11#ifndef PBAT_GPU_GEOMETRY_BVH_H
12#define PBAT_GPU_GEOMETRY_BVH_H
15#include "PhysicsBasedAnimationToolkitExport.h"
24namespace pbat::gpu::impl::geometry {
47 Bvh& operator=(
Bvh const&) =
delete;
52 PBAT_API
Bvh(
Bvh&& other)
noexcept;
58 PBAT_API
Bvh& operator=(
Bvh&& other)
noexcept;
67 Eigen::Vector<GpuScalar, 3>
const& min,
68 Eigen::Vector<GpuScalar, 3>
const& max);
128 PBAT_API Eigen::Vector<MortonCodeType, Eigen::Dynamic>
MortonCodes()
const;
Axis-aligned bounding box (AABB) buffer on the GPU.
This file contains the Buffer class for 1- or 2-dimensional GPU buffers of numeric types.
This file contains functions to compute Morton codes.
1- or 2-dimensional GPU buffer of numeric types
Definition Buffer.h:25
GPU axis-aligned bounding box (AABB) buffer public API.
Definition Aabb.h:25
PBAT_API GpuIndexVectorX Visits() const
Definition Bvh.cu:297
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.
Definition Bvh.cu:192
PBAT_API Eigen::Vector< MortonCodeType, Eigen::Dynamic > MortonCodes() const
Definition Bvh.cu:277
PBAT_API GpuIndexVectorX Parent() const
Definition Bvh.cu:287
PBAT_API GpuIndexMatrixX Rightmost() const
Definition Bvh.cu:292
pbat::geometry::MortonCodeType MortonCodeType
Type of the Morton codes.
Definition Bvh.h:38
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.
Definition Bvh.cu:123
PBAT_API GpuIndexVectorX LeafOrdering() const
Definition Bvh.cu:272
PBAT_API Bvh(GpuIndex nBoxes, GpuIndex nOverlaps)
Construct a new Bvh object with space allocated for nBoxes and at most nOverlaps.
Definition Bvh.cu:21
PBAT_API impl::geometry::Bvh * Impl()
Handle to the implementation.
Definition Bvh.cu:307
PBAT_API ~Bvh()
Destructor.
Definition Bvh.cu:302
PBAT_API GpuMatrixX Min() const
BVH nodes' box minimums.
Definition Bvh.cu:262
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.
Definition Bvh.cu:50
PBAT_API GpuIndexMatrixX Child() const
Definition Bvh.cu:282
PBAT_API GpuMatrixX Max() const
BVH nodes' box maximums.
Definition Bvh.cu:267
PBAT_API GpuIndexMatrixX DetectOverlaps(Aabb const &aabbs)
Detect overlaps between the AABBs.
Definition Bvh.cu:68
Radix-tree linear BVH.
Definition Bvh.cuh:34
Type aliases for GPU code.
std::uint32_t MortonCodeType
Type used to represent Morton codes.
Definition Morton.h:24
Public geometry API for GPU.
Definition Aabb.cu:16
GPU related public functionality.
Definition Buffer.cu:16
The main namespace of the library.
Definition Aliases.h:15
Eigen::Vector< GpuIndex, Eigen::Dynamic > GpuIndexVectorX
Index vector type for GPU code.
Definition Aliases.h:28
Eigen::Matrix< GpuIndex, Eigen::Dynamic, Eigen::Dynamic > GpuIndexMatrixX
Index matrix type for GPU code.
Definition Aliases.h:24
Eigen::Matrix< GpuScalar, Eigen::Dynamic, Eigen::Dynamic > GpuMatrixX
Matrix type for GPU code.
Definition Aliases.h:22
std::int32_t GpuIndex
Index type for GPU code.
Definition Aliases.h:20