MeshLib Documentation
Loading...
Searching...
No Matches
MR::MultiwayAligningTransform Class Reference

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

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/2]

MRMESH_API MR::MultiwayAligningTransform::MultiwayAligningTransform ( int numObjs = 0)
explicit

initializes internal data to start registering given number of objects

◆ MultiwayAligningTransform() [2/2]

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

◆ ~MultiwayAligningTransform()

MRMESH_API MR::MultiwayAligningTransform::~MultiwayAligningTransform ( )

Member Function Documentation

◆ add() [1/5]

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

appends links accumulated in (r) into this

◆ add() [2/5]

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)

◆ add() [3/5]

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

◆ 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=()

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

◆ reset()

MRMESH_API 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]

MRMESH_API 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: