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

Go to the source code of this file.

Typedefs

typedef struct MR_Box3f MR_Box3f
 
typedef struct MR_OriginAndDimensions MR_OriginAndDimensions
 

Functions

MRC_API const MR_Vector3fMR_OriginAndDimensions_Get_origin (const MR_OriginAndDimensions *_this)
 
MRC_API void MR_OriginAndDimensions_Set_origin (MR_OriginAndDimensions *_this, MR_Vector3f value)
 
MRC_API MR_Vector3fMR_OriginAndDimensions_GetMutable_origin (MR_OriginAndDimensions *_this)
 
MRC_API const MR_Vector3iMR_OriginAndDimensions_Get_dimensions (const MR_OriginAndDimensions *_this)
 
MRC_API void MR_OriginAndDimensions_Set_dimensions (MR_OriginAndDimensions *_this, MR_Vector3i value)
 
MRC_API MR_Vector3iMR_OriginAndDimensions_GetMutable_dimensions (MR_OriginAndDimensions *_this)
 
MRC_API MR_OriginAndDimensionsMR_OriginAndDimensions_DefaultConstruct (void)
 
MRC_API MR_OriginAndDimensionsMR_OriginAndDimensions_DefaultConstructArray (size_t num_elems)
 
MRC_API MR_OriginAndDimensionsMR_OriginAndDimensions_ConstructFrom (MR_Vector3f origin, MR_Vector3i dimensions)
 
MRC_API const MR_OriginAndDimensionsMR_OriginAndDimensions_OffsetPtr (const MR_OriginAndDimensions *ptr, ptrdiff_t i)
 
MRC_API MR_OriginAndDimensionsMR_OriginAndDimensions_OffsetMutablePtr (MR_OriginAndDimensions *ptr, ptrdiff_t i)
 
MRC_API MR_OriginAndDimensionsMR_OriginAndDimensions_ConstructFromAnother (const MR_OriginAndDimensions *_other)
 
MRC_API void MR_OriginAndDimensions_Destroy (const MR_OriginAndDimensions *_this)
 Destroys a heap-allocated instance of MR_OriginAndDimensions. Does nothing if the pointer is null.
 
MRC_API void MR_OriginAndDimensions_DestroyArray (const MR_OriginAndDimensions *_this)
 Destroys a heap-allocated array of MR_OriginAndDimensions. Does nothing if the pointer is null.
 
MRC_API MR_OriginAndDimensionsMR_OriginAndDimensions_AssignFromAnother (MR_OriginAndDimensions *_this, const MR_OriginAndDimensions *_other)
 
MRC_API MR_OriginAndDimensionsMR_calcOriginAndDimensions (const MR_Box3f *box, float voxelSize)
 

Typedef Documentation

◆ MR_Box3f

typedef struct MR_Box3f MR_Box3f

◆ MR_OriginAndDimensions

shift of zero voxel in 3D space and dimensions of voxel-grid Generated from class MR::OriginAndDimensions. 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).

Function Documentation

◆ MR_calcOriginAndDimensions()

MRC_API MR_OriginAndDimensions * MR_calcOriginAndDimensions ( const MR_Box3f * box,
float voxelSize )

computes origin and dimensions of voxel-grid to cover given 3D box with given spacing (voxelSize) Generated from function MR::calcOriginAndDimensions. Parameter box can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_OriginAndDimensions_Destroy() to free it when you're done using it.

◆ MR_OriginAndDimensions_AssignFromAnother()

MRC_API MR_OriginAndDimensions * MR_OriginAndDimensions_AssignFromAnother ( MR_OriginAndDimensions * _this,
const MR_OriginAndDimensions * _other )

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

MRC_API MR_OriginAndDimensions * MR_OriginAndDimensions_ConstructFrom ( MR_Vector3f origin,
MR_Vector3i dimensions )

Constructs MR::OriginAndDimensions elementwise. The reference to the parameter origin might be preserved in the constructed object. The reference to the parameter dimensions might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_OriginAndDimensions_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_OriginAndDimensions_ConstructFromAnother()

MRC_API MR_OriginAndDimensions * MR_OriginAndDimensions_ConstructFromAnother ( const MR_OriginAndDimensions * _other)

Generated from constructor MR::OriginAndDimensions::OriginAndDimensions. Parameter _other 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 the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_OriginAndDimensions_Destroy() to free it when you're done using it.

◆ MR_OriginAndDimensions_DefaultConstruct()

MRC_API MR_OriginAndDimensions * MR_OriginAndDimensions_DefaultConstruct ( void )

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

◆ MR_OriginAndDimensions_DefaultConstructArray()

MRC_API MR_OriginAndDimensions * MR_OriginAndDimensions_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_OriginAndDimensions_DestroyArray(). Use MR_OriginAndDimensions_OffsetMutablePtr() and MR_OriginAndDimensions_OffsetPtr() to access the array elements.

◆ MR_OriginAndDimensions_Destroy()

MRC_API void MR_OriginAndDimensions_Destroy ( const MR_OriginAndDimensions * _this)

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

◆ MR_OriginAndDimensions_DestroyArray()

MRC_API void MR_OriginAndDimensions_DestroyArray ( const MR_OriginAndDimensions * _this)

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

◆ MR_OriginAndDimensions_Get_dimensions()

MRC_API const MR_Vector3i * MR_OriginAndDimensions_Get_dimensions ( const MR_OriginAndDimensions * _this)

Returns a pointer to a member variable of class MR::OriginAndDimensions named dimensions. 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_OriginAndDimensions_Get_origin()

MRC_API const MR_Vector3f * MR_OriginAndDimensions_Get_origin ( const MR_OriginAndDimensions * _this)

Returns a pointer to a member variable of class MR::OriginAndDimensions named origin. 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_OriginAndDimensions_GetMutable_dimensions()

MRC_API MR_Vector3i * MR_OriginAndDimensions_GetMutable_dimensions ( MR_OriginAndDimensions * _this)

Returns a mutable pointer to a member variable of class MR::OriginAndDimensions named dimensions. 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_OriginAndDimensions_GetMutable_origin()

MRC_API MR_Vector3f * MR_OriginAndDimensions_GetMutable_origin ( MR_OriginAndDimensions * _this)

Returns a mutable pointer to a member variable of class MR::OriginAndDimensions named origin. 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_OriginAndDimensions_OffsetMutablePtr()

MRC_API MR_OriginAndDimensions * MR_OriginAndDimensions_OffsetMutablePtr ( MR_OriginAndDimensions * 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_OriginAndDimensions_OffsetPtr()

MRC_API const MR_OriginAndDimensions * MR_OriginAndDimensions_OffsetPtr ( const MR_OriginAndDimensions * 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_OriginAndDimensions_Set_dimensions()

MRC_API void MR_OriginAndDimensions_Set_dimensions ( MR_OriginAndDimensions * _this,
MR_Vector3i value )

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

◆ MR_OriginAndDimensions_Set_origin()

MRC_API void MR_OriginAndDimensions_Set_origin ( MR_OriginAndDimensions * _this,
MR_Vector3f value )

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