38 #ifndef HPP_FCL_BROAD_PHASE_DYNAMIC_AABB_TREE_ARRAY_INL_H
39 #define HPP_FCL_BROAD_PHASE_DYNAMIC_AABB_TREE_ARRAY_INL_H
44 #if HPP_FCL_HAVE_OCTOMAP
51 namespace dynamic_AABB_tree_array {
53 #if HPP_FCL_HAVE_OCTOMAP
56 template <
typename Derived>
57 bool collisionRecurse_(
60 const AABB& root2_bv,
const Eigen::MatrixBase<Derived>& translation2,
70 if (root1->
bv.overlap(root_bv_t)) {
74 tf2.translation() = translation2;
84 if (collisionRecurse_(nodes1, root1->
children[0], tree2,
nullptr,
87 if (collisionRecurse_(nodes1, root1->
children[1], tree2,
nullptr,
97 if (root1->
bv.overlap(root_bv_t)) {
101 tf2.translation() = translation2;
104 box->cost_density = root2->getOccupancy();
116 if (tree2->
isNodeFree(root2) || !root1->
bv.overlap(root_bv_t))
return false;
119 (!root1->
isLeaf() && (root1->
bv.size() > root2_bv.
size()))) {
120 if (collisionRecurse_(nodes1, root1->
children[0], tree2, root2, root2_bv,
123 if (collisionRecurse_(nodes1, root1->
children[1], tree2, root2, root2_bv,
127 for (
unsigned int i = 0; i < 8; ++i) {
133 if (collisionRecurse_(nodes1, root1_id, tree2, child, child_bv,
139 if (collisionRecurse_(nodes1, root1_id, tree2,
nullptr, child_bv,
150 template <
typename Derived>
151 bool distanceRecurse_(
154 const AABB& root2_bv,
const Eigen::MatrixBase<Derived>& translation2,
163 tf2.translation() = translation2;
175 (!root1->
isLeaf() && (root1->
bv.size() > root2_bv.
size()))) {
183 if (distanceRecurse_(nodes1, root1->
children[1], tree2, root2, root2_bv,
189 if (distanceRecurse_(nodes1, root1->
children[0], tree2, root2, root2_bv,
195 if (distanceRecurse_(nodes1, root1->
children[0], tree2, root2, root2_bv,
201 if (distanceRecurse_(nodes1, root1->
children[1], tree2, root2, root2_bv,
207 for (
unsigned int i = 0; i < 8; ++i) {
217 if (distanceRecurse_(nodes1, root1_id, tree2, child, child_bv,