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

Go to the source code of this file.

Typedefs

typedef struct MR_BMap_MR_FaceId_uint64_t MR_BMap_MR_FaceId_uint64_t
 
typedef struct MR_BMap_MR_UndirectedEdgeId_uint64_t MR_BMap_MR_UndirectedEdgeId_uint64_t
 
typedef struct MR_BMap_MR_VertId_uint64_t MR_BMap_MR_VertId_uint64_t
 
typedef enum MR_GridSettings_EdgeType MR_GridSettings_EdgeType
 
typedef enum MR_GridSettings_TriType MR_GridSettings_TriType
 
typedef struct MR_GridSettings MR_GridSettings
 

Enumerations

enum  MR_GridSettings_EdgeType { MR_GridSettings_EdgeType_Horizontal = 0 , MR_GridSettings_EdgeType_Vertical = 1 , MR_GridSettings_EdgeType_DiagonalA = 2 , MR_GridSettings_EdgeType_DiagonalB = 3 }
 
enum  MR_GridSettings_TriType { MR_GridSettings_TriType_Lower = 0 , MR_GridSettings_TriType_Upper = 1 }
 

Functions

MRC_API const MR_Vector2iMR_GridSettings_Get_dim (const MR_GridSettings *_this)
 
MRC_API void MR_GridSettings_Set_dim (MR_GridSettings *_this, MR_Vector2i value)
 
MRC_API MR_Vector2iMR_GridSettings_GetMutable_dim (MR_GridSettings *_this)
 
MRC_API const MR_BMap_MR_VertId_uint64_tMR_GridSettings_Get_vertIds (const MR_GridSettings *_this)
 
MRC_API void MR_GridSettings_Set_vertIds (MR_GridSettings *_this, MR_PassBy value_pass_by, MR_BMap_MR_VertId_uint64_t *value)
 
MRC_API MR_BMap_MR_VertId_uint64_tMR_GridSettings_GetMutable_vertIds (MR_GridSettings *_this)
 
MRC_API const MR_BMap_MR_UndirectedEdgeId_uint64_tMR_GridSettings_Get_uedgeIds (const MR_GridSettings *_this)
 
MRC_API void MR_GridSettings_Set_uedgeIds (MR_GridSettings *_this, MR_PassBy value_pass_by, MR_BMap_MR_UndirectedEdgeId_uint64_t *value)
 
MRC_API MR_BMap_MR_UndirectedEdgeId_uint64_tMR_GridSettings_GetMutable_uedgeIds (MR_GridSettings *_this)
 
MRC_API const MR_BMap_MR_FaceId_uint64_tMR_GridSettings_Get_faceIds (const MR_GridSettings *_this)
 
MRC_API void MR_GridSettings_Set_faceIds (MR_GridSettings *_this, MR_PassBy value_pass_by, MR_BMap_MR_FaceId_uint64_t *value)
 
MRC_API MR_BMap_MR_FaceId_uint64_tMR_GridSettings_GetMutable_faceIds (MR_GridSettings *_this)
 
MRC_API MR_GridSettingsMR_GridSettings_DefaultConstruct (void)
 
MRC_API MR_GridSettingsMR_GridSettings_DefaultConstructArray (size_t num_elems)
 
MRC_API MR_GridSettingsMR_GridSettings_ConstructFrom (MR_Vector2i dim, MR_PassBy vertIds_pass_by, MR_BMap_MR_VertId_uint64_t *vertIds, MR_PassBy uedgeIds_pass_by, MR_BMap_MR_UndirectedEdgeId_uint64_t *uedgeIds, MR_PassBy faceIds_pass_by, MR_BMap_MR_FaceId_uint64_t *faceIds)
 
MRC_API const MR_GridSettingsMR_GridSettings_OffsetPtr (const MR_GridSettings *ptr, ptrdiff_t i)
 
MRC_API MR_GridSettingsMR_GridSettings_OffsetMutablePtr (MR_GridSettings *ptr, ptrdiff_t i)
 
MRC_API MR_GridSettingsMR_GridSettings_ConstructFromAnother (MR_PassBy _other_pass_by, MR_GridSettings *_other)
 
MRC_API void MR_GridSettings_Destroy (const MR_GridSettings *_this)
 Destroys a heap-allocated instance of MR_GridSettings. Does nothing if the pointer is null.
 
MRC_API void MR_GridSettings_DestroyArray (const MR_GridSettings *_this)
 Destroys a heap-allocated array of MR_GridSettings. Does nothing if the pointer is null.
 
MRC_API MR_GridSettingsMR_GridSettings_AssignFromAnother (MR_GridSettings *_this, MR_PassBy _other_pass_by, MR_GridSettings *_other)
 

Typedef Documentation

◆ MR_BMap_MR_FaceId_uint64_t

◆ MR_BMap_MR_UndirectedEdgeId_uint64_t

◆ MR_BMap_MR_VertId_uint64_t

◆ MR_GridSettings

settings defining regular grid, where each quadrangular cell is split on two triangles in one of two ways Generated from class MR::GridSettings. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_GridSettings_EdgeType

◆ MR_GridSettings_TriType

Enumeration Type Documentation

◆ MR_GridSettings_EdgeType

Enumerator
MR_GridSettings_EdgeType_Horizontal 
MR_GridSettings_EdgeType_Vertical 
MR_GridSettings_EdgeType_DiagonalA 
MR_GridSettings_EdgeType_DiagonalB 

◆ MR_GridSettings_TriType

Enumerator
MR_GridSettings_TriType_Lower 
MR_GridSettings_TriType_Upper 

Function Documentation

◆ MR_GridSettings_AssignFromAnother()

MRC_API MR_GridSettings * MR_GridSettings_AssignFromAnother ( MR_GridSettings * _this,
MR_PassBy _other_pass_by,
MR_GridSettings * _other )

Generated from method MR::GridSettings::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_GridSettings_ConstructFrom()

MRC_API MR_GridSettings * MR_GridSettings_ConstructFrom ( MR_Vector2i dim,
MR_PassBy vertIds_pass_by,
MR_BMap_MR_VertId_uint64_t * vertIds,
MR_PassBy uedgeIds_pass_by,
MR_BMap_MR_UndirectedEdgeId_uint64_t * uedgeIds,
MR_PassBy faceIds_pass_by,
MR_BMap_MR_FaceId_uint64_t * faceIds )

Constructs MR::GridSettings elementwise. The reference to the parameter dim might be preserved in the constructed object. The reference to the parameter vertIds might be preserved in the constructed object. The reference to the parameter uedgeIds might be preserved in the constructed object. The reference to the parameter faceIds might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_GridSettings_Destroy() to free it when you're done using it. When this function is called, this object will drop any object references it had previously.

◆ MR_GridSettings_ConstructFromAnother()

MRC_API MR_GridSettings * MR_GridSettings_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_GridSettings * _other )

Generated from constructor MR::GridSettings::GridSettings. 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_GridSettings_Destroy() to free it when you're done using it.

◆ MR_GridSettings_DefaultConstruct()

MRC_API MR_GridSettings * MR_GridSettings_DefaultConstruct ( void )

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

◆ MR_GridSettings_DefaultConstructArray()

MRC_API MR_GridSettings * MR_GridSettings_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_GridSettings_DestroyArray(). Use MR_GridSettings_OffsetMutablePtr() and MR_GridSettings_OffsetPtr() to access the array elements.

◆ MR_GridSettings_Destroy()

MRC_API void MR_GridSettings_Destroy ( const MR_GridSettings * _this)

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

◆ MR_GridSettings_DestroyArray()

MRC_API void MR_GridSettings_DestroyArray ( const MR_GridSettings * _this)

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

◆ MR_GridSettings_Get_dim()

MRC_API const MR_Vector2i * MR_GridSettings_Get_dim ( const MR_GridSettings * _this)

the number of cells in X and Y dimensions; the number of vertices will be at most (X+1)*(Y+1) Returns a pointer to a member variable of class MR::GridSettings named dim. 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_GridSettings_Get_faceIds()

MRC_API const MR_BMap_MR_FaceId_uint64_t * MR_GridSettings_Get_faceIds ( const MR_GridSettings * _this)

grid coordinates of lower-left vertex and triangle-type to faceId; all 3 vertices and all 3 edges of valid face must be valid as well; index is 2 * ( x + y * settings.dim.x ) + triType Returns a pointer to a member variable of class MR::GridSettings named faceIds. 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_GridSettings_Get_uedgeIds()

MRC_API const MR_BMap_MR_UndirectedEdgeId_uint64_t * MR_GridSettings_Get_uedgeIds ( const MR_GridSettings * _this)

grid coordinates of lower-left vertex and edge-type to edgeId with the origin in this vertex; both vertices of valid edge must be valid as well; index is 4 * ( x + y * ( settings.dim.x + 1 ) ) + edgeType Returns a pointer to a member variable of class MR::GridSettings named uedgeIds. 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_GridSettings_Get_vertIds()

MRC_API const MR_BMap_MR_VertId_uint64_t * MR_GridSettings_Get_vertIds ( const MR_GridSettings * _this)

