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

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

#include <entityoctree.h>

Public Member Functions

 Iterator (EntityOctree *root)
 Creates an iterator for the subtree with the given root. More...
 
bool next ()
 Jumps to the next Entity in the tree. More...
 
bool finished ()
 Checks if the iterator is finished and removes the finished-flag. More...
 
void replace (Entity &newEntity)
 Replaces the Entity at the current position. More...
 
Iteratoroperator++ ()
 Jumps to the next Entity in the tree. More...
 
Iterator operator++ (int)
 Jumps to the next Entity in the tree. More...
 
Entityoperator-> ()
 Returns the Entity at the current position. More...
 
Entityoperator* ()
 Returns the Entity at the current position. More...
 

Detailed Description

An iterator to iterate over an octree.

Constructor & Destructor Documentation

EntityOctree::Iterator::Iterator ( EntityOctree root)

Creates an iterator for the subtree with the given root.

Parameters
rootThe subtree root. If 0, the iterator's finished flag is persistently activated and the iterator should never be dereferenced.

Member Function Documentation

bool EntityOctree::Iterator::finished ( )

Checks if the iterator is finished and removes the finished-flag.

Returns
true if the iterator has reached the end and started over, or if the tree is empty.
bool EntityOctree::Iterator::next ( )

Jumps to the next Entity in the tree.

If there is no next Entity it starts over from the beginning.

Returns
true if the whole tree has been traversed.
Entity & EntityOctree::Iterator::operator* ( )

Returns the Entity at the current position.

Should not be called if the tree is empty.

Returns
The entity.
EntityOctree::Iterator & EntityOctree::Iterator::operator++ ( )

Jumps to the next Entity in the tree.

If there is no next Entity it starts over from the beginning.

Returns
The iterator at the new location.
EntityOctree::Iterator EntityOctree::Iterator::operator++ ( int  )

Jumps to the next Entity in the tree.

If there is no next Entity it starts over from the beginning.

Returns
The iterator at the old location.
Entity * EntityOctree::Iterator::operator-> ( )

Returns the Entity at the current position.

Should not be called if the tree is empty.

Returns
The entity.
void EntityOctree::Iterator::replace ( Entity newEntity)

Replaces the Entity at the current position.

Parameters
newEntityThe new Entity.

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