38 #ifndef COAL_BROAD_PHASE_DYNAMIC_AABB_TREE_INL_H
39 #define COAL_BROAD_PHASE_DYNAMIC_AABB_TREE_INL_H
55 namespace dynamic_AABB_tree {
60 template <
typename Derived>
64 const Eigen::MatrixBase<Derived>& translation2,
72 if (root1->
bv.overlap(root2_bv_t)) {
76 tf2.translation() = translation2;
87 if (collisionRecurse_(root1->
children[0], tree2,
nullptr, root2_bv,
90 if (collisionRecurse_(root1->
children[1], tree2,
nullptr, root2_bv,
101 if (root1->
bv.overlap(root2_bv_t)) {
105 tf2.translation() = translation2;
108 box->cost_density = root2->getOccupancy();
120 if (tree2->
isNodeFree(root2) || !root1->
bv.overlap(root2_bv_t))
return false;
123 (!root1->
isLeaf() && (root1->
bv.size() > root2_bv.
size()))) {
124 if (collisionRecurse_(root1->
children[0], tree2, root2, root2_bv,
127 if (collisionRecurse_(root1->
children[1], tree2, root2, root2_bv,
131 for (
unsigned int i = 0; i < 8; ++i) {
137 if (collisionRecurse_(root1, tree2, child, child_bv, translation2,
143 if (collisionRecurse_(root1, tree2,
nullptr, child_bv, translation2,
153 template <
typename Derived>
156 const AABB& root2_bv,
157 const Eigen::MatrixBase<Derived>& translation2,
164 tf2.translation() = translation2;
176 (!root1->
isLeaf() && (root1->
bv.size() > root2_bv.
size()))) {
183 if (distanceRecurse_(root1->
children[1], tree2, root2, root2_bv,
189 if (distanceRecurse_(root1->
children[0], tree2, root2, root2_bv,
195 if (distanceRecurse_(root1->
children[0], tree2, root2, root2_bv,
201 if (distanceRecurse_(root1->
children[1], tree2, root2, root2_bv,
207 for (
unsigned int i = 0; i < 8; ++i) {
217 if (distanceRecurse_(root1, tree2, child, child_bv, translation2,