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

One query result: the cloud index of a matched point and its squared distance. More...

#include <EBGeometry_PointCloud.hpp>

Public Member Functions

bool valid () const noexcept
 Whether this is a match rather than a miss.
 

Public Attributes

uint32_t index = InvalidIndex
 Cloud index of the matched point.
 
T distanceSquared = Math::Limits<T>::max()
 Squared distance from the query to it.
 

Detailed Description

template<class T>
struct EBGeometry::PointCloud::Hit< T >

One query result: the cloud index of a matched point and its squared distance.

distanceSquared avoids a sqrt on the hot path. A default-constructed Hit is a miss: index == InvalidIndex and distanceSquared == Math::Limits<T>::max(). Queries return it when there is no point to report (an empty cloud, or a self-query on a cloud with one point), and leave it in the result slots they could not fill.

Template Parameters
TFloating-point precision.

Member Function Documentation

◆ valid()

template<class T >
bool EBGeometry::PointCloud::Hit< T >::valid ( ) const
inlinenoexcept

Whether this is a match rather than a miss.

Returns
True if index refers to a point.

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