|
| | RayQuery (const Vec3T< T > &a_origin, const Vec3T< T > &a_direction, T a_tMin=T(0)) noexcept |
| | The ray origin + t * direction, t >= tMin.
|
| |
| template<size_t K> |
| Array< T, K > | keys (const ChildBoxes< T, K > &a_row) const noexcept |
| | Where the ray enters the K child boxes of a node (+infinity where it misses one).
|
| |
| template<size_t K> |
| T | key (const ChildBoxes< T, K > &a_row, size_t a_k) const noexcept |
| | Where the ray enters one child box, bit for bit what keys() gives it.
|
| |
| T | key (const BoundingVolumes::AABBT< T > &a_box) const noexcept |
| | Where the ray enters a box (the root's).
|
| |
template<class T>
struct EBGeometry::BVH::RayQuery< T >
A ray tracked through a BVH: the key of a box is the distance along the ray at which it enters the box, or +infinity if it misses it.
The ray is origin + t * direction for t >= tMin, with a unit direction so that t is a distance. The caller's bound is the far end: the nearest crossing found so far for a closest-hit query, a segment's length for a segment, or -infinity to end the walk (any-hit after the first crossing). The slab test is robust to a zero direction component (its inverse is +-infinity) and drops the NaN of 0 * infinity; boxes are padded by a few ulps so a ray through a face or edge shared by two boxes enters one of them. This type holds no RayT or HitT: those belong to the ray queries built on it.
- Template Parameters
-
| T | Floating-point precision. |