38 #ifndef FCL_TRAVERSAL_MESHCONSERVATIVEADVANCEMENTTRAVERSALNODE_H 39 #define FCL_TRAVERSAL_MESHCONSERVATIVEADVANCEMENTTRAVERSALNODE_H 41 #include "fcl/math/motion/tbv_motion_bound_visitor.h" 42 #include "fcl/narrowphase/detail/traversal/distance/mesh_distance_traversal_node.h" 43 #include "fcl/narrowphase/detail/traversal/distance/conservative_advancement_stack_data.h" 52 template <
typename BV>
58 using S =
typename BV::S;
71 mutable S min_distance;
73 mutable Vector3<S> closest_p1, closest_p2;
75 mutable int last_tri_id1, last_tri_id2;
91 mutable std::vector<ConservativeAdvancementStackData<S>> stack;
93 template <
typename,
typename>
99 template <
typename BV>
103 const Transform3<typename BV::S>&
tf1,
105 const Transform3<typename BV::S>&
tf2,
106 typename BV::S
w = 1,
107 bool use_refit =
false,
108 bool refit_bottomup =
false);
110 template <
typename S>
126 this->
model1->getBV(b1).bv,
127 this->
model2->getBV(b2).bv,
131 this->stack.emplace_back(P1, P2, b1, b2, d);
143 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
151 template <
typename S>
155 const Transform3<S>&
tf1,
157 const Transform3<S>&
tf2,
160 template <
typename S>
176 this->
model1->getBV(b1).bv,
177 this->
model2->getBV(b2).bv,
181 this->stack.emplace_back(P1, P2, b1, b2, d);
193 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
199 template <
typename S>
203 const Transform3<S>& tf1,
205 const Transform3<S>& tf2,
208 template <
typename S,
typename BV>
209 const Vector3<S> getBVAxis(
const BV& bv,
int i);
211 template <
typename BV>
212 bool meshConservativeAdvancementTraversalNodeCanStop(
214 typename BV::S min_distance,
215 typename BV::S abs_err,
225 template <
typename BV>
226 bool meshConservativeAdvancementOrientedNodeCanStop(
228 typename BV::S min_distance,
229 typename BV::S abs_err,
230 typename BV::S rel_err,
237 typename BV::S& delta_t);
239 template <
typename BV>
240 void meshConservativeAdvancementOrientedNodeLeafTesting(
247 const Vector3<typename BV::S>* vertices1,
248 const Vector3<typename BV::S>* vertices2,
249 const Matrix3<typename BV::S>& R,
250 const Vector3<typename BV::S>& T,
254 typename BV::S& min_distance,
255 Vector3<typename BV::S>& p1,
256 Vector3<typename BV::S>& p2,
259 typename BV::S& delta_t,
260 int& num_leaf_tests);
265 #include "fcl/narrowphase/detail/traversal/distance/mesh_conservative_advancement_traversal_node-inl.h" const BVHModel< BV > * model1
The first BVH model.
Definition: bvh_distance_traversal_node.h:87
Main namespace.
Definition: broadphase_bruteforce-inl.h:45
S rel_err
relative and absolute error, default value is 0.01 for both terms
Definition: mesh_distance_traversal_node.h:76
const MotionBase< S > * motion1
Motions for the two objects in query.
Definition: mesh_conservative_advancement_traversal_node.h:88
S BVTesting(int b1, int b2) const
BV culling test in one BVTT node.
Definition: mesh_conservative_advancement_traversal_node-inl.h:99
S w
CA controlling variable: early stop for the early iterations of CA.
Definition: mesh_conservative_advancement_traversal_node.h:78
Transform3< BV::S > tf2
configuration of second object
Definition: traversal_node_base.h:88
continuous collision node using conservative advancement. when using this default version...
Definition: mesh_conservative_advancement_traversal_node.h:53
Triangle with 3 indices for points.
Definition: triangle.h:47
int num_bv_tests
statistical information
Definition: bvh_distance_traversal_node.h:92
S delta_t
The delta_t each step.
Definition: mesh_conservative_advancement_traversal_node.h:85
S toc
The time from beginning point.
Definition: mesh_conservative_advancement_traversal_node.h:81
Definition: bv_motion_bound_visitor.h:45
void leafTesting(int b1, int b2) const
Conservative advancement testing between leaves (two triangles)
Definition: mesh_conservative_advancement_traversal_node-inl.h:112
Definition: conservative_advancement_stack_data.h:50
A class describing the bounding hierarchy of a mesh model or a point cloud model (which is viewed as ...
Definition: BVH_model.h:57
const BVHModel< BV > * model2
The second BVH model.
Definition: bvh_distance_traversal_node.h:89
bool canStop(S c) const
Whether the traversal process can stop early.
Definition: mesh_conservative_advancement_traversal_node-inl.h:234
Transform3< BV::S > tf1
configuation of first object
Definition: traversal_node_base.h:85
S distance(const Eigen::MatrixBase< DerivedA > &R0, const Eigen::MatrixBase< DerivedB > &T0, const kIOS< S > &b1, const kIOS< S > &b2, Vector3< S > *P, Vector3< S > *Q)
Approximate distance between two kIOS bounding volumes.
Definition: kIOS-inl.h:266
Definition: mesh_conservative_advancement_traversal_node-inl.h:169
bool enable_statistics
Whether stores statistics.
Definition: distance_traversal_node_base.h:79
Traversal node for distance computation between two meshes.
Definition: mesh_distance_traversal_node.h:55