TR-mbed 1.0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
Eigen::KdBVH< _Scalar, _Dim, _Object > Class Template Reference

A simple bounding volume hierarchy based on AlignedBox. More...

#include <KdBVH.h>

Public Types

enum  { Dim = _Dim }
 
typedef _Object Object
 
typedef std::vector< Object, aligned_allocator< Object > > ObjectList
 
typedef _Scalar Scalar
 
typedef AlignedBox< Scalar, DimVolume
 
typedef std::vector< Volume, aligned_allocator< Volume > > VolumeList
 
typedef int Index
 
typedef const intVolumeIterator
 
typedef const ObjectObjectIterator
 

Public Member Functions

 KdBVH ()
 
template<typename Iter >
 KdBVH (Iter begin, Iter end)
 
template<typename OIter , typename BIter >
 KdBVH (OIter begin, OIter end, BIter boxBegin, BIter boxEnd)
 
template<typename Iter >
void init (Iter begin, Iter end)
 
template<typename OIter , typename BIter >
void init (OIter begin, OIter end, BIter boxBegin, BIter boxEnd)
 
Index getRootIndex () const
 
EIGEN_STRONG_INLINE void getChildren (Index index, VolumeIterator &outVBegin, VolumeIterator &outVEnd, ObjectIterator &outOBegin, ObjectIterator &outOEnd) const
 
const VolumegetVolume (Index index) const
 

Detailed Description

template<typename _Scalar, int _Dim, typename _Object>
class Eigen::KdBVH< _Scalar, _Dim, _Object >

A simple bounding volume hierarchy based on AlignedBox.

Parameters
_ScalarThe underlying scalar type of the bounding boxes
_DimThe dimension of the space in which the hierarchy lives
_ObjectThe object type that lives in the hierarchy. It must have value semantics. Either bounding_box(_Object) must be defined and return an AlignedBox<_Scalar, _Dim> or bounding boxes must be provided to the tree initializer.

This class provides a simple (as opposed to optimized) implementation of a bounding volume hierarchy analogous to a Kd-tree. Given a sequence of objects, it computes their bounding boxes, constructs a Kd-tree of their centers and builds a BVH with the structure of that Kd-tree. When the elements of the tree are too expensive to be copied around, it is useful for _Object to be a pointer.

Member Typedef Documentation

◆ Index

template<typename _Scalar , int _Dim, typename _Object >
typedef int Eigen::KdBVH< _Scalar, _Dim, _Object >::Index

◆ Object

template<typename _Scalar , int _Dim, typename _Object >
typedef _Object Eigen::KdBVH< _Scalar, _Dim, _Object >::Object

◆ ObjectIterator

template<typename _Scalar , int _Dim, typename _Object >
typedef const Object* Eigen::KdBVH< _Scalar, _Dim, _Object >::ObjectIterator

◆ ObjectList

template<typename _Scalar , int _Dim, typename _Object >
typedef std::vector<Object, aligned_allocator<Object> > Eigen::KdBVH< _Scalar, _Dim, _Object >::ObjectList

◆ Scalar

template<typename _Scalar , int _Dim, typename _Object >
typedef _Scalar Eigen::KdBVH< _Scalar, _Dim, _Object >::Scalar

◆ Volume

template<typename _Scalar , int _Dim, typename _Object >
typedef AlignedBox<Scalar, Dim> Eigen::KdBVH< _Scalar, _Dim, _Object >::Volume

◆ VolumeIterator

template<typename _Scalar , int _Dim, typename _Object >
typedef const int* Eigen::KdBVH< _Scalar, _Dim, _Object >::VolumeIterator

◆ VolumeList

template<typename _Scalar , int _Dim, typename _Object >
typedef std::vector<Volume, aligned_allocator<Volume> > Eigen::KdBVH< _Scalar, _Dim, _Object >::VolumeList

Member Enumeration Documentation

◆ anonymous enum

template<typename _Scalar , int _Dim, typename _Object >
anonymous enum
Enumerator
Dim 

Constructor & Destructor Documentation

◆ KdBVH() [1/3]

template<typename _Scalar , int _Dim, typename _Object >
Eigen::KdBVH< _Scalar, _Dim, _Object >::KdBVH ( )
inline

◆ KdBVH() [2/3]

template<typename _Scalar , int _Dim, typename _Object >
template<typename Iter >
Eigen::KdBVH< _Scalar, _Dim, _Object >::KdBVH ( Iter  begin,
Iter  end 
)
inline

Given an iterator range over Object references, constructs the BVH. Requires that bounding_box(Object) return a Volume.

◆ KdBVH() [3/3]

template<typename _Scalar , int _Dim, typename _Object >
template<typename OIter , typename BIter >
Eigen::KdBVH< _Scalar, _Dim, _Object >::KdBVH ( OIter  begin,
OIter  end,
BIter  boxBegin,
BIter  boxEnd 
)
inline

Given an iterator range over Object references and an iterator range over their bounding boxes, constructs the BVH

Member Function Documentation

◆ getChildren()

template<typename _Scalar , int _Dim, typename _Object >
EIGEN_STRONG_INLINE void Eigen::KdBVH< _Scalar, _Dim, _Object >::getChildren ( Index  index,
VolumeIterator outVBegin,
VolumeIterator outVEnd,
ObjectIterator outOBegin,
ObjectIterator outOEnd 
) const
inline

Given an index of a node, on exit, outVBegin and outVEnd range over the indices of the volume children of the node and outOBegin and outOEnd range over the object children of the node

◆ getRootIndex()

template<typename _Scalar , int _Dim, typename _Object >
Index Eigen::KdBVH< _Scalar, _Dim, _Object >::getRootIndex ( ) const
inline
Returns
the index of the root of the hierarchy

◆ getVolume()

template<typename _Scalar , int _Dim, typename _Object >
const Volume & Eigen::KdBVH< _Scalar, _Dim, _Object >::getVolume ( Index  index) const
inline
Returns
the bounding box of the node at index

◆ init() [1/2]

template<typename _Scalar , int _Dim, typename _Object >
template<typename Iter >
void Eigen::KdBVH< _Scalar, _Dim, _Object >::init ( Iter  begin,
Iter  end 
)
inline

Given an iterator range over Object references, constructs the BVH, overwriting whatever is in there currently. Requires that bounding_box(Object) return a Volume.

◆ init() [2/2]

template<typename _Scalar , int _Dim, typename _Object >
template<typename OIter , typename BIter >
void Eigen::KdBVH< _Scalar, _Dim, _Object >::init ( OIter  begin,
OIter  end,
BIter  boxBegin,
BIter  boxEnd 
)
inline

Given an iterator range over Object references and an iterator range over their bounding boxes, constructs the BVH, overwriting whatever is in there currently.


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