EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
EBGeometry_BVHQuery.hpp File Reference

What PackedBVH::traverse() tracks through a tree: query types, the child-box rows they test, and the order the children are visited in. More...

#include <cstddef>
#include <cstdint>
#include <type_traits>
#include <utility>
#include "EBGeometry_Array.hpp"
#include "EBGeometry_BoundingVolumes.hpp"
#include "EBGeometry_GPU.hpp"
#include "EBGeometry_Math.hpp"
#include "EBGeometry_Vec.hpp"
#include "EBGeometry_BVHQueryImplem.hpp"
Include dependency graph for EBGeometry_BVHQuery.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  EBGeometry::BVH::ChildBoxes< T, K >
 The boxes of the K children of one interior node, in SoA layout: m_lo[axis][child] and m_hi[axis][child], so that one axis of all K children loads as one SIMD register. More...
 
struct  EBGeometry::BVH::NearestFirst
 Visit the children within the bound nearest first (smallest key first). The default: a nearest-primitive search or a closest-hit ray tightens its bound fastest this way. More...
 
struct  EBGeometry::BVH::FarthestFirst
 Visit the children within the bound farthest first (largest key first). More...
 
struct  EBGeometry::BVH::AsStored
 Visit the children within the bound in the order they are stored (first slot first), without sorting: for an any-hit query or a search that collects every leaf it reaches, where order does not matter. More...
 
struct  EBGeometry::BVH::DescendAll
 The default visit callback of PackedBVH::traverse(): enter every node that passes the bound. More...
 
struct  EBGeometry::BVH::QueryKey< Q, class >
 The key type of a query type: Q::Key if it declares one, else Q::Scalar. More...
 
struct  EBGeometry::BVH::QueryKey< Q, std::void_t< typename Q::Key > >
 A query type that declares its key type. More...
 
struct  EBGeometry::BVH::QueryLanes< Q, class >
 How many queries a query type carries. 1 unless the type says otherwise. More...
 
struct  EBGeometry::BVH::QueryLanes< Q, std::void_t< decltype(Q::Lanes)> >
 A query type that declares static constexpr uint32_t Lanes. More...
 
struct  EBGeometry::BVH::IsQuery< Q, class >
 Whether a type is a query type: it names its precision (Scalar) and keys a node's children. More...
 
struct  EBGeometry::BVH::IsQuery< Q, std::void_t< typename Q::Scalar, decltype(std::declval< const Q & >().key(std::declval< const BoundingVolumes::AABBT< typename Q::Scalar > & >()))> >
 A type with Scalar and a root key(box) is a query type. More...
 
struct  EBGeometry::BVH::PointQuery< T >
 A point tracked through a BVH: the key of a box is the squared distance from the point to it (0 inside it). More...
 
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. More...
 

Namespaces

namespace  EBGeometry
 Namespace containing all of EBGeometry's functionality.
 
namespace  EBGeometry::BVH
 Namespace for various bounding volume hierarchy (BVH) functionalities.
 

Functions

template<class T >
 EBGeometry::BVH::PointQuery (Vec3T< T >) -> PointQuery< T >
 Deduce PointQuery's precision from its point: BVH::PointQuery{p}.
 

Detailed Description

What PackedBVH::traverse() tracks through a tree: query types, the child-box rows they test, and the order the children are visited in.

A query type decides, for the K child boxes of a node, how far each one is from the query: its key. PackedBVH::traverse() enters a child whose key is within the caller's bound, in the order a visit order policy gives. The library ships PointQuery (the squared distance from a point to a box) and RayQuery (where a ray enters a box); a user can write their own query type with the same three functions (see PointQuery for the interface).

Author
Robert Marskar