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

A BVH ray query whose boxes are grown by a radius: what a mesh's offset faces are walked with. More...

#include <EBGeometry_OffsetRayForms.hpp>

Public Types

using Scalar = T
 Floating-point precision.
 
using Key = T
 Key type: a distance along the ray.
 

Public Member Functions

 GrownRayQuery (const RayT< T > &a_ray, const T a_tMin, const T a_grow) noexcept
 The query along a ray.
 
T entry (const T(&a_lo)[3], const T(&a_hi)[3]) const noexcept
 Where the ray enters a grown box.
 
template<size_t K>
Array< T, K > keys (const BVH::ChildBoxes< T, K > &a_row) const noexcept
 Where the ray enters the K grown child boxes.
 
template<size_t K>
T key (const BVH::ChildBoxes< T, K > &a_row, const size_t a_k) const noexcept
 Where the ray enters one grown child box.
 
T key (const BoundingVolumes::AABBT< T > &a_box) const noexcept
 Where the ray enters a grown box.
 

Public Attributes

Vec3T< T > m_origin
 Ray origin.
 
Vec3T< T > m_inverseDirection
 1 / direction, per component.
 
T m_tMin
 Start of the ray.
 
T m_grow
 How much each box is grown.
 

Detailed Description

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

A BVH ray query whose boxes are grown by a radius: what a mesh's offset faces are walked with.

Internal helper; not part of the public API. Growing [lo, hi] by g moves each axis's slab distances by g / |direction component| outward.

Template Parameters
TFloating-point precision.

Constructor & Destructor Documentation

◆ GrownRayQuery()

template<class T >
EBGeometry::RayDetail::GrownRayQuery< T >::GrownRayQuery ( const RayT< T > &  a_ray,
const T  a_tMin,
const T  a_grow 
)
inlinenoexcept

The query along a ray.

Parameters
[in]a_rayThe ray.
[in]a_tMinStart.
[in]a_growHow much each box is grown.

Member Function Documentation

◆ entry()

template<class T >
T EBGeometry::RayDetail::GrownRayQuery< T >::entry ( const T(&)  a_lo[3],
const T(&)  a_hi[3] 
) const
inlinenoexcept

Where the ray enters a grown box.

Parameters
[in]a_loLow corner.
[in]a_hiHigh corner.
Returns
The entry, or +infinity.

◆ key() [1/2]

template<class T >
T EBGeometry::RayDetail::GrownRayQuery< T >::key ( const BoundingVolumes::AABBT< T > &  a_box) const
inlinenoexcept

Where the ray enters a grown box.

Parameters
[in]a_boxBox.
Returns
The entry.

◆ key() [2/2]

template<class T >
template<size_t K>
T EBGeometry::RayDetail::GrownRayQuery< T >::key ( const BVH::ChildBoxes< T, K > &  a_row,
const size_t  a_k 
) const
inlinenoexcept

Where the ray enters one grown child box.

Template Parameters
KBranching factor.
Parameters
[in]a_rowChild boxes.
[in]a_kChild slot.
Returns
The entry.

◆ keys()

template<class T >
template<size_t K>
Array< T, K > EBGeometry::RayDetail::GrownRayQuery< T >::keys ( const BVH::ChildBoxes< T, K > &  a_row) const
inlinenoexcept

Where the ray enters the K grown child boxes.

Template Parameters
KBranching factor.
Parameters
[in]a_rowChild boxes.
Returns
The entries.

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