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

An octree storing entities. More...

#include <entityoctree.h>

Classes

class  Iterator
 An iterator to iterate over an octree. More...
 

Public Member Functions

 EntityOctree (Entity &entity, float x, float y, float z)
 Constructor; for more functionality use EntityOctreeContainer. More...
 
 EntityOctree (EntityOctree &subtree, float x, float y, float z)
 Constructor; for more functionality use EntityOctreeContainer. More...
 
bool insert (Entity &entity, float &x)
 Insert an entity into this octree. More...
 
void knnSearch (Entity **found, float *distances, unsigned char k, Entity &to, float &xP)
 This method inserts all entities in the tree into the given list of neighbours. More...
 

Detailed Description

An octree storing entities.

Constructor & Destructor Documentation

EntityOctree::EntityOctree ( Entity entity,
float  x,
float  y,
float  z 
)

Constructor; for more functionality use EntityOctreeContainer.

Parameters
entityThe entity that the octree shall contain; do not modify or delete the entity after it has been passed.
xThe x coordinate of the subtree center.
yThe y coordinate of the subtree center.
zThe z coordinate of the subtree center.
EntityOctree::EntityOctree ( EntityOctree subtree,
float  x,
float  y,
float  z 
)

Constructor; for more functionality use EntityOctreeContainer.

Parameters
subtree
xThe x coordinate of the subtree center.
yThe y coordinate of the subtree center.
zThe z coordinate of the subtree center.

Member Function Documentation

bool EntityOctree::insert ( Entity entity,
float &  x 
)

Insert an entity into this octree.

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

Parameters
entityThe entity to insert.
xThe x coordinate of the center of the parent element.
void EntityOctree::knnSearch ( Entity **  found,
float *  distances,
unsigned char  k,
Entity to,
float &  xP 
)

This method inserts all entities in the tree into the given list of neighbours.

Parameters
foundA list of pointers to the k nearest entities. The entities are stored in increasing distance to the reference entity. Empty slots (nullpointer) are sorted to the end of the list.
distancesA list of the distances between each entry of the neighbour list and the reference entity. Empty slots in the neighbour list are at distance infinity.
kThe length of the neighbour list - 1.
toThe reference point.
xPThe x coordinate of the center of the parent element.

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