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

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

#include <EBGeometry_PointCloudHashGrid.hpp>

Public Attributes

std::size_t index = 0
 Cloud index of the matched point.
 
distanceSquared = std::numeric_limits<T>::max()
 Squared distance from the query to it.
 

Detailed Description

template<class T, class Meta = std::size_t>
struct EBGeometry::PointCloudHashGrid< T, Meta >::Hit

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

Identical in shape to PointCloudBVH::Hit. index is the point's position in the input positions / metadata arrays; distanceSquared avoids a sqrt on the hot path.

Note
A "no match" result (an empty cloud, or a self-query on a cloud with no other point) is signalled by distanceSquared == std::numeric_limits<T>::max(); test that rather than index, since the default index of 0 is indistinguishable from a genuine match on point 0. The multi-result queries instead report the count found via their return value.

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