octomap  1.9.7
octomap::CountingOcTreeNode Class Reference

An Octree-node which stores an internal counter per node / volume. More...

+ Inheritance diagram for octomap::CountingOcTreeNode:
+ Collaboration diagram for octomap::CountingOcTreeNode:

Public Types

typedef unsigned int DataType
 Make the templated data type available from the outside. More...
 

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. More...
 
 CountingOcTreeNode ()
 implementation of CountingOcTreeNode -------------------------------— More...
 
unsigned int getCount () const
 
unsigned int getValue () const
 
void increaseCount ()
 
 OCTOMAP_DEPRECATED (bool childExists(unsigned int i) const)
 Test whether the i-th child exists. More...
 
 OCTOMAP_DEPRECATED (bool hasChildren() const)
 
bool operator== (const OcTreeDataNode &rhs) const
 Equals operator, compares if the stored value is identical. More...
 
std::istream & readData (std::istream &s)
 Read node payload (data only) from binary stream. More...
 
void setCount (unsigned c)
 
void setValue (unsigned int v)
 sets value to be stored in the node More...
 
std::ostream & writeData (std::ostream &s) const
 Write node payload (data only) to binary stream. More...
 
 ~CountingOcTreeNode ()
 

Protected Member Functions

void allocChildren ()
 

Protected Attributes

AbstractOcTreeNode ** children
 pointer to array of children, may be NULL More...
 
unsigned int value
 stored data (payload) More...
 

Detailed Description

An Octree-node which stores an internal counter per node / volume.

Count is recursive, parent nodes have the summed count of their children.

Note
In our mapping system this data structure is used in CountingOcTree in the sensor model only

Member Typedef Documentation

◆ DataType

typedef unsigned int octomap::OcTreeDataNode< unsigned int >::DataType
inherited

Make the templated data type available from the outside.

Constructor & Destructor Documentation

◆ CountingOcTreeNode()

octomap::CountingOcTreeNode::CountingOcTreeNode ( )

implementation of CountingOcTreeNode -------------------------------—

◆ ~CountingOcTreeNode()

octomap::CountingOcTreeNode::~CountingOcTreeNode ( )

Member Function Documentation

◆ allocChildren()

void octomap::OcTreeDataNode< unsigned int >::allocChildren
protectedinherited

◆ copyData()

void octomap::OcTreeDataNode< unsigned int >::copyData ( const OcTreeDataNode< unsigned int > &  from)
inherited

Copy the payload (data in "value") from rhs into this node Opposed to copy ctor, this does not clone the children as well.

◆ getCount()

unsigned int octomap::CountingOcTreeNode::getCount ( ) const
inline

◆ getValue()

unsigned int octomap::OcTreeDataNode< unsigned int >::getValue
inlineinherited
Returns
value stored in the node

◆ increaseCount()

void octomap::CountingOcTreeNode::increaseCount ( )
inline

◆ OCTOMAP_DEPRECATED() [1/2]

octomap::OcTreeDataNode< unsigned int >::OCTOMAP_DEPRECATED ( bool childExists(unsigned int i) const  )
inherited

Test whether the i-th child exists.

Returns
true if the i-th child exists

◆ OCTOMAP_DEPRECATED() [2/2]

octomap::OcTreeDataNode< unsigned int >::OCTOMAP_DEPRECATED ( bool hasChildren() const  )
inherited
Returns
true if the node has at least one child

◆ operator==()

bool octomap::OcTreeDataNode< unsigned int >::operator== ( const OcTreeDataNode< unsigned int > &  rhs) const
inherited

Equals operator, compares if the stored value is identical.

◆ readData()

std::istream & octomap::OcTreeDataNode< unsigned int >::readData ( std::istream &  s)
inherited

Read node payload (data only) from binary stream.

◆ setCount()

void octomap::CountingOcTreeNode::setCount ( unsigned  c)
inline

◆ setValue()

void octomap::OcTreeDataNode< unsigned int >::setValue ( unsigned int  v)
inlineinherited

sets value to be stored in the node

◆ writeData()

std::ostream & octomap::OcTreeDataNode< unsigned int >::writeData ( std::ostream &  s) const
inherited

Write node payload (data only) to binary stream.

Field Documentation

◆ children

AbstractOcTreeNode** octomap::OcTreeDataNode< unsigned int >::children
protectedinherited

pointer to array of children, may be NULL

Note
The tree class manages this pointer, the array, and the memory for it! The children of a node are always enforced to be the same type as the node

◆ value

unsigned int octomap::OcTreeDataNode< unsigned int >::value
protectedinherited

stored data (payload)


The documentation for this class was generated from the following files: