#include <MRMesh/MRMultiwayAligningTransform.h>
Classes | |
| struct | Stabilizer |
Public Member Functions | |
| MultiwayAligningTransform () | |
| MultiwayAligningTransform (int numObjs) | |
| initializes internal data to start registering given number of objects | |
| MultiwayAligningTransform (MultiwayAligningTransform &&) noexcept | |
| MultiwayAligningTransform & | operator= (MultiwayAligningTransform &&) noexcept |
| ~MultiwayAligningTransform () | |
| void | reset (int numObjs) |
| reinitializes internal data to start registering given number of objects | |
| void | add (int objA, const Vector3d &pA, int objB, const Vector3d &pB, double w=1) |
| void | add (int objA, const Vector3f &pA, int objB, const Vector3f &pB, float w=1) |
| void | add (int objA, const Vector3d &pA, int objB, const Vector3d &pB, const Vector3d &n, double w=1) |
| void | add (int objA, const Vector3f &pA, int objB, const Vector3f &pB, const Vector3f &n, float w=1) |
| void | add (const MultiwayAligningTransform &r) |
| appends links accumulated in (r) into this | |
| std::vector< RigidXf3d > | solve (const Stabilizer &stab) const |
| std::vector< RigidXf3d > | solve () const |
This class can be used to solve the problem of multiple 3D objects alignment, by first collecting weighted links between pairs of points from different objects, and then solving for transformations minimizing weighted average of link penalties
| MR::MultiwayAligningTransform::MultiwayAligningTransform | ( | ) |
|
explicit |
initializes internal data to start registering given number of objects
|
noexcept |
| MR::MultiwayAligningTransform::~MultiwayAligningTransform | ( | ) |
| void MR::MultiwayAligningTransform::add | ( | const MultiwayAligningTransform & | r | ) |
appends links accumulated in (r) into this
| void MR::MultiwayAligningTransform::add | ( | int | objA, |
| const Vector3d & | pA, | ||
| int | objB, | ||
| const Vector3d & | pB, | ||
| const Vector3d & | n, | ||
| double | w = 1 ) |
appends a 1D link into consideration: one point (pA) from (objA), and the other point (pB) from (objB) with link penalty equal to weight (w) times squared distance between their projections on given direction (n); for a point on last fixed object, it is equivalent to point-to-plane link with the plane through that fixed point with normal (n)
| void MR::MultiwayAligningTransform::add | ( | int | objA, |
| const Vector3d & | pA, | ||
| int | objB, | ||
| const Vector3d & | pB, | ||
| double | w = 1 ) |
appends a 3D link into consideration: one point (pA) from (objA), and the other point (pB) from (objB) with link penalty equal to weight (w) times squared distance between two points
|
inline |
appends a 1D link into consideration: one point (pA) from (objA), and the other point (pB) from (objB) with link penalty equal to weight (w) times squared distance between their projections on given direction (n); for a point on last fixed object, it is equivalent to point-to-plane link with the plane through that fixed point with normal (n)
|
inline |
appends a 3D link into consideration: one point (pA) from (objA), and the other point (pB) from (objB) with link penalty equal to weight (w) times squared distance between two points
|
noexcept |
| void MR::MultiwayAligningTransform::reset | ( | int | numObjs | ) |
reinitializes internal data to start registering given number of objects
|
inlinenodiscard |
|
nodiscard |
finds the solution consisting of all objects transformations (numObj), that minimizes the summed weighted squared distance among accumulated links; the transform of the last object is always identity (it is fixed)