objtree::Node Class Reference
#include <node.h>
List of all members.
Detailed Description
Octree node class.
Definition at line 43 of file node.h.
Constructor & Destructor Documentation
objtree::Node::Node |
( |
unsigned char |
place = 0 , |
|
|
Node * |
parent = NULL | |
|
) |
| | |
A constructor. Creates a new node.
- Parameters:
-
| place | position inside the parent |
| parent | pointer to the parent |
Definition at line 40 of file node.cpp.
Member Function Documentation
void objtree::Node::add |
( |
Object * |
object |
) |
|
Adds object to the node.
- Parameters:
-
Definition at line 149 of file node.cpp.
Node * objtree::Node::child |
( |
unsigned char |
place, |
|
|
bool |
createNew = false | |
|
) |
| | |
Returns pointer to the child.
- Parameters:
-
| place | child position |
| createNew | if true non-existing childs are created |
- Returns:
- pointer to child
Definition at line 116 of file node.cpp.
Node * objtree::Node::computeNeighbor |
( |
unsigned char |
dir |
) |
[private] |
Computes neighbor from node position and neighbor direction. Returns pointer to the computed node.
- Parameters:
-
- Returns:
- pointer to the neighbor or NULL if neighbor doesn't exists
Definition at line 246 of file node.cpp.
void objtree::Node::deleteIfEmpty |
( |
|
) |
|
Removes node if it doesn't contain any children and objects.
Definition at line 309 of file node.cpp.
Box & objtree::Node::getChildBox |
( |
unsigned char |
place, |
|
|
Box & |
childBox, |
|
|
const Box & |
parentBox | |
|
) |
| | [static] |
Computes position and size of selected child node.
- Parameters:
-
| place | child position |
| childBox | output computed position and size |
| parentBox | parent bounding box |
- Returns:
- computed position and size
Definition at line 162 of file node.cpp.
Node * objtree::Node::neighbor |
( |
unsigned char |
dir |
) |
|
Returns pointer to the neighbor.
- Parameters:
-
| dir | neighbor direction (0-25) |
- Returns:
- pointer to the neighbor
Definition at line 131 of file node.cpp.
const std::list< Object * > & objtree::Node::objects |
( |
|
) |
const |
Returns objects in node.
- Returns:
- std::list of objects
Definition at line 140 of file node.cpp.
Node * objtree::Node::parent |
( |
|
) |
|
Returns node parent.
- Returns:
- node parent
Definition at line 105 of file node.cpp.
Node * objtree::Node::parentNeighborChild |
( |
unsigned char |
parentNeighbor, |
|
|
unsigned char |
child | |
|
) |
| | [private] |
Returns pointer to the child from parent neighbor.
- Parameters:
-
| parentNeighbor | parent neighbor direction |
| child | child position |
- Returns:
- pointer to the selected node
Definition at line 211 of file node.cpp.
void objtree::Node::removeObject |
( |
Object * |
object |
) |
|
Removes object from node. Also removes node if there is no one remaining.
- Parameters:
-
| object | pointer to the object |
Definition at line 294 of file node.cpp.
unsigned char objtree::Node::reverseNeighborId |
( |
unsigned char |
dir |
) |
[static, private] |
Returns opposite neighbor direction.
- Parameters:
-
- Returns:
- opposite neighbor direction
Definition at line 284 of file node.cpp.
Member Data Documentation
The documentation for this class was generated from the following files:
srs_env_model
Author(s): Vit Stancl (stancl@fit.vutbr.cz), Tomas Lokaj, Jan Gorig, Michal Spanel (spanel@fit.vutbr.cz)
autogenerated on Tue Mar 5 14:33:48 2013