55 static const float threshold;
62 bool subInsert(
Entity &entity,
float &x);
63 float computeDist(
float x,
float y,
float z,
float w);
131 std::list<EntityOctree*> stack;
132 std::list<unsigned char> stackIndex;
139 #endif // ENTITYOCTREE_H
bool insert(Entity &entity, float &x)
Insert an entity into this octree.
Definition: entityoctree.cpp:40
bool finished()
Checks if the iterator is finished and removes the finished-flag.
Definition: entityoctree.cpp:150
Entity & operator*()
Returns the Entity at the current position.
Definition: entityoctree.cpp:205
Iterator(EntityOctree *root)
Creates an iterator for the subtree with the given root.
Definition: entityoctree.cpp:210
An element with a location in 3-dimensional space.
Definition: entity.h:9
Iterator & operator++()
Jumps to the next Entity in the tree.
Definition: entityoctree.cpp:164
An octree storing entities.
Definition: entityoctree.h:10
Entity * operator->()
Returns the Entity at the current position.
Definition: entityoctree.cpp:200
bool next()
Jumps to the next Entity in the tree.
Definition: entityoctree.cpp:145
void replace(Entity &newEntity)
Replaces the Entity at the current position.
Definition: entityoctree.cpp:158
An iterator to iterate over an octree.
Definition: entityoctree.h:69
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.
Definition: entityoctree.cpp:50
EntityOctree(Entity &entity, float x, float y, float z)
Constructor; for more functionality use EntityOctreeContainer.
Definition: entityoctree.cpp:7