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

Where a ray is inside a convex piece: [m_in, m_out], with the outward normals there; empty if m_in > m_out. More...

#include <EBGeometry_OffsetRayForms.hpp>

Public Member Functions

bool hit () const noexcept
 Whether the ray meets the piece.
 
void clip (const RayT< T > &a_ray, const Vec3T< T > &a_n, const T a_d) noexcept
 Clip to the half-space n . x <= d.
 
void unite (const Piece &a_other) noexcept
 Unite with another piece, the union being convex: the nearer entry and the farther exit.
 

Static Public Member Functions

static Piece empty () noexcept
 An empty piece.
 

Public Attributes

T m_in = -Math::Limits<T>::infinity()
 Where the ray enters.
 
T m_out = Math::Limits<T>::infinity()
 Where it leaves.
 
Vec3T< T > m_nIn = Vec3T<T>::zeros()
 Outward normal where it enters.
 
Vec3T< T > m_nOut = Vec3T<T>::zeros()
 Outward normal where it leaves.
 

Detailed Description

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

Where a ray is inside a convex piece: [m_in, m_out], with the outward normals there; empty if m_in > m_out.

Internal helper; not part of the public API.

Template Parameters
TFloating-point precision.

Member Function Documentation

◆ clip()

template<class T >
void EBGeometry::RayDetail::Piece< T >::clip ( const RayT< T > &  a_ray,
const Vec3T< T > &  a_n,
const T  a_d 
)
inlinenoexcept

Clip to the half-space n . x <= d.

Parameters
[in]a_rayThe ray.
[in]a_nOutward normal, unit length.
[in]a_dOffset.

◆ empty()

template<class T >
static Piece EBGeometry::RayDetail::Piece< T >::empty ( )
inlinestaticnoexcept

An empty piece.

Returns
The piece.

◆ hit()

template<class T >
bool EBGeometry::RayDetail::Piece< T >::hit ( ) const
inlinenoexcept

Whether the ray meets the piece.

Returns
m_in <= m_out.

◆ unite()

template<class T >
void EBGeometry::RayDetail::Piece< T >::unite ( const Piece< T > &  a_other)
inlinenoexcept

Unite with another piece, the union being convex: the nearer entry and the farther exit.

Parameters
[in]a_otherThe other piece.

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