PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
Loading...
Searching...
No Matches
pbat::gpu::geometry::Aabb Class Reference

GPU axis-aligned bounding box (AABB) buffer public API. More...

#include <Aabb.h>

Public Member Functions

PBAT_API Aabb (GpuIndex dims=3, GpuIndex nBoxes=0)
 Construct a new Aabb object.
 
 Aabb (Aabb const &)=delete
 
Aabboperator= (Aabb const &)=delete
 
PBAT_API Aabb (Aabb &&other) noexcept
 Move constructor.
 
PBAT_API Aabboperator= (Aabb &&other) noexcept
 Move assignment operator.
 
PBAT_API void Construct (Eigen::Ref< GpuMatrixX const > const &L, Eigen::Ref< GpuMatrixX const > const &U)
 Construct a new Aabb object from the lower and upper bounds matrices.
 
PBAT_API void Construct (Eigen::Ref< GpuMatrixX const > const &P, Eigen::Ref< GpuIndexMatrixX const > const &S)
 Construct a new Aabb object from shared vertex simplex mes (P,S)
 
PBAT_API void Resize (GpuIndex dims, GpuIndex nBoxes)
 Resize the AABB buffer.
 
PBAT_API GpuIndex Size () const
 Get the number of boxes.
 
GpuIndex Dimensions () const
 Get the embedding dimensionality.
 
void * Impl ()
 Handle to the implementation.
 
void * Impl () const
 Handle to the implementation.
 
PBAT_API GpuMatrixX Lower () const
 Fetch the lower bounds from GPU and return as CPU matrix.
 
PBAT_API GpuMatrixX Upper () const
 Fetch the upper bounds from GPU and return as CPU matrix.
 
PBAT_API ~Aabb ()
 Destroy the Aabb 3 D object.
 

Detailed Description

GPU axis-aligned bounding box (AABB) buffer public API.

Constructor & Destructor Documentation

◆ Aabb() [1/2]

pbat::gpu::geometry::Aabb::Aabb ( GpuIndex dims = 3,
GpuIndex nBoxes = 0 )

Construct a new Aabb object.

Parameters
dimsEmbedding dimensionality > 0
nBoxes

◆ Aabb() [2/2]

pbat::gpu::geometry::Aabb::Aabb ( Aabb && other)
noexcept

Move constructor.

Parameters
otherAabb to move from

Member Function Documentation

◆ Construct() [1/2]

void pbat::gpu::geometry::Aabb::Construct ( Eigen::Ref< GpuMatrixX const > const & L,
Eigen::Ref< GpuMatrixX const > const & U )

Construct a new Aabb object from the lower and upper bounds matrices.

Parameters
Ldims x |# pts| array of lower bounds
Udims x |# pts| array of upper bounds

◆ Construct() [2/2]

void pbat::gpu::geometry::Aabb::Construct ( Eigen::Ref< GpuMatrixX const > const & P,
Eigen::Ref< GpuIndexMatrixX const > const & S )

Construct a new Aabb object from shared vertex simplex mes (P,S)

Parameters
Pdims x |# pts| array of points
SK x |# simplices| array of simplices where K>1 is the number of vertices per simplex

◆ Dimensions()

GpuIndex pbat::gpu::geometry::Aabb::Dimensions ( ) const
inline

Get the embedding dimensionality.

Returns
Embedding dimensionality

◆ Impl() [1/2]

void * pbat::gpu::geometry::Aabb::Impl ( )
inline

Handle to the implementation.

Returns
Handle to the implementation

◆ Impl() [2/2]

void * pbat::gpu::geometry::Aabb::Impl ( ) const
inline

Handle to the implementation.

Returns
Handle to the implementation

◆ Lower()

GpuMatrixX pbat::gpu::geometry::Aabb::Lower ( ) const

Fetch the lower bounds from GPU and return as CPU matrix.

Returns
dims x |# boxes| array of lower bounds

◆ operator=()

PBAT_API Aabb & pbat::gpu::geometry::Aabb::operator= ( Aabb && other)
noexcept

Move assignment operator.

Parameters
otherAabb to move from
Returns
Reference to this

◆ Resize()

void pbat::gpu::geometry::Aabb::Resize ( GpuIndex dims,
GpuIndex nBoxes )

Resize the AABB buffer.

Parameters
dimsNew embedding dimensionality > 0
nBoxesNew number of boxes

◆ Size()

GpuIndex pbat::gpu::geometry::Aabb::Size ( ) const

Get the number of boxes.

Returns
Number of boxes

◆ Upper()

GpuMatrixX pbat::gpu::geometry::Aabb::Upper ( ) const

Fetch the upper bounds from GPU and return as CPU matrix.

Returns
dims x |# boxes| array of upper bounds

The documentation for this class was generated from the following files: