This abstract class is an interface to all octrees and provides a factory design pattern for readin and writing all kinds of OcTrees to files (see read()).
Definition at line 64 of file AbstractOcTree.h.
#include <mrpt/otherlibs/octomap/AbstractOcTree.h>
Public Member Functions | |
AbstractOcTree () | |
virtual | ~AbstractOcTree () |
virtual AbstractOcTree * | create () const =0 |
virtual constructor: creates a new object of same type More... | |
virtual std::string | getTreeType () const =0 |
returns actual class name as string for identification More... | |
virtual double | getResolution () const =0 |
virtual void | setResolution (double res)=0 |
virtual size_t | size () const =0 |
virtual size_t | memoryUsage () const =0 |
virtual size_t | memoryUsageNode () const =0 |
virtual void | getMetricMin (double &x, double &y, double &z)=0 |
virtual void | getMetricMin (double &x, double &y, double &z) const =0 |
virtual void | getMetricMax (double &x, double &y, double &z)=0 |
virtual void | getMetricMax (double &x, double &y, double &z) const =0 |
virtual void | getMetricSize (double &x, double &y, double &z)=0 |
virtual void | prune ()=0 |
virtual void | expand ()=0 |
virtual void | clear ()=0 |
bool | write (const std::string &filename) const |
Write file header and complete tree to file (serialization) More... | |
bool | write (std::ostream &s) const |
Write file header and complete tree to stream (serialization) More... | |
virtual std::istream & | readData (std::istream &s)=0 |
Read all nodes from the input stream (without file header), for this the tree needs to be already created. More... | |
virtual std::ostream & | writeData (std::ostream &s) const =0 |
Write complete state of tree to stream (without file header) unmodified. More... | |
Static Public Member Functions | |
static AbstractOcTree * | createTree (const std::string id, double res) |
Creates a certain OcTree (factory pattern) More... | |
static AbstractOcTree * | read (const std::string &filename) |
Read the file header, create the appropriate class and deserialize. More... | |
static AbstractOcTree * | read (std::istream &s) |
Read the file header, create the appropriate class and deserialize. More... | |
Static Protected Member Functions | |
static bool | readHeader (std::istream &s, std::string &id, unsigned &size, double &res) |
static void | registerTreeType (AbstractOcTree *tree) |
Static Protected Attributes | |
static const std::string | fileHeader |
Static Private Member Functions | |
static std::map< std::string, AbstractOcTree * > & | classIDMapping () |
create private store, Construct on first use More... | |
Friends | |
class | StaticMapInit |
octomap::AbstractOcTree::AbstractOcTree | ( | ) |
|
inlinevirtual |
Definition at line 68 of file AbstractOcTree.h.
|
staticprivate |
create private store, Construct on first use
|
pure virtual |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, and octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >.
|
pure virtual |
virtual constructor: creates a new object of same type
Implemented in octomap::ColorOcTree, octomap::OcTreeStamped, octomap::OcTree, octomap::OcTreeBase< NODE >, and octomap::OcTreeBase< CountingOcTreeNode >.
|
static |
|
pure virtual |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, and octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >.
|
pure virtual |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, and octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >.
|
pure virtual |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, and octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >.
|
pure virtual |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, and octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >.
|
pure virtual |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, and octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >.
|
pure virtual |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, and octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >.
|
pure virtual |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, and octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >.
|
pure virtual |
returns actual class name as string for identification
Implemented in octomap::ColorOcTree, octomap::OcTreeStamped, octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTree, octomap::OcTreeBase< NODE >, and octomap::OcTreeBase< CountingOcTreeNode >.
|
pure virtual |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, and octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >.
|
pure virtual |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, and octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >.
|
pure virtual |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, and octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >.
|
static |
Read the file header, create the appropriate class and deserialize.
This creates a new octree which you need to delete yourself. If you expect or requre a specific kind of octree, use dynamic_cast afterwards:
|
static |
Read the file header, create the appropriate class and deserialize.
This creates a new octree which you need to delete yourself.
|
pure virtual |
Read all nodes from the input stream (without file header), for this the tree needs to be already created.
For general file IO, you should probably use AbstractOcTree::read() instead.
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, and octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >.
|
staticprotected |
|
staticprotected |
Referenced by octomap::OcTree::StaticMemberInitializer::StaticMemberInitializer(), octomap::CountingOcTree::StaticMemberInitializer::StaticMemberInitializer(), octomap::OcTreeStamped::StaticMemberInitializer::StaticMemberInitializer(), and octomap::ColorOcTree::StaticMemberInitializer::StaticMemberInitializer().
|
pure virtual |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, and octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >.
|
pure virtual |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, and octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >.
bool octomap::AbstractOcTree::write | ( | const std::string & | filename | ) | const |
Write file header and complete tree to file (serialization)
bool octomap::AbstractOcTree::write | ( | std::ostream & | s | ) | const |
Write file header and complete tree to stream (serialization)
|
pure virtual |
Write complete state of tree to stream (without file header) unmodified.
Pruning the tree first produces smaller files (lossless compression)
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, and octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >.
|
friend |
Definition at line 65 of file AbstractOcTree.h.
|
staticprotected |
Definition at line 169 of file AbstractOcTree.h.
Page generated by Doxygen 1.8.9.1 for MRPT 1.3.2 SVN:Unversioned directory at Tue Dec 8 09:49:21 UTC 2015 |