38 #ifndef FCL_TRAVERSAL_BVHCOLLISIONTRAVERSALNODE_INL_H 39 #define FCL_TRAVERSAL_BVHCOLLISIONTRAVERSALNODE_INL_H 41 #include "fcl/narrowphase/detail/traversal/collision/bvh_collision_traversal_node.h" 50 template <
typename BV>
51 BVHCollisionTraversalNode<BV>::BVHCollisionTraversalNode()
52 : CollisionTraversalNodeBase<typename BV::S>()
59 query_time_seconds = 0.0;
63 template <
typename BV>
66 return model1->getBV(b).isLeaf();
70 template <
typename BV>
73 return model2->getBV(b).isLeaf();
77 template <
typename BV>
80 S sz1 = model1->getBV(b1).bv.size();
81 S sz2 = model2->getBV(b2).bv.size();
83 bool l1 = model1->getBV(b1).isLeaf();
84 bool l2 = model2->getBV(b2).isLeaf();
86 if(l2 || (!l1 && (sz1 > sz2)))
92 template <
typename BV>
95 return model1->getBV(b).leftChild();
99 template <
typename BV>
102 return model1->getBV(b).rightChild();
106 template <
typename BV>
109 return model2->getBV(b).leftChild();
113 template <
typename BV>
116 return model2->getBV(b).rightChild();
120 template <
typename BV>
123 if(this->enable_statistics) num_bv_tests++;
124 return !model1->getBV(b1).overlap(model2->getBV(b2));
int getFirstLeftChild(int b) const
Obtain the left child of BV node in the first BVH.
Definition: bvh_collision_traversal_node-inl.h:93
bool firstOverSecond(int b1, int b2) const
Determine the traversal order, is the first BVTT subtree better.
Definition: bvh_collision_traversal_node-inl.h:78
Main namespace.
Definition: broadphase_bruteforce-inl.h:45
bool isFirstNodeLeaf(int b) const
Whether the BV node in the first BVH tree is leaf.
Definition: bvh_collision_traversal_node-inl.h:64
int getSecondLeftChild(int b) const
Obtain the left child of BV node in the second BVH.
Definition: bvh_collision_traversal_node-inl.h:107
int getFirstRightChild(int b) const
Obtain the right child of BV node in the first BVH.
Definition: bvh_collision_traversal_node-inl.h:100
int getSecondRightChild(int b) const
Obtain the right child of BV node in the second BVH.
Definition: bvh_collision_traversal_node-inl.h:114
bool BVTesting(int b1, int b2) const
BV culling test in one BVTT node.
Definition: bvh_collision_traversal_node-inl.h:121
bool isSecondNodeLeaf(int b) const
Whether the BV node in the second BVH tree is leaf.
Definition: bvh_collision_traversal_node-inl.h:71