EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Public Attributes | List of all members
EBGeometry::ClosestPoint< T > Struct Template Reference

The point of a mesh closest to a query point, as the mesh SDFs' closestPoint() returns it. More...

#include <EBGeometry_MeshDistanceFunctions.hpp>

Public Attributes

T signedDistance = Math::Limits<T>::max()
 Signed distance, as signedDistance() returns it.
 
uint32_t faceId = UINT32_MAX
 Id of the face the point lies on, as getClosestFace().
 
Vec3T< T > point = Vec3T<T>::zeros()
 The closest point on the mesh.
 
Vec3T< T > normal = Vec3T<T>::zeros()
 Unit pseudonormal of the face, edge or vertex it lies on.
 

Detailed Description

template<class T>
struct EBGeometry::ClosestPoint< T >

The point of a mesh closest to a query point, as the mesh SDFs' closestPoint() returns it.

A plain, trivially copyable value, so closestPoint() is callable on a device. The closest point point lies on the face faceId, and |query - point| equals |signedDistance| to rounding. normal is the unit pseudonormal of the face, edge or vertex the point lies on (for a TriMeshSDF, of the triangle's face, edge or vertex: a point on the diagonal of a fan-triangulated polygon has the polygon's normal there, since both triangles have it). When several faces are equally close (a point on the medial surface), the first one found is reported. For an empty mesh, faceId is UINT32_MAX and the other members keep their defaults.

Template Parameters
TFloating-point precision type.

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