41 #include "fcl/config.h" 48 #include <octomap/octomap.h> 49 #include "fcl/math/bv/AABB.h" 50 #include "fcl/narrowphase/collision_object.h" 58 class OcTree :
public CollisionGeometry<S>
61 std::shared_ptr<const octomap::OcTree> tree;
65 S occupancy_threshold;
70 typedef octomap::OcTreeNode OcTreeNode;
76 OcTree(
const std::shared_ptr<const octomap::OcTree>& tree_);
79 void computeLocalAABB();
82 AABB<S> getRootBV()
const;
85 OcTreeNode* getRoot()
const;
88 bool isNodeOccupied(
const OcTreeNode* node)
const;
91 bool isNodeFree(
const OcTreeNode* node)
const;
94 bool isNodeUncertain(
const OcTreeNode* node)
const;
99 std::vector<std::array<S, 6> > toBoxes()
const;
103 S getOccupancyThres()
const;
107 S getFreeThres()
const;
109 S getDefaultOccupancy()
const;
111 void setCellDefaultOccupancy(S d);
113 void setOccupancyThres(S d);
115 void setFreeThres(S d);
118 OcTreeNode* getNodeChild(OcTreeNode* node,
unsigned int childIdx);
121 const OcTreeNode* getNodeChild(
const OcTreeNode* node,
unsigned int childIdx)
const;
124 bool nodeChildExists(
const OcTreeNode* node,
unsigned int childIdx)
const;
127 bool nodeHasChildren(
const OcTreeNode* node)
const;
136 using OcTreef = OcTree<float>;
137 using OcTreed = OcTree<double>;
140 template <
typename S>
141 void computeChildBV(
const AABB<S>& root_bv,
unsigned int i, AABB<S>& child_bv);
145 #include "fcl/geometry/octree/octree-inl.h" 147 #endif // #if FCL_HAVE_OCTOMAP NODE_TYPE
traversal node type: bounding volume (AABB, OBB, RSS, kIOS, OBBRSS, KDOP16, KDOP18, kDOP24), basic shape (box, sphere, ellipsoid, capsule, cone, cylinder, convex, plane, halfspace, triangle), and octree
Definition: collision_geometry.h:54
Main namespace.
Definition: broadphase_bruteforce-inl.h:45
OBJECT_TYPE
object type: BVH (mesh, points), basic geometry, octree
Definition: collision_geometry.h:51