MeshLib Documentation
Loading...
Searching...
No Matches
MR::MarchingCubesParams Struct Reference

#include <MRMarchingCubes.h>

Public Types

enum class  CachingMode { Automatic , None , Normal }
 

Public Attributes

Vector3f origin
 origin point of voxels box in 3D space with output mesh
 
ProgressCallback cb
 progress callback
 
float iso { 0.0f }
 target iso-value of the surface to be extracted from volume
 
bool lessInside { false }
 should be false for dense volumes, and true for distance volume
 
Vector< VoxelId, FaceId > * outVoxelPerFaceMap { nullptr }
 optional output map FaceId->VoxelId
 
VoxelPointPositioner positioner = {}
 
int maxVertices = INT_MAX
 if the mesh exceeds this number of vertices, an error returns
 
enum MR::MarchingCubesParams::CachingMode cachingMode = CachingMode::Automatic
 
std::function< void()> freeVolume
 this optional function is called when volume is no longer needed to deallocate it and reduce peak memory consumption
 

Member Enumeration Documentation

◆ CachingMode

caching mode to reduce the number of accesses to voxel volume data on the first pass of the algorithm by consuming more memory on cache; note: the cache for the second pass of the algorithm (bit sets of invalid and lower-than-iso voxels are always allocated)

Enumerator
Automatic 

choose caching mode automatically depending on volume type (current defaults: Normal for FunctionVolume and VdbVolume, None for others)

None 

don't cache any data

Normal 

allocates 2 full slices per parallel thread

Member Data Documentation

◆ cachingMode

enum MR::MarchingCubesParams::CachingMode MR::MarchingCubesParams::cachingMode = CachingMode::Automatic

◆ cb

ProgressCallback MR::MarchingCubesParams::cb

progress callback

◆ freeVolume

std::function<void()> MR::MarchingCubesParams::freeVolume

this optional function is called when volume is no longer needed to deallocate it and reduce peak memory consumption

◆ iso

float MR::MarchingCubesParams::iso { 0.0f }

target iso-value of the surface to be extracted from volume

◆ lessInside

bool MR::MarchingCubesParams::lessInside { false }

should be false for dense volumes, and true for distance volume

◆ maxVertices

int MR::MarchingCubesParams::maxVertices = INT_MAX

if the mesh exceeds this number of vertices, an error returns

◆ origin

Vector3f MR::MarchingCubesParams::origin

origin point of voxels box in 3D space with output mesh

◆ outVoxelPerFaceMap

Vector<VoxelId, FaceId>* MR::MarchingCubesParams::outVoxelPerFaceMap { nullptr }

optional output map FaceId->VoxelId

◆ positioner

VoxelPointPositioner MR::MarchingCubesParams::positioner = {}

function to calculate position of result mesh points if the function isn't set, a linear positioner will be used note: this function is called in parallel from different threads


The documentation for this struct was generated from the following file: