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

Go to the source code of this file.

Typedefs

typedef struct MR_Box3i MR_Box3i
 
typedef struct MR_OpenVdbFloatGrid MR_OpenVdbFloatGrid
 
typedef struct MR_Vector3f MR_Vector3f
 
typedef struct MR_Vector3i MR_Vector3i
 
typedef struct MR_VoxelBitSet MR_VoxelBitSet
 
typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float
 
typedef struct MR_std_shared_ptr_MR_OpenVdbFloatGrid MR_std_shared_ptr_MR_OpenVdbFloatGrid
 
typedef struct MR_FloatGrid MR_FloatGrid
 

Functions

MRC_API MR_FloatGridMR_FloatGrid_DefaultConstruct (void)
 
MRC_API MR_FloatGridMR_FloatGrid_DefaultConstructArray (size_t num_elems)
 
MRC_API const MR_FloatGridMR_FloatGrid_OffsetPtr (const MR_FloatGrid *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_FloatGridMR_FloatGrid_OffsetMutablePtr (MR_FloatGrid *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_FloatGridMR_FloatGrid_ConstructFromAnother (MR_PassBy _other_pass_by, MR_FloatGrid *_other)
 
MRC_API MR_FloatGridMR_FloatGrid_Construct (MR_PassBy ptr_pass_by, MR_std_shared_ptr_MR_OpenVdbFloatGrid *ptr)
 
MRC_API void MR_FloatGrid_Destroy (const MR_FloatGrid *_this)
 Destroys a heap-allocated instance of MR_FloatGrid. Does nothing if the pointer is null.
 
MRC_API void MR_FloatGrid_DestroyArray (const MR_FloatGrid *_this)
 Destroys a heap-allocated array of MR_FloatGrid. Does nothing if the pointer is null.
 
MRC_API bool MR_FloatGrid_ConvertTo_bool (const MR_FloatGrid *_this)
 
MRC_API MR_FloatGridMR_FloatGrid_AssignFromAnother (MR_FloatGrid *_this, MR_PassBy _other_pass_by, MR_FloatGrid *_other)
 
MRC_API void MR_FloatGrid_reset (MR_FloatGrid *_this)
 
MRC_API void MR_FloatGrid_swap (MR_FloatGrid *_this, MR_FloatGrid *other)
 
MRC_API MR_OpenVdbFloatGridMR_FloatGrid_get (const MR_FloatGrid *_this)
 
MRC_API MR_OpenVdbFloatGridMR_deref_MR_FloatGrid (const MR_FloatGrid *_this)
 
MRC_API MR_OpenVdbFloatGridMR_FloatGrid_arrow (const MR_FloatGrid *_this)
 
MRC_API MR_std_shared_ptr_MR_OpenVdbFloatGridMR_FloatGrid_toVdb (const MR_FloatGrid *_this)
 
MRC_API MR_uint64_t MR_heapBytes_MR_FloatGrid (const MR_FloatGrid *grid)
 
MRC_API MR_FloatGridMR_resampled_float (const MR_FloatGrid *grid, float voxelScale, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb)
 
MRC_API MR_FloatGridMR_resampled_MR_Vector3f (const MR_FloatGrid *grid, const MR_Vector3f *voxelScale, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb)
 
MRC_API MR_FloatGridMR_cropped (const MR_FloatGrid *grid, const MR_Box3i *box, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb)
 
MRC_API void MR_gaussianFilter (MR_FloatGrid *grid, int32_t width, int32_t iters, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb)
 
MRC_API MR_FloatGridMR_gaussianFiltered (const MR_FloatGrid *grid, int32_t width, int32_t iters, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb)
 
MRC_API float MR_getValue (const MR_FloatGrid *grid, const MR_Vector3i *p)
 
MRC_API void MR_setValue_MR_Vector3i (MR_FloatGrid *grid, const MR_Vector3i *p, float value)
 
MRC_API void MR_setValue_MR_VoxelBitSet (MR_FloatGrid *grid, const MR_VoxelBitSet *region, float value)
 
MRC_API void MR_setLevelSetType (MR_FloatGrid *grid)
 
MRC_API MR_FloatGridMR_add_assign_MR_FloatGrid (MR_FloatGrid *a, const MR_FloatGrid *b)
 
MRC_API MR_FloatGridMR_sub_assign_MR_FloatGrid (MR_FloatGrid *a, const MR_FloatGrid *b)
 
MRC_API MR_FloatGridMR_mul_assign_MR_FloatGrid (MR_FloatGrid *a, const MR_FloatGrid *b)
 

Typedef Documentation

◆ MR_Box3i

typedef struct MR_Box3i MR_Box3i

◆ MR_FloatGrid

typedef struct MR_FloatGrid MR_FloatGrid

wrapper class that helps mrbind to avoid excess MRVDBFloatGrid.h includes Generated from class MR::FloatGrid.

◆ MR_OpenVdbFloatGrid

◆ MR_std_function_bool_from_float

◆ MR_std_shared_ptr_MR_OpenVdbFloatGrid

◆ MR_Vector3f

typedef struct MR_Vector3f MR_Vector3f

◆ MR_Vector3i

typedef struct MR_Vector3i MR_Vector3i

◆ MR_VoxelBitSet

Function Documentation

◆ MR_add_assign_MR_FloatGrid()

MRC_API MR_FloatGrid * MR_add_assign_MR_FloatGrid ( MR_FloatGrid * a,
const MR_FloatGrid * b )

Generated from function MR::operator+=. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_FloatGrid_Destroy() to free it when you're done using it.

◆ MR_cropped()

MRC_API MR_FloatGrid * MR_cropped ( const MR_FloatGrid * grid,
const MR_Box3i * box,
MR_PassBy cb_pass_by,
MR_std_function_bool_from_float * cb )

returns cropped grid Generated from function MR::cropped. Parameter grid can not be null. It is a single object. Parameter box can not be null. It is a single object. Parameter cb has a default argument: {}, pass MR_PassBy_DefaultArgument and a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_FloatGrid_Destroy() to free it when you're done using it.

◆ MR_deref_MR_FloatGrid()

MRC_API MR_OpenVdbFloatGrid * MR_deref_MR_FloatGrid ( const MR_FloatGrid * _this)

Generated from a method of class MR::FloatGrid named operator*. 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_FloatGrid_arrow()

MRC_API MR_OpenVdbFloatGrid * MR_FloatGrid_arrow ( const MR_FloatGrid * _this)

Generated from a method of class MR::FloatGrid named operator->. Parameter _this can not be null. It is a single object.

◆ MR_FloatGrid_AssignFromAnother()

MRC_API MR_FloatGrid * MR_FloatGrid_AssignFromAnother ( MR_FloatGrid * _this,
MR_PassBy _other_pass_by,
MR_FloatGrid * _other )

Generated from a method of class MR::FloatGrid named operator=. 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_FloatGrid_Construct()

MRC_API MR_FloatGrid * MR_FloatGrid_Construct ( MR_PassBy ptr_pass_by,
MR_std_shared_ptr_MR_OpenVdbFloatGrid * ptr )

Generated from a constructor of class MR::FloatGrid. Never returns null. Returns an instance allocated on the heap! Must call MR_FloatGrid_Destroy() to free it when you're done using it.

◆ MR_FloatGrid_ConstructFromAnother()

MRC_API MR_FloatGrid * MR_FloatGrid_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_FloatGrid * _other )

Generated from a constructor of class MR::FloatGrid. Never returns null. Returns an instance allocated on the heap! Must call MR_FloatGrid_Destroy() to free it when you're done using it.

◆ MR_FloatGrid_ConvertTo_bool()

MRC_API bool MR_FloatGrid_ConvertTo_bool ( const MR_FloatGrid * _this)

Generated from a conversion operator of class MR::FloatGrid to type bool. Parameter _this can not be null. It is a single object.

◆ MR_FloatGrid_DefaultConstruct()

MRC_API MR_FloatGrid * MR_FloatGrid_DefaultConstruct ( void )

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

◆ MR_FloatGrid_DefaultConstructArray()

MRC_API MR_FloatGrid * MR_FloatGrid_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_FloatGrid_DestroyArray(). Use MR_FloatGrid_OffsetMutablePtr() and MR_FloatGrid_OffsetPtr() to access the array elements.

◆ MR_FloatGrid_Destroy()

MRC_API void MR_FloatGrid_Destroy ( const MR_FloatGrid * _this)

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

◆ MR_FloatGrid_DestroyArray()

MRC_API void MR_FloatGrid_DestroyArray ( const MR_FloatGrid * _this)

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

◆ MR_FloatGrid_get()

MRC_API MR_OpenVdbFloatGrid * MR_FloatGrid_get ( const MR_FloatGrid * _this)

Generated from a method of class MR::FloatGrid named get. Parameter _this can not be null. It is a single object.

◆ MR_FloatGrid_OffsetMutablePtr()

MRC_API MR_FloatGrid * MR_FloatGrid_OffsetMutablePtr ( MR_FloatGrid * 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_FloatGrid_OffsetPtr()

MRC_API const MR_FloatGrid * MR_FloatGrid_OffsetPtr ( const MR_FloatGrid * 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_FloatGrid_reset()

MRC_API void MR_FloatGrid_reset ( MR_FloatGrid * _this)

Generated from a method of class MR::FloatGrid named reset. Parameter _this can not be null. It is a single object.

◆ MR_FloatGrid_swap()

MRC_API void MR_FloatGrid_swap ( MR_FloatGrid * _this,
MR_FloatGrid * other )

Generated from a method of class MR::FloatGrid named swap. Parameter _this can not be null. It is a single object. Parameter other can not be null. It is a single object.

◆ MR_FloatGrid_toVdb()

MRC_API MR_std_shared_ptr_MR_OpenVdbFloatGrid * MR_FloatGrid_toVdb ( const MR_FloatGrid * _this)

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

◆ MR_gaussianFilter()

MRC_API void MR_gaussianFilter ( MR_FloatGrid * grid,
int32_t width,
int32_t iters,
MR_PassBy cb_pass_by,
MR_std_function_bool_from_float * cb )

returns grid with gaussian filter applied Generated from function MR::gaussianFilter. Parameter grid can not be null. It is a single object. Parameter cb has a default argument: {}, pass MR_PassBy_DefaultArgument and a null pointer to use it.

◆ MR_gaussianFiltered()

MRC_API MR_FloatGrid * MR_gaussianFiltered ( const MR_FloatGrid * grid,
int32_t width,
int32_t iters,
MR_PassBy cb_pass_by,
MR_std_function_bool_from_float * cb )

Generated from function MR::gaussianFiltered. Parameter grid can not be null. It is a single object. Parameter cb has a default argument: {}, pass MR_PassBy_DefaultArgument and a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_FloatGrid_Destroy() to free it when you're done using it.

◆ MR_getValue()

MRC_API float MR_getValue ( const MR_FloatGrid * grid,
const MR_Vector3i * p )

returns the value at given voxel Generated from function MR::getValue. Parameter grid can not be null. It is a single object. Parameter p can not be null. It is a single object.

◆ MR_heapBytes_MR_FloatGrid()

MRC_API MR_uint64_t MR_heapBytes_MR_FloatGrid ( const MR_FloatGrid * grid)

returns the amount of heap memory occupied by grid Generated from function MR::heapBytes. Parameter grid can not be null. It is a single object.

◆ MR_mul_assign_MR_FloatGrid()

MRC_API MR_FloatGrid * MR_mul_assign_MR_FloatGrid ( MR_FloatGrid * a,
const MR_FloatGrid * b )

Generated from function MR::operator*=. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_FloatGrid_Destroy() to free it when you're done using it.

◆ MR_resampled_float()

MRC_API MR_FloatGrid * MR_resampled_float ( const MR_FloatGrid * grid,
float voxelScale,
MR_PassBy cb_pass_by,
MR_std_function_bool_from_float * cb )

resample this grid to fit voxelScale Generated from function MR::resampled. Parameter grid can not be null. It is a single object. Parameter cb has a default argument: {}, pass MR_PassBy_DefaultArgument and a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_FloatGrid_Destroy() to free it when you're done using it.

◆ MR_resampled_MR_Vector3f()

MRC_API MR_FloatGrid * MR_resampled_MR_Vector3f ( const MR_FloatGrid * grid,
const MR_Vector3f * voxelScale,
MR_PassBy cb_pass_by,
MR_std_function_bool_from_float * cb )

resample this grid to fit voxelScale Generated from function MR::resampled. Parameter grid can not be null. It is a single object. Parameter voxelScale can not be null. It is a single object. Parameter cb has a default argument: {}, pass MR_PassBy_DefaultArgument and a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_FloatGrid_Destroy() to free it when you're done using it.

◆ MR_setLevelSetType()

MRC_API void MR_setLevelSetType ( MR_FloatGrid * grid)

sets type of this grid as LEVEL SET (for normal flipping) Generated from function MR::setLevelSetType. Parameter grid can not be null. It is a single object.

◆ MR_setValue_MR_Vector3i()

MRC_API void MR_setValue_MR_Vector3i ( MR_FloatGrid * grid,
const MR_Vector3i * p,
float value )

sets given region voxels value

Note
region is in grid space (0 voxel id is minimum active voxel in grid) Generated from function MR::setValue. Parameter grid can not be null. It is a single object. Parameter p can not be null. It is a single object.

◆ MR_setValue_MR_VoxelBitSet()

MRC_API void MR_setValue_MR_VoxelBitSet ( MR_FloatGrid * grid,
const MR_VoxelBitSet * region,
float value )

sets given region voxels value

Note
region is in grid space (0 voxel id is minimum active voxel in grid) Generated from function MR::setValue. Parameter grid can not be null. It is a single object. Parameter region can not be null. It is a single object.

◆ MR_sub_assign_MR_FloatGrid()

MRC_API MR_FloatGrid * MR_sub_assign_MR_FloatGrid ( MR_FloatGrid * a,
const MR_FloatGrid * b )

Generated from function MR::operator-=. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_FloatGrid_Destroy() to free it when you're done using it.