#include <MRMultiwayAligningTransform.h>
Classes | |
struct | Stabilizer |
Public Member Functions | |
MRMESH_API | MultiwayAligningTransform (int numObjs=0) |
initializes internal data to start registering given number of objects | |
MRMESH_API | MultiwayAligningTransform (MultiwayAligningTransform &&) noexcept |
MRMESH_API MultiwayAligningTransform & | operator= (MultiwayAligningTransform &&) noexcept |
MRMESH_API | ~MultiwayAligningTransform () |
MRMESH_API void | reset (int numObjs) |
reinitializes internal data to start registering given number of objects | |
MRMESH_API 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) |
MRMESH_API 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) |
MRMESH_API void | add (const MultiwayAligningTransform &r) |
appends links accumulated in (r) into this | |
MRMESH_API 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
|
explicit |
initializes internal data to start registering given number of objects
|
noexcept |
MRMESH_API MR::MultiwayAligningTransform::~MultiwayAligningTransform | ( | ) |
MRMESH_API void MR::MultiwayAligningTransform::add | ( | const MultiwayAligningTransform & | r | ) |
appends links accumulated in (r) into this
MRMESH_API 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)
MRMESH_API 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 |
MRMESH_API 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)