octomap 1.9.8
Loading...
Searching...
No Matches
octomap::ColorOcTreeNode Class Reference

#include <ColorOcTree.h>

Inheritance diagram for octomap::ColorOcTreeNode:
Collaboration diagram for octomap::ColorOcTreeNode:

Data Structures

class  Color

Public Types

typedef float DataType
 Make the templated data type available from the outside.

Public Member Functions

void addValue (const float &p)
 adds p to the node's logOdds value (with no boundary / threshold checking!)
 ColorOcTreeNode ()
 ColorOcTreeNode (const ColorOcTreeNode &rhs)
void copyData (const ColorOcTreeNode &from)
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.
ColorOcTreeNode::Color getAverageChildColor () const
ColorgetColor ()
Color getColor () const
float getLogOdds () const
float getMaxChildLogOdds () const
double getMeanChildLogOdds () const
double getOccupancy () const
float getValue () const
bool isColorSet () const
 OCTOMAP_DEPRECATED (bool childExists(unsigned int i) const)
 Test whether the i-th child exists.
bool operator== (const ColorOcTreeNode &rhs) const
bool operator== (const OcTreeDataNode &rhs) const
 Equals operator, compares if the stored value is identical.
std::istream & readData (std::istream &s)
void setColor (Color c)
void setColor (uint8_t r, uint8_t g, uint8_t b)
void setLogOdds (float l)
 sets log odds occupancy of node
void setValue (float v)
 sets value to be stored in the node
void updateColorChildren ()
void updateOccupancyChildren ()
 update this node's occupancy according to its children's maximum occupancy
std::ostream & writeData (std::ostream &s) const

Protected Member Functions

void allocChildren ()

Protected Attributes

AbstractOcTreeNode ** children
 pointer to array of children, may be NULL
Color color
float value
 stored data (payload)

Friends

class ColorOcTree

Member Typedef Documentation

◆ DataType

typedef float octomap::OcTreeDataNode< float >::DataType
inherited

Make the templated data type available from the outside.

Constructor & Destructor Documentation

◆ ColorOcTreeNode() [1/2]

octomap::ColorOcTreeNode::ColorOcTreeNode ( )
inline

◆ ColorOcTreeNode() [2/2]

octomap::ColorOcTreeNode::ColorOcTreeNode ( const ColorOcTreeNode & rhs)
inline

Member Function Documentation

◆ addValue()

void octomap::OcTreeNode::addValue ( const float & p)
inherited

adds p to the node's logOdds value (with no boundary / threshold checking!)

References octomap::OcTreeDataNode< float >::value.

◆ allocChildren()

void octomap::OcTreeDataNode< float >::allocChildren ( )
protectedinherited

◆ copyData() [1/2]

void octomap::ColorOcTreeNode::copyData ( const ColorOcTreeNode & from)
inline

◆ copyData() [2/2]

void octomap::OcTreeDataNode< float >::copyData ( const OcTreeDataNode< float > & 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.

Referenced by octomap::ColorOcTreeNode::copyData(), and octomap::OcTreeNodeStamped::copyData().

◆ getAverageChildColor()

◆ getColor() [1/2]

Color & octomap::ColorOcTreeNode::getColor ( )
inline

References color.

◆ getColor() [2/2]

◆ getLogOdds()

◆ getMaxChildLogOdds()

float octomap::OcTreeNode::getMaxChildLogOdds ( ) const
inherited
Returns
maximum of children's occupancy probabilities, in log odds

References octomap::OcTreeDataNode< float >::children, getLogOdds(), and OcTreeNode().

Referenced by updateOccupancyChildren(), and octomap::OcTreeNodeStamped::updateOccupancyChildren().

◆ getMeanChildLogOdds()

double octomap::OcTreeNode::getMeanChildLogOdds ( ) const
inherited
Returns
mean of all children's occupancy probabilities, in log odds

References octomap::OcTreeDataNode< float >::children, getOccupancy(), and OcTreeNode().

◆ getOccupancy()

double octomap::OcTreeNode::getOccupancy ( ) const
inlineinherited

◆ getValue()

float octomap::OcTreeDataNode< float >::getValue ( ) const
inlineinherited
Returns
value stored in the node

◆ isColorSet()

bool octomap::ColorOcTreeNode::isColorSet ( ) const
inline

◆ OCTOMAP_DEPRECATED()

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

Test whether the i-th child exists.

Returns
true if the i-th child exists

◆ operator==() [1/2]

bool octomap::ColorOcTreeNode::operator== ( const ColorOcTreeNode & rhs) const
inline

◆ operator==() [2/2]

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

Equals operator, compares if the stored value is identical.

◆ readData()

std::istream & octomap::ColorOcTreeNode::readData ( std::istream & s)

◆ setColor() [1/2]

◆ setColor() [2/2]

void octomap::ColorOcTreeNode::setColor ( uint8_t r,
uint8_t g,
uint8_t b )
inline

References color.

◆ setLogOdds()

void octomap::OcTreeNode::setLogOdds ( float l)
inlineinherited

◆ setValue()

void octomap::OcTreeDataNode< float >::setValue ( float v)
inlineinherited

sets value to be stored in the node

◆ updateColorChildren()

void octomap::ColorOcTreeNode::updateColorChildren ( )

◆ updateOccupancyChildren()

void octomap::OcTreeNode::updateOccupancyChildren ( )
inlineinherited

update this node's occupancy according to its children's maximum occupancy

References getMaxChildLogOdds(), and setLogOdds().

Referenced by octomap::ColorOcTree::updateInnerOccupancyRecurs().

◆ writeData()

std::ostream & octomap::ColorOcTreeNode::writeData ( std::ostream & s) const

◆ ColorOcTree

friend class ColorOcTree
friend

References ColorOcTree.

Referenced by ColorOcTree.

Field Documentation

◆ children

AbstractOcTreeNode** octomap::OcTreeDataNode< float >::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

Referenced by octomap::ColorOcTreeNode::getAverageChildColor(), octomap::OcTreeNode::getMaxChildLogOdds(), and octomap::OcTreeNode::getMeanChildLogOdds().

◆ color

◆ value


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