MeshLib C Docs
Loading...
Searching...
No Matches
MRFreeFormDeformer.h File Reference
#include <MRCMesh/MRVector3.h>
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stddef.h>

Go to the source code of this file.

Typedefs

typedef struct MR_AffineXf3f MR_AffineXf3f
 
typedef struct MR_Box3d MR_Box3d
 
typedef struct MR_Box3f MR_Box3f
 
typedef struct MR_Mesh MR_Mesh
 
typedef struct MR_Vector3d MR_Vector3d
 
typedef struct MR_VertBitSet MR_VertBitSet
 
typedef struct MR_VertCoords MR_VertCoords
 
typedef struct MR_std_vector_MR_Vector3f MR_std_vector_MR_Vector3f
 
typedef struct MR_FreeFormDeformer MR_FreeFormDeformer
 Class for deforming mesh using Bernstein interpolation.
 
typedef struct MR_FreeFormBestFit MR_FreeFormBestFit
 

Functions

MRC_API MR_FreeFormDeformerMR_FreeFormDeformer_ConstructFromAnother (MR_PassBy _other_pass_by, MR_FreeFormDeformer *_other)
 
MRC_API const MR_FreeFormDeformerMR_FreeFormDeformer_OffsetPtr (const MR_FreeFormDeformer *ptr, ptrdiff_t i)
 
MRC_API MR_FreeFormDeformerMR_FreeFormDeformer_OffsetMutablePtr (MR_FreeFormDeformer *ptr, ptrdiff_t i)
 
MRC_API MR_FreeFormDeformerMR_FreeFormDeformer_Construct_MR_VertCoords (MR_VertCoords *coords, const MR_VertBitSet *valid)
 
MRC_API MR_FreeFormDeformerMR_FreeFormDeformer_Construct_MR_Mesh (MR_Mesh *mesh, const MR_VertBitSet *region)
 
MRC_API void MR_FreeFormDeformer_Destroy (const MR_FreeFormDeformer *_this)
 Destroys a heap-allocated instance of MR_FreeFormDeformer. Does nothing if the pointer is null.
 
MRC_API void MR_FreeFormDeformer_DestroyArray (const MR_FreeFormDeformer *_this)
 Destroys a heap-allocated array of MR_FreeFormDeformer. Does nothing if the pointer is null.
 
MRC_API void MR_FreeFormDeformer_init (MR_FreeFormDeformer *_this, const MR_Vector3i *resolution, const MR_Box3f *initialBox)
 
MRC_API void MR_FreeFormDeformer_setRefGridPointPosition (MR_FreeFormDeformer *_this, const MR_Vector3i *coordOfPointInGrid, const MR_Vector3f *newPos)
 
MRC_API const MR_Vector3fMR_FreeFormDeformer_getRefGridPointPosition (const MR_FreeFormDeformer *_this, const MR_Vector3i *coordOfPointInGrid)
 
MRC_API void MR_FreeFormDeformer_apply (const MR_FreeFormDeformer *_this)
 
MRC_API MR_Vector3f MR_FreeFormDeformer_applySinglePoint (const MR_FreeFormDeformer *_this, const MR_Vector3f *point)
 
MRC_API int MR_FreeFormDeformer_getIndex (const MR_FreeFormDeformer *_this, const MR_Vector3i *coordOfPointInGrid)
 
MRC_API MR_Vector3i MR_FreeFormDeformer_getCoord (const MR_FreeFormDeformer *_this, int index)
 
MRC_API const MR_std_vector_MR_Vector3fMR_FreeFormDeformer_getAllRefGridPositions (const MR_FreeFormDeformer *_this)
 
MRC_API void MR_FreeFormDeformer_setAllRefGridPositions (MR_FreeFormDeformer *_this, const MR_std_vector_MR_Vector3f *refPoints)
 
MRC_API const MR_Vector3iMR_FreeFormDeformer_getResolution (const MR_FreeFormDeformer *_this)
 
MRC_API MR_FreeFormBestFitMR_FreeFormBestFit_ConstructFromAnother (MR_PassBy _other_pass_by, MR_FreeFormBestFit *_other)
 
MRC_API const MR_FreeFormBestFitMR_FreeFormBestFit_OffsetPtr (const MR_FreeFormBestFit *ptr, ptrdiff_t i)
 
MRC_API MR_FreeFormBestFitMR_FreeFormBestFit_OffsetMutablePtr (MR_FreeFormBestFit *ptr, ptrdiff_t i)
 
MRC_API MR_FreeFormBestFitMR_FreeFormBestFit_Construct (const MR_Box3d *box, const MR_Vector3i *resolution)
 
MRC_API void MR_FreeFormBestFit_Destroy (const MR_FreeFormBestFit *_this)
 Destroys a heap-allocated instance of MR_FreeFormBestFit. Does nothing if the pointer is null.
 
MRC_API void MR_FreeFormBestFit_DestroyArray (const MR_FreeFormBestFit *_this)
 Destroys a heap-allocated array of MR_FreeFormBestFit. Does nothing if the pointer is null.
 
MRC_API MR_FreeFormBestFitMR_FreeFormBestFit_AssignFromAnother (MR_FreeFormBestFit *_this, MR_PassBy _other_pass_by, MR_FreeFormBestFit *_other)
 
MRC_API void MR_FreeFormBestFit_addPair_MR_Vector3d (MR_FreeFormBestFit *_this, const MR_Vector3d *src, const MR_Vector3d *tgt, const double *w)
 
MRC_API void MR_FreeFormBestFit_addPair_MR_Vector3f (MR_FreeFormBestFit *_this, const MR_Vector3f *src, const MR_Vector3f *tgt, const float *w)
 
MRC_API void MR_FreeFormBestFit_addOther (MR_FreeFormBestFit *_this, const MR_FreeFormBestFit *other)
 
MRC_API void MR_FreeFormBestFit_setStabilizer (MR_FreeFormBestFit *_this, double stabilizer)
 
MRC_API double MR_FreeFormBestFit_getStabilizer (const MR_FreeFormBestFit *_this)
 
MRC_API MR_std_vector_MR_Vector3fMR_FreeFormBestFit_findBestDeformationReferenceGrid (MR_FreeFormBestFit *_this)
 
MRC_API MR_std_vector_MR_Vector3fMR_makeFreeFormOriginGrid (const MR_Box3f *box, const MR_Vector3i *resolution)
 
MRC_API MR_std_vector_MR_Vector3fMR_findBestFreeformDeformation (const MR_Box3f *box, const MR_std_vector_MR_Vector3f *source, const MR_std_vector_MR_Vector3f *target, const MR_Vector3i *resolution, const MR_AffineXf3f *samplesToBox)
 

Typedef Documentation

◆ MR_AffineXf3f

typedef struct MR_AffineXf3f MR_AffineXf3f

◆ MR_Box3d

typedef struct MR_Box3d MR_Box3d

◆ MR_Box3f

typedef struct MR_Box3f MR_Box3f

◆ MR_FreeFormBestFit

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 ) Generated from class MR::FreeFormBestFit. Supported MR_PassBy modes: MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_FreeFormDeformer

Class for deforming mesh using Bernstein interpolation.

Generated from class MR::FreeFormDeformer. Supported MR_PassBy modes: MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_Mesh

typedef struct MR_Mesh MR_Mesh

◆ MR_std_vector_MR_Vector3f

◆ MR_Vector3d

typedef struct MR_Vector3d MR_Vector3d

◆ MR_VertBitSet

typedef struct MR_VertBitSet MR_VertBitSet

◆ MR_VertCoords

typedef struct MR_VertCoords MR_VertCoords

Function Documentation

◆ MR_findBestFreeformDeformation()

MRC_API MR_std_vector_MR_Vector3f * MR_findBestFreeformDeformation ( const MR_Box3f * box,
const MR_std_vector_MR_Vector3f * source,
const MR_std_vector_MR_Vector3f * target,
const MR_Vector3i * resolution,
const MR_AffineXf3f * samplesToBox )

Generated from function MR::findBestFreeformDeformation. Parameter box can not be null. It is a single object. Parameter source can not be null. It is a single object. Parameter target can not be null. It is a single object. Parameter resolution is a single object. Parameter resolution has a default argument: Vector3i::diagonal(2), pass a null pointer to use it. Parameter samplesToBox defaults to a null pointer in C++. Never returns null. Returns an instance allocated on the heap! Must call MR_std_vector_MR_Vector3f_Destroy() to free it when you're done using it.

◆ MR_FreeFormBestFit_addOther()

MRC_API void MR_FreeFormBestFit_addOther ( MR_FreeFormBestFit * _this,
const MR_FreeFormBestFit * other )

adds other instance of FreeFormBestFit if it has same ref grid Generated from method MR::FreeFormBestFit::addOther. Parameter _this can not be null. It is a single object. Parameter other can not be null. It is a single object.

◆ MR_FreeFormBestFit_addPair_MR_Vector3d()

MRC_API void MR_FreeFormBestFit_addPair_MR_Vector3d ( MR_FreeFormBestFit * _this,
const MR_Vector3d * src,
const MR_Vector3d * tgt,
const double * w )

add pair of source and target point to accumulator Generated from method MR::FreeFormBestFit::addPair. Parameter _this can not be null. It is a single object. Parameter src can not be null. It is a single object. Parameter tgt can not be null. It is a single object. Parameter w has a default argument: 1.0, pass a null pointer to use it.

◆ MR_FreeFormBestFit_addPair_MR_Vector3f()

MRC_API void MR_FreeFormBestFit_addPair_MR_Vector3f ( MR_FreeFormBestFit * _this,
const MR_Vector3f * src,
const MR_Vector3f * tgt,
const float * w )

Generated from method MR::FreeFormBestFit::addPair. Parameter _this can not be null. It is a single object. Parameter src can not be null. It is a single object. Parameter tgt can not be null. It is a single object. Parameter w has a default argument: 1.0f, pass a null pointer to use it.

◆ MR_FreeFormBestFit_AssignFromAnother()

MRC_API MR_FreeFormBestFit * MR_FreeFormBestFit_AssignFromAnother ( MR_FreeFormBestFit * _this,
MR_PassBy _other_pass_by,
MR_FreeFormBestFit * _other )

Generated from method MR::FreeFormBestFit::operator=. Parameter _this can not be null. It is a single object. The reference to things referred to by the parameter _other (if any) might be preserved in this object. The returned pointer will never be null. It is non-owning, do NOT destroy it. When this function is called, this object will drop any object references it had previously.

◆ MR_FreeFormBestFit_Construct()

MRC_API MR_FreeFormBestFit * MR_FreeFormBestFit_Construct ( const MR_Box3d * box,
const MR_Vector3i * resolution )

initialize the class, compute cached values and reserve space for matrices Generated from constructor MR::FreeFormBestFit::FreeFormBestFit. Parameter box can not be null. It is a single object. The reference to the parameter box might be preserved in the constructed object. Parameter resolution is a single object. Parameter resolution has a default argument: Vector3i::diagonal(2), pass a null pointer to use it. The reference to the parameter resolution might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_FreeFormBestFit_Destroy() to free it when you're done using it.

◆ MR_FreeFormBestFit_ConstructFromAnother()

MRC_API MR_FreeFormBestFit * MR_FreeFormBestFit_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_FreeFormBestFit * _other )

Generated from constructor MR::FreeFormBestFit::FreeFormBestFit. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_FreeFormBestFit_Destroy() to free it when you're done using it.

◆ MR_FreeFormBestFit_Destroy()

MRC_API void MR_FreeFormBestFit_Destroy ( const MR_FreeFormBestFit * _this)

Destroys a heap-allocated instance of MR_FreeFormBestFit. Does nothing if the pointer is null.

◆ MR_FreeFormBestFit_DestroyArray()

MRC_API void MR_FreeFormBestFit_DestroyArray ( const MR_FreeFormBestFit * _this)

Destroys a heap-allocated array of MR_FreeFormBestFit. Does nothing if the pointer is null.

