version 3.3

VRS::DynamicOctree< CONTENT > Class Template Reference

#include <vrs/container/octree.h>

Inheritance diagram for VRS::DynamicOctree< CONTENT >:

VRS::DynamicSpaceTree< CONTENT, 3 > VRS::SpaceTree< NODE, DIM > VRS::SharedObj VRS::Visitable

List of all members.

Public Types

typedef SpaceTreePath< 3 > Path
typedef DynamicSpaceTree
< CONTENT, 3 >::NodePointer 
NodePointer

Public Member Functions

 DynamicOctree (const Bounds &bounds)
SpaceTreePath< 3 > findContainingNode (const Vector &point, UINT level, bool mustExist=true)
Iterator< SpaceTreePath< 3 > > * findBoundsIntersectingNodes (const Bounds &bounds, UINT level, bool mustExist=true)
SpaceTreePath< 3 > findSmallestBoundsEnclosingNode (const Bounds &bounds, UINT maxLevel=16, bool mustExist=true)


Detailed Description

template<typename CONTENT>
class VRS::DynamicOctree< CONTENT >

DynamicOctree and StaticOctree are 3-dimensional specializations of DynamicSpaceTree and StaticSpaceTree that are extended by constructors and methods that accept VRS Vector and Bounds.

See spacetree.h for further information.


Member Typedef Documentation

template<typename CONTENT>
typedef SpaceTreePath<3> VRS::DynamicOctree< CONTENT >::Path

The original declaration of the following methods are part of a quite unreadable code section that need not to be read to understand how to use a SpaceTree. Therefore their declarations are repeated here: template<typename POINTSET,typename INCLUSIONTEST> SpaceTreePath<DIM> findSmallestEnclosingNode( const POINTSET& pointSet, UINT maxLevel = Path::MaxPathLength(), bool mustExist = true, INCLUSIONTEST test = DefaultInclusionTest<POINTSET>()); Returns the longest path that leads to a node whose cell completely encloses a given point set. If the path length attains "maxLevel", the search is aborted and the path of length maxLevel is returned. Not that the length of a path cannot exceed Path::MaxPathLength(). If "mustExist" is true, only existing nodes are considered. Otherwise the result can be a path leading to a still not existing node, whose cell would enclose the point set. The parameter "test" is a function object that provides an operator() with two parameters pointSet and cell, that returns true if the pointSet is contained in the cell. You can see how to realize the function object on the example of the DefaultIntersectionTest class (see below). If POINTSET provides a method isContainedIn(Cell), the test parameter can be left out. template<typename POINTSET, typename INTERSECTIONTEST> Iterator<SpaceTreePath<DIM> >* findIntersectingNodes( const POINTSET& pointSet, UINT level, bool mustExist = true, INTERSECTIONTEST test = DefaultIntersectionTest<POINTSET>()); Returns an iterator of paths to all nodes on a specified tree level that intersect a given point set. For the "mustExist" parameter see above. The intersection test of a point set and a cell is performed similar to the inclusion test above. The parameter "test" can be left out if POINTSET provides a method intersects(Cell). template<typename POINTSET, typename INCLUSIONTEST> Iterator<SpaceTreePath<DIM> >* findEnclosingNodes( const POINTSET& pointSet, UINT level, bool mustExist, INCLUSIONTEST test) { This method is only useful for derivates of SpaceTree that enable overlapping cells. Otherwise the result is empty or contains exactly one element,

Reimplemented from VRS::DynamicSpaceTree< CONTENT, 3 >.

template<typename CONTENT>
typedef DynamicSpaceTree<CONTENT, 3>::NodePointer VRS::DynamicOctree< CONTENT >::NodePointer


Constructor & Destructor Documentation

template<typename CONTENT>
VRS::DynamicOctree< CONTENT >::DynamicOctree ( const Bounds bounds  )  [inline]


Member Function Documentation

template<typename CONTENT>
SpaceTreePath< 3 > VRS::DynamicOctree< CONTENT >::findContainingNode ( const Vector point,
UINT  level,
bool  mustExist = true 
) [inline]

template<typename CONTENT>
Iterator< SpaceTreePath< 3 > > * VRS::DynamicOctree< CONTENT >::findBoundsIntersectingNodes ( const Bounds bounds,
UINT  level,
bool  mustExist = true 
) [inline]

template<typename CONTENT>
SpaceTreePath< 3 > VRS::DynamicOctree< CONTENT >::findSmallestBoundsEnclosingNode ( const Bounds bounds,
UINT  maxLevel = 16,
bool  mustExist = true 
) [inline]


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

Generated on Mon May 21 06:00:16 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact