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::RayDetail::CrossingPairer< T > Struct Template Reference

Pairs crossings, in order, into spans: a span from each crossing the ray enters at to the next it leaves at. More...

#include <EBGeometry_RaySpans.hpp>

Public Member Functions

void take (const SpanEndT< T > &a_end, const bool a_entering, const T a_t0, RaySpansT< T > &a_spans) noexcept
 Take the next crossing.
 
void finish (const T a_t, RaySpansT< T > &a_spans) noexcept
 Close the open span, if any, at an Open end.
 

Public Attributes

SpanEndT< T > m_start
 Where the open span begins.
 
bool m_inside = false
 Whether a span is open.
 
bool m_first = true
 Whether no crossing has been seen yet.
 

Detailed Description

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

Pairs crossings, in order, into spans: a span from each crossing the ray enters at to the next it leaves at.

Internal helper; not part of the public API. A crossing the ray leaves at before any it enters at closes a span from the start of the interval; a repeated crossing of the same kind (a ray through an edge shared by two faces crosses both) is skipped.

Template Parameters
TFloating-point precision.

Member Function Documentation

◆ finish()

template<class T >
void EBGeometry::RayDetail::CrossingPairer< T >::finish ( const T  a_t,
RaySpansT< T > &  a_spans 
)
inlinenoexcept

Close the open span, if any, at an Open end.

Parameters
[in]a_tWhere it ends.
[in,out]a_spansThe list.

◆ take()

template<class T >
void EBGeometry::RayDetail::CrossingPairer< T >::take ( const SpanEndT< T > &  a_end,
const bool  a_entering,
const T  a_t0,
RaySpansT< T > &  a_spans 
)
inlinenoexcept

Take the next crossing.

Parameters
[in]a_endThe crossing.
[in]a_enteringWhether the ray enters there.
[in]a_t0Start of the interval.
[in,out]a_spansThe list.

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