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

#include <MRClosestWeightedPoint.h>

Public Member Functions

float bidirDist () const
 bidirectional distance from input location to mtp considering point's weight
 
float dist () const
 
auto operator<=> (const MeshPointAndDistance &other) const
 comparison telling which point is closer to the location
 
bool valid () const
 check for validity, otherwise there is no point closer than maxBidirDist
 
 operator bool () const
 

Public Attributes

Vector3f loc
 point location
 
MeshTriPoint mtp
 the corresponding point on mesh in barycentric representation
 
float eucledeanDist = 0
 euclidean distance from input location to mtp
 
float w = 0
 point's weight
 
bool bidirectionalOrOutside = true
 

Member Function Documentation

◆ bidirDist()

float MR::MeshPointAndDistance::bidirDist ( ) const
inlinenodiscard

bidirectional distance from input location to mtp considering point's weight

◆ dist()

float MR::MeshPointAndDistance::dist ( ) const
inlinenodiscard

the distance from input location to mtp considering point's weight and location inside/outside; dist() is continuous function of location unlike innerDist(), which makes 2*weight jump if the location moves through the surface

◆ operator bool()

MR::MeshPointAndDistance::operator bool ( ) const
inlineexplicitnodiscard

◆ operator<=>()

auto MR::MeshPointAndDistance::operator<=> ( const MeshPointAndDistance & other) const
inline

comparison telling which point is closer to the location

◆ valid()

bool MR::MeshPointAndDistance::valid ( ) const
inlinenodiscard

check for validity, otherwise there is no point closer than maxBidirDist

Member Data Documentation

◆ bidirectionalOrOutside

bool MR::MeshPointAndDistance::bidirectionalOrOutside = true

either 1) bidirectional distances are computed, or 2) input location is locally outside of the surface (by pseudonormal) used for optimization

◆ eucledeanDist

float MR::MeshPointAndDistance::eucledeanDist = 0

euclidean distance from input location to mtp

◆ loc

Vector3f MR::MeshPointAndDistance::loc

point location

◆ mtp

MeshTriPoint MR::MeshPointAndDistance::mtp

the corresponding point on mesh in barycentric representation

◆ w

float MR::MeshPointAndDistance::w = 0

point's weight


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