38 #ifndef FCL_TRAVERSAL_MESHDISTANCETRAVERSALNODE_H 39 #define FCL_TRAVERSAL_MESHDISTANCETRAVERSALNODE_H 41 #include "fcl/narrowphase/detail/primitive_shape_algorithm/triangle_distance.h" 42 #include "fcl/math/bv/RSS.h" 43 #include "fcl/math/bv/OBBRSS.h" 44 #include "fcl/math/bv/kIOS.h" 45 #include "fcl/narrowphase/detail/traversal/distance/bvh_distance_traversal_node.h" 54 template <
typename BV>
59 using S =
typename BV::S;
69 Vector3<S>* vertices1;
70 Vector3<S>* vertices2;
82 template <
typename BV>
86 Transform3<typename BV::S>&
tf1,
88 Transform3<typename BV::S>&
tf2,
91 bool use_refit =
false,
bool refit_bottomup =
false);
109 return distance(tf.linear(), tf.translation(), this->
model1->getBV(b1).bv, this->
model2->getBV(b2).bv);
116 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
124 template <
typename S>
128 const Transform3<S>&
tf1,
130 const Transform3<S>&
tf2,
134 template <
typename S>
149 return distance(tf.linear(), tf.translation(), this->
model1->getBV(b1).bv, this->
model2->getBV(b2).bv);
156 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
164 template <
typename S>
168 const Transform3<S>& tf1,
170 const Transform3<S>& tf2,
174 template <
typename S>
189 return distance(tf.linear(), tf.translation(), this->
model1->getBV(b1).bv, this->
model2->getBV(b2).bv);
196 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
204 template <
typename S>
208 const Transform3<S>& tf1,
210 const Transform3<S>& tf2,
214 template <
typename BV>
216 void meshDistanceOrientedNodeLeafTesting(
221 Vector3<typename BV::S>* vertices1,
222 Vector3<typename BV::S>* vertices2,
225 const Matrix3<typename BV::S>& R,
226 const Vector3<typename BV::S>& T,
232 template <
typename BV>
233 void meshDistanceOrientedNodeLeafTesting(
238 Vector3<typename BV::S>* vertices1,
239 Vector3<typename BV::S>* vertices2,
242 const Transform3<typename BV::S>& tf,
243 bool enable_statistics,
248 template <
typename BV>
249 void distancePreprocessOrientedNode(
252 const Vector3<typename BV::S>* vertices1,
253 Vector3<typename BV::S>* vertices2,
258 const Matrix3<typename BV::S>& R,
259 const Vector3<typename BV::S>& T,
263 template <
typename BV>
264 void distancePreprocessOrientedNode(
267 const Vector3<typename BV::S>* vertices1,
268 Vector3<typename BV::S>* vertices2,
273 const Transform3<typename BV::S>& tf,
277 template <
typename BV>
278 void distancePostprocessOrientedNode(
281 const Transform3<typename BV::S>& tf1,
288 #include "fcl/narrowphase/detail/traversal/distance/mesh_distance_traversal_node-inl.h" const BVHModel< BV > * model1
The first BVH model.
Definition: bvh_distance_traversal_node.h:87
bool canStop(S c) const
Whether the traversal process can stop early.
Definition: mesh_distance_traversal_node-inl.h:148
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
S BVTesting(int b1, int b2) const
BV test between b1 and b2.
Definition: mesh_distance_traversal_node.h:145
distance result
Definition: distance_request.h:48
Definition: mesh_distance_traversal_node.h:135
Transform3< BV::S > tf2
configuration of second object
Definition: traversal_node_base.h:88
void leafTesting(int b1, int b2) const
Distance testing between leaves (two triangles)
Definition: mesh_distance_traversal_node-inl.h:109
Traversal node for distance computation between BVH models.
Definition: bvh_distance_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
DistanceRequest< BV::S > request
request setting for distance
Definition: distance_traversal_node_base.h:73
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
DistanceResult< BV::S > * result
distance result kept during the traversal iteration
Definition: distance_traversal_node_base.h:76
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
request to the distance computation
Definition: distance_request.h:52
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