Go to the documentation of this file.
26 #ifndef TESSERACT_GEOMETRY_OCTREE_H
27 #define TESSERACT_GEOMETRY_OCTREE_H
31 #include <boost/serialization/export.hpp>
32 #include <Eigen/Geometry>
61 using Ptr = std::shared_ptr<Octree>;
62 using ConstPtr = std::shared_ptr<const Octree>;
64 Octree(std::shared_ptr<const octomap::OcTree> octree,
67 bool binary_octree =
false);
71 const std::shared_ptr<const octomap::OcTree>&
getOctree()
const;
79 bool operator==(const
Octree& rhs) const;
80 bool operator!=(const
Octree& rhs) const;
98 std::shared_ptr<const octomap::OcTree>
octree_;
104 static bool isNodeCollapsible(octomap::OcTree& octree, octomap::OcTreeNode* node);
106 static bool pruneNode(octomap::OcTree& octree, octomap::OcTreeNode* node);
110 octomap::OcTreeNode* node,
112 unsigned int max_depth,
113 unsigned int& num_pruned);
117 template <
class Archive>
118 void save(Archive& ar,
const unsigned int version)
const;
120 template <
class Archive>
121 void load(Archive& ar,
const unsigned int version);
123 template <
class Archive>
124 void serialize(Archive& ar,
const unsigned int version);
135 static void prune(octomap::OcTree& octree);
std::shared_ptr< Geometry > Ptr
static bool pruneNode(octomap::OcTree &octree, octomap::OcTreeNode *node)
std::shared_ptr< const octomap::OcTree > octree_
void save(Archive &ar, const unsigned int version) const
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
static void pruneRecurs(octomap::OcTree &octree, octomap::OcTreeNode *node, unsigned int depth, unsigned int max_depth, unsigned int &num_pruned)
const std::shared_ptr< const octomap::OcTree > & getOctree() const
void load(Archive &ar, const unsigned int version)
friend class boost::serialization::access
OctreeSubType getSubType() const
void update()
Octrees are typically generated from 3D sensor data so this method should be used to efficiently upda...
Geometry::Ptr clone() const override final
Create a copy of this shape.
#define TESSERACT_COMMON_IGNORE_WARNINGS_POP
static bool isNodeCollapsible(octomap::OcTree &octree, octomap::OcTreeNode *node)
~Octree() override=default
static void prune(octomap::OcTree &octree)
A custom octree prune which will prune if all children are above the occupancy threshold.
std::shared_ptr< const Geometry > ConstPtr
long calcNumSubShapes() const
Calculate the number of sub shapes that would get generated for this octree.
void serialize(Archive &ar, const unsigned int version)