#include <MRPointToPointAligningTransform.h>
Public Member Functions | |
MRMESH_API void | add (const Vector3d &p1, const Vector3d &p2, double w=1) |
Add one pair of points in the set. | |
void | add (const Vector3f &p1, const Vector3f &p2, float w=1) |
Add one pair of points in the set. | |
MRMESH_API void | add (const PointToPointAligningTransform &other) |
Add another two sets of points. | |
void | clear () |
Clear sets. | |
Vector3d | centroid1 () const |
returns weighted centroid of points p1 accumulated so far | |
Vector3d | centroid2 () const |
returns weighted centroid of points p2 accumulated so far | |
double | totalWeight () const |
returns summed weight of points accumulated so far | |
MRMESH_API AffineXf3d | findBestRigidXf () const |
MRMESH_API AffineXf3d | findBestRigidScaleXf () const |
this version searches for best rigid body transformation with uniform scaling | |
MRMESH_API AffineXf3d | findBestRigidXfFixedRotationAxis (const Vector3d &axis) const |
this version searches for best transformation where rotation is allowed only around given axis and with arbitrary translation | |
MRMESH_API 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 () const |
Simplified solution for translational part only. | |
This class and its main method can be used to solve the problem well-known as the absolute orientation problem. It means computing the transformation that aligns two sets of points for which correspondence is known.
MRMESH_API void MR::PointToPointAligningTransform::add | ( | const PointToPointAligningTransform & | other | ) |
Add another two sets of points.
MRMESH_API void MR::PointToPointAligningTransform::add | ( | const Vector3d & | p1, |
const Vector3d & | p2, | ||
double | w = 1 ) |
Add one pair of points in the set.
|
inline |
Add one pair of points in the set.
|
inlinenodiscard |
returns weighted centroid of points p1 accumulated so far
|
inlinenodiscard |
returns weighted centroid of points p2 accumulated so far
|
inline |
Clear sets.
|
nodiscard |
this version searches for best rigid body transformation with uniform scaling
|
nodiscard |
Compute transformation as the solution to a least squares formulation of the problem: xf( p1_i ) = p2_i this version searches for best rigid body transformation
|
nodiscard |
this version searches for best transformation where rotation is allowed only around given axis and with arbitrary translation
|
nodiscard |
this version searches for best transformation where rotation is allowed only around axes orthogonal to given one
|
nodiscard |
Simplified solution for translational part only.
|
inlinenodiscard |
returns summed weight of points accumulated so far