An Octree-node which stores an internal counter per node / volume.
Count is recursive, parent nodes have the summed count of their children.
Definition at line 68 of file CountingOcTree.h.
#include <mrpt/otherlibs/octomap/CountingOcTree.h>
Public Types | |
typedef unsigned int | DataType |
Make the templated data type available from the outside. More... | |
Public Member Functions | |
CountingOcTreeNode () | |
~CountingOcTreeNode () | |
bool | createChild (unsigned int i) |
CountingOcTreeNode * | getChild (unsigned int i) |
const CountingOcTreeNode * | getChild (unsigned int i) const |
unsigned int | getCount () const |
void | increaseCount () |
void | setCount (unsigned c) |
void | expandNode () |
bool | operator== (const OcTreeDataNode &rhs) const |
Equals operator, compares if the stored value is identical. More... | |
bool | childExists (unsigned int i) const |
bool | hasChildren () 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. More... | |
void | deleteChild (unsigned int i) |
Deletes the i-th child of the node. More... | |
bool | pruneNode () |
Prunes a node when it is collapsible. More... | |
unsigned int | getValue () const |
void | setValue (unsigned intv) |
sets value to be stored in the node More... | |
std::istream & | readValue (std::istream &s) |
Read node from binary stream (incl. More... | |
std::ostream & | writeValue (std::ostream &s) const |
Write node to binary stream (incl float value), recursively continue with all children. More... | |
Protected Member Functions | |
void | allocChildren () |
Protected Attributes | |
OcTreeDataNode< unsigned int > ** | children |
pointer to array of children, may be NULL More... | |
unsigned int | value |
stored data (payload) More... | |
|
inherited |
Make the templated data type available from the outside.
Definition at line 156 of file OcTreeDataNode.h.
octomap::CountingOcTreeNode::CountingOcTreeNode | ( | ) |
octomap::CountingOcTreeNode::~CountingOcTreeNode | ( | ) |
|
protectedinherited |
|
inherited |
|
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 | ) |
|
inherited |
Deletes the i-th child of the node.
void octomap::CountingOcTreeNode::expandNode | ( | ) |
Referenced by setCount().
|
inline |
Definition at line 76 of file CountingOcTree.h.
References octomap::OcTreeDataNode< T >::getChild().
|
inline |
Definition at line 80 of file CountingOcTree.h.
References octomap::OcTreeDataNode< T >::getChild().
|
inline |
Definition at line 84 of file CountingOcTree.h.
References octomap::OcTreeDataNode< unsigned int >::getValue().
|
inlineinherited |
Definition at line 129 of file OcTreeDataNode.h.
Referenced by getCount().
|
inherited |
|
inline |
Definition at line 85 of file CountingOcTree.h.
References octomap::OcTreeDataNode< unsigned int >::value.
|
inherited |
Equals operator, compares if the stored value is identical.
|
inherited |
Prunes a node when it is collapsible.
|
inherited |
Read node from binary stream (incl.
float value), recursively continue with all children.
s |
|
inline |
Definition at line 86 of file CountingOcTree.h.
References expandNode(), and octomap::OcTreeDataNode< unsigned int >::setValue().
|
inlineinherited |
sets value to be stored in the node
Definition at line 131 of file OcTreeDataNode.h.
Referenced by setCount().
|
inherited |
Write node to binary stream (incl float value), recursively continue with all children.
This preserves the complete state of the node.
s |
|
protectedinherited |
pointer to array of children, may be NULL
Definition at line 163 of file OcTreeDataNode.h.
|
protectedinherited |
stored data (payload)
Definition at line 165 of file OcTreeDataNode.h.
Referenced by octomap::CountingOcTree::CountingOcTree(), and increaseCount().
Page generated by Doxygen 1.8.11 for MRPT 1.4.0 SVN: at Sun Aug 14 23:58:29 UTC 2016 |