@@ -134,10 +134,11 @@ void getShapeSupport(const TriangleP* triangle, const Vec3f& dir,
134
134
}
135
135
getShapeSupportTplInstantiation (TriangleP)
136
136
137
- // ============================================================================
138
- template <int _SupportOptions>
139
- inline void getShapeSupport (const Box* box, const Vec3f& dir, Vec3f& support,
140
- int & /* unused*/ , ShapeSupportData& /* unused*/ ) {
137
+ // ============================================================================
138
+ template <int _SupportOptions>
139
+ inline void getShapeSupport (const Box* box, const Vec3f& dir,
140
+ Vec3f& support, int & /* unused*/ ,
141
+ ShapeSupportData& /* unused*/ ) {
141
142
// The inflate value is simply to make the specialized functions with box
142
143
// have a preferred side for edge cases.
143
144
static const FCL_REAL inflate = (dir.array () == 0 ).any () ? 1 + 1e-10 : 1 .;
@@ -154,11 +155,11 @@ inline void getShapeSupport(const Box* box, const Vec3f& dir, Vec3f& support,
154
155
}
155
156
getShapeSupportTplInstantiation (Box)
156
157
157
- // ============================================================================
158
- template <int _SupportOptions>
159
- inline void getShapeSupport (const Sphere* sphere, const Vec3f& dir,
160
- Vec3f& support, int & /* unused*/ ,
161
- ShapeSupportData& /* unused*/ ) {
158
+ // ============================================================================
159
+ template <int _SupportOptions>
160
+ inline void getShapeSupport (const Sphere* sphere, const Vec3f& dir,
161
+ Vec3f& support, int & /* unused*/ ,
162
+ ShapeSupportData& /* unused*/ ) {
162
163
if (_SupportOptions == SupportOptions::WithSweptSphere) {
163
164
support.noalias () =
164
165
(sphere->radius + sphere->getSweptSphereRadius ()) * dir.normalized ();
@@ -171,11 +172,11 @@ inline void getShapeSupport(const Sphere* sphere, const Vec3f& dir,
171
172
}
172
173
getShapeSupportTplInstantiation (Sphere)
173
174
174
- // ============================================================================
175
- template <int _SupportOptions>
176
- inline void getShapeSupport (const Ellipsoid* ellipsoid, const Vec3f& dir,
177
- Vec3f& support, int & /* unused*/ ,
178
- ShapeSupportData& /* unused*/ ) {
175
+ // ============================================================================
176
+ template <int _SupportOptions>
177
+ inline void getShapeSupport (const Ellipsoid* ellipsoid, const Vec3f& dir,
178
+ Vec3f& support, int & /* unused*/ ,
179
+ ShapeSupportData& /* unused*/ ) {
179
180
FCL_REAL a2 = ellipsoid->radii [0 ] * ellipsoid->radii [0 ];
180
181
FCL_REAL b2 = ellipsoid->radii [1 ] * ellipsoid->radii [1 ];
181
182
FCL_REAL c2 = ellipsoid->radii [2 ] * ellipsoid->radii [2 ];
@@ -192,11 +193,11 @@ inline void getShapeSupport(const Ellipsoid* ellipsoid, const Vec3f& dir,
192
193
}
193
194
getShapeSupportTplInstantiation (Ellipsoid)
194
195
195
- // ============================================================================
196
- template <int _SupportOptions>
197
- inline void getShapeSupport (const Capsule* capsule, const Vec3f& dir,
198
- Vec3f& support, int & /* unused*/ ,
199
- ShapeSupportData& /* unused*/ ) {
196
+ // ============================================================================
197
+ template <int _SupportOptions>
198
+ inline void getShapeSupport (const Capsule* capsule, const Vec3f& dir,
199
+ Vec3f& support, int & /* unused*/ ,
200
+ ShapeSupportData& /* unused*/ ) {
200
201
static const FCL_REAL dummy_precision =
201
202
Eigen::NumTraits<FCL_REAL>::dummy_precision ();
202
203
support.setZero ();
@@ -213,10 +214,10 @@ inline void getShapeSupport(const Capsule* capsule, const Vec3f& dir,
213
214
}
214
215
getShapeSupportTplInstantiation (Capsule)
215
216
216
- // ============================================================================
217
- template <int _SupportOptions>
218
- void getShapeSupport (const Cone* cone, const Vec3f& dir, Vec3f& support,
219
- int & /* unused*/ , ShapeSupportData& /* unused*/ ) {
217
+ // ============================================================================
218
+ template <int _SupportOptions>
219
+ void getShapeSupport (const Cone* cone, const Vec3f& dir, Vec3f& support,
220
+ int & /* unused*/ , ShapeSupportData& /* unused*/ ) {
220
221
static const FCL_REAL dummy_precision =
221
222
Eigen::NumTraits<FCL_REAL>::dummy_precision ();
222
223
@@ -263,10 +264,11 @@ void getShapeSupport(const Cone* cone, const Vec3f& dir, Vec3f& support,
263
264
}
264
265
getShapeSupportTplInstantiation (Cone)
265
266
266
- // ============================================================================
267
- template <int _SupportOptions>
268
- void getShapeSupport (const Cylinder* cylinder, const Vec3f& dir, Vec3f& support,
269
- int & /* unused*/ , ShapeSupportData& /* unused*/ ) {
267
+ // ============================================================================
268
+ template <int _SupportOptions>
269
+ void getShapeSupport (const Cylinder* cylinder, const Vec3f& dir,
270
+ Vec3f& support, int & /* unused*/ ,
271
+ ShapeSupportData& /* unused*/ ) {
270
272
static const FCL_REAL dummy_precision =
271
273
Eigen::NumTraits<FCL_REAL>::dummy_precision ();
272
274
@@ -303,11 +305,11 @@ void getShapeSupport(const Cylinder* cylinder, const Vec3f& dir, Vec3f& support,
303
305
}
304
306
getShapeSupportTplInstantiation (Cylinder)
305
307
306
- // ============================================================================
307
- template <int _SupportOptions>
308
- void getShapeSupportLog (const ConvexBase* convex, const Vec3f& dir,
309
- Vec3f& support, int & hint,
310
- ShapeSupportData& support_data) {
308
+ // ============================================================================
309
+ template <int _SupportOptions>
310
+ void getShapeSupportLog (const ConvexBase* convex, const Vec3f& dir,
311
+ Vec3f& support, int & hint,
312
+ ShapeSupportData& support_data) {
311
313
assert (convex->neighbors != nullptr && " Convex has no neighbors." );
312
314
313
315
// Use warm start if current support direction is distant from last support
@@ -421,36 +423,35 @@ void getShapeSupport(const ConvexBase* convex, const Vec3f& dir, Vec3f& support,
421
423
}
422
424
getShapeSupportTplInstantiation (ConvexBase)
423
425
424
- // ============================================================================
425
- template <int _SupportOptions>
426
- inline void getShapeSupport (const SmallConvex* convex, const Vec3f& dir,
427
- Vec3f& support, int & hint,
428
- ShapeSupportData& support_data) {
426
+ // ============================================================================
427
+ template <int _SupportOptions>
428
+ inline void getShapeSupport (const SmallConvex* convex, const Vec3f& dir,
429
+ Vec3f& support, int & hint,
430
+ ShapeSupportData& support_data) {
429
431
getShapeSupportLinear<_SupportOptions>(
430
432
reinterpret_cast <const ConvexBase*>(convex), dir, support, hint,
431
433
support_data);
432
434
}
433
435
getShapeSupportTplInstantiation (SmallConvex)
434
436
435
- // ============================================================================
436
- template <int _SupportOptions>
437
- inline void getShapeSupport (const LargeConvex* convex, const Vec3f& dir,
438
- Vec3f& support, int & hint,
439
- ShapeSupportData& support_data) {
437
+ // ============================================================================
438
+ template <int _SupportOptions>
439
+ inline void getShapeSupport (const LargeConvex* convex, const Vec3f& dir,
440
+ Vec3f& support, int & hint,
441
+ ShapeSupportData& support_data) {
440
442
getShapeSupportLog<_SupportOptions>(
441
443
reinterpret_cast <const ConvexBase*>(convex), dir, support, hint,
442
444
support_data);
443
445
}
444
446
getShapeSupportTplInstantiation (LargeConvex)
445
-
446
447
// ============================================================================
447
448
#define CALL_GET_SHAPE_SUPPORT_SET (ShapeType ) \
448
449
getShapeSupportSet<_SupportOptions>(static_cast <const ShapeType*>(shape), \
449
450
support_set, hint, support_data, \
450
451
max_num_supports, tol)
451
- template <int _SupportOptions>
452
- void getSupportSet (const ShapeBase* shape, SupportSet& support_set, int & hint ,
453
- size_t max_num_supports, FCL_REAL tol) {
452
+ template <int _SupportOptions>
453
+ void getSupportSet (const ShapeBase* shape, SupportSet& support_set,
454
+ int & hint, size_t max_num_supports, FCL_REAL tol) {
454
455
ShapeSupportData support_data;
455
456
switch (shape->getNodeType ()) {
456
457
case GEOM_TRIANGLE:
0 commit comments