Go to the documentation of this file.
34 #ifndef OCTOMAP_ABSTRACT_OCTREE_H
35 #define OCTOMAP_ABSTRACT_OCTREE_H
66 virtual size_t size()
const = 0;
69 virtual void getMetricMin(
double& x,
double& y,
double& z) = 0;
70 virtual void getMetricMin(
double& x,
double& y,
double& z)
const = 0;
71 virtual void getMetricMax(
double& x,
double& y,
double& z) = 0;
72 virtual void getMetricMax(
double& x,
double& y,
double& z)
const = 0;
73 virtual void getMetricSize(
double& x,
double& y,
double& z) = 0;
75 virtual void prune() = 0;
77 virtual void clear() = 0;
107 bool write(
const std::string& filename)
const;
109 bool write(std::ostream& s)
const;
142 virtual std::istream&
readData(std::istream &s) = 0;
146 virtual std::ostream&
writeData(std::ostream &s)
const = 0;
149 static std::map<std::string, AbstractOcTree*>& classIDMapping();
152 static bool readHeader(std::istream &s, std::string&
id,
unsigned&
size,
double& res);
virtual size_t memoryUsage() const =0
virtual size_t memoryUsageNode() const =0
virtual ~AbstractOcTree()
Definition: AbstractOcTree.h:54
virtual std::ostream & writeData(std::ostream &s) const =0
Write complete state of tree to stream (without file header) unmodified. Pruning the tree first produ...
static const std::string fileHeader
Definition: AbstractOcTree.h:155
bool write(const std::string &filename) const
Write file header and complete tree to file (serialization)
Definition: AbstractOcTree.cpp:45
virtual void getMetricMax(double &x, double &y, double &z)=0
virtual double getResolution() const =0
This abstract class is an interface to all octrees and provides a factory design pattern for readin a...
Definition: AbstractOcTree.h:50
friend class StaticMapInit
Definition: AbstractOcTree.h:51
static AbstractOcTree * createTree(const std::string id, double res)
Creates a certain OcTree (factory pattern)
Definition: AbstractOcTree.cpp:184
static bool readHeader(std::istream &s, std::string &id, unsigned &size, double &res)
Definition: AbstractOcTree.cpp:119
Base class for OcTree iterators.
Definition: OcTreeIterator.hxx:42
virtual std::string getTreeType() const =0
returns actual class name as string for identification
virtual size_t size() const =0
static void registerTreeType(AbstractOcTree *tree)
Definition: AbstractOcTree.cpp:205
AbstractOcTree()
Definition: AbstractOcTree.cpp:41
static AbstractOcTree * read(const std::string &filename)
Read the file header, create the appropriate class and deserialize.
Definition: AbstractOcTree.cpp:74
OcTreeBaseImpl< NodeType, INTERFACE > const * tree
Octree this iterator is working on.
Definition: OcTreeIterator.hxx:158
Tables used by the Marching Cubes Algorithm The tables are from Paul Bourke's web page http://paulbou...
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 cre...
virtual void getMetricMin(double &x, double &y, double &z)=0
virtual AbstractOcTree * create() const =0
virtual constructor: creates a new object of same type
virtual void getMetricSize(double &x, double &y, double &z)=0
virtual void setResolution(double res)=0