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

#include <MRFreeFormDeformer.h>

Public Member Functions

MRMESH_API FreeFormBestFit (const Box3d &box, const Vector3i &resolution=Vector3i::diagonal(2))
 initialize the class, compute cached values and reserve space for matrices
 
MRMESH_API void addPair (const Vector3d &src, const Vector3d &tgt, double w=1.0)
 add pair of source and target point to accumulator
 
void addPair (const Vector3f &src, const Vector3f &tgt, float w=1.0f)
 
MRMESH_API void addOther (const FreeFormBestFit &other)
 adds other instance of FreeFormBestFit if it has same ref grid
 
void setStabilizer (double stabilizer)
 
double getStabilizer () const
 
MRMESH_API std::vector< Vector3f > findBestDeformationReferenceGrid ()
 finds best grid points positions to align source points to target points
 

Detailed Description

Class to accumulate source and target points for free form alignment Calculates best Free Form transform to fit given source->target deformation origin ref grid as box corners ( resolution parameter specifies how to divide box )

Constructor & Destructor Documentation

◆ FreeFormBestFit()

MRMESH_API MR::FreeFormBestFit::FreeFormBestFit ( const Box3d & box,
const Vector3i & resolution = Vector3i::diagonal(2) )

initialize the class, compute cached values and reserve space for matrices

Member Function Documentation

◆ addOther()

MRMESH_API void MR::FreeFormBestFit::addOther ( const FreeFormBestFit & other)

adds other instance of FreeFormBestFit if it has same ref grid

◆ addPair() [1/2]

MRMESH_API void MR::FreeFormBestFit::addPair ( const Vector3d & src,
const Vector3d & tgt,
double w = 1.0 )

add pair of source and target point to accumulator

◆ addPair() [2/2]

void MR::FreeFormBestFit::addPair ( const Vector3f & src,
const Vector3f & tgt,
float w = 1.0f )
inline

◆ findBestDeformationReferenceGrid()

MRMESH_API std::vector< Vector3f > MR::FreeFormBestFit::findBestDeformationReferenceGrid ( )
nodiscard

finds best grid points positions to align source points to target points

◆ getStabilizer()

double MR::FreeFormBestFit::getStabilizer ( ) const
inline

◆ setStabilizer()

void MR::FreeFormBestFit::setStabilizer ( double stabilizer)
inline

stabilizer adds additional weights to keep result grid closer to origins recommended values (0;1], but it can be higher


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