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

Go to the source code of this file.

Typedefs

typedef struct MR_Mesh MR_Mesh
 
typedef struct MR_SphereParams MR_SphereParams
 Generated from class MR::SphereParams.
 

Functions

MRC_API const float * MR_SphereParams_Get_radius (const MR_SphereParams *_this)
 
MRC_API void MR_SphereParams_Set_radius (MR_SphereParams *_this, float value)
 
MRC_API float * MR_SphereParams_GetMutable_radius (MR_SphereParams *_this)
 
MRC_API const int32_t * MR_SphereParams_Get_numMeshVertices (const MR_SphereParams *_this)
 
MRC_API void MR_SphereParams_Set_numMeshVertices (MR_SphereParams *_this, int32_t value)
 
MRC_API int32_t * MR_SphereParams_GetMutable_numMeshVertices (MR_SphereParams *_this)
 
MRC_API MR_SphereParamsMR_SphereParams_DefaultConstruct (void)
 
MRC_API MR_SphereParamsMR_SphereParams_DefaultConstructArray (size_t num_elems)
 
MRC_API MR_SphereParamsMR_SphereParams_ConstructFrom (float radius, int32_t numMeshVertices)
 
MRC_API const MR_SphereParamsMR_SphereParams_OffsetPtr (const MR_SphereParams *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_SphereParamsMR_SphereParams_OffsetMutablePtr (MR_SphereParams *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_SphereParamsMR_SphereParams_ConstructFromAnother (const MR_SphereParams *_other)
 
MRC_API void MR_SphereParams_Destroy (const MR_SphereParams *_this)
 Destroys a heap-allocated instance of MR_SphereParams. Does nothing if the pointer is null.
 
MRC_API void MR_SphereParams_DestroyArray (const MR_SphereParams *_this)
 Destroys a heap-allocated array of MR_SphereParams. Does nothing if the pointer is null.
 
MRC_API MR_SphereParamsMR_SphereParams_AssignFromAnother (MR_SphereParams *_this, const MR_SphereParams *_other)
 
MRC_API MR_MeshMR_makeSphere (const MR_SphereParams *params)
 
MRC_API MR_MeshMR_makeUVSphere (const float *radius, const int32_t *horisontalResolution, const int32_t *verticalResolution)
 

Typedef Documentation

◆ MR_Mesh

typedef struct MR_Mesh MR_Mesh

◆ MR_SphereParams

Generated from class MR::SphereParams.

Function Documentation

◆ MR_makeSphere()

MRC_API MR_Mesh * MR_makeSphere ( const MR_SphereParams * params)

creates a mesh of sphere with irregular triangulation Generated from function MR::makeSphere. Parameter params can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_Mesh_Destroy() to free it when you're done using it.

◆ MR_makeUVSphere()

MRC_API MR_Mesh * MR_makeUVSphere ( const float * radius,
const int32_t * horisontalResolution,
const int32_t * verticalResolution )

creates a mesh of sphere with regular triangulation (parallels and meridians) Generated from function MR::makeUVSphere. Parameter radius has a default argument: 1., pass a null pointer to use it. Parameter horisontalResolution has a default argument: 16, pass a null pointer to use it. Parameter verticalResolution has a default argument: 16, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_Mesh_Destroy() to free it when you're done using it.

◆ MR_SphereParams_AssignFromAnother()

MRC_API MR_SphereParams * MR_SphereParams_AssignFromAnother ( MR_SphereParams * _this,
const MR_SphereParams * _other )

Generated from a method of class MR::SphereParams 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_SphereParams_ConstructFrom()

MRC_API MR_SphereParams * MR_SphereParams_ConstructFrom ( float radius,
int32_t numMeshVertices )

Constructs MR::SphereParams elementwise. Never returns null. Returns an instance allocated on the heap! Must call MR_SphereParams_Destroy() to free it when you're done using it.

◆ MR_SphereParams_ConstructFromAnother()

MRC_API MR_SphereParams * MR_SphereParams_ConstructFromAnother ( const MR_SphereParams * _other)

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

◆ MR_SphereParams_DefaultConstruct()

MRC_API MR_SphereParams * MR_SphereParams_DefaultConstruct ( void )

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

◆ MR_SphereParams_DefaultConstructArray()

MRC_API MR_SphereParams * MR_SphereParams_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_SphereParams_DestroyArray(). Use MR_SphereParams_OffsetMutablePtr() and MR_SphereParams_OffsetPtr() to access the array elements.

◆ MR_SphereParams_Destroy()

MRC_API void MR_SphereParams_Destroy ( const MR_SphereParams * _this)

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

◆ MR_SphereParams_DestroyArray()

MRC_API void MR_SphereParams_DestroyArray ( const MR_SphereParams * _this)

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

◆ MR_SphereParams_Get_numMeshVertices()

MRC_API const int32_t * MR_SphereParams_Get_numMeshVertices ( const MR_SphereParams * _this)

Returns a pointer to a member variable of class MR::SphereParams named numMeshVertices. 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_SphereParams_Get_radius()

MRC_API const float * MR_SphereParams_Get_radius ( const MR_SphereParams * _this)

Returns a pointer to a member variable of class MR::SphereParams named radius. 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_SphereParams_GetMutable_numMeshVertices()

MRC_API int32_t * MR_SphereParams_GetMutable_numMeshVertices ( MR_SphereParams * _this)

Returns a mutable pointer to a member variable of class MR::SphereParams named numMeshVertices. 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_SphereParams_GetMutable_radius()

MRC_API float * MR_SphereParams_GetMutable_radius ( MR_SphereParams * _this)

Returns a mutable pointer to a member variable of class MR::SphereParams named radius. 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_SphereParams_OffsetMutablePtr()

MRC_API MR_SphereParams * MR_SphereParams_OffsetMutablePtr ( MR_SphereParams * 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_SphereParams_OffsetPtr()

MRC_API const MR_SphereParams * MR_SphereParams_OffsetPtr ( const MR_SphereParams * 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_SphereParams_Set_numMeshVertices()

MRC_API void MR_SphereParams_Set_numMeshVertices ( MR_SphereParams * _this,
int32_t value )

Modifies a member variable of class MR::SphereParams named numMeshVertices. Parameter _this can not be null. It is a single object.

◆ MR_SphereParams_Set_radius()

MRC_API void MR_SphereParams_Set_radius ( MR_SphereParams * _this,
float value )

Modifies a member variable of class MR::SphereParams named radius. Parameter _this can not be null. It is a single object.