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;
152 static bool readHeader(std::istream &s, std::string&
id,
unsigned&
size,
double& res);
virtual void getMetricSize(double &x, double &y, double &z)=0
virtual size_t memoryUsage() const =0
static void registerTreeType(AbstractOcTree *tree)
virtual std::string getTreeType() const =0
returns actual class name as string for identification
static AbstractOcTree * read(const std::string &filename)
virtual std::istream & readData(std::istream &s)=0
virtual ~AbstractOcTree()
friend class StaticMapInit
static bool readHeader(std::istream &s, std::string &id, unsigned &size, double &res)
virtual size_t size() const =0
virtual size_t memoryUsageNode() const =0
virtual std::ostream & writeData(std::ostream &s) const =0
virtual double getResolution() const =0
static AbstractOcTree * createTree(const std::string id, double res)
bool write(const std::string &filename) const
Write file header and complete tree to file (serialization)
virtual void getMetricMin(double &x, double &y, double &z)=0
static std::map< std::string, AbstractOcTree * > & classIDMapping()
create private store, Construct on first use
virtual void setResolution(double res)=0
virtual AbstractOcTree * create() const =0
virtual constructor: creates a new object of same type
virtual void getMetricMax(double &x, double &y, double &z)=0
static const std::string fileHeader