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::SphereCloud::Hit< T > Struct Template Reference

One query result: the cloud index of a sphere and the signed distance to its surface. More...

#include <EBGeometry_SphereCloud.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 sphere.
 
T distance = Math::Limits<T>::max()
 Signed distance from the query to its surface.
 

Detailed Description

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

One query result: the cloud index of a sphere and the signed distance to its surface.

The distance is |p - c| - r, negative inside the sphere. A default-constructed Hit is a miss: index == InvalidIndex and distance == Math::Limits<T>::max(), which a query on an empty cloud returns.

Template Parameters
TFloating-point precision.

Member Function Documentation

◆ valid()

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

Whether this is a match rather than a miss.

Returns
True if index refers to a sphere.

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