contact_patch_func_matrix.cpp
Go to the documentation of this file.
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2024, INRIA
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of INRIA nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  */
34 
40 #include "coal/BV/BV.h"
41 
42 namespace coal {
43 
44 template <typename T_BVH, typename T_SH>
46  static void run(const CollisionGeometry* o1, const Transform3s& tf1,
47  const CollisionGeometry* o2, const Transform3s& tf2,
48  const CollisionResult& collision_result,
49  const ContactPatchSolver* csolver,
50  const ContactPatchRequest& request,
51  ContactPatchResult& result) {
56  COAL_UNUSED_VARIABLE(csolver);
57  for (size_t i = 0; i < collision_result.numContacts(); ++i) {
58  if (i >= request.max_num_patch) {
59  break;
60  }
61  const Contact& contact = collision_result.getContact(i);
62  ContactPatch& contact_patch = result.getUnusedContactPatch();
63  constructContactPatchFrameFromContact(contact, contact_patch);
64  contact_patch.addPoint(contact.pos);
65  }
66  }
67 };
68 
69 template <typename BV, typename Shape>
71  static void run(const CollisionGeometry* o1, const Transform3s& tf1,
72  const CollisionGeometry* o2, const Transform3s& tf2,
73  const CollisionResult& collision_result,
74  const ContactPatchSolver* csolver,
75  const ContactPatchRequest& request,
76  ContactPatchResult& result) {
81  COAL_UNUSED_VARIABLE(csolver);
82  for (size_t i = 0; i < collision_result.numContacts(); ++i) {
83  if (i >= request.max_num_patch) {
84  break;
85  }
86  const Contact& contact = collision_result.getContact(i);
87  ContactPatch& contact_patch = result.getUnusedContactPatch();
88  constructContactPatchFrameFromContact(contact, contact_patch);
89  contact_patch.addPoint(contact.pos);
90  }
91  }
92 };
93 
94 template <typename BV>
96  static void run(const CollisionGeometry* o1, const Transform3s& tf1,
97  const CollisionGeometry* o2, const Transform3s& tf2,
98  const CollisionResult& collision_result,
99  const ContactPatchSolver* csolver,
100  const ContactPatchRequest& request,
101  ContactPatchResult& result) {
106  COAL_UNUSED_VARIABLE(csolver);
107  for (size_t i = 0; i < collision_result.numContacts(); ++i) {
108  if (i >= request.max_num_patch) {
109  break;
110  }
111  const Contact& contact = collision_result.getContact(i);
112  ContactPatch& contact_patch = result.getUnusedContactPatch();
113  constructContactPatchFrameFromContact(contact, contact_patch);
114  contact_patch.addPoint(contact.pos);
115  }
116  }
117 };
118 
120  const CollisionGeometry* o1, const Transform3s& /*tf1*/,
121  const CollisionGeometry* o2, const Transform3s& /*tf2*/,
122  const CollisionResult& /*collision_result*/,
123  const ContactPatchSolver* /*csolver*/,
124  const ContactPatchRequest& /*request*/, ContactPatchResult& /*result*/) {
125  NODE_TYPE node_type1 = o1->getNodeType();
126  NODE_TYPE node_type2 = o2->getNodeType();
127 
128  COAL_THROW_PRETTY("Contact patch function between node type "
129  << std::string(get_node_type_name(node_type1))
130  << " and node type "
131  << std::string(get_node_type_name(node_type2))
132  << " is not yet supported.",
133  std::invalid_argument);
134 }
135 
137  for (int i = 0; i < NODE_COUNT; ++i) {
138  for (int j = 0; j < NODE_COUNT; ++j) contact_patch_matrix[i][j] = nullptr;
139  }
140 
141  // clang-format off
142  contact_patch_matrix[GEOM_BOX][GEOM_BOX] = &ShapeShapeContactPatch<Box, Box>;
143  contact_patch_matrix[GEOM_BOX][GEOM_SPHERE] = &ShapeShapeContactPatch<Box, Sphere>;
144  contact_patch_matrix[GEOM_BOX][GEOM_CAPSULE] = &ShapeShapeContactPatch<Box, Capsule>;
145  contact_patch_matrix[GEOM_BOX][GEOM_CONE] = &ShapeShapeContactPatch<Box, Cone>;
146  contact_patch_matrix[GEOM_BOX][GEOM_CYLINDER] = &ShapeShapeContactPatch<Box, Cylinder>;
147  contact_patch_matrix[GEOM_BOX][GEOM_CONVEX] = &ShapeShapeContactPatch<Box, ConvexBase>;
148  contact_patch_matrix[GEOM_BOX][GEOM_PLANE] = &ShapeShapeContactPatch<Box, Plane>;
149  contact_patch_matrix[GEOM_BOX][GEOM_HALFSPACE] = &ShapeShapeContactPatch<Box, Halfspace>;
150  contact_patch_matrix[GEOM_BOX][GEOM_ELLIPSOID] = &ShapeShapeContactPatch<Box, Ellipsoid>;
151  contact_patch_matrix[GEOM_BOX][GEOM_TRIANGLE] = &ShapeShapeContactPatch<Box, TriangleP>;
152 
153  contact_patch_matrix[GEOM_SPHERE][GEOM_BOX] = &ShapeShapeContactPatch<Sphere, Box>;
154  contact_patch_matrix[GEOM_SPHERE][GEOM_SPHERE] = &ShapeShapeContactPatch<Sphere, Sphere>;
155  contact_patch_matrix[GEOM_SPHERE][GEOM_CAPSULE] = &ShapeShapeContactPatch<Sphere, Capsule>;
156  contact_patch_matrix[GEOM_SPHERE][GEOM_CONE] = &ShapeShapeContactPatch<Sphere, Cone>;
157  contact_patch_matrix[GEOM_SPHERE][GEOM_CYLINDER] = &ShapeShapeContactPatch<Sphere, Cylinder>;
158  contact_patch_matrix[GEOM_SPHERE][GEOM_CONVEX] = &ShapeShapeContactPatch<Sphere, ConvexBase>;
159  contact_patch_matrix[GEOM_SPHERE][GEOM_PLANE] = &ShapeShapeContactPatch<Sphere, Plane>;
160  contact_patch_matrix[GEOM_SPHERE][GEOM_HALFSPACE] = &ShapeShapeContactPatch<Sphere, Halfspace>;
161  contact_patch_matrix[GEOM_SPHERE][GEOM_ELLIPSOID] = &ShapeShapeContactPatch<Sphere, Ellipsoid>;
162  contact_patch_matrix[GEOM_SPHERE][GEOM_TRIANGLE] = &ShapeShapeContactPatch<Sphere, TriangleP>;
163 
164  contact_patch_matrix[GEOM_ELLIPSOID][GEOM_BOX] = &ShapeShapeContactPatch<Ellipsoid, Box>;
165  contact_patch_matrix[GEOM_ELLIPSOID][GEOM_SPHERE] = &ShapeShapeContactPatch<Ellipsoid, Sphere>;
166  contact_patch_matrix[GEOM_ELLIPSOID][GEOM_CAPSULE] = &ShapeShapeContactPatch<Ellipsoid, Capsule>;
167  contact_patch_matrix[GEOM_ELLIPSOID][GEOM_CONE] = &ShapeShapeContactPatch<Ellipsoid, Cone>;
168  contact_patch_matrix[GEOM_ELLIPSOID][GEOM_CYLINDER] = &ShapeShapeContactPatch<Ellipsoid, Cylinder>;
169  contact_patch_matrix[GEOM_ELLIPSOID][GEOM_CONVEX] = &ShapeShapeContactPatch<Ellipsoid, ConvexBase>;
170  contact_patch_matrix[GEOM_ELLIPSOID][GEOM_PLANE] = &ShapeShapeContactPatch<Ellipsoid, Plane>;
171  contact_patch_matrix[GEOM_ELLIPSOID][GEOM_HALFSPACE] = &ShapeShapeContactPatch<Ellipsoid, Halfspace>;
172  contact_patch_matrix[GEOM_ELLIPSOID][GEOM_ELLIPSOID] = &ShapeShapeContactPatch<Ellipsoid, Ellipsoid>;
173  contact_patch_matrix[GEOM_ELLIPSOID][GEOM_TRIANGLE] = &ShapeShapeContactPatch<Ellipsoid, TriangleP>;
174 
175  contact_patch_matrix[GEOM_CAPSULE][GEOM_BOX] = &ShapeShapeContactPatch<Capsule, Box>;
176  contact_patch_matrix[GEOM_CAPSULE][GEOM_SPHERE] = &ShapeShapeContactPatch<Capsule, Sphere>;
177  contact_patch_matrix[GEOM_CAPSULE][GEOM_CAPSULE] = &ShapeShapeContactPatch<Capsule, Capsule>;
178  contact_patch_matrix[GEOM_CAPSULE][GEOM_CONE] = &ShapeShapeContactPatch<Capsule, Cone>;
179  contact_patch_matrix[GEOM_CAPSULE][GEOM_CYLINDER] = &ShapeShapeContactPatch<Capsule, Cylinder>;
180  contact_patch_matrix[GEOM_CAPSULE][GEOM_CONVEX] = &ShapeShapeContactPatch<Capsule, ConvexBase>;
181  contact_patch_matrix[GEOM_CAPSULE][GEOM_PLANE] = &ShapeShapeContactPatch<Capsule, Plane>;
182  contact_patch_matrix[GEOM_CAPSULE][GEOM_HALFSPACE] = &ShapeShapeContactPatch<Capsule, Halfspace>;
183  contact_patch_matrix[GEOM_CAPSULE][GEOM_ELLIPSOID] = &ShapeShapeContactPatch<Capsule, Ellipsoid>;
184  contact_patch_matrix[GEOM_CAPSULE][GEOM_TRIANGLE] = &ShapeShapeContactPatch<Capsule, TriangleP>;
185 
186  contact_patch_matrix[GEOM_CONE][GEOM_BOX] = &ShapeShapeContactPatch<Cone, Box>;
187  contact_patch_matrix[GEOM_CONE][GEOM_SPHERE] = &ShapeShapeContactPatch<Cone, Sphere>;
188  contact_patch_matrix[GEOM_CONE][GEOM_CAPSULE] = &ShapeShapeContactPatch<Cone, Capsule>;
189  contact_patch_matrix[GEOM_CONE][GEOM_CONE] = &ShapeShapeContactPatch<Cone, Cone>;
190  contact_patch_matrix[GEOM_CONE][GEOM_CYLINDER] = &ShapeShapeContactPatch<Cone, Cylinder>;
191  contact_patch_matrix[GEOM_CONE][GEOM_CONVEX] = &ShapeShapeContactPatch<Cone, ConvexBase>;
192  contact_patch_matrix[GEOM_CONE][GEOM_PLANE] = &ShapeShapeContactPatch<Cone, Plane>;
193  contact_patch_matrix[GEOM_CONE][GEOM_HALFSPACE] = &ShapeShapeContactPatch<Cone, Halfspace>;
194  contact_patch_matrix[GEOM_CONE][GEOM_ELLIPSOID] = &ShapeShapeContactPatch<Cone, Ellipsoid>;
195  contact_patch_matrix[GEOM_CONE][GEOM_TRIANGLE] = &ShapeShapeContactPatch<Cone, TriangleP>;
196 
197  contact_patch_matrix[GEOM_CYLINDER][GEOM_BOX] = &ShapeShapeContactPatch<Cylinder, Box>;
198  contact_patch_matrix[GEOM_CYLINDER][GEOM_SPHERE] = &ShapeShapeContactPatch<Cylinder, Sphere>;
199  contact_patch_matrix[GEOM_CYLINDER][GEOM_CAPSULE] = &ShapeShapeContactPatch<Cylinder, Capsule>;
200  contact_patch_matrix[GEOM_CYLINDER][GEOM_CONE] = &ShapeShapeContactPatch<Cylinder, Cone>;
201  contact_patch_matrix[GEOM_CYLINDER][GEOM_CYLINDER] = &ShapeShapeContactPatch<Cylinder, Cylinder>;
202  contact_patch_matrix[GEOM_CYLINDER][GEOM_CONVEX] = &ShapeShapeContactPatch<Cylinder, ConvexBase>;
203  contact_patch_matrix[GEOM_CYLINDER][GEOM_PLANE] = &ShapeShapeContactPatch<Cylinder, Plane>;
204  contact_patch_matrix[GEOM_CYLINDER][GEOM_HALFSPACE] = &ShapeShapeContactPatch<Cylinder, Halfspace>;
205  contact_patch_matrix[GEOM_CYLINDER][GEOM_ELLIPSOID] = &ShapeShapeContactPatch<Cylinder, Ellipsoid>;
206  contact_patch_matrix[GEOM_CYLINDER][GEOM_TRIANGLE] = &ShapeShapeContactPatch<Cylinder, TriangleP>;
207 
208  contact_patch_matrix[GEOM_CONVEX][GEOM_BOX] = &ShapeShapeContactPatch<ConvexBase, Box>;
209  contact_patch_matrix[GEOM_CONVEX][GEOM_SPHERE] = &ShapeShapeContactPatch<ConvexBase, Sphere>;
210  contact_patch_matrix[GEOM_CONVEX][GEOM_CAPSULE] = &ShapeShapeContactPatch<ConvexBase, Capsule>;
211  contact_patch_matrix[GEOM_CONVEX][GEOM_CONE] = &ShapeShapeContactPatch<ConvexBase, Cone>;
212  contact_patch_matrix[GEOM_CONVEX][GEOM_CYLINDER] = &ShapeShapeContactPatch<ConvexBase, Cylinder>;
213  contact_patch_matrix[GEOM_CONVEX][GEOM_CONVEX] = &ShapeShapeContactPatch<ConvexBase, ConvexBase>;
214  contact_patch_matrix[GEOM_CONVEX][GEOM_PLANE] = &ShapeShapeContactPatch<ConvexBase, Plane>;
215  contact_patch_matrix[GEOM_CONVEX][GEOM_HALFSPACE] = &ShapeShapeContactPatch<ConvexBase, Halfspace>;
216  contact_patch_matrix[GEOM_CONVEX][GEOM_ELLIPSOID] = &ShapeShapeContactPatch<ConvexBase, Ellipsoid>;
217  contact_patch_matrix[GEOM_CONVEX][GEOM_TRIANGLE] = &ShapeShapeContactPatch<ConvexBase, TriangleP>;
218 
219  contact_patch_matrix[GEOM_PLANE][GEOM_BOX] = &ShapeShapeContactPatch<Plane, Box>;
220  contact_patch_matrix[GEOM_PLANE][GEOM_SPHERE] = &ShapeShapeContactPatch<Plane, Sphere>;
221  contact_patch_matrix[GEOM_PLANE][GEOM_CAPSULE] = &ShapeShapeContactPatch<Plane, Capsule>;
222  contact_patch_matrix[GEOM_PLANE][GEOM_CONE] = &ShapeShapeContactPatch<Plane, Cone>;
223  contact_patch_matrix[GEOM_PLANE][GEOM_CYLINDER] = &ShapeShapeContactPatch<Plane, Cylinder>;
224  contact_patch_matrix[GEOM_PLANE][GEOM_CONVEX] = &ShapeShapeContactPatch<Plane, ConvexBase>;
225  contact_patch_matrix[GEOM_PLANE][GEOM_PLANE] = &ShapeShapeContactPatch<Plane, Plane>;
226  contact_patch_matrix[GEOM_PLANE][GEOM_HALFSPACE] = &ShapeShapeContactPatch<Plane, Halfspace>;
227  contact_patch_matrix[GEOM_PLANE][GEOM_ELLIPSOID] = &ShapeShapeContactPatch<Plane, Ellipsoid>;
228  contact_patch_matrix[GEOM_PLANE][GEOM_TRIANGLE] = &ShapeShapeContactPatch<Plane, TriangleP>;
229 
230  contact_patch_matrix[GEOM_HALFSPACE][GEOM_BOX] = &ShapeShapeContactPatch<Halfspace, Box>;
231  contact_patch_matrix[GEOM_HALFSPACE][GEOM_SPHERE] = &ShapeShapeContactPatch<Halfspace, Sphere>;
232  contact_patch_matrix[GEOM_HALFSPACE][GEOM_CAPSULE] = &ShapeShapeContactPatch<Halfspace, Capsule>;
233  contact_patch_matrix[GEOM_HALFSPACE][GEOM_CONE] = &ShapeShapeContactPatch<Halfspace, Cone>;
234  contact_patch_matrix[GEOM_HALFSPACE][GEOM_CYLINDER] = &ShapeShapeContactPatch<Halfspace, Cylinder>;
235  contact_patch_matrix[GEOM_HALFSPACE][GEOM_CONVEX] = &ShapeShapeContactPatch<Halfspace, ConvexBase>;
236  contact_patch_matrix[GEOM_HALFSPACE][GEOM_PLANE] = &ShapeShapeContactPatch<Halfspace, Plane>;
237  contact_patch_matrix[GEOM_HALFSPACE][GEOM_HALFSPACE] = &ShapeShapeContactPatch<Halfspace, Halfspace>;
238  contact_patch_matrix[GEOM_HALFSPACE][GEOM_ELLIPSOID] = &ShapeShapeContactPatch<Halfspace, Ellipsoid>;
239  contact_patch_matrix[GEOM_HALFSPACE][GEOM_TRIANGLE] = &ShapeShapeContactPatch<Halfspace, TriangleP>;
240 
241  contact_patch_matrix[GEOM_TRIANGLE][GEOM_BOX] = &ShapeShapeContactPatch<TriangleP, Box>;
242  contact_patch_matrix[GEOM_TRIANGLE][GEOM_SPHERE] = &ShapeShapeContactPatch<TriangleP, Sphere>;
243  contact_patch_matrix[GEOM_TRIANGLE][GEOM_CAPSULE] = &ShapeShapeContactPatch<TriangleP, Capsule>;
244  contact_patch_matrix[GEOM_TRIANGLE][GEOM_CONE] = &ShapeShapeContactPatch<TriangleP, Cone>;
245  contact_patch_matrix[GEOM_TRIANGLE][GEOM_CYLINDER] = &ShapeShapeContactPatch<TriangleP, Cylinder>;
246  contact_patch_matrix[GEOM_TRIANGLE][GEOM_CONVEX] = &ShapeShapeContactPatch<TriangleP, ConvexBase>;
247  contact_patch_matrix[GEOM_TRIANGLE][GEOM_PLANE] = &ShapeShapeContactPatch<TriangleP, Plane>;
248  contact_patch_matrix[GEOM_TRIANGLE][GEOM_HALFSPACE] = &ShapeShapeContactPatch<TriangleP, Halfspace>;
249  contact_patch_matrix[GEOM_TRIANGLE][GEOM_ELLIPSOID] = &ShapeShapeContactPatch<TriangleP, Ellipsoid>;
250  contact_patch_matrix[GEOM_TRIANGLE][GEOM_TRIANGLE] = &ShapeShapeContactPatch<TriangleP, TriangleP>;
251 
252  // TODO(louis): properly handle non-convex shapes like BVH, Octrees and Hfields.
253  // The following functions work. However apart from the contact frame, these functions don't
254  // compute more information than a call to `collide`.
264 
274 
284 
294 
304 
314 
324 
334 
344 
354 
363 
364  // TODO(louis): octrees
365 #ifdef COAL_HAS_OCTOMAP
387 
408 #endif
409  // clang-format on
410 }
411 
412 } // namespace coal
coal::Contact::pos
Vec3s pos
contact position, in world space
Definition: coal/collision_data.h:102
coal::BVHShapeComputeContactPatch
Definition: contact_patch_func_matrix.cpp:45
coal::CollisionGeometry::getNodeType
virtual NODE_TYPE getNodeType() const
get the node type
Definition: coal/collision_object.h:130
shape_shape_contact_patch_func.h
coal::BV_AABB
@ BV_AABB
Definition: coal/collision_object.h:66
coal::BV_KDOP24
@ BV_KDOP24
Definition: coal/collision_object.h:73
coal::NODE_COUNT
@ NODE_COUNT
Definition: coal/collision_object.h:87
coal::ContactPatchResult::getUnusedContactPatch
ContactPatchRef getUnusedContactPatch()
Returns a new unused contact patch from the internal data vector.
Definition: coal/collision_data.h:862
coal::HeightFieldShapeComputeContactPatch
Definition: contact_patch_func_matrix.cpp:70
coal::BV_kIOS
@ BV_kIOS
Definition: coal/collision_object.h:69
coal::BV_OBBRSS
@ BV_OBBRSS
Definition: coal/collision_object.h:70
coal::GEOM_CONE
@ GEOM_CONE
Definition: coal/collision_object.h:77
coal::Halfspace
Half Space: this is equivalent to the Plane in ODE. A Half space has a priviledged direction: the dir...
Definition: coal/shape/geometric_shapes.h:892
coal::GEOM_CONVEX
@ GEOM_CONVEX
Definition: coal/collision_object.h:79
contact_patch_func_matrix.h
gjk.tf1
tuple tf1
Definition: test/scripts/gjk.py:27
coal::NODE_TYPE
NODE_TYPE
traversal node type: bounding volume (AABB, OBB, RSS, kIOS, OBBRSS, KDOP16, KDOP18,...
Definition: coal/collision_object.h:64
coal::Capsule
Capsule It is where is the distance between the point x and the capsule segment AB,...
Definition: coal/shape/geometric_shapes.h:383
coal::BV_RSS
@ BV_RSS
Definition: coal/collision_object.h:68
coal::ContactPatchRequest::max_num_patch
size_t max_num_patch
Maximum number of contact patches that will be computed.
Definition: coal/collision_data.h:726
coal
Main namespace.
Definition: coal/broadphase/broadphase_bruteforce.h:44
coal::GEOM_CAPSULE
@ GEOM_CAPSULE
Definition: coal/collision_object.h:76
coal::BV_KDOP18
@ BV_KDOP18
Definition: coal/collision_object.h:72
coal::Ellipsoid
Ellipsoid centered at point zero.
Definition: coal/shape/geometric_shapes.h:305
coal::GEOM_SPHERE
@ GEOM_SPHERE
Definition: coal/collision_object.h:75
coal::HeightFieldShapeComputeContactPatch::run
static void run(const CollisionGeometry *o1, const Transform3s &tf1, const CollisionGeometry *o2, const Transform3s &tf2, const CollisionResult &collision_result, const ContactPatchSolver *csolver, const ContactPatchRequest &request, ContactPatchResult &result)
Definition: contact_patch_func_matrix.cpp:71
coal::ContactPatch
This structure allows to encode contact patches. A contact patch is defined by a set of points belong...
Definition: coal/collision_data.h:512
BV.h
coal::CollisionGeometry
The geometry for the object for collision or distance computation.
Definition: coal/collision_object.h:94
coal::Plane
Infinite plane. A plane can be viewed as two half spaces; it has no priviledged direction....
Definition: coal/shape/geometric_shapes.h:983
coal::Box
Center at zero point, axis aligned box.
Definition: coal/shape/geometric_shapes.h:166
coal::Sphere
Center at zero point sphere.
Definition: coal/shape/geometric_shapes.h:240
coal::Transform3s
Simple transform class used locally by InterpMotion.
Definition: coal/math/transform.h:55
coal::HF_AABB
@ HF_AABB
Definition: coal/collision_object.h:85
coal::constructContactPatchFrameFromContact
void constructContactPatchFrameFromContact(const Contact &contact, ContactPatch &contact_patch)
Construct a frame from a Contact's position and normal. Because both Contact's position and normal ar...
Definition: coal/collision_data.h:704
COAL_UNUSED_VARIABLE
#define COAL_UNUSED_VARIABLE(var)
Definition: include/coal/fwd.hh:56
coal::GEOM_PLANE
@ GEOM_PLANE
Definition: coal/collision_object.h:80
coal::GEOM_ELLIPSOID
@ GEOM_ELLIPSOID
Definition: coal/collision_object.h:84
coal::GEOM_HALFSPACE
@ GEOM_HALFSPACE
Definition: coal/collision_object.h:81
COAL_THROW_PRETTY
#define COAL_THROW_PRETTY(message, exception)
Definition: include/coal/fwd.hh:64
coal::CollisionResult
collision result
Definition: coal/collision_data.h:390
coal::GEOM_TRIANGLE
@ GEOM_TRIANGLE
Definition: coal/collision_object.h:82
coal::contact_patch_function_not_implemented
COAL_LOCAL void contact_patch_function_not_implemented(const CollisionGeometry *o1, const Transform3s &, const CollisionGeometry *o2, const Transform3s &, const CollisionResult &, const ContactPatchSolver *, const ContactPatchRequest &, ContactPatchResult &)
Definition: contact_patch_func_matrix.cpp:119
coal::ContactPatchFunctionMatrix::contact_patch_matrix
ContactPatchFunc contact_patch_matrix[NODE_COUNT][NODE_COUNT]
Each item in the contact patch matrix is a function to handle contact patch computation between objec...
Definition: coal/contact_patch_func_matrix.h:78
gjk.tf2
tuple tf2
Definition: test/scripts/gjk.py:36
coal::BVHComputeContactPatch
Definition: contact_patch_func_matrix.cpp:95
coal::Cylinder
Cylinder along Z axis. The cylinder is defined at its centroid.
Definition: coal/shape/geometric_shapes.h:560
coal::ContactPatchResult
Result for a contact patch computation.
Definition: coal/collision_data.h:822
coal::Contact
Contact information returned by collision.
Definition: coal/collision_data.h:58
omniidl_be_python_with_docstring.run
def run(tree, args)
Definition: omniidl_be_python_with_docstring.py:140
coal::ContactPatchRequest
Request for a contact patch computation.
Definition: coal/collision_data.h:724
coal::GEOM_CYLINDER
@ GEOM_CYLINDER
Definition: coal/collision_object.h:78
coal::get_node_type_name
const char * get_node_type_name(NODE_TYPE node_type)
Returns the name associated to a NODE_TYPE.
Definition: coal/collision_utility.h:32
coal::Cone
Cone The base of the cone is at and the top is at .
Definition: coal/shape/geometric_shapes.h:467
coal::GEOM_OCTREE
@ GEOM_OCTREE
Definition: coal/collision_object.h:83
geometric_shapes.h
coal::CollisionResult::getContact
const Contact & getContact(size_t i) const
get the i-th contact calculated
Definition: coal/collision_data.h:449
coal::BVHComputeContactPatch::run
static void run(const CollisionGeometry *o1, const Transform3s &tf1, const CollisionGeometry *o2, const Transform3s &tf2, const CollisionResult &collision_result, const ContactPatchSolver *csolver, const ContactPatchRequest &request, ContactPatchResult &result)
Definition: contact_patch_func_matrix.cpp:96
coal::ContactPatchSolver
Solver to compute contact patches, i.e. the intersection between two contact surfaces projected onto ...
Definition: coal/contact_patch/contact_patch_solver.h:59
coal::BV_OBB
@ BV_OBB
Definition: coal/collision_object.h:67
coal::GEOM_BOX
@ GEOM_BOX
Definition: coal/collision_object.h:74
coal::HF_OBBRSS
@ HF_OBBRSS
Definition: coal/collision_object.h:86
coal::BVHShapeComputeContactPatch::run
static void run(const CollisionGeometry *o1, const Transform3s &tf1, const CollisionGeometry *o2, const Transform3s &tf2, const CollisionResult &collision_result, const ContactPatchSolver *csolver, const ContactPatchRequest &request, ContactPatchResult &result)
Definition: contact_patch_func_matrix.cpp:46
coal::ContactPatchFunctionMatrix::ContactPatchFunctionMatrix
ContactPatchFunctionMatrix()
Definition: contact_patch_func_matrix.cpp:136
coal::ContactPatch::addPoint
void addPoint(const Vec3s &point_3d)
Add a 3D point to the set, expressed in the world frame.
Definition: coal/collision_data.h:584
coal::BV_KDOP16
@ BV_KDOP16
Definition: coal/collision_object.h:71
coal::ConvexBase
Base for convex polytope.
Definition: coal/shape/geometric_shapes.h:645
coal::CollisionResult::numContacts
size_t numContacts() const
number of contacts found
Definition: coal/collision_data.h:446


hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:44:57