library of assembled shared sources

http://lass.cocamware.com

lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics > Class Template Reference

an AABB bounding volume tree that looks similar to a KdTree More...

#include <aabp_tree.h>


Data Structures

struct  BalanceResult
struct  Input
class  Neighbour
class  Node

Public Types

enum  { dimension = TObjectTraits::dimension }
typedef AabpTree< ObjectType,
ObjectTraits, SplitHeuristics > 
TSelf
typedef ObjectType TObject
typedef ObjectTraits TObjectTraits
typedef SplitHeuristics TSplitHeuristics
typedef
TObjectTraits::TObjectIterator 
TObjectIterator
typedef
TObjectTraits::TObjectReference 
TObjectReference
typedef TObjectTraits::TAabb TAabb
typedef TObjectTraits::TRay TRay
typedef TObjectTraits::TPoint TPoint
typedef TObjectTraits::TVector TVector
typedef TObjectTraits::TValue TValue
typedef TObjectTraits::TParam TParam
typedef TObjectTraits::TReference TReference
typedef
TObjectTraits::TConstReference 
TConstReference
typedef TObjectTraits::TInfo TInfo
typedef std::vector
< TObjectIterator
TObjectIterators

Public Member Functions

 AabpTree ()
 AabpTree (TObjectIterator first, TObjectIterator last)
void reset ()
void reset (TObjectIterator first, TObjectIterator last)
const TAabbaabb () const
const bool contains (const TPoint &point, const TInfo *info=0) const
template<typename OutputIterator >
OutputIterator find (const TPoint &point, OutputIterator result, const TInfo *info=0) const
const TObjectIterator intersect (const TRay &ray, TReference t, TParam minT=0, const TInfo *info=0) const
const bool intersects (const TRay &ray, TParam minT=0, TParam maxT=std::numeric_limits< TValue >::infinity(), const TInfo *info=0) const
const Neighbour nearestNeighbour (const TPoint &point, const TInfo *info=0) const
template<typename RandomIterator >
RandomIterator rangeSearch (const TPoint &center, TParam maxRadius, size_t maxCount, RandomIterator first, const TInfo *info=0) const
void swap (TSelf &other)
const bool isEmpty () const
const TObjectIterator end () const
template<typename RandomAccessIterator >
RandomAccessIterator rangeSearch (const TPoint &target, TParam maxRadius, size_t maxCount, RandomAccessIterator first, const TInfo *info) const

Private Types

typedef std::vector< InputTInputs
typedef TInputs::iterator TInputIterator
typedef std::vector< NodeTNodes

Private Member Functions

const BalanceResult balance (TInputIterator iFirst, TInputIterator iLast)
const int addLeafNode (TInputIterator iFirst, TInputIterator iLast)
const int addInternalNode (int iAxis)
const bool doContains (int index, const TPoint &point, const TInfo *info) const
template<typename OutputIterator >
OutputIterator doFind (int index, const TPoint &point, OutputIterator iResult, const TInfo *info) const
const TObjectIterator doIntersect (int index, const TRay &ray, TReference t, TParam tMin, const TInfo *info, const TVector &reciprocalDirection, TParam tNear, TParam tFar) const
const bool doIntersects (int index, const TRay &ray, TParam tMin, TParam tMax, const TInfo *info, const TVector &reciprocalDirection, TParam tNear, TParam tFar) const
void doNearestNeighbour (int index, const TPoint &point, const TInfo *info, Neighbour &best) const
template<typename RandomIterator >
RandomIterator doRangeSearch (int index, const TPoint &point, TReference squaredRadius, size_t maxCount, RandomIterator first, RandomIterator last, const TInfo *info) const
void getChildren (int index, const TPoint &target, int indices[2], TValue signedDistances[2]) const

Private Attributes

TAabb aabb_
TObjectIterators objects_
TNodes nodes_
TObjectIterator end_


Detailed Description

template<class ObjectType, class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
class lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >

an AABB bounding volume tree that looks similar to a KdTree

Author:
Bram de Greve [BdG]
the AabbTree does NOT own the objects. You must keep them yourself!

Definition at line 72 of file aabp_tree.h.


Member Typedef Documentation

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef AabpTree<ObjectType, ObjectTraits, SplitHeuristics> lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TSelf

Definition at line 76 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef ObjectType lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TObject

Definition at line 78 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef ObjectTraits lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TObjectTraits

Definition at line 79 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef SplitHeuristics lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TSplitHeuristics

Definition at line 80 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef TObjectTraits::TObjectIterator lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TObjectIterator

Definition at line 82 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef TObjectTraits::TObjectReference lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TObjectReference

Definition at line 83 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef TObjectTraits::TAabb lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TAabb

Definition at line 84 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef TObjectTraits::TRay lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TRay

Definition at line 85 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef TObjectTraits::TPoint lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TPoint

Definition at line 86 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef TObjectTraits::TVector lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TVector

Definition at line 87 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef TObjectTraits::TValue lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TValue

Definition at line 88 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef TObjectTraits::TParam lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TParam

Definition at line 89 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef TObjectTraits::TReference lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TReference

Definition at line 90 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef TObjectTraits::TConstReference lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TConstReference

Definition at line 91 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef TObjectTraits::TInfo lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TInfo

Definition at line 92 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef std::vector<TObjectIterator> lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TObjectIterators

Definition at line 96 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef std::vector<Input> lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TInputs [private]

Definition at line 146 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef TInputs::iterator lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TInputIterator [private]

Definition at line 147 of file aabp_tree.h.

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
typedef std::vector<Node> lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::TNodes [private]

Definition at line 192 of file aabp_tree.h.


Member Enumeration Documentation

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
anonymous enum

Enumerator:
dimension 

Definition at line 94 of file aabp_tree.h.


Constructor & Destructor Documentation

template<typename O , typename OT , typename SH >
lass::spat::AabpTree< O, OT, SH >::AabpTree (  )  [inline]

Definition at line 59 of file aabp_tree.inl.

template<typename O , typename OT , typename SH >
lass::spat::AabpTree< O, OT, SH >::AabpTree ( TObjectIterator  first,
TObjectIterator  last 
) [inline]


Member Function Documentation

template<typename O , typename OT , typename SH >
void lass::spat::AabpTree< O, OT, SH >::reset (  )  [inline]

template<typename O , typename OT , typename SH >
void lass::spat::AabpTree< O, OT, SH >::reset ( TObjectIterator  first,
TObjectIterator  last 
) [inline]

template<typename O , typename OT , typename SH >
const AabpTree< O, OT, SH >::TAabb & lass::spat::AabpTree< O, OT, SH >::aabb (  )  const [inline]

template<typename O , typename OT , typename SH >
const bool lass::spat::AabpTree< O, OT, SH >::contains ( const TPoint point,
const TInfo info = 0 
) const [inline]

template<typename O , typename OT , typename SH >
template<typename OutputIterator >
OutputIterator lass::spat::AabpTree< O, OT, SH >::find ( const TPoint point,
OutputIterator  result,
const TInfo info = 0 
) const [inline]

template<typename O , typename OT , typename SH >
const AabpTree< O, OT, SH >::TObjectIterator lass::spat::AabpTree< O, OT, SH >::intersect ( const TRay ray,
TReference  t,
TParam  minT = 0,
const TInfo info = 0 
) const [inline]

template<typename O , typename OT , typename SH >
const bool lass::spat::AabpTree< O, OT, SH >::intersects ( const TRay ray,
TParam  minT = 0,
TParam  maxT = std::numeric_limits<TValue>::infinity(),
const TInfo info = 0 
) const [inline]

template<typename O , typename OT , typename SH >
const AabpTree< O, OT, SH >::Neighbour lass::spat::AabpTree< O, OT, SH >::nearestNeighbour ( const TPoint point,
const TInfo info = 0 
) const [inline]

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
template<typename RandomIterator >
RandomIterator lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::rangeSearch ( const TPoint center,
TParam  maxRadius,
size_t  maxCount,
RandomIterator  first,
const TInfo info = 0 
) const [inline]

template<typename O , typename OT , typename SH >
void lass::spat::AabpTree< O, OT, SH >::swap ( TSelf other  )  [inline]

template<typename O , typename OT , typename SH >
const bool lass::spat::AabpTree< O, OT, SH >::isEmpty (  )  const [inline]

template<typename O , typename OT , typename SH >
const AabpTree< O, OT, SH >::TObjectIterator lass::spat::AabpTree< O, OT, SH >::end (  )  const [inline]

template<typename O , typename OT , typename SH >
const AabpTree< O, OT, SH >::BalanceResult lass::spat::AabpTree< O, OT, SH >::balance ( TInputIterator  iFirst,
TInputIterator  iLast 
) [inline, private]

template<typename O , typename OT , typename SH >
const int lass::spat::AabpTree< O, OT, SH >::addLeafNode ( TInputIterator  iFirst,
TInputIterator  iLast 
) [inline, private]

template<typename O , typename OT , typename SH >
const int lass::spat::AabpTree< O, OT, SH >::addInternalNode ( int  iAxis  )  [inline, private]

template<typename O , typename OT , typename SH >
const bool lass::spat::AabpTree< O, OT, SH >::doContains ( int  index,
const TPoint point,
const TInfo info 
) const [inline, private]

template<typename O , typename OT , typename SH >
template<typename OutputIterator >
OutputIterator lass::spat::AabpTree< O, OT, SH >::doFind ( int  index,
const TPoint point,
OutputIterator  iResult,
const TInfo info 
) const [inline, private]

template<typename O , typename OT , typename SH >
const AabpTree< O, OT, SH >::TObjectIterator lass::spat::AabpTree< O, OT, SH >::doIntersect ( int  index,
const TRay ray,
TReference  t,
TParam  tMin,
const TInfo info,
const TVector reciprocalDirection,
TParam  tNear,
TParam  tFar 
) const [inline, private]

template<typename O , typename OT , typename SH >
const bool lass::spat::AabpTree< O, OT, SH >::doIntersects ( int  index,
const TRay ray,
TParam  tMin,
TParam  tMax,
const TInfo info,
const TVector reciprocalDirection,
TParam  tNear,
TParam  tFar 
) const [inline, private]

template<typename O , typename OT , typename SH >
void lass::spat::AabpTree< O, OT, SH >::doNearestNeighbour ( int  index,
const TPoint point,
const TInfo info,
Neighbour best 
) const [inline, private]

template<typename O , typename OT , typename SH >
template<typename RandomIterator >
RandomIterator lass::spat::AabpTree< O, OT, SH >::doRangeSearch ( int  index,
const TPoint point,
TReference  squaredRadius,
size_t  maxCount,
RandomIterator  first,
RandomIterator  last,
const TInfo info 
) const [inline, private]

template<typename O , typename OT , typename SH >
void lass::spat::AabpTree< O, OT, SH >::getChildren ( int  index,
const TPoint target,
int  indices[2],
TValue  signedDistances[2] 
) const [inline, private]

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
template<typename RandomAccessIterator >
RandomAccessIterator lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::rangeSearch ( const TPoint target,
TParam  maxRadius,
size_t  maxCount,
RandomAccessIterator  first,
const TInfo info 
) const [inline]


Field Documentation

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
TAabb lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::aabb_ [private]

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
TObjectIterators lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::objects_ [private]

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
TNodes lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::nodes_ [private]

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>, typename SplitHeuristics = DefaultSplitHeuristics<>>
TObjectIterator lass::spat::AabpTree< ObjectType, ObjectTraits, SplitHeuristics >::end_ [private]


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

Generated on Mon Nov 10 14:22:15 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo