Rasterfarm-SDK
Loading...
Searching...
No Matches
Tree::AACubeTree Class Reference

#include <aacubetree.h>

Classes

class  Branch
 
class  Leaf
 
class  Node
 

Public Member Functions

 AACubeTree (const Primitive3D::AABoundingBox &cube)
 
 AACubeTree (const HeapArray< Primitive3D::AABoundingBox > &cube)
 
 AACubeTree (const AACubeTree &)=delete
 
void operator= (const AACubeTree &)=delete
 
virtual ~AACubeTree ()
 
 operator Branch & () const
 
 operator Branch * () const
 
 operator HeapArray< Leaf * > ()
 
HeapArray< Leaf * > getLeaves () const
 
HeapArray< Primitive3D::AABoundingBox > getBoxes (bool unique=false) const
 
Leafoperator[] (Handle index) const
 
Handle operator[] (const Primitive3D::AABoundingBox &cube) const
 
void erase (Leaf *pLeaf)
 
void erase (Handle index)
 
void update (Handle index, const Primitive3D::AABoundingBox &box)
 
void update ()
 
Handle insert (const Primitive3D::AABoundingBox &cube)
 
HeapArray< Handle > insert (const HeapArray< Primitive3D::AABoundingBox > &cube)
 
HeapArray< Leaf * > intersect (const Primitive3D::AABoundingBox &Cube) const
 
HeapArray< Leaf * > inside (const Primitive3D::AABoundingBox &Cube, float precision=0.0f) const
 
HeapArray< Leaf * > inside (const Vertex3f &v, float precision=0.0f) const
 
HeapArray< Leaf * > within (const Primitive3D::AABoundingBox &Cube, float precision=0.0f) const
 
size_t size () const
 
void clear ()
 

Static Public Member Functions

static bool larger (const Primitive3D::AABoundingBox &leftCube, const Primitive3D::AABoundingBox &rightCube)
 

Detailed Description

This tree sorts axis-aligned bounding Cubees and their spatial relationships. Each Cube typically represents the bounds of some geometry or point-cloud. By sorting these Cubees based-upon the spatial relationship to it's parent the number of collision tests can be greatly reduced.

Constructor & Destructor Documentation

◆ AACubeTree() [1/3]

Tree::AACubeTree::AACubeTree ( const Primitive3D::AABoundingBox & cube)
Parameters
Anaxis-aligned 3d bounding-cube

◆ AACubeTree() [2/3]

Tree::AACubeTree::AACubeTree ( const HeapArray< Primitive3D::AABoundingBox > & cube)
Parameters
Aunique-set of axis-aligned 3d bounding-cube

◆ AACubeTree() [3/3]

Tree::AACubeTree::AACubeTree ( const AACubeTree & )
delete

Copying an AACubeTree is not currently supported;

◆ ~AACubeTree()

virtual Tree::AACubeTree::~AACubeTree ( )
virtual

Member Function Documentation

◆ clear()

void Tree::AACubeTree::clear ( )

◆ erase() [1/2]

void Tree::AACubeTree::erase ( Handle index)
inline

Removes and deletes this leaf.

Parameters
Pointerof the leaf to remove;

◆ erase() [2/2]

void Tree::AACubeTree::erase ( Leaf * pLeaf)

Removes and deletes this leaf.

Parameters
Leafobject to remove;

◆ getBoxes()

HeapArray< Primitive3D::AABoundingBox > Tree::AACubeTree::getBoxes ( bool unique = false) const

◆ getLeaves()

HeapArray< Leaf * > Tree::AACubeTree::getLeaves ( ) const

◆ insert() [1/2]

HeapArray< Handle > Tree::AACubeTree::insert ( const HeapArray< Primitive3D::AABoundingBox > & cube)

◆ insert() [2/2]

Handle Tree::AACubeTree::insert ( const Primitive3D::AABoundingBox & cube)

◆ inside() [1/2]

HeapArray< Leaf * > Tree::AACubeTree::inside ( const Primitive3D::AABoundingBox & Cube,
float precision = 0.0f ) const

◆ inside() [2/2]

HeapArray< Leaf * > Tree::AACubeTree::inside ( const Vertex3f & v,
float precision = 0.0f ) const

◆ intersect()

HeapArray< Leaf * > Tree::AACubeTree::intersect ( const Primitive3D::AABoundingBox & Cube) const

◆ larger()

static bool Tree::AACubeTree::larger ( const Primitive3D::AABoundingBox & leftCube,
const Primitive3D::AABoundingBox & rightCube )
static
Returns
True if the left cube is larger in volue that the right.

◆ operator Branch &()

Tree::AACubeTree::operator Branch & ( ) const
inline

◆ operator Branch *()

Tree::AACubeTree::operator Branch * ( ) const
inline

◆ operator HeapArray< Leaf * >()

Tree::AACubeTree::operator HeapArray< Leaf * > ( )
inline
Returns
An array of Leaf pointers inserted by iteration of the tree. NOTE: There are no duplicate Leaves.

◆ operator=()

void Tree::AACubeTree::operator= ( const AACubeTree & )
delete

Copying an AACubeTree is not currently supported;

◆ operator[]() [1/2]

Handle Tree::AACubeTree::operator[] ( const Primitive3D::AABoundingBox & cube) const
Returns
The base index of the vertex within pLeaf.

◆ operator[]() [2/2]

Leaf & Tree::AACubeTree::operator[] ( Handle index) const
Returns
Reference to the Vertex at the given index.

◆ size()

size_t Tree::AACubeTree::size ( ) const
inline
Returns
The number of vertices stored in this tree. NOTE: The Array pLeaf may hold duplicate pointer references.

◆ update() [1/2]

void Tree::AACubeTree::update ( )

◆ update() [2/2]

void Tree::AACubeTree::update ( Handle index,
const Primitive3D::AABoundingBox & box )

Updates the Leaf at the given index. Duplicate indices will be unassociated with this Leaf if the index is == Leaf::baseIndex.

Parameters
Indexof Leaf object to update;

◆ within()

HeapArray< Leaf * > Tree::AACubeTree::within ( const Primitive3D::AABoundingBox & Cube,
float precision = 0.0f ) const

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