◆ MR_FreeFormBestFit_findBestDeformationReferenceGrid()

MRC_API MR_std_vector_MR_Vector3f * MR_FreeFormBestFit_findBestDeformationReferenceGrid ( MR_FreeFormBestFit * _this)

finds best grid points positions to align source points to target points Generated from method MR::FreeFormBestFit::findBestDeformationReferenceGrid. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_vector_MR_Vector3f_Destroy() to free it when you're done using it.

◆ MR_FreeFormBestFit_getStabilizer()

MRC_API double MR_FreeFormBestFit_getStabilizer ( const MR_FreeFormBestFit * _this)

Generated from method MR::FreeFormBestFit::getStabilizer. Parameter _this can not be null. It is a single object.

◆ MR_FreeFormBestFit_OffsetMutablePtr()

MRC_API MR_FreeFormBestFit * MR_FreeFormBestFit_OffsetMutablePtr ( MR_FreeFormBestFit * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_FreeFormBestFit_OffsetPtr()

MRC_API const MR_FreeFormBestFit * MR_FreeFormBestFit_OffsetPtr ( const MR_FreeFormBestFit * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_FreeFormBestFit_setStabilizer()

MRC_API void MR_FreeFormBestFit_setStabilizer ( MR_FreeFormBestFit * _this,
double stabilizer )

stabilizer adds additional weights to keep result grid closer to origins recommended values (0;1], but it can be higher Generated from method MR::FreeFormBestFit::setStabilizer. Parameter _this can not be null. It is a single object.

◆ MR_FreeFormDeformer_apply()

MRC_API void MR_FreeFormDeformer_apply ( const MR_FreeFormDeformer * _this)

Generated from method MR::FreeFormDeformer::apply. Parameter _this can not be null. It is a single object.

◆ MR_FreeFormDeformer_applySinglePoint()

MRC_API MR_Vector3f MR_FreeFormDeformer_applySinglePoint ( const MR_FreeFormDeformer * _this,
const MR_Vector3f * point )

Generated from method MR::FreeFormDeformer::applySinglePoint. Parameter _this can not be null. It is a single object. Parameter point can not be null. It is a single object.

◆ MR_FreeFormDeformer_Construct_MR_Mesh()

MRC_API MR_FreeFormDeformer * MR_FreeFormDeformer_Construct_MR_Mesh ( MR_Mesh * mesh,
const MR_VertBitSet * region )

Generated from constructor MR::FreeFormDeformer::FreeFormDeformer. Parameter mesh can not be null. It is a single object. The reference to the parameter mesh might be preserved in the constructed object. Parameter region defaults to a null pointer in C++. The reference to the parameter region might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_FreeFormDeformer_Destroy() to free it when you're done using it.

◆ MR_FreeFormDeformer_Construct_MR_VertCoords()

MRC_API MR_FreeFormDeformer * MR_FreeFormDeformer_Construct_MR_VertCoords ( MR_VertCoords * coords,
const MR_VertBitSet * valid )

Generated from constructor MR::FreeFormDeformer::FreeFormDeformer. Parameter coords can not be null. It is a single object. The reference to the parameter coords might be preserved in the constructed object. Parameter valid can not be null. It is a single object. The reference to the parameter valid might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_FreeFormDeformer_Destroy() to free it when you're done using it.

◆ MR_FreeFormDeformer_ConstructFromAnother()

MRC_API MR_FreeFormDeformer * MR_FreeFormDeformer_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_FreeFormDeformer * _other )

Generated from constructor MR::FreeFormDeformer::FreeFormDeformer. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_FreeFormDeformer_Destroy() to free it when you're done using it.

◆ MR_FreeFormDeformer_Destroy()

MRC_API void MR_FreeFormDeformer_Destroy ( const MR_FreeFormDeformer * _this)

Destroys a heap-allocated instance of MR_FreeFormDeformer. Does nothing if the pointer is null.

◆ MR_FreeFormDeformer_DestroyArray()

MRC_API void MR_FreeFormDeformer_DestroyArray ( const MR_FreeFormDeformer * _this)

Destroys a heap-allocated array of MR_FreeFormDeformer. Does nothing if the pointer is null.

◆ MR_FreeFormDeformer_getAllRefGridPositions()

MRC_API const MR_std_vector_MR_Vector3f * MR_FreeFormDeformer_getAllRefGridPositions ( const MR_FreeFormDeformer * _this)

Generated from method MR::FreeFormDeformer::getAllRefGridPositions. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_FreeFormDeformer_getCoord()

MRC_API MR_Vector3i MR_FreeFormDeformer_getCoord ( const MR_FreeFormDeformer * _this,
int index )

Generated from method MR::FreeFormDeformer::getCoord. Parameter _this can not be null. It is a single object.

◆ MR_FreeFormDeformer_getIndex()

MRC_API int MR_FreeFormDeformer_getIndex ( const MR_FreeFormDeformer * _this,
const MR_Vector3i * coordOfPointInGrid )

Generated from method MR::FreeFormDeformer::getIndex. Parameter _this can not be null. It is a single object. Parameter coordOfPointInGrid can not be null. It is a single object.

◆ MR_FreeFormDeformer_getRefGridPointPosition()

MRC_API const MR_Vector3f * MR_FreeFormDeformer_getRefGridPointPosition ( const MR_FreeFormDeformer * _this,
const MR_Vector3i * coordOfPointInGrid )

Generated from method MR::FreeFormDeformer::getRefGridPointPosition. Parameter _this can not be null. It is a single object. Parameter coordOfPointInGrid can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_FreeFormDeformer_getResolution()

MRC_API const MR_Vector3i * MR_FreeFormDeformer_getResolution ( const MR_FreeFormDeformer * _this)

Generated from method MR::FreeFormDeformer::getResolution. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_FreeFormDeformer_init()

MRC_API void MR_FreeFormDeformer_init ( MR_FreeFormDeformer * _this,
const MR_Vector3i * resolution,
const MR_Box3f * initialBox )

Generated from method MR::FreeFormDeformer::init. Parameter _this can not be null. It is a single object. Parameter resolution is a single object. Parameter resolution has a default argument: Vector3i::diagonal(2), pass a null pointer to use it. Parameter initialBox is a single object. Parameter initialBox has a default argument: MR::Box3f(), pass a null pointer to use it.

◆ MR_FreeFormDeformer_OffsetMutablePtr()

MRC_API MR_FreeFormDeformer * MR_FreeFormDeformer_OffsetMutablePtr ( MR_FreeFormDeformer * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_FreeFormDeformer_OffsetPtr()

MRC_API const MR_FreeFormDeformer * MR_FreeFormDeformer_OffsetPtr ( const MR_FreeFormDeformer * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_FreeFormDeformer_setAllRefGridPositions()

MRC_API void MR_FreeFormDeformer_setAllRefGridPositions ( MR_FreeFormDeformer * _this,
const MR_std_vector_MR_Vector3f * refPoints )

Generated from method MR::FreeFormDeformer::setAllRefGridPositions. Parameter _this can not be null. It is a single object. Parameter refPoints can not be null. It is a single object.

◆ MR_FreeFormDeformer_setRefGridPointPosition()

MRC_API void MR_FreeFormDeformer_setRefGridPointPosition ( MR_FreeFormDeformer * _this,
const MR_Vector3i * coordOfPointInGrid,
const MR_Vector3f * newPos )

Generated from method MR::FreeFormDeformer::setRefGridPointPosition. Parameter _this can not be null. It is a single object. Parameter coordOfPointInGrid can not be null. It is a single object. Parameter newPos can not be null. It is a single object.

◆ MR_makeFreeFormOriginGrid()

MRC_API MR_std_vector_MR_Vector3f * MR_makeFreeFormOriginGrid ( const MR_Box3f * box,
const MR_Vector3i * resolution )

Returns positions of grid points in given box with given resolution Generated from function MR::makeFreeFormOriginGrid. Parameter box can not be null. It is a single object. Parameter resolution can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_vector_MR_Vector3f_Destroy() to free it when you're done using it.