MeshLib Documentation
Loading...
Searching...
No Matches
Basic Structures

This chapter represents documentation about basic structures elements. More...

Classes

struct  MR::Image
 
struct  MR::MeshTexture
 
struct  MR::SceneColors
 
class  MR::SceneSettings
 
struct  MR::OpenVdbFloatGrid
 this class just hides very complex type of typedef openvdb::FloatGrid More...
 

Typedefs

typedef std::function< bool(float)> MR::ProgressCallback
 

Functions

MRVOXELS_API size_t MR::heapBytes (const FloatGrid &grid)
 returns the amount of heap memory occupied by grid
 
MRVOXELS_API FloatGrid MR::resampled (const FloatGrid &grid, float voxelScale, ProgressCallback cb={})
 resample this grid to fit voxelScale
 
MRVOXELS_API FloatGrid MR::resampled (const FloatGrid &grid, const Vector3f &voxelScale, ProgressCallback cb={})
 resample this grid to fit voxelScale
 
MRVOXELS_API FloatGrid MR::cropped (const FloatGrid &grid, const Box3i &box, ProgressCallback cb={})
 returns cropped grid
 
MRVOXELS_API float MR::getValue (const FloatGrid &grid, const Vector3i &p)
 returns the value at given voxel
 
MRVOXELS_API void MR::setValue (FloatGrid &grid, const VoxelBitSet &region, float value)
 
MRVOXELS_API void MR::setLevelSetType (FloatGrid &grid)
 sets type of this grid as LEVEL SET (for normal flipping)
 
MRVOXELS_API FloatGrid MR::operator+= (FloatGrid &a, const FloatGrid &b)
 
MRVOXELS_API FloatGrid MR::operator-= (FloatGrid &a, const FloatGrid &b)
 
MRVOXELS_API FloatGrid MR::operator*= (FloatGrid &a, const FloatGrid &b)
 
MR_BIND_IGNORE openvdb::FloatGrid & MR::ovdb (OpenVdbFloatGrid &v)
 
MR_BIND_IGNORE const openvdb::FloatGrid & MR::ovdb (const OpenVdbFloatGrid &v)
 
MR_BIND_IGNORE FloatGrid MR::MakeFloatGrid (openvdb::FloatGrid::Ptr &&p)
 makes MR::FloatGrid shared pointer taking the contents of the input pointer
 
MR_BIND_IGNORE Vector3i MR::fromVdb (const openvdb::Coord &v)
 
MR_BIND_IGNORE openvdb::Coord MR::toVdb (const Vector3i &v)
 

Detailed Description

This chapter represents documentation about basic structures elements.

Typedef Documentation

◆ ProgressCallback

typedef std::function<bool( float )> MR::ProgressCallback

Argument value - progress in [0,1]; returns true to continue the operation and returns false to stop the operation

Function Documentation

◆ cropped()

MRVOXELS_API FloatGrid MR::cropped ( const FloatGrid & grid,
const Box3i & box,
ProgressCallback cb = {} )

returns cropped grid

◆ fromVdb()

MR_BIND_IGNORE Vector3i MR::fromVdb ( const openvdb::Coord & v)
inline

◆ getValue()

MRVOXELS_API float MR::getValue ( const FloatGrid & grid,
const Vector3i & p )
nodiscard

returns the value at given voxel

◆ heapBytes()

MRVOXELS_API size_t MR::heapBytes ( const FloatGrid & grid)
nodiscard

returns the amount of heap memory occupied by grid

◆ MakeFloatGrid()

MR_BIND_IGNORE FloatGrid MR::MakeFloatGrid ( openvdb::FloatGrid::Ptr && p)
inline

makes MR::FloatGrid shared pointer taking the contents of the input pointer

◆ operator*=()

MRVOXELS_API FloatGrid MR::operator*= ( FloatGrid & a,
const FloatGrid & b )

◆ operator+=()

MRVOXELS_API FloatGrid MR::operator+= ( FloatGrid & a,
const FloatGrid & b )

◆ operator-=()

MRVOXELS_API FloatGrid MR::operator-= ( FloatGrid & a,
const FloatGrid & b )

◆ ovdb() [1/2]

MR_BIND_IGNORE const openvdb::FloatGrid & MR::ovdb ( const OpenVdbFloatGrid & v)
inline

◆ ovdb() [2/2]

MR_BIND_IGNORE openvdb::FloatGrid & MR::ovdb ( OpenVdbFloatGrid & v)
inline

◆ resampled() [1/2]

MRVOXELS_API FloatGrid MR::resampled ( const FloatGrid & grid,
const Vector3f & voxelScale,
ProgressCallback cb = {} )

resample this grid to fit voxelScale

◆ resampled() [2/2]

MRVOXELS_API FloatGrid MR::resampled ( const FloatGrid & grid,
float voxelScale,
ProgressCallback cb = {} )

resample this grid to fit voxelScale

◆ setLevelSetType()

MRVOXELS_API void MR::setLevelSetType ( FloatGrid & grid)

sets type of this grid as LEVEL SET (for normal flipping)

◆ setValue()

MRVOXELS_API void MR::setValue ( FloatGrid & grid,
const VoxelBitSet & region,
float value )

sets given region voxels value

Note
region is in grid space (0 voxel id is minimum active voxel in grid)

◆ toVdb()

MR_BIND_IGNORE openvdb::Coord MR::toVdb ( const Vector3i & v)
inline