MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::RebuildMeshSettings Struct Reference

#include <MRRebuildMesh.h>

Public Attributes

bool preSubdivide = true
 
float voxelSize = 0
 
SignDetectionModeShort signMode = SignDetectionModeShort::Auto
 
bool closeHolesInHoleWindingNumber = true
 whether to construct closed mesh in signMode = SignDetectionModeShort::HoleWindingNumber
 
OffsetMode offsetMode = OffsetMode::Standard
 
UndirectedEdgeBitSet * outSharpEdges = nullptr
 if non-null then created sharp edges (only if offsetMode = OffsetMode::Sharpening) will be saved here
 
float windingNumberThreshold = 0.5f
 
float windingNumberBeta = 2
 
std::shared_ptr< IFastWindingNumberfwn
 
bool decimate = true
 whether to decimate resulting mesh
 
float tinyEdgeLength = -1
 
ProgressCallback progress
 To report algorithm's progress and cancel it on user demand.
 
std::function< void(SignDetectionMode)> onSignDetectionModeSelected
 

Member Data Documentation

◆ closeHolesInHoleWindingNumber

bool MR::RebuildMeshSettings::closeHolesInHoleWindingNumber = true

whether to construct closed mesh in signMode = SignDetectionModeShort::HoleWindingNumber

◆ decimate

bool MR::RebuildMeshSettings::decimate = true

whether to decimate resulting mesh

◆ fwn

std::shared_ptr<IFastWindingNumber> MR::RebuildMeshSettings::fwn

defines particular implementation of IFastWindingNumber interface that will compute windings (if required). If it is not specified, default FastWindingNumber is used

◆ offsetMode

OffsetMode MR::RebuildMeshSettings::offsetMode = OffsetMode::Standard

◆ onSignDetectionModeSelected

std::function<void(SignDetectionMode)> MR::RebuildMeshSettings::onSignDetectionModeSelected

this callback is invoked when SignDetectionMode is determined (useful if signMode = SignDetectionModeShort::Auto), but before actual work begins

◆ outSharpEdges

UndirectedEdgeBitSet* MR::RebuildMeshSettings::outSharpEdges = nullptr

if non-null then created sharp edges (only if offsetMode = OffsetMode::Sharpening) will be saved here

◆ preSubdivide

bool MR::RebuildMeshSettings::preSubdivide = true

whether to make subdivision of initial mesh before conversion to voxels, despite time and memory required for the subdivision, it typically makes the whole rebuilding faster (or even much faster in case of large initial triangles), because AABB tree contains small triangles in leaves, which is good for both 1) search for closest triangle because the closest box more frequently contains the closest triangle, 2) and winding number approximation because of more frequent usage of approximation for distant dipoles

◆ progress

ProgressCallback MR::RebuildMeshSettings::progress

To report algorithm's progress and cancel it on user demand.

◆ signMode

SignDetectionModeShort MR::RebuildMeshSettings::signMode = SignDetectionModeShort::Auto

◆ tinyEdgeLength

float MR::RebuildMeshSettings::tinyEdgeLength = -1

only if decimate = true: edges not longer than this value will be collapsed even if it results in appearance of a triangle with high aspect ratio

◆ voxelSize

float MR::RebuildMeshSettings::voxelSize = 0

Size of voxel in grid conversions; The user is responsible for setting some positive value here

◆ windingNumberBeta

float MR::RebuildMeshSettings::windingNumberBeta = 2

if general winding number is used to differentiate inside from outside: determines the precision of fast approximation: the more the better, minimum value is 1

◆ windingNumberThreshold

float MR::RebuildMeshSettings::windingNumberThreshold = 0.5f

if general winding number is used to differentiate inside from outside: positive distance if winding number below or equal this threshold; ideal threshold: 0.5 for closed meshes; 0.0 for planar meshes


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