Point Cloud Viewer  1.00
A Viewer to display point clouds with phong shading by converting them to splats.
entityoctreecontainer.h
1 #ifndef ENTITYOCTREECONTAINER_H
2 #define ENTITYOCTREECONTAINER_H
3 
4 #include "entityoctree.h"
5 
10 public:
18  EntityOctreeContainer(float width = 0, float x = 0, float y = 0, float z = 0);
26  void insert(Entity &entity);
38  Entity** knnSearch(Entity &to, unsigned char k, float *distances = 0);
39 
45 
50  unsigned int size();
51 
52 private:
53  EntityOctree *octree;
54  //until octree is defined, xyz represent the tree center; after definition they
55  //represent the lowest corner of the tree bounding box.
56  float x, y, z, width;
57  unsigned int nrOfElements;
58 
59  bool inside(Entity &entity);
60  void growBounds(Entity &forEntity);
61 };
62 
63 #endif // ENTITYOCTREECONTAINER_H
Stores an entity octree.
Definition: entityoctreecontainer.h:9
unsigned int size()
Returns the number of Entities stored in the octree.
Definition: entityoctreecontainer.cpp:55
EntityOctreeContainer(float width=0, float x=0, float y=0, float z=0)
Constructor.
Definition: entityoctreecontainer.cpp:4
An element with a location in 3-dimensional space.
Definition: entity.h:9
EntityOctree::Iterator iterator()
Returns an iterator that iterates over the whole octree.
Definition: entityoctreecontainer.cpp:51
void insert(Entity &entity)
Insert an entity into this octree.
Definition: entityoctreecontainer.cpp:17
An octree storing entities.
Definition: entityoctree.h:10
Entity ** knnSearch(Entity &to, unsigned char k, float *distances=0)
k-Nearest Neighbour search.
Definition: entityoctreecontainer.cpp:38
An iterator to iterate over an octree.
Definition: entityoctree.h:69