Bounding volume hierarchy (BVH).
More...
#include <bvh.hpp>
Bounding volume hierarchy (BVH).
Definition at line 38 of file bvh.hpp.
◆ visitor_type
◆ bvh() [1/3]
Constructs a BVH from a set of primitives.
- Parameters
-
primitives | Axis-aligned bounding boxes. |
Definition at line 29 of file bvh.cpp.
◆ bvh() [2/3]
Constructs a BVH from a B-rep mesh.
- Parameters
-
mesh | B-rep mesh from which to build the BVH. |
Definition at line 34 of file bvh.cpp.
◆ bvh() [3/3]
constexpr geom::bvh::bvh |
( |
| ) |
|
|
constexprdefaultnoexcept |
◆ build() [1/2]
void geom::bvh::build |
( |
const brep_mesh & |
mesh | ) |
|
Constructs a BVH from a B-rep mesh.
- Parameters
-
mesh | B-rep mesh from which to build the BVH. |
Definition at line 66 of file bvh.cpp.
◆ build() [2/2]
void geom::bvh::build |
( |
std::span< const bvh_primitive > |
primitives | ) |
|
Constructs a BVH from a set of primitives.
- Parameters
-
primitives | BVH primitives. |
Definition at line 39 of file bvh.cpp.
◆ clear()
void geom::bvh::clear |
( |
| ) |
|
Clears the BVH.
Definition at line 96 of file bvh.cpp.
◆ nodes()
constexpr const std::vector<bvh_node>& geom::bvh::nodes |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns the BVH nodes.
Definition at line 92 of file bvh.hpp.
◆ visit()
Visits the primitive indices of all BVH nodes that intersect a ray.
- Parameters
-
ray | Query ray. |
f | Unary visitor function which operates on a BVH primitive index. |
Definition at line 83 of file bvh.hpp.
The documentation for this class was generated from the following files: