mesh_collision_traversal_node.h
Go to the documentation of this file.
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2011-2014, Willow Garage, Inc.
5  * Copyright (c) 2014-2016, Open Source Robotics Foundation
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer in the documentation and/or other materials provided
17  * with the distribution.
18  * * Neither the name of Open Source Robotics Foundation nor the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  * POSSIBILITY OF SUCH DAMAGE.
34  */
35 
38 #ifndef FCL_TRAVERSAL_MESHCOLLISIONTRAVERSALNODE_H
39 #define FCL_TRAVERSAL_MESHCOLLISIONTRAVERSALNODE_H
40 
41 #include "fcl/math/bv/OBB.h"
42 #include "fcl/math/bv/RSS.h"
43 #include "fcl/math/bv/OBBRSS.h"
44 #include "fcl/math/bv/kIOS.h"
49 
50 namespace fcl
51 {
52 
53 namespace detail
54 {
55 
57 template <typename BV>
59 {
60 public:
61 
62  using S = typename BV::S;
63 
65 
67  void leafTesting(int b1, int b2) const;
68 
70  bool canStop() const;
71 
74 
77 
79 };
80 
83 template <typename BV>
84 FCL_EXPORT
85 bool initialize(
87  BVHModel<BV>& model1,
89  BVHModel<BV>& model2,
91  const CollisionRequest<typename BV::S>& request,
93  bool use_refit = false,
94  bool refit_bottomup = false);
95 
98 template <typename S>
100 {
101 public:
103 
104  bool BVTesting(int b1, int b2) const;
105 
106  void leafTesting(int b1, int b2) const;
107 
108  bool BVTesting(int b1, int b2, const Matrix3<S>& Rc, const Vector3<S>& Tc) const;
109 
110  bool BVTesting(int b1, int b2, const Transform3<S>& tf) const;
111 
112  void leafTesting(int b1, int b2, const Matrix3<S>& Rc, const Vector3<S>& Tc) const;
113 
114  void leafTesting(int b1, int b2, const Transform3<S>& tf) const;
115 
118 
119  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
120 };
121 
124 
127 template <typename S>
128 FCL_EXPORT
129 bool initialize(
131  const BVHModel<OBB<S>>& model1,
132  const Transform3<S>& tf1,
133  const BVHModel<OBB<S>>& model2,
134  const Transform3<S>& tf2,
135  const CollisionRequest<S>& request,
136  CollisionResult<S>& result);
137 
138 template <typename S>
140 {
141 public:
143 
144  bool BVTesting(int b1, int b2) const;
145 
146  void leafTesting(int b1, int b2) const;
147 
148 // FCL_DEPRECATED
149 // bool BVTesting(int b1, int b2, const Matrix3<S>& Rc, const Vector3<S>& Tc) const;
150 
151  bool BVTesting(int b1, int b2, const Transform3<S>& tf) const;
152 
153 // FCL_DEPRECATED
154 // void leafTesting(int b1, int b2, const Matrix3<S>& Rc, const Vector3<S>& Tc) const;
155 
156  void leafTesting(int b1, int b2, const Transform3<S>& tf) const;
157 
160 
161  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
162 };
163 
166 
169 template <typename S>
170 FCL_EXPORT
171 bool initialize(
173  const BVHModel<RSS<S>>& model1,
174  const Transform3<S>& tf1,
175  const BVHModel<RSS<S>>& model2,
176  const Transform3<S>& tf2,
177  const CollisionRequest<S>& request,
178  CollisionResult<S>& result);
179 
180 template <typename S>
182 {
183 public:
185 
186  bool BVTesting(int b1, int b2) const;
187 
188  void leafTesting(int b1, int b2) const;
189 
192 
193  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
194 };
195 
198 
201 template <typename S>
202 FCL_EXPORT
203 bool initialize(
205  const BVHModel<kIOS<S>>& model1,
206  const Transform3<S>& tf1,
207  const BVHModel<kIOS<S>>& model2,
208  const Transform3<S>& tf2,
209  const CollisionRequest<S>& request,
210  CollisionResult<S>& result);
211 
212 template <typename S>
214 {
215 public:
217 
218 
219  bool BVTesting(int b1, int b2) const;
220 
221  void leafTesting(int b1, int b2) const;
222 
225 
226  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
227 };
228 
231 
234 template <typename S>
235 FCL_EXPORT
236 bool initialize(
238  const BVHModel<OBBRSS<S>>& model1,
239  const Transform3<S>& tf1,
240  const BVHModel<OBBRSS<S>>& model2,
241  const Transform3<S>& tf2,
242  const CollisionRequest<S>& request,
243  CollisionResult<S>& result);
244 
245 template <typename BV>
246 FCL_EXPORT
248  int b1,
249  int b2,
250  const BVHModel<BV>* model1,
251  const BVHModel<BV>* model2,
252  Vector3<typename BV::S>* vertices1,
253  Vector3<typename BV::S>* vertices2,
254  Triangle* tri_indices1,
255  Triangle* tri_indices2,
256  const Matrix3<typename BV::S>& R,
257  const Vector3<typename BV::S>& T,
258  const Transform3<typename BV::S>& tf1,
259  const Transform3<typename BV::S>& tf2,
260  bool enable_statistics,
261  typename BV::S cost_density,
262  int& num_leaf_tests,
263  const CollisionRequest<typename BV::S>& request,
265 
266 template <typename BV>
267 FCL_EXPORT
269  int b1,
270  int b2,
271  const BVHModel<BV>* model1,
272  const BVHModel<BV>* model2,
273  Vector3<typename BV::S>* vertices1,
274  Vector3<typename BV::S>* vertices2,
275  Triangle* tri_indices1,
276  Triangle* tri_indices2,
277  const Transform3<typename BV::S>& tf,
278  const Transform3<typename BV::S>& tf1,
279  const Transform3<typename BV::S>& tf2,
280  bool enable_statistics,
281  typename BV::S cost_density,
282  int& num_leaf_tests,
283  const CollisionRequest<typename BV::S>& request,
285 
286 } // namespace detail
287 } // namespace fcl
288 
290 
291 #endif
fcl::detail::MeshCollisionTraversalNodeOBB::T
Vector3< S > T
Definition: mesh_collision_traversal_node.h:117
fcl::Transform3
Eigen::Transform< S, 3, Eigen::Isometry > Transform3
Definition: types.h:91
fcl::detail::MeshCollisionTraversalNodeOBBRSS::R
Matrix3< S > R
Definition: mesh_collision_traversal_node.h:223
fcl::kIOS< S >
cost_source.h
fcl::detail::MeshCollisionTraversalNodeRSS::R
Matrix3< S > R
Definition: mesh_collision_traversal_node.h:158
fcl::detail::BVHCollisionTraversalNode< OBB< S > >::S
typename OBB< S > ::S S
Definition: bvh_collision_traversal_node.h:57
fcl::detail::MeshCollisionTraversalNode
Traversal node for collision between two meshes.
Definition: mesh_collision_traversal_node.h:58
fcl::detail::MeshCollisionTraversalNodeOBBRSS::T
Vector3< S > T
Definition: mesh_collision_traversal_node.h:224
fcl::CollisionResult
collision result
Definition: collision_request.h:48
fcl::RSS< S >
fcl::detail::MeshCollisionTraversalNode::tri_indices2
Triangle * tri_indices2
Definition: mesh_collision_traversal_node.h:76
fcl::Triangle
Triangle with 3 indices for points.
Definition: triangle.h:48
fcl::detail::MeshCollisionTraversalNode::vertices2
Vector3< S > * vertices2
Definition: mesh_collision_traversal_node.h:73
fcl::Vector3
Eigen::Matrix< S, 3, 1 > Vector3
Definition: types.h:70
fcl::detail::MeshCollisionTraversalNode::cost_density
S cost_density
Definition: mesh_collision_traversal_node.h:78
mesh_collision_traversal_node-inl.h
fcl::Matrix3
Eigen::Matrix< S, 3, 3 > Matrix3
Definition: types.h:85
fcl::OBB< S >
bvh_collision_traversal_node.h
fcl::detail::MeshCollisionTraversalNodeOBBRSS
Definition: mesh_collision_traversal_node.h:213
fcl::CollisionRequest
Parameters for performing collision request.
Definition: collision_request.h:52
fcl::detail::initialize
template bool initialize(MeshCollisionTraversalNodeOBB< double > &node, const BVHModel< OBB< double >> &model1, const Transform3< double > &tf1, const BVHModel< OBB< double >> &model2, const Transform3< double > &tf2, const CollisionRequest< double > &request, CollisionResult< double > &result)
fcl::detail::MeshCollisionTraversalNodeOBB::R
Matrix3< S > R
Definition: mesh_collision_traversal_node.h:116
fcl::OBBRSS< S >
fcl::BVHModel
A class describing the bounding hierarchy of a mesh model or a point cloud model (which is viewed as ...
Definition: BVH_model.h:57
OBBRSS.h
contact.h
fcl::detail::BVHCollisionTraversalNode
Traversal node for collision between BVH models.
Definition: bvh_collision_traversal_node.h:52
fcl::detail::MeshCollisionTraversalNodekIOS::R
Matrix3< S > R
Definition: mesh_collision_traversal_node.h:190
fcl::detail::MeshCollisionTraversalNodekIOS
Definition: mesh_collision_traversal_node.h:181
fcl::detail::MeshCollisionTraversalNode::vertices1
Vector3< S > * vertices1
Definition: mesh_collision_traversal_node.h:72
fcl::detail::MeshCollisionTraversalNodekIOS::T
Vector3< S > T
Definition: mesh_collision_traversal_node.h:191
intersect.h
fcl::detail::MeshCollisionTraversalNode::tri_indices1
Triangle * tri_indices1
Definition: mesh_collision_traversal_node.h:75
OBB.h
RSS.h
fcl::detail::MeshCollisionTraversalNodeRSS::T
Vector3< S > T
Definition: mesh_collision_traversal_node.h:159
kIOS.h
fcl
Main namespace.
Definition: broadphase_bruteforce-inl.h:45
fcl::detail::meshCollisionOrientedNodeLeafTesting
void meshCollisionOrientedNodeLeafTesting(int b1, int b2, const BVHModel< BV > *model1, const BVHModel< BV > *model2, Vector3< typename BV::S > *vertices1, Vector3< typename BV::S > *vertices2, Triangle *tri_indices1, Triangle *tri_indices2, const Matrix3< typename BV::S > &R, const Vector3< typename BV::S > &T, const Transform3< typename BV::S > &tf1, const Transform3< typename BV::S > &tf2, bool enable_statistics, typename BV::S cost_density, int &num_leaf_tests, const CollisionRequest< typename BV::S > &request, CollisionResult< typename BV::S > &result)
Definition: mesh_collision_traversal_node-inl.h:527
fcl::detail::MeshCollisionTraversalNodeRSS
Definition: mesh_collision_traversal_node.h:139
fcl::detail::MeshCollisionTraversalNodeOBB
Traversal node for collision between two meshes if their underlying BVH node is oriented node (OBB,...
Definition: mesh_collision_traversal_node.h:99


fcl
Author(s):
autogenerated on Fri Apr 2 2021 02:38:00