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

The nearest crossings of a mesh along a ray, in order, as a BVH walk finds them: at most Capacity, enough for the spans a list holds and one more. More...

#include <EBGeometry_MeshRayForms.hpp>

Collaboration diagram for EBGeometry::RayDetail::NearestCrossings< T >:
Collaboration graph
[legend]

Classes

struct  Crossing
 A crossing. More...
 

Public Member Functions

void insert (const T a_t, const bool a_entering) noexcept
 Take a crossing.
 
T horizon () const noexcept
 How far the crossings are known: the end of the interval, or the farthest held once full.
 
void toSpans (const T a_t0, const bool a_inside, RaySpansT< T > &a_spans) const noexcept
 The spans: the crossings paired by the side of the face the ray crosses from.
 

Public Attributes

Crossing m_crossings [Capacity]
 The crossings, nearest first.
 
uint32_t m_count = 0
 How many are held.
 
T m_tMax
 End of the interval.
 

Static Public Attributes

static constexpr uint32_t Capacity = 2U * RaySpansT<T>::Capacity + 1U
 Most crossings held.
 

Detailed Description

template<class T>
struct EBGeometry::RayDetail::NearestCrossings< T >

The nearest crossings of a mesh along a ray, in order, as a BVH walk finds them: at most Capacity, enough for the spans a list holds and one more.

Internal helper; not part of the public API. Once full, a nearer crossing replaces the farthest, and the walk's bound is the farthest, so that it leaves out the boxes beyond; the crossings are then known only up to it.

Template Parameters
TFloating-point precision.

Member Function Documentation

◆ horizon()

template<class T >
T EBGeometry::RayDetail::NearestCrossings< T >::horizon ( ) const
inlinenoexcept

How far the crossings are known: the end of the interval, or the farthest held once full.

Returns
The distance; also the walk's bound.

◆ insert()

template<class T >
void EBGeometry::RayDetail::NearestCrossings< T >::insert ( const T  a_t,
const bool  a_entering 
)
inlinenoexcept

Take a crossing.

Parameters
[in]a_tDistance along the ray.
[in]a_enteringWhether the ray enters there.

◆ toSpans()

template<class T >
void EBGeometry::RayDetail::NearestCrossings< T >::toSpans ( const T  a_t0,
const bool  a_inside,
RaySpansT< T > &  a_spans 
) const
inlinenoexcept

The spans: the crossings paired by the side of the face the ray crosses from.

Parameters
[in]a_t0Start of the interval.
[in]a_insideWhether the ray is inside at a_t0; read only if there are no crossings.
[out]a_spansThe list.

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