MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / getUniformScale

Function getUniformScale

source/MRMesh/MRFeatures.cpp:19–24  ·  view source on GitHub ↗

Extracts a uniform scale factor from a matrix. If the scaling isn't actually uniform, returns some unspecified average scaling, which is hopefully better than just taking an arbitrary axis.

Source from the content-addressed store, hash-verified

17// Extracts a uniform scale factor from a matrix.
18// If the scaling isn't actually uniform, returns some unspecified average scaling, which is hopefully better than just taking an arbitrary axis.
19[[nodiscard]] static float getUniformScale( const Matrix3f& m )
20{
21 Matrix3f r, s;
22 decomposeMatrix3( m, r, s );
23 return ( s.x.x + s.y.y + s.z.z ) / 3;
24}
25
26Primitives::ConeSegment Primitives::Plane::intersectWithPlane( const Plane& other ) const
27{

Callers 1

transformPrimitiveFunction · 0.85

Calls 1

decomposeMatrix3Function · 0.85

Tested by

no test coverage detected