|
octomap 1.9.8
|
Basic node in the OcTree that can hold arbitrary data of type T in value. More...
#include <OcTreeDataNode.h>
Public Types | |
| typedef T | DataType |
| Make the templated data type available from the outside. | |
Public Member Functions | |
| void | copyData (const OcTreeDataNode &from) |
| Copy the payload (data in "value") from rhs into this node Opposed to copy ctor, this does not clone the children as well. | |
| T | getValue () const |
| OCTOMAP_DEPRECATED (bool childExists(unsigned int i) const) | |
| Test whether the i-th child exists. | |
| OCTOMAP_DEPRECATED (bool hasChildren() const) | |
| OcTreeDataNode () | |
| OcTreeDataNode (const OcTreeDataNode &rhs) | |
| Copy constructor, performs a recursive deep-copy of all children including node data in "value". | |
| OcTreeDataNode (T initVal) | |
| bool | operator== (const OcTreeDataNode &rhs) const |
| Equals operator, compares if the stored value is identical. | |
| std::istream & | readData (std::istream &s) |
| Read node payload (data only) from binary stream. | |
| void | setValue (T v) |
| sets value to be stored in the node | |
| std::ostream & | writeData (std::ostream &s) const |
| Write node payload (data only) to binary stream. | |
| ~OcTreeDataNode () | |
| Delete only own members. OcTree maintains tree structure and must have deleted children already. | |
Protected Member Functions | |
| void | allocChildren () |
Protected Attributes | |
| AbstractOcTreeNode ** | children |
| pointer to array of children, may be NULL | |
| T | value |
| stored data (payload) | |
Friends | |
| template<typename NODE, typename I> | |
| class | OcTreeBaseImpl |
Basic node in the OcTree that can hold arbitrary data of type T in value.
This is the base class for nodes used in an OcTree. The used implementation for occupancy mapping is in OcTreeNode.#
| T | data to be stored in the node (e.g. a float for probabilities) |
Note: If you derive a class (directly or indirectly) from OcTreeDataNode, you have to implement (at least) the following functions to avoid slicing errors and memory-related bugs: createChild(), getChild(), getChild() const, expandNode() See ColorOcTreeNode in ColorOcTree.h for an example.
| typedef T octomap::OcTreeDataNode< T >::DataType |
Make the templated data type available from the outside.
| octomap::OcTreeDataNode< T >::OcTreeDataNode | ( | ) |
References children.
Referenced by copyData(), OcTreeBaseImpl, OcTreeDataNode(), and operator==().
| octomap::OcTreeDataNode< T >::OcTreeDataNode | ( | T | initVal | ) |
| octomap::OcTreeDataNode< T >::OcTreeDataNode | ( | const OcTreeDataNode< T > & | rhs | ) |
Copy constructor, performs a recursive deep-copy of all children including node data in "value".
References children, OcTreeDataNode(), and value.
| octomap::OcTreeDataNode< T >::~OcTreeDataNode | ( | ) |
Delete only own members. OcTree maintains tree structure and must have deleted children already.
References ~OcTreeDataNode().
Referenced by ~OcTreeDataNode().
|
protected |
References allocChildren(), and children.
Referenced by allocChildren().
| void octomap::OcTreeDataNode< T >::copyData | ( | const OcTreeDataNode< T > & | from | ) |
Copy the payload (data in "value") from rhs into this node Opposed to copy ctor, this does not clone the children as well.
References copyData(), OcTreeDataNode(), and value.
Referenced by copyData().
|
inline |
References value.
Referenced by octomap::ColorOcTree::isNodeCollapsible().
| octomap::OcTreeDataNode< T >::OCTOMAP_DEPRECATED | ( | bool childExists(unsigned int i) const | ) |
Test whether the i-th child exists.
| octomap::OcTreeDataNode< T >::OCTOMAP_DEPRECATED | ( | bool hasChildren() const | ) |
| bool octomap::OcTreeDataNode< T >::operator== | ( | const OcTreeDataNode< T > & | rhs | ) | const |
Equals operator, compares if the stored value is identical.
References OcTreeDataNode(), and value.
| std::istream & octomap::OcTreeDataNode< T >::readData | ( | std::istream & | s | ) |
Read node payload (data only) from binary stream.
References readData(), and value.
Referenced by readData().
|
inline |
| std::ostream & octomap::OcTreeDataNode< T >::writeData | ( | std::ostream & | s | ) | const |
Write node payload (data only) to binary stream.
Referenced by octomap::OcTreeDataNode< unsigned int >::allocChildren().
References OcTreeBaseImpl, and OcTreeDataNode().
Referenced by OcTreeBaseImpl.
|
protected |
pointer to array of children, may be NULL
Referenced by allocChildren(), OcTreeDataNode(), OcTreeDataNode(), OcTreeDataNode(), and octomap::ColorOcTree::pruneNode().
|
protected |
stored data (payload)
Referenced by copyData(), getValue(), OcTreeDataNode(), OcTreeDataNode(), octomap::ColorOcTreeNode::operator==(), operator==(), octomap::OcTreeNodeStamped::operator==(), readData(), and setValue().