octomap  1.9.7
octomap::ColorOcTreeNode Class Reference
+ 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. More...
 

Public Member Functions

void addValue (const float &p)
 adds p to the node's logOdds value (with no boundary / threshold checking!) More...
 
 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. More...
 
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. More...
 
 OCTOMAP_DEPRECATED (bool hasChildren() const)
 
bool operator== (const ColorOcTreeNode &rhs) const
 
bool operator== (const OcTreeDataNode &rhs) const
 Equals operator, compares if the stored value is identical. More...
 
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 More...
 
void setValue (float v)
 sets value to be stored in the node More...
 
void updateColorChildren ()
 
void updateOccupancyChildren ()
 update this node's occupancy according to its children's maximum occupancy More...
 
std::ostream & writeData (std::ostream &s) const
 

Protected Member Functions

void allocChildren ()
 

Protected Attributes

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

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.

◆ getAverageChildColor()

◆ getColor() [1/2]

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

References color.

◆ getColor() [2/2]

◆ getLogOdds()

float octomap::OcTreeNode::getLogOdds ( ) const
inlineinherited

◆ getMaxChildLogOdds()

float octomap::OcTreeNode::getMaxChildLogOdds ( ) const
inherited

◆ getMeanChildLogOdds()

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

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

◆ getOccupancy()

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

◆ getValue()

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

◆ isColorSet()

◆ OCTOMAP_DEPRECATED() [1/2]

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

◆ OCTOMAP_DEPRECATED() [2/2]

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

◆ 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 octomap::OcTreeNode::getMaxChildLogOdds(), and octomap::OcTreeNode::setLogOdds().

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

◆ writeData()

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

Friends And Related Function Documentation

◆ ColorOcTree

friend class ColorOcTree
friend

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

◆ color

Color octomap::ColorOcTreeNode::color
protected

◆ value

float octomap::OcTreeDataNode< float >::value
protectedinherited

stored data (payload)


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