45 : children(NULL), value(initVal)
52 : children(NULL), value(rhs.value)
56 for (
unsigned i = 0; i<8; ++i){
69 assert(children == NULL);
79 return rhs.
value == value;
90 if ((children != NULL) && (children[i] != NULL))
100 for (
unsigned int i = 0; i<8; i++){
102 if (children[i] != NULL)
113 template <
typename T>
115 s.read((
char*) &value,
sizeof(value));
120 template <
typename T>
122 s.write((
const char*) &value,
sizeof(value));
130 template <
typename T>
133 for (
unsigned int i=0; i<8; i++) {
Definition: OcTreeDataNode.h:43
Basic node in the OcTree that can hold arbitrary data of type T in value.
Definition: OcTreeDataNode.h:63
AbstractOcTreeNode ** children
pointer to array of children, may be NULL
Definition: OcTreeDataNode.h:126
T value
stored data (payload)
Definition: OcTreeDataNode.h:128
bool operator==(const OcTreeDataNode &rhs) const
Equals operator, compares if the stored value is identical.
Definition: OcTreeDataNode.hxx:78
std::ostream & writeData(std::ostream &s) const
Write node payload (data only) to binary stream.
Definition: OcTreeDataNode.hxx:121
OcTreeDataNode()
Definition: OcTreeDataNode.hxx:37
void allocChildren()
Definition: OcTreeDataNode.hxx:131
std::istream & readData(std::istream &s)
Read node payload (data only) from binary stream.
Definition: OcTreeDataNode.hxx:114
void copyData(const OcTreeDataNode &from)
Copy the payload (data in "value") from rhs into this node Opposed to copy ctor, this does not clone ...
Definition: OcTreeDataNode.hxx:73
~OcTreeDataNode()
Delete only own members. OcTree maintains tree structure and must have deleted children already.
Definition: OcTreeDataNode.hxx:65
Namespace the OctoMap library and visualization tools.