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

Go to the source code of this file.

Typedefs

typedef struct MR_Mesh MR_Mesh
 
typedef struct MR_MeshTriPoint MR_MeshTriPoint
 
typedef struct MR_expected_MR_Mesh_std_string MR_expected_MR_Mesh_std_string
 
typedef struct MR_std_vector_std_vector_MR_Vector2f MR_std_vector_std_vector_MR_Vector2f
 
typedef struct MR_ContoursMeshAlignParams MR_ContoursMeshAlignParams
 

Functions

MRC_API const MR_MeshTriPointMR_ContoursMeshAlignParams_Get_meshPoint (const MR_ContoursMeshAlignParams *_this)
 
MRC_API void MR_ContoursMeshAlignParams_Set_meshPoint (MR_ContoursMeshAlignParams *_this, const MR_MeshTriPoint *value)
 
MRC_API MR_MeshTriPointMR_ContoursMeshAlignParams_GetMutable_meshPoint (MR_ContoursMeshAlignParams *_this)
 
MRC_API const MR_Vector2fMR_ContoursMeshAlignParams_Get_pivotPoint (const MR_ContoursMeshAlignParams *_this)
 
MRC_API void MR_ContoursMeshAlignParams_Set_pivotPoint (MR_ContoursMeshAlignParams *_this, MR_Vector2f value)
 
MRC_API MR_Vector2fMR_ContoursMeshAlignParams_GetMutable_pivotPoint (MR_ContoursMeshAlignParams *_this)
 
MRC_API const MR_Vector3fMR_ContoursMeshAlignParams_Get_xDirection (const MR_ContoursMeshAlignParams *_this)
 
MRC_API void MR_ContoursMeshAlignParams_Set_xDirection (MR_ContoursMeshAlignParams *_this, MR_Vector3f value)
 
MRC_API MR_Vector3fMR_ContoursMeshAlignParams_GetMutable_xDirection (MR_ContoursMeshAlignParams *_this)
 
MRC_API const MR_Vector3f *const * MR_ContoursMeshAlignParams_Get_zDirection (const MR_ContoursMeshAlignParams *_this)
 
MRC_API void MR_ContoursMeshAlignParams_Set_zDirection (MR_ContoursMeshAlignParams *_this, const MR_Vector3f *value)
 
MRC_API const MR_Vector3f ** MR_ContoursMeshAlignParams_GetMutable_zDirection (MR_ContoursMeshAlignParams *_this)
 
MRC_API const float * MR_ContoursMeshAlignParams_Get_extrusion (const MR_ContoursMeshAlignParams *_this)
 
MRC_API void MR_ContoursMeshAlignParams_Set_extrusion (MR_ContoursMeshAlignParams *_this, float value)
 
MRC_API float * MR_ContoursMeshAlignParams_GetMutable_extrusion (MR_ContoursMeshAlignParams *_this)
 
MRC_API const float * MR_ContoursMeshAlignParams_Get_maximumShift (const MR_ContoursMeshAlignParams *_this)
 
MRC_API void MR_ContoursMeshAlignParams_Set_maximumShift (MR_ContoursMeshAlignParams *_this, float value)
 
MRC_API float * MR_ContoursMeshAlignParams_GetMutable_maximumShift (MR_ContoursMeshAlignParams *_this)
 
MRC_API MR_ContoursMeshAlignParamsMR_ContoursMeshAlignParams_DefaultConstruct (void)
 
MRC_API MR_ContoursMeshAlignParamsMR_ContoursMeshAlignParams_DefaultConstructArray (size_t num_elems)
 
MRC_API MR_ContoursMeshAlignParamsMR_ContoursMeshAlignParams_ConstructFrom (const MR_MeshTriPoint *meshPoint, MR_Vector2f pivotPoint, MR_Vector3f xDirection, const MR_Vector3f *zDirection, float extrusion, float maximumShift)
 
