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

One end of a span: where a ray enters or leaves an object. More...

#include <EBGeometry_Ray.hpp>

Public Types

enum  Kind : uint8_t { Open = 0 , Exact = 1 , Marched = 2 }
 What an end is. More...
 

Public Member Functions

bool crossing () const noexcept
 Whether the end is a crossing of the surface.
 

Public Attributes

T m_t
 Distance along the ray.
 
uint32_t m_leaf
 Which of a composition's leaves the crossing lies on, numbered by the composition; a shape that is not a composition leaves it 0.
 
Kind m_kind
 What the end is.
 

Detailed Description

template<class T>
struct EBGeometry::SpanEndT< T >

One end of a span: where a ray enters or leaves an object.

An end is either a crossing of the object's surface, or the end of the interval the ray was traced over (or of what is known of it; see RaySpansT), which is no crossing. A crossing carries no normal, so that span lists stay small (on a device they live in each thread's local memory, where every word copied or compared costs a memory operation, which is most of what tracing costs): a composition names the leaf it lies on (m_leaf), and asks that leaf for the normal once, at the crossing the trace ends at.

Template Parameters
TFloating-point precision.

Member Enumeration Documentation

◆ Kind

template<class T >
enum EBGeometry::SpanEndT::Kind : uint8_t

What an end is.

Enumerator
Open 

No crossing: an end of the interval, or of what is known.

Exact 

A crossing found exactly, by a ray form.

Marched 

A crossing found by marching, to within RayOptions::m_tolerance.

Member Function Documentation

◆ crossing()

template<class T >
bool EBGeometry::SpanEndT< T >::crossing ( ) const
inlinenoexcept

Whether the end is a crossing of the surface.

Returns
m_kind != Open.

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