|
MRMESH_API void | add (const Vector3d &p1, const Vector3d &p2, const Vector3d &normal2, double w=1) |
| Add a pair of corresponding points and the normal of the tangent plane at the second point.
|
|
void | add (const Vector3f &p1, const Vector3f &p2, const Vector3f &normal2, float w=1) |
| Add a pair of corresponding points and the normal of the tangent plane at the second point.
|
|
MRMESH_API void | prepare () |
| this method must be called after add() and before constant find...()/calculate...() to make the matrix symmetric
|
|
void | clear () |
| Clear points and normals data.
|
|
AffineXf3d | findBestRigidXf () const |
|
AffineXf3d | findBestRigidScaleXf () const |
| this version searches for best rigid body transformation with uniform scaling
|
|
AffineXf3d | findBestRigidXfFixedRotationAxis (const Vector3d &axis) const |
| this version searches for best transformation where rotation is allowed only around given axis and with arbitrary translation
|
|
AffineXf3d | findBestRigidXfOrthogonalRotationAxis (const Vector3d &ort) const |
| this version searches for best transformation where rotation is allowed only around axes orthogonal to given one
|
|
MRMESH_API Vector3d | findBestTranslation (Vector3d rotAngles={}, double scale=1) const |
| this version searches for best translational part of affine transformation with given linear part
|
|
MRMESH_API RigidScaleXf3d | calculateAmendment () const |
| Compute transformation relative to given approximation and return it as angles and shift (scale = 1)
|
|
MRMESH_API RigidScaleXf3d | calculateAmendmentWithScale () const |
| Compute transformation relative to given approximation and return it as scale, angles and shift.
|
|
MRMESH_API RigidScaleXf3d | calculateFixedAxisAmendment (const Vector3d &axis) const |
| this version searches for best transformation where rotation is allowed only around given axis and with arbitrary translation
|
|
MRMESH_API RigidScaleXf3d | calculateOrthogonalAxisAmendment (const Vector3d &ort) const |
| this version searches for best transformation where rotation is allowed only around axes orthogonal to given one
|
|
This class and its main method can be used to solve the problem of 3D shape alignment. This algorithm uses a point-to-plane error metric in which the object of minimization is the sum of the squared distance between a point and the tangent plane at its correspondence point. To use this technique it's need to have small rotation angles. So there is an approximate solution. The result of this algorithm is the transformation of first points (p1) which aligns it to the second ones (p2).