MRC_API const MR_ContoursMeshAlignParamsMR_ContoursMeshAlignParams_OffsetPtr (const MR_ContoursMeshAlignParams *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.
 
MRC_API MR_ContoursMeshAlignParamsMR_ContoursMeshAlignParams_OffsetMutablePtr (MR_ContoursMeshAlignParams *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.
 
MRC_API MR_ContoursMeshAlignParamsMR_ContoursMeshAlignParams_ConstructFromAnother (const MR_ContoursMeshAlignParams *_other)
 
MRC_API void MR_ContoursMeshAlignParams_Destroy (const MR_ContoursMeshAlignParams *_this)
 Destroys a heap-allocated instance of MR_ContoursMeshAlignParams. Does nothing if the pointer is null.
 
MRC_API void MR_ContoursMeshAlignParams_DestroyArray (const MR_ContoursMeshAlignParams *_this)
 Destroys a heap-allocated array of MR_ContoursMeshAlignParams. Does nothing if the pointer is null.
 
MRC_API MR_ContoursMeshAlignParamsMR_ContoursMeshAlignParams_AssignFromAnother (MR_ContoursMeshAlignParams *_this, const MR_ContoursMeshAlignParams *_other)
 
MRC_API MR_expected_MR_Mesh_std_stringMR_alignContoursToMesh (const MR_Mesh *mesh, const MR_std_vector_std_vector_MR_Vector2f *contours, const MR_ContoursMeshAlignParams *params)
 
MRC_API void MR_addBaseToPlanarMesh (MR_Mesh *mesh, float zOffset)
 

Typedef Documentation

◆ MR_ContoursMeshAlignParams

Parameters for aligning 2d contour onto mesh surface Generated from class MR::ContoursMeshAlignParams.

◆ MR_expected_MR_Mesh_std_string

◆ MR_Mesh

typedef struct MR_Mesh MR_Mesh

◆ MR_MeshTriPoint

◆ MR_std_vector_std_vector_MR_Vector2f

Function Documentation

◆ MR_addBaseToPlanarMesh()

MRC_API void MR_addBaseToPlanarMesh ( MR_Mesh * mesh,
float zOffset )

given a planar mesh with boundary on input located in plane XY, packs and extends it along Z on zOffset (along -Z if zOffset is negative) to make a volumetric closed mesh note that this function also packs the mesh Generated from function MR::addBaseToPlanarMesh. Parameter mesh can not be null. It is a single object.

◆ MR_alignContoursToMesh()

MRC_API MR_expected_MR_Mesh_std_string * MR_alignContoursToMesh ( const MR_Mesh * mesh,
const MR_std_vector_std_vector_MR_Vector2f * contours,
const MR_ContoursMeshAlignParams * params )

Creates planar mesh out of given contour and aligns it to given surface Generated from function MR::alignContoursToMesh. Parameter mesh can not be null. It is a single object. Parameter contours can not be null. It is a single object. Parameter params can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_MR_Mesh_std_string_Destroy() to free it when you're done using it.

◆ MR_ContoursMeshAlignParams_AssignFromAnother()

MRC_API MR_ContoursMeshAlignParams * MR_ContoursMeshAlignParams_AssignFromAnother ( MR_ContoursMeshAlignParams * _this,
const MR_ContoursMeshAlignParams * _other )

Generated from a method of class MR::ContoursMeshAlignParams named operator=. Parameter _this can not be null. It is a single object. Parameter _other 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_ContoursMeshAlignParams_ConstructFrom()

MRC_API MR_ContoursMeshAlignParams * MR_ContoursMeshAlignParams_ConstructFrom ( const MR_MeshTriPoint * meshPoint,
MR_Vector2f pivotPoint,
MR_Vector3f xDirection,
const MR_Vector3f * zDirection,
float extrusion,
float maximumShift )

Constructs MR::ContoursMeshAlignParams elementwise. Parameter meshPoint can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_ContoursMeshAlignParams_Destroy() to free it when you're done using it.

◆ MR_ContoursMeshAlignParams_ConstructFromAnother()

MRC_API MR_ContoursMeshAlignParams * MR_ContoursMeshAlignParams_ConstructFromAnother ( const MR_ContoursMeshAlignParams * _other)

Generated from a constructor of class MR::ContoursMeshAlignParams. Parameter _other can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_ContoursMeshAlignParams_Destroy() to free it when you're done using it.

◆ MR_ContoursMeshAlignParams_DefaultConstruct()

MRC_API MR_ContoursMeshAlignParams * MR_ContoursMeshAlignParams_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_ContoursMeshAlignParams_Destroy() to free it when you're done using it.

◆ MR_ContoursMeshAlignParams_DefaultConstructArray()

MRC_API MR_ContoursMeshAlignParams * MR_ContoursMeshAlignParams_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_ContoursMeshAlignParams_DestroyArray(). Use MR_ContoursMeshAlignParams_OffsetMutablePtr() and MR_ContoursMeshAlignParams_OffsetPtr() to access the array elements.

◆ MR_ContoursMeshAlignParams_Destroy()

MRC_API void MR_ContoursMeshAlignParams_Destroy ( const MR_ContoursMeshAlignParams * _this)

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

◆ MR_ContoursMeshAlignParams_DestroyArray()

MRC_API void MR_ContoursMeshAlignParams_DestroyArray ( const MR_ContoursMeshAlignParams * _this)

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

◆ MR_ContoursMeshAlignParams_Get_extrusion()

MRC_API const float * MR_ContoursMeshAlignParams_Get_extrusion ( const MR_ContoursMeshAlignParams * _this)

Contours extrusion in +z and -z direction Returns a pointer to a member variable of class MR::ContoursMeshAlignParams named extrusion. 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_ContoursMeshAlignParams_Get_maximumShift()

MRC_API const float * MR_ContoursMeshAlignParams_Get_maximumShift ( const MR_ContoursMeshAlignParams * _this)

Maximum allowed shift along 'zDirection' for alignment Returns a pointer to a member variable of class MR::ContoursMeshAlignParams named maximumShift. 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_ContoursMeshAlignParams_Get_meshPoint()

MRC_API const MR_MeshTriPoint * MR_ContoursMeshAlignParams_Get_meshPoint ( const MR_ContoursMeshAlignParams * _this)

Point coordinate on mesh, represent position of contours box 'pivotPoint' on mesh Returns a pointer to a member variable of class MR::ContoursMeshAlignParams named meshPoint. 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_ContoursMeshAlignParams_Get_pivotPoint()

MRC_API const MR_Vector2f * MR_ContoursMeshAlignParams_Get_pivotPoint ( const MR_ContoursMeshAlignParams * _this)

Relative position of 'meshPoint' in contours bounding box (0, 0) - bottom left, (0, 1) - bottom right, (0.5, 0.5) - center, (1, 1) - top right Returns a pointer to a member variable of class MR::ContoursMeshAlignParams named pivotPoint. 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_ContoursMeshAlignParams_Get_xDirection()

MRC_API const MR_Vector3f * MR_ContoursMeshAlignParams_Get_xDirection ( const MR_ContoursMeshAlignParams * _this)

Represents 2d contours xDirection in mesh space Returns a pointer to a member variable of class MR::ContoursMeshAlignParams named xDirection. 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_ContoursMeshAlignParams_Get_zDirection()

MRC_API const MR_Vector3f *const * MR_ContoursMeshAlignParams_Get_zDirection ( const MR_ContoursMeshAlignParams * _this)

Represents contours normal in mesh space if nullptr - use mesh normal at 'meshPoint' Returns a pointer to a member variable of class MR::ContoursMeshAlignParams named zDirection. 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_ContoursMeshAlignParams_GetMutable_extrusion()

MRC_API float * MR_ContoursMeshAlignParams_GetMutable_extrusion ( MR_ContoursMeshAlignParams * _this)

Contours extrusion in +z and -z direction Returns a mutable pointer to a member variable of class MR::ContoursMeshAlignParams named extrusion. 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_ContoursMeshAlignParams_GetMutable_maximumShift()

MRC_API float * MR_ContoursMeshAlignParams_GetMutable_maximumShift ( MR_ContoursMeshAlignParams * _this)

Maximum allowed shift along 'zDirection' for alignment Returns a mutable pointer to a member variable of class MR::ContoursMeshAlignParams named maximumShift. 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_ContoursMeshAlignParams_GetMutable_meshPoint()

MRC_API MR_MeshTriPoint * MR_ContoursMeshAlignParams_GetMutable_meshPoint ( MR_ContoursMeshAlignParams * _this)

Point coordinate on mesh, represent position of contours box 'pivotPoint' on mesh Returns a mutable pointer to a member variable of class MR::ContoursMeshAlignParams named meshPoint. 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_ContoursMeshAlignParams_GetMutable_pivotPoint()

MRC_API MR_Vector2f * MR_ContoursMeshAlignParams_GetMutable_pivotPoint ( MR_ContoursMeshAlignParams * _this)

Relative position of 'meshPoint' in contours bounding box (0, 0) - bottom left, (0, 1) - bottom right, (0.5, 0.5) - center, (1, 1) - top right Returns a mutable pointer to a member variable of class MR::ContoursMeshAlignParams named pivotPoint. 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_ContoursMeshAlignParams_GetMutable_xDirection()

MRC_API MR_Vector3f * MR_ContoursMeshAlignParams_GetMutable_xDirection ( MR_ContoursMeshAlignParams * _this)

Represents 2d contours xDirection in mesh space Returns a mutable pointer to a member variable of class MR::ContoursMeshAlignParams named xDirection. 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_ContoursMeshAlignParams_GetMutable_zDirection()

MRC_API const MR_Vector3f ** MR_ContoursMeshAlignParams_GetMutable_zDirection ( MR_ContoursMeshAlignParams * _this)

Represents contours normal in mesh space if nullptr - use mesh normal at 'meshPoint' Returns a mutable pointer to a member variable of class MR::ContoursMeshAlignParams named zDirection. 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_ContoursMeshAlignParams_OffsetMutablePtr()

MRC_API MR_ContoursMeshAlignParams * MR_ContoursMeshAlignParams_OffsetMutablePtr ( MR_ContoursMeshAlignParams * 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.

◆ MR_ContoursMeshAlignParams_OffsetPtr()

MRC_API const MR_ContoursMeshAlignParams * MR_ContoursMeshAlignParams_OffsetPtr ( const MR_ContoursMeshAlignParams * 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.

◆ MR_ContoursMeshAlignParams_Set_extrusion()

MRC_API void MR_ContoursMeshAlignParams_Set_extrusion ( MR_ContoursMeshAlignParams * _this,
float value )

Contours extrusion in +z and -z direction Modifies a member variable of class MR::ContoursMeshAlignParams named extrusion. Parameter _this can not be null. It is a single object.

◆ MR_ContoursMeshAlignParams_Set_maximumShift()

MRC_API void MR_ContoursMeshAlignParams_Set_maximumShift ( MR_ContoursMeshAlignParams * _this,
float value )

Maximum allowed shift along 'zDirection' for alignment Modifies a member variable of class MR::ContoursMeshAlignParams named maximumShift. Parameter _this can not be null. It is a single object.

◆ MR_ContoursMeshAlignParams_Set_meshPoint()

MRC_API void MR_ContoursMeshAlignParams_Set_meshPoint ( MR_ContoursMeshAlignParams * _this,
const MR_MeshTriPoint * value )

Point coordinate on mesh, represent position of contours box 'pivotPoint' on mesh Modifies a member variable of class MR::ContoursMeshAlignParams named meshPoint. Parameter _this can not be null. It is a single object. Parameter value can not be null. It is a single object.

◆ MR_ContoursMeshAlignParams_Set_pivotPoint()

MRC_API void MR_ContoursMeshAlignParams_Set_pivotPoint ( MR_ContoursMeshAlignParams * _this,
MR_Vector2f value )

Relative position of 'meshPoint' in contours bounding box (0, 0) - bottom left, (0, 1) - bottom right, (0.5, 0.5) - center, (1, 1) - top right Modifies a member variable of class MR::ContoursMeshAlignParams named pivotPoint. Parameter _this can not be null. It is a single object.

◆ MR_ContoursMeshAlignParams_Set_xDirection()

MRC_API void MR_ContoursMeshAlignParams_Set_xDirection ( MR_ContoursMeshAlignParams * _this,
MR_Vector3f value )

Represents 2d contours xDirection in mesh space Modifies a member variable of class MR::ContoursMeshAlignParams named xDirection. Parameter _this can not be null. It is a single object.

◆ MR_ContoursMeshAlignParams_Set_zDirection()

MRC_API void MR_ContoursMeshAlignParams_Set_zDirection ( MR_ContoursMeshAlignParams * _this,
const MR_Vector3f * value )

Represents contours normal in mesh space if nullptr - use mesh normal at 'meshPoint' Modifies a member variable of class MR::ContoursMeshAlignParams named zDirection. Parameter _this can not be null. It is a single object.