template<typename T, size_t Dim, size_t IndexBits = sizeof(T) * CHAR_BIT, size_t PrimCountBits = 4>
struct bvh::v2::Node< T, Dim, IndexBits, PrimCountBits >
Binary BVH node, containing its bounds and an index into its children or the primitives it contains.
By definition, inner BVH nodes do not contain primitives; only leaves do.
Definition at line 23 of file node.h.
|
| Node ()=default |
|
BVH_ALWAYS_INLINE BBox< T, Dim > | get_bbox () const |
|
BVH_ALWAYS_INLINE Vec< T, Dim > | get_max_bounds (const Octant &octant) const |
|
BVH_ALWAYS_INLINE Vec< T, Dim > | get_min_bounds (const Octant &octant) const |
|
BVH_ALWAYS_INLINE std::pair< T, T > | intersect_fast (const Ray< T, Dim > &ray, const Vec< T, Dim > &inv_dir, const Vec< T, Dim > &inv_org, const Octant &octant) const |
|
BVH_ALWAYS_INLINE std::pair< T, T > | intersect_robust (const Ray< T, Dim > &ray, const Vec< T, Dim > &inv_dir, const Vec< T, Dim > &inv_dir_pad, const Octant &octant) const |
| Robust ray-node intersection routine. See "Robust BVH Ray Traversal", by T. Ize.
|
|
BVH_ALWAYS_INLINE bool | is_leaf () const |
|
bool | operator!= (const Node &other) const |
|
bool | operator== (const Node &other) const |
|
BVH_ALWAYS_INLINE void | serialize (OutputStream &stream) const |
|
BVH_ALWAYS_INLINE void | set_bbox (const BBox< T, Dim > &bbox) |
|
template<typename T , size_t Dim, size_t IndexBits = sizeof(T) * CHAR_BIT, size_t PrimCountBits = 4>
std::array<T, Dim * 2> bvh::v2::Node< T, Dim, IndexBits, PrimCountBits >::bounds |
Bounds of the node, laid out in memory as [min_x, max_x, min_y, max_y, ...]
.
Users should not really depend on a specific order and instead use get_bbox()
and extract the min
and/or max
components accordingly.
Definition at line 34 of file node.h.