MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::MultiwayAligningTransform Class Reference

#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
MultiwayAligningTransformoperator= (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

Detailed Description

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

Constructor & Destructor Documentation

◆ MultiwayAligningTransform() [1/3]

MR::MultiwayAligningTransform::MultiwayAligningTransform ( )

◆ MultiwayAligningTransform() [2/3]

MR::MultiwayAligningTransform::MultiwayAligningTransform ( int numObjs)
explicit

initializes internal data to start registering given number of objects

◆ MultiwayAligningTransform() [3/3]

MR::MultiwayAligningTransform::MultiwayAligningTransform ( MultiwayAligningTransform && )
noexcept

◆ ~MultiwayAligningTransform()

MR::MultiwayAligningTransform::~MultiwayAligningTransform ( )

Member Function Documentation

◆ add() [1/5]

void MR::MultiwayAligningTransform::add ( const MultiwayAligningTransform & r)

appends links accumulated in (r) into this

◆ add() [2/5]

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)

◆ add() [3/5]

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

◆ add() [4/5]

void MR::MultiwayAligningTransform::add ( int objA,
const Vector3f & pA,
int objB,
const Vector3f & pB,
const Vector3f & n,
float w = 1 )
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)

◆ add() [5/5]

void MR::MultiwayAligningTransform::add ( int objA,
const Vector3f & pA,
int objB,
const Vector3f & pB,
float w = 1 )
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

◆ operator=()

MultiwayAligningTransform & MR::MultiwayAligningTransform::operator= ( MultiwayAligningTransform && )
noexcept

◆ reset()

void MR::MultiwayAligningTransform::reset ( int numObjs)

reinitializes internal data to start registering given number of objects

◆ solve() [1/2]

std::vector< RigidXf3d > MR::MultiwayAligningTransform::solve ( ) const
inlinenodiscard

◆ solve() [2/2]

std::vector< RigidXf3d > MR::MultiwayAligningTransform::solve ( const Stabilizer & stab) const
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)


The documentation for this class was generated from the following file: