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

Go to the source code of this file.

Typedefs

typedef struct MR_Triangulation MR_Triangulation
 
typedef struct MR_VertCoords MR_VertCoords
 
typedef struct MR_TriMesh MR_TriMesh
 

Functions

MRC_API const MR_TriangulationMR_TriMesh_Get_tris (const MR_TriMesh *_this)
 
MRC_API void MR_TriMesh_Set_tris (MR_TriMesh *_this, MR_PassBy value_pass_by, MR_Triangulation *value)
 
MRC_API MR_TriangulationMR_TriMesh_GetMutable_tris (MR_TriMesh *_this)
 
MRC_API const MR_VertCoordsMR_TriMesh_Get_points (const MR_TriMesh *_this)
 
MRC_API void MR_TriMesh_Set_points (MR_TriMesh *_this, MR_PassBy value_pass_by, MR_VertCoords *value)
 
MRC_API MR_VertCoordsMR_TriMesh_GetMutable_points (MR_TriMesh *_this)
 
MRC_API MR_TriMeshMR_TriMesh_DefaultConstruct (void)
 
MRC_API MR_TriMeshMR_TriMesh_DefaultConstructArray (size_t num_elems)
 
MRC_API MR_TriMeshMR_TriMesh_ConstructFrom (MR_PassBy tris_pass_by, MR_Triangulation *tris, MR_PassBy points_pass_by, MR_VertCoords *points)
 
MRC_API const MR_TriMeshMR_TriMesh_OffsetPtr (const MR_TriMesh *ptr, ptrdiff_t i)
 
MRC_API MR_TriMeshMR_TriMesh_OffsetMutablePtr (MR_TriMesh *ptr, ptrdiff_t i)
 
MRC_API MR_TriMeshMR_TriMesh_ConstructFromAnother (MR_PassBy _other_pass_by, MR_TriMesh *_other)
 
MRC_API void MR_TriMesh_Destroy (const MR_TriMesh *_this)
 Destroys a heap-allocated instance of MR_TriMesh. Does nothing if the pointer is null.
 
MRC_API void MR_TriMesh_DestroyArray (const MR_TriMesh *_this)
 Destroys a heap-allocated array of MR_TriMesh. Does nothing if the pointer is null.
 
MRC_API MR_TriMeshMR_TriMesh_AssignFromAnother (MR_TriMesh *_this, MR_PassBy _other_pass_by, MR_TriMesh *_other)
 

Typedef Documentation

◆ MR_Triangulation

◆ MR_TriMesh

typedef struct MR_TriMesh MR_TriMesh

very simple structure for storing mesh of triangles only, without easy navigation between neighbor elements as in Mesh Generated from class MR::TriMesh. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_VertCoords

typedef struct MR_VertCoords MR_VertCoords

Function Documentation

◆ MR_TriMesh_AssignFromAnother()

MRC_API MR_TriMesh * MR_TriMesh_AssignFromAnother ( MR_TriMesh * _this,
MR_PassBy _other_pass_by,
MR_TriMesh * _other )

Generated from method MR::TriMesh::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_TriMesh_ConstructFrom()

MRC_API MR_TriMesh * MR_TriMesh_ConstructFrom ( MR_PassBy tris_pass_by,
MR_Triangulation * tris,
MR_PassBy points_pass_by,
MR_VertCoords * points )

Constructs MR::TriMesh elementwise. The reference to the parameter tris might be preserved in the constructed object. The reference to the parameter points might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_TriMesh_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_TriMesh_ConstructFromAnother()

MRC_API MR_TriMesh * MR_TriMesh_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_TriMesh * _other )

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

◆ MR_TriMesh_DefaultConstruct()

MRC_API MR_TriMesh * MR_TriMesh_DefaultConstruct ( void )

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

◆ MR_TriMesh_DefaultConstructArray()

MRC_API MR_TriMesh * MR_TriMesh_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_TriMesh_DestroyArray(). Use MR_TriMesh_OffsetMutablePtr() and MR_TriMesh_OffsetPtr() to access the array elements.

◆ MR_TriMesh_Destroy()

MRC_API void MR_TriMesh_Destroy ( const MR_TriMesh * _this)

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

◆ MR_TriMesh_DestroyArray()

MRC_API void MR_TriMesh_DestroyArray ( const MR_TriMesh * _this)

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

◆ MR_TriMesh_Get_points()

MRC_API const MR_VertCoords * MR_TriMesh_Get_points ( const MR_TriMesh * _this)

Returns a pointer to a member variable of class MR::TriMesh named points. 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_TriMesh_Get_tris()

MRC_API const MR_Triangulation * MR_TriMesh_Get_tris ( const MR_TriMesh * _this)

Returns a pointer to a member variable of class MR::TriMesh named tris. 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_TriMesh_GetMutable_points()

MRC_API MR_VertCoords * MR_TriMesh_GetMutable_points ( MR_TriMesh * _this)

Returns a mutable pointer to a member variable of class MR::TriMesh named points. 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_TriMesh_GetMutable_tris()

MRC_API MR_Triangulation * MR_TriMesh_GetMutable_tris ( MR_TriMesh * _this)

Returns a mutable pointer to a member variable of class MR::TriMesh named tris. 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_TriMesh_OffsetMutablePtr()

MRC_API MR_TriMesh * MR_TriMesh_OffsetMutablePtr ( MR_TriMesh * 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_TriMesh_OffsetPtr()

MRC_API const MR_TriMesh * MR_TriMesh_OffsetPtr ( const MR_TriMesh * 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_TriMesh_Set_points()

MRC_API void MR_TriMesh_Set_points ( MR_TriMesh * _this,
MR_PassBy value_pass_by,
MR_VertCoords * value )

Modifies a member variable of class MR::TriMesh named points. 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 points. When this function is called, this object will drop object references it had previously in points.

◆ MR_TriMesh_Set_tris()

MRC_API void MR_TriMesh_Set_tris ( MR_TriMesh * _this,
MR_PassBy value_pass_by,
MR_Triangulation * value )

Modifies a member variable of class MR::TriMesh named tris. 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 tris. When this function is called, this object will drop object references it had previously in tris.