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

#include <cubetree.h>

Inheritance diagram for Tree::CubeTree:
Mesh::TriangleMesh Shape::Geometry Geometry Shape::Cone Shape::Cuboid Shape::Disk Shape::Polygon Shape::PolygonalText Shape::Quad Shape::ShadowVolume Shape::Skeletal Shape::Sphere Shape::TexturedText Shape::Triangle Shape::Wavefront Shape::Wire

Classes

class  Branch
 
class  Leaf
 
class  Node
 

Public Member Functions

 CubeTree ()
 
 CubeTree (const Vertex3fArray &vertex)
 
 CubeTree (const CubeTree &)
 
virtual ~CubeTree ()
 
bool hasDuplicates ()
 
 operator const Branch & () const
 
 operator const Branch * () const
 
 operator HeapArray< Leaf * > ()
 
bool operator() (const Vertex3f &vA, const Vertex3f &vB) const
 
Leafnearest (const Vertex3f &vertex)
 
Leaffind (const Vertex3f &vertex, float precision=0.0f) const
 
void erase (Leaf *pLeaf)
 
void update (Handle index, const Vertex3f &vertex)
 
void update ()
 
Handle insert (const Vertex3f &vertex)
 
HeapArray< Handle > insert (const Vector3fArray &list)
 
template<typename INDICES >
Vector3fArray getVertices (const INDICES &c) const
 
Vector3fArray getVertices (bool unique=false) const
 
HeapArray< Leaf * > getLeaves () const
 
const Leafoperator[] (Handle index) const
 
Handle operator[] (const Vertex3f &v) const
 
const Vertex3fback () const
 
const Vertex3ffront () const
 
HeapArray< Leaf * >::iterator begin ()
 
HeapArray< Leaf * >::iterator end ()
 
HeapArray< Leaf * >::const_iterator begin () const
 
HeapArray< Leaf * >::const_iterator end () const
 
size_t size () const
 
void clear ()
 

Detailed Description

AKA: Octree Implements and CubeTree node.

Constructor & Destructor Documentation

◆ CubeTree() [1/3]

Tree::CubeTree::CubeTree ( )

◆ CubeTree() [2/3]

Tree::CubeTree::CubeTree ( const Vertex3fArray & vertex)

CubeTree storage of 3D vertices with support for duplicate values. A Leaf node holds a counter indicating the number of duplicates stored.

Parameters
Anarray of vertices.

◆ CubeTree() [3/3]

Tree::CubeTree::CubeTree ( const CubeTree & )

◆ ~CubeTree()

virtual Tree::CubeTree::~CubeTree ( )
virtual

Member Function Documentation

◆ back()

const Vertex3f & Tree::CubeTree::back ( ) const
inline

◆ begin() [1/2]

HeapArray< Leaf * >::iterator Tree::CubeTree::begin ( )
inline

◆ begin() [2/2]

HeapArray< Leaf * >::const_iterator Tree::CubeTree::begin ( ) const
inline

◆ clear()

void Tree::CubeTree::clear ( )

◆ end() [1/2]

HeapArray< Leaf * >::iterator Tree::CubeTree::end ( )
inline

◆ end() [2/2]

HeapArray< Leaf * >::const_iterator Tree::CubeTree::end ( ) const
inline

◆ erase()

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

Removes and deletes this leaf.

Parameters
Leafobject to remove;

◆ find()

Leaf * Tree::CubeTree::find ( const Vertex3f & vertex,
float precision = 0.0f ) const

◆ front()

const Vertex3f & Tree::CubeTree::front ( ) const
inline

◆ getLeaves()

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

◆ getVertices() [1/2]

Vector3fArray Tree::CubeTree::getVertices ( bool unique = false) const

◆ getVertices() [2/2]

template<typename INDICES >
Vector3fArray Tree::CubeTree::getVertices ( const INDICES & c) const
inline
Returns
The container of vertices.

◆ hasDuplicates()

bool Tree::CubeTree::hasDuplicates ( )

◆ insert() [1/2]

HeapArray< Handle > Tree::CubeTree::insert ( const Vector3fArray & list)
Returns
An array of indices for the given Leaf pointers containing the vertices;

◆ insert() [2/2]

Handle Tree::CubeTree::insert ( const Vertex3f & vertex)
Returns
The index of the Leaf pointer containing the vertex;

◆ nearest()

Leaf * Tree::CubeTree::nearest ( const Vertex3f & vertex)
Parameters
Thevertex to search the tree.
Returns
The closest Leaf in the tree to the vertex passed.

◆ operator const Branch &()

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

◆ operator const Branch *()

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

◆ operator HeapArray< Leaf * >()

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

◆ operator()()

bool Tree::CubeTree::operator() ( const Vertex3f & vA,
const Vertex3f & vB ) const

◆ operator[]() [1/2]

Handle Tree::CubeTree::operator[] ( const Vertex3f & v) const
Returns
The base-index of the vertex within pLeaf.

◆ operator[]() [2/2]

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

◆ size()

size_t Tree::CubeTree::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::CubeTree::update ( )

Removes all branches and leaves, and reinserts all leaves. This function should be called any time a leaf has been modified.

◆ update() [2/2]

void Tree::CubeTree::update ( Handle index,
const Vertex3f & vertex )

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;

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