Skip to content

Commit c0fb226

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b8ab18b commit c0fb226

File tree

1 file changed

+47
-46
lines changed

1 file changed

+47
-46
lines changed

src/narrowphase/support_functions.cpp

+47-46
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,11 @@ void getShapeSupport(const TriangleP* triangle, const Vec3f& dir,
134134
}
135135
getShapeSupportTplInstantiation(TriangleP)
136136

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*/) {
141142
// The inflate value is simply to make the specialized functions with box
142143
// have a preferred side for edge cases.
143144
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,
154155
}
155156
getShapeSupportTplInstantiation(Box)
156157

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*/) {
162163
if (_SupportOptions == SupportOptions::WithSweptSphere) {
163164
support.noalias() =
164165
(sphere->radius + sphere->getSweptSphereRadius()) * dir.normalized();
@@ -171,11 +172,11 @@ inline void getShapeSupport(const Sphere* sphere, const Vec3f& dir,
171172
}
172173
getShapeSupportTplInstantiation(Sphere)
173174

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*/) {
179180
FCL_REAL a2 = ellipsoid->radii[0] * ellipsoid->radii[0];
180181
FCL_REAL b2 = ellipsoid->radii[1] * ellipsoid->radii[1];
181182
FCL_REAL c2 = ellipsoid->radii[2] * ellipsoid->radii[2];
@@ -192,11 +193,11 @@ inline void getShapeSupport(const Ellipsoid* ellipsoid, const Vec3f& dir,
192193
}
193194
getShapeSupportTplInstantiation(Ellipsoid)
194195

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*/) {
200201
static const FCL_REAL dummy_precision =
201202
Eigen::NumTraits<FCL_REAL>::dummy_precision();
202203
support.setZero();
@@ -213,10 +214,10 @@ inline void getShapeSupport(const Capsule* capsule, const Vec3f& dir,
213214
}
214215
getShapeSupportTplInstantiation(Capsule)
215216

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*/) {
220221
static const FCL_REAL dummy_precision =
221222
Eigen::NumTraits<FCL_REAL>::dummy_precision();
222223

@@ -263,10 +264,11 @@ void getShapeSupport(const Cone* cone, const Vec3f& dir, Vec3f& support,
263264
}
264265
getShapeSupportTplInstantiation(Cone)
265266

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*/) {
270272
static const FCL_REAL dummy_precision =
271273
Eigen::NumTraits<FCL_REAL>::dummy_precision();
272274

@@ -303,11 +305,11 @@ void getShapeSupport(const Cylinder* cylinder, const Vec3f& dir, Vec3f& support,
303305
}
304306
getShapeSupportTplInstantiation(Cylinder)
305307

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) {
311313
assert(convex->neighbors != nullptr && "Convex has no neighbors.");
312314

313315
// 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,
421423
}
422424
getShapeSupportTplInstantiation(ConvexBase)
423425

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) {
429431
getShapeSupportLinear<_SupportOptions>(
430432
reinterpret_cast<const ConvexBase*>(convex), dir, support, hint,
431433
support_data);
432434
}
433435
getShapeSupportTplInstantiation(SmallConvex)
434436

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) {
440442
getShapeSupportLog<_SupportOptions>(
441443
reinterpret_cast<const ConvexBase*>(convex), dir, support, hint,
442444
support_data);
443445
}
444446
getShapeSupportTplInstantiation(LargeConvex)
445-
446447
// ============================================================================
447448
#define CALL_GET_SHAPE_SUPPORT_SET(ShapeType) \
448449
getShapeSupportSet<_SupportOptions>(static_cast<const ShapeType*>(shape), \
449450
support_set, hint, support_data, \
450451
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) {
454455
ShapeSupportData support_data;
455456
switch (shape->getNodeType()) {
456457
case GEOM_TRIANGLE:

0 commit comments

Comments
 (0)