GPU linear BVH [6] public API.
More...
#include <Bvh.h>
|
PBAT_API | Bvh (GpuIndex nBoxes, GpuIndex nOverlaps) |
| Construct a new Bvh object with space allocated for nBoxes and at most nOverlaps.
|
|
| Bvh (Bvh const &)=delete |
|
Bvh & | operator= (Bvh const &)=delete |
|
PBAT_API | Bvh (Bvh &&other) noexcept |
| Move constructor.
|
|
PBAT_API Bvh & | operator= (Bvh &&other) noexcept |
| Move assignment.
|
|
PBAT_API void | Build (Aabb &aabbs, Eigen::Vector< GpuScalar, 3 > const &min, Eigen::Vector< GpuScalar, 3 > const &max) |
| Build the BVH from the given AABBs.
|
|
PBAT_API GpuIndexMatrixX | DetectOverlaps (Aabb const &aabbs) |
| Detect overlaps between the AABBs.
|
|
PBAT_API GpuIndexMatrixX | DetectOverlaps (common::Buffer const &set, Aabb const &aabbs) |
| Detect overlaps between the AABBs of different sets.
|
|
PBAT_API GpuIndexMatrixX | PointTriangleNearestNeighbors (Aabb const &aabbs, common::Buffer const &X, common::Buffer const &V, common::Buffer const &F) |
| Compute nearest triangles (V,F) to points X, given the triangle AABBs.
|
|
PBAT_API GpuIndexMatrixX | PointTetrahedronNearestNeighbors (Aabb const &aabbs, common::Buffer const &X, common::Buffer const &V, common::Buffer const &T) |
| Compute nearest tets (V,T) to points X, given the tetrahedron AABBs.
|
|
PBAT_API GpuMatrixX | Min () const |
| BVH nodes' box minimums.
|
|
PBAT_API GpuMatrixX | Max () const |
| BVH nodes' box maximums.
|
|
PBAT_API GpuIndexVectorX | LeafOrdering () const |
|
PBAT_API Eigen::Vector< MortonCodeType, Eigen::Dynamic > | MortonCodes () const |
|
PBAT_API GpuIndexMatrixX | Child () const |
|
PBAT_API GpuIndexVectorX | Parent () const |
|
PBAT_API GpuIndexMatrixX | Rightmost () const |
|
PBAT_API GpuIndexVectorX | Visits () const |
|
PBAT_API impl::geometry::Bvh * | Impl () |
| Handle to the implementation.
|
|
PBAT_API impl::geometry::Bvh const * | Impl () const |
| Handle to the implementation.
|
|
PBAT_API | ~Bvh () |
| Destructor.
|
|
GPU linear BVH [6] public API.
◆ Bvh() [1/2]
Construct a new Bvh object with space allocated for nBoxes and at most nOverlaps.
- Parameters
-
nBoxes | Number of boxes |
nOverlaps | Maximum number of overlaps |
◆ Bvh() [2/2]
pbat::gpu::geometry::Bvh::Bvh |
( |
Bvh && | other | ) |
|
|
noexcept |
Move constructor.
- Parameters
-
◆ Build()
void pbat::gpu::geometry::Bvh::Build |
( |
Aabb & | aabbs, |
|
|
Eigen::Vector< GpuScalar, 3 > const & | min, |
|
|
Eigen::Vector< GpuScalar, 3 > const & | max ) |
Build the BVH from the given AABBs.
- Parameters
-
aabbs | Handle to the AABBs |
min | Minimum of the world's bounding box |
max | Maximum of the world's bounding box |
◆ Child()
◆ DetectOverlaps() [1/2]
Detect overlaps between the AABBs.
- Parameters
-
aabbs | The AABBs which were used to build this BVH |
◆ DetectOverlaps() [2/2]
Detect overlaps between the AABBs of different sets.
- Parameters
-
set | |# aabbs| map of indices of aabbs to their corresponding set, i.e. set[i] = j means that aabb i belongs to set j. Must be a 1D Buffer of type GpuIndex of the same size as aabbs. |
aabbs | The AABBs which were used to build this BVH |
- Returns
- 2x|# Foverlaps| matrix of overlap pairs between boxes of different sets
◆ Impl() [1/2]
Handle to the implementation.
- Returns
- Handle to the implementation
◆ Impl() [2/2]
Handle to the implementation.
- Returns
- Handle to the implementation
◆ LeafOrdering()
◆ Max()
GpuMatrixX pbat::gpu::geometry::Bvh::Max |
( |
| ) |
const |
BVH nodes' box maximums.
- Returns
dims x |# aabbs|
array of box upper bounds
◆ Min()
GpuMatrixX pbat::gpu::geometry::Bvh::Min |
( |
| ) |
const |
BVH nodes' box minimums.
- Returns
dims x |# aabbs|
array of box lower bounds
◆ MortonCodes()
Eigen::Vector< typename Bvh::MortonCodeType, Eigen::Dynamic > pbat::gpu::geometry::Bvh::MortonCodes |
( |
| ) |
const |
◆ operator=()
Bvh & pbat::gpu::geometry::Bvh::operator= |
( |
Bvh && | other | ) |
|
|
noexcept |
Move assignment.
- Parameters
-
- Returns
- Reference to this
◆ Parent()
◆ PointTetrahedronNearestNeighbors()
Compute nearest tets (V,T) to points X, given the tetrahedron AABBs.
- Parameters
-
aabbs | The AABBs of the tets |
X | 3x|# pts| matrix of NN query points |
V | 3x|# verts| matrix of vertices |
T | 4x|# tets| matrix of tet vertex indices |
- Returns
|# X|
matrix of nearest tets to corresponding columns in X
◆ PointTriangleNearestNeighbors()
Compute nearest triangles (V,F) to points X, given the triangle AABBs.
- Parameters
-
aabbs | The AABBs of the triangles |
X | 3x|# pts| matrix of NN query points |
V | 3x|# verts| matrix of vertices |
F | 3x|# triangles| matrix of triangle vertex indices |
- Returns
|# X|
matrix of nearest triangles to corresponding columns in X
◆ Rightmost()
◆ Visits()
The documentation for this class was generated from the following files:
- C:/git/PhysicsBasedAnimationToolkit/source/pbat/gpu/geometry/Bvh.h
- C:/git/PhysicsBasedAnimationToolkit/source/pbat/gpu/geometry/Bvh.cu