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

options determining computation of distance from a point to a mesh More...

#include <MRDistanceToMeshOptions.h>

+ Inheritance diagram for MR::DistanceToMeshOptions:

Public Attributes

float minDistSq { 0 }
 minimum squared distance from a point to mesh to be computed precisely
 
float maxDistSq { FLT_MAX }
 maximum squared distance from a point to mesh to be computed precisely
 
bool nullOutsideMinMax = true
 
float windingNumberThreshold = 0.5f
 
float windingNumberBeta = 2
 

Detailed Description

options determining computation of distance from a point to a mesh

Member Data Documentation

◆ maxDistSq

float MR::DistanceToMeshOptions::maxDistSq { FLT_MAX }

maximum squared distance from a point to mesh to be computed precisely

◆ minDistSq

float MR::DistanceToMeshOptions::minDistSq { 0 }

minimum squared distance from a point to mesh to be computed precisely

◆ nullOutsideMinMax

bool MR::DistanceToMeshOptions::nullOutsideMinMax = true

what to do if actual distance is outside [min, max) range: true - return std::nullopt for std::optional<float> or NaN for float, false - return approximate value of the distance (with correct sign in case of SignDetectionMode::HoleWindingRule); please note that in HoleWindingRule the sign can change even for too small or too large distances, so if you would like to get closed mesh from marching cubes, set false here

◆ windingNumberBeta

float MR::DistanceToMeshOptions::windingNumberBeta = 2

only for SignDetectionMode::HoleWindingRule: determines the precision of fast approximation: the more the better, minimum value is 1

◆ windingNumberThreshold

float MR::DistanceToMeshOptions::windingNumberThreshold = 0.5f

only for SignDetectionMode::HoleWindingRule: 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: