Tesseract 0.28.4
Loading...
Searching...
No Matches
tesseract::geometry::Octree Class Reference
Inheritance diagram for tesseract::geometry::Octree:

Public Types

using Ptr = std::shared_ptr<Octree>
using ConstPtr = std::shared_ptr<const Octree>
Public Types inherited from tesseract::geometry::Geometry
using Ptr = std::shared_ptr<Geometry>
using ConstPtr = std::shared_ptr<const Geometry>

Public Member Functions

 Octree (std::shared_ptr< const octomap::OcTree > octree, OctreeSubType sub_type, bool pruned=false, bool binary_octree=false)
const std::shared_ptr< const octomap::OcTree > & getOctree () const
OctreeSubType getSubType () const
bool getPruned () const
Geometry::Ptr clone () const override final
 Create a copy of this shape.
bool operator== (const Octree &rhs) const
bool operator!= (const Octree &rhs) const
void update ()
 Octrees are typically generated from 3D sensor data so this method should be used to efficiently update the collision shape.
long calcNumSubShapes () const
 Calculate the number of sub shapes that would get generated for this octree.
Public Member Functions inherited from tesseract::geometry::Geometry
 Geometry (GeometryType type=GeometryType::UNINITIALIZED)
 Geometry (const Geometry &)=default
Geometry & operator= (const Geometry &)=default
 Geometry (Geometry &&)=default
Geometry & operator= (Geometry &&)=default
GeometryType getType () const
 Get the geometry type.
void setUUID (const boost::uuids::uuid &uuid)
 Set the geometry UUID.
const boost::uuids::uuid & getUUID () const
 Get the geometry UUID.
bool operator== (const Geometry &rhs) const
bool operator!= (const Geometry &rhs) const

Static Public Member Functions

static void prune (octomap::OcTree &octree)
 A custom octree prune which will prune if all children are above the occupancy threshold.

Friends

template<class Archive>
friend void::tesseract::geometry::serialize (Archive &ar, Octree &obj)

Member Function Documentation

◆ clone()

Geometry::Ptr tesseract::geometry::Octree::clone ( ) const
finaloverridevirtual

Create a copy of this shape.

Implements tesseract::geometry::Geometry.

◆ calcNumSubShapes()

long tesseract::geometry::Octree::calcNumSubShapes ( ) const

Calculate the number of sub shapes that would get generated for this octree.

This is expensive and should not be called multiple times

Returns
number of sub shapes

◆ prune()

void tesseract::geometry::Octree::prune ( octomap::OcTree & octree)
static

A custom octree prune which will prune if all children are above the occupancy threshold.

This is different from the octomap::OcTree::prune which requires all children to have the same occupancy to be collapsed.

Parameters
octreeThe octree to be pruned.