octomap 1.5.0
|
An Octree-node which stores an internal counter per node / volume. More...
Public Types | |
typedef unsigned int | DataType |
Make the templated data type available from the outside. | |
Public Member Functions | |
bool | childExists (unsigned int i) const |
bool | collapsible () const |
A node is collapsible if all children exist, don't have children of their own and have the same occupancy value. | |
CountingOcTreeNode () | |
implementation of CountingOcTreeNode ---------------------------------- | |
bool | createChild (unsigned int i) |
initialize i-th child, allocate children array if needed | |
void | deleteChild (unsigned int i) |
Deletes the i-th child of the node. | |
void | expandNode () |
Expands a node (reverse of pruning): All children are created and their occupancy probability is set to the node's value. | |
CountingOcTreeNode * | getChild (unsigned int i) |
const CountingOcTreeNode * | getChild (unsigned int i) const |
unsigned int | getCount () const |
unsigned int | getValue () const |
bool | hasChildren () const |
void | increaseCount () |
bool | operator== (const OcTreeDataNode &rhs) const |
Equals operator, compares if the stored value is identical. | |
bool | pruneNode () |
Prunes a node when it is collapsible. | |
std::istream & | readValue (std::istream &s) |
Read node from binary stream (incl. | |
void | setCount (unsigned c) |
void | setValue (unsigned intv) |
sets value to be stored in the node | |
std::ostream & | writeValue (std::ostream &s) const |
Write node to binary stream (incl float value), recursively continue with all children. | |
~CountingOcTreeNode () | |
Protected Member Functions | |
void | allocChildren () |
Protected Attributes | |
OcTreeDataNode< unsigned int > ** | children |
pointer to array of children, may be NULL | |
unsigned int | value |
stored data (payload) |
An Octree-node which stores an internal counter per node / volume.
Count is recursive, parent nodes have the summed count of their children.
typedef unsigned int octomap::OcTreeDataNode< unsigned int >::DataType [inherited] |
Make the templated data type available from the outside.
octomap::CountingOcTreeNode::CountingOcTreeNode | ( | ) |
implementation of CountingOcTreeNode ----------------------------------
Referenced by createChild().
octomap::CountingOcTreeNode::~CountingOcTreeNode | ( | ) |
void octomap::OcTreeDataNode< unsigned int >::allocChildren | ( | ) | [protected, inherited] |
Referenced by createChild().
bool octomap::OcTreeDataNode< unsigned int >::childExists | ( | unsigned int | i | ) | const [inherited] |
bool octomap::OcTreeDataNode< unsigned int >::collapsible | ( | ) | const [inherited] |
A node is collapsible if all children exist, don't have children of their own and have the same occupancy value.
bool octomap::CountingOcTreeNode::createChild | ( | unsigned int | i | ) |
initialize i-th child, allocate children array if needed
Reimplemented from octomap::OcTreeDataNode< unsigned int >.
References octomap::OcTreeDataNode< unsigned int >::allocChildren(), octomap::OcTreeDataNode< unsigned int >::children, and CountingOcTreeNode().
Referenced by expandNode(), and octomap::CountingOcTree::updateNode().
void octomap::OcTreeDataNode< unsigned int >::deleteChild | ( | unsigned int | i | ) | [inherited] |
Deletes the i-th child of the node.
void octomap::CountingOcTreeNode::expandNode | ( | ) |
Expands a node (reverse of pruning): All children are created and their occupancy probability is set to the node's value.
You need to verify that this is indeed a pruned node (i.e. not a leaf at the lowest level)
Reimplemented from octomap::OcTreeDataNode< unsigned int >.
References octomap::OcTreeDataNode< unsigned int >::children, createChild(), octomap::OcTreeDataNode< unsigned int >::hasChildren(), octomap::OcTreeDataNode< T >::setValue(), and octomap::OcTreeDataNode< unsigned int >::value.
CountingOcTreeNode* octomap::CountingOcTreeNode::getChild | ( | unsigned int | i | ) | [inline] |
Reimplemented from octomap::OcTreeDataNode< unsigned int >.
Referenced by octomap::CountingOcTree::getCentersMinHitsRecurs(), getChild(), and octomap::CountingOcTree::updateNode().
const CountingOcTreeNode* octomap::CountingOcTreeNode::getChild | ( | unsigned int | i | ) | const [inline] |
Reimplemented from octomap::OcTreeDataNode< unsigned int >.
References getChild().
unsigned int octomap::CountingOcTreeNode::getCount | ( | ) | const [inline] |
References octomap::OcTreeDataNode< unsigned int >::getValue().
Referenced by octomap::CountingOcTree::getCentersMinHitsRecurs().
unsigned int octomap::OcTreeDataNode< unsigned int >::getValue | ( | ) | const [inline, inherited] |
References octomap::OcTreeDataNode< T >::value.
Referenced by getCount().
bool octomap::OcTreeDataNode< unsigned int >::hasChildren | ( | ) | const [inherited] |
Referenced by expandNode().
void octomap::CountingOcTreeNode::increaseCount | ( | ) | [inline] |
References octomap::OcTreeDataNode< unsigned int >::value.
Referenced by octomap::CountingOcTree::updateNode().
bool octomap::OcTreeDataNode< unsigned int >::operator== | ( | const OcTreeDataNode< unsigned int > & | rhs | ) | const [inherited] |
Equals operator, compares if the stored value is identical.
bool octomap::OcTreeDataNode< unsigned int >::pruneNode | ( | ) | [inherited] |
Prunes a node when it is collapsible.
std::istream& octomap::OcTreeDataNode< unsigned int >::readValue | ( | std::istream & | s | ) | [inherited] |
Read node from binary stream (incl.
float value), recursively continue with all children.
s |
void octomap::CountingOcTreeNode::setCount | ( | unsigned | c | ) | [inline] |
void octomap::OcTreeDataNode< unsigned int >::setValue | ( | unsigned int | v | ) | [inline, inherited] |
sets value to be stored in the node
References octomap::OcTreeDataNode< T >::value.
Referenced by setCount().
std::ostream& octomap::OcTreeDataNode< unsigned int >::writeValue | ( | std::ostream & | s | ) | const [inherited] |
Write node to binary stream (incl float value), recursively continue with all children.
This preserves the complete state of the node.
s |
OcTreeDataNode<unsigned int >** octomap::OcTreeDataNode< unsigned int >::children [protected, inherited] |
pointer to array of children, may be NULL
Referenced by createChild(), and expandNode().
unsigned int octomap::OcTreeDataNode< unsigned int >::value [protected, inherited] |
stored data (payload)
Referenced by expandNode(), and increaseCount().