grid coordinates to vertex Id; invalid vertex Id means that this vertex is missing in grid; index is x + y * ( settings.dim.x + 1 ) Returns a pointer to a member variable of class MR::GridSettings named vertIds. 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_GridSettings_GetMutable_dim()

MRC_API MR_Vector2i * MR_GridSettings_GetMutable_dim ( MR_GridSettings * _this)

the number of cells in X and Y dimensions; the number of vertices will be at most (X+1)*(Y+1) Returns a mutable pointer to a member variable of class MR::GridSettings named dim. 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_GridSettings_GetMutable_faceIds()

MRC_API MR_BMap_MR_FaceId_uint64_t * MR_GridSettings_GetMutable_faceIds ( MR_GridSettings * _this)

grid coordinates of lower-left vertex and triangle-type to faceId; all 3 vertices and all 3 edges of valid face must be valid as well; index is 2 * ( x + y * settings.dim.x ) + triType Returns a mutable pointer to a member variable of class MR::GridSettings named faceIds. 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_GridSettings_GetMutable_uedgeIds()

MRC_API MR_BMap_MR_UndirectedEdgeId_uint64_t * MR_GridSettings_GetMutable_uedgeIds ( MR_GridSettings * _this)

grid coordinates of lower-left vertex and edge-type to edgeId with the origin in this vertex; both vertices of valid edge must be valid as well; index is 4 * ( x + y * ( settings.dim.x + 1 ) ) + edgeType Returns a mutable pointer to a member variable of class MR::GridSettings named uedgeIds. 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_GridSettings_GetMutable_vertIds()

MRC_API MR_BMap_MR_VertId_uint64_t * MR_GridSettings_GetMutable_vertIds ( MR_GridSettings * _this)

grid coordinates to vertex Id; invalid vertex Id means that this vertex is missing in grid; index is x + y * ( settings.dim.x + 1 ) Returns a mutable pointer to a member variable of class MR::GridSettings named vertIds. 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_GridSettings_OffsetMutablePtr()

MRC_API MR_GridSettings * MR_GridSettings_OffsetMutablePtr ( MR_GridSettings * 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_GridSettings_OffsetPtr()

MRC_API const MR_GridSettings * MR_GridSettings_OffsetPtr ( const MR_GridSettings * 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_GridSettings_Set_dim()

MRC_API void MR_GridSettings_Set_dim ( MR_GridSettings * _this,
MR_Vector2i value )

the number of cells in X and Y dimensions; the number of vertices will be at most (X+1)*(Y+1) Modifies a member variable of class MR::GridSettings named dim. Parameter _this can not be null. It is a single object. The reference to the parameter value might be preserved in this object in element dim. When this function is called, this object will drop object references it had previously in dim.

◆ MR_GridSettings_Set_faceIds()

MRC_API void MR_GridSettings_Set_faceIds ( MR_GridSettings * _this,
MR_PassBy value_pass_by,
MR_BMap_MR_FaceId_uint64_t * value )

grid coordinates of lower-left vertex and triangle-type to faceId; all 3 vertices and all 3 edges of valid face must be valid as well; index is 2 * ( x + y * settings.dim.x ) + triType Modifies a member variable of class MR::GridSettings named faceIds. Parameter _this can not be null. It is a single object. The reference to the parameter value might be preserved in this object in element faceIds. When this function is called, this object will drop object references it had previously in faceIds.

◆ MR_GridSettings_Set_uedgeIds()

MRC_API void MR_GridSettings_Set_uedgeIds ( MR_GridSettings * _this,
MR_PassBy value_pass_by,
MR_BMap_MR_UndirectedEdgeId_uint64_t * value )

grid coordinates of lower-left vertex and edge-type to edgeId with the origin in this vertex; both vertices of valid edge must be valid as well; index is 4 * ( x + y * ( settings.dim.x + 1 ) ) + edgeType Modifies a member variable of class MR::GridSettings named uedgeIds. Parameter _this can not be null. It is a single object. The reference to the parameter value might be preserved in this object in element uedgeIds. When this function is called, this object will drop object references it had previously in uedgeIds.

◆ MR_GridSettings_Set_vertIds()

MRC_API void MR_GridSettings_Set_vertIds ( MR_GridSettings * _this,
MR_PassBy value_pass_by,
MR_BMap_MR_VertId_uint64_t * value )

grid coordinates to vertex Id; invalid vertex Id means that this vertex is missing in grid; index is x + y * ( settings.dim.x + 1 ) Modifies a member variable of class MR::GridSettings named vertIds. Parameter _this can not be null. It is a single object. The reference to the parameter value might be preserved in this object in element vertIds. When this function is called, this object will drop object references it had previously in vertIds.