options determining computation of distance from a point to a mesh More...
#include <MRDistanceToMeshOptions.h>
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 |
options determining computation of distance from a point to a mesh
float MR::DistanceToMeshOptions::maxDistSq { FLT_MAX } |
maximum squared distance from a point to mesh to be computed precisely
float MR::DistanceToMeshOptions::minDistSq { 0 } |
minimum squared distance from a point to mesh to be computed precisely
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
float MR::DistanceToMeshOptions::windingNumberBeta = 2 |
only for SignDetectionMode::HoleWindingRule: determines the precision of fast approximation: the more the better, minimum value is 1
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