MeshLib Python Docs
Loading...
Searching...
No Matches
meshlib.mrmeshpy.MultiwayAligningTransform Class Reference

Classes

class  Stabilizer
 

Public Member Functions

None __init__ (self, int numObjs=0)
 
None add (self, int objA, Vector3d pA, int objB, Vector3d pB, float w=1)
 
None add (self, int objA, Vector3f pA, int objB, Vector3f pB, float w=1)
 
None add (self, int objA, Vector3d pA, int objB, Vector3d pB, Vector3d n, float w=1)
 
None add (self, int objA, Vector3f pA, int objB, Vector3f pB, Vector3f n, float w=1)
 
None add (self, MultiwayAligningTransform r)
 
None reset (self, int numObjs)
 
std_vector_RigidXf3_double solve (self, MultiwayAligningTransform.Stabilizer stab)
 
std_vector_RigidXf3_double solve (self)
 

Detailed Description

Generated from:  MR::MultiwayAligningTransform

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

◆ __init__()

None meshlib.mrmeshpy.MultiwayAligningTransform.__init__ ( self,
int numObjs = 0 )
initializes internal data to start registering given number of objects

Member Function Documentation

◆ add() [1/5]

None meshlib.mrmeshpy.MultiwayAligningTransform.add ( self,
int objA,
Vector3d pA,
int objB,
Vector3d pB,
float 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() [2/5]

None meshlib.mrmeshpy.MultiwayAligningTransform.add ( self,
int objA,
Vector3d pA,
int objB,
Vector3d pB,
Vector3d n,
float 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]

None meshlib.mrmeshpy.MultiwayAligningTransform.add ( self,
int objA,
Vector3f pA,
int objB,
Vector3f pB,
float 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]

None meshlib.mrmeshpy.MultiwayAligningTransform.add ( self,
int objA,
Vector3f pA,
int objB,
Vector3f pB,
Vector3f n,
float 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() [5/5]

None meshlib.mrmeshpy.MultiwayAligningTransform.add ( self,
MultiwayAligningTransform r )
appends links accumulated in (r) into this

◆ reset()

None meshlib.mrmeshpy.MultiwayAligningTransform.reset ( self,
int numObjs )
reinitializes internal data to start registering given number of objects

◆ solve() [1/2]

std_vector_RigidXf3_double meshlib.mrmeshpy.MultiwayAligningTransform.solve ( self)

◆ solve() [2/2]

std_vector_RigidXf3_double meshlib.mrmeshpy.MultiwayAligningTransform.solve ( self,
MultiwayAligningTransform.Stabilizer stab )
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: