Point Cloud Viewer  1.00
A Viewer to display point clouds with phong shading by converting them to splats.
EntityOctreeContainer Class Reference

Stores an entity octree. More...

#include <entityoctreecontainer.h>

Public Member Functions

 EntityOctreeContainer (float width=0, float x=0, float y=0, float z=0)
 Constructor. More...
 
void insert (Entity &entity)
 Insert an entity into this octree. More...
 
Entity ** knnSearch (Entity &to, unsigned char k, float *distances=0)
 k-Nearest Neighbour search. More...
 
EntityOctree::Iterator iterator ()
 Returns an iterator that iterates over the whole octree. More...
 
unsigned int size ()
 Returns the number of Entities stored in the octree. More...
 

Detailed Description

Stores an entity octree.

Constructor & Destructor Documentation

EntityOctreeContainer::EntityOctreeContainer ( float  width = 0,
float  x = 0,
float  y = 0,
float  z = 0 
)

Constructor.

Parameters
widthThe initial side length of the tree's bounding box.
xThe x coordinate of the tree's center.
yThe y coordinate of the tree's center.
zThe z coordinate of the tree's center.

Member Function Documentation

void EntityOctreeContainer::insert ( Entity entity)

Insert an entity into this octree.

Do not modify or delete the entity after it has been passed.

Parameters
entityThe entity to insert.
EntityOctree::Iterator EntityOctreeContainer::iterator ( )

Returns an iterator that iterates over the whole octree.

Returns
The iterator.
Entity ** EntityOctreeContainer::knnSearch ( Entity to,
unsigned char  k,
float *  distances = 0 
)

k-Nearest Neighbour search.

Parameters
toThe reference entity to which the neighbours are searched. If it is stored in the tree it will be the first entry of the resturned list.
kThe number of neighbours to search.
distancesOptional; an array of length k into which the distances to the entities of the result list are stored. If less than k entities were found the remaining array entries are set to infinity.
Returns
A list of pointers to the k nearest neighbour entities. If less than k entities were found the remaining pointers are set to 0.
unsigned int EntityOctreeContainer::size ( )

Returns the number of Entities stored in the octree.

Returns
The number of Entities.

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