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

Method getBasicXf

source/MRMesh/MRBestFit.cpp:57–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57AffineXf3d PointAccumulator::getBasicXf() const
58{
59 Vector3d centroid;
60 Matrix3d eigenvectors;
61 Vector3d eigenvalues;
62 [[maybe_unused]] bool ok = getCenteredCovarianceEigen( centroid, eigenvectors, eigenvalues );
63 assert( ok );
64
65 AffineXf3d res;
66 res.b = centroid;
67 if ( mixed( eigenvectors.x, eigenvectors.y, eigenvectors.z ) < 0.0f )
68 eigenvectors.z = -eigenvectors.z;
69 res.A = eigenvectors.transposed();
70 return res;
71}
72
73std::array<AffineXf3d, 4> PointAccumulator::get4BasicXfs() const
74{

Callers 4

autoSelectFloatXfMethod · 0.80
init_Method · 0.80
relaxApproxFunction · 0.80
relaxApproxFunction · 0.80

Calls 2

mixedFunction · 0.85
transposedMethod · 0.45

Tested by

no test coverage detected