diff --git a/python/collision.cc b/python/collision.cc index db7d13dff..a759b193a 100644 --- a/python/collision.cc +++ b/python/collision.cc @@ -94,8 +94,8 @@ void exposeCollisionAPI() { .def("clear", &CPUTimes::clear, arg("self"), "Reset the time values."); } -HPP_FCL_COMPILER_DIAGNOSTIC_PUSH -HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS + HPP_FCL_COMPILER_DIAGNOSTIC_PUSH + HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS if (!eigenpy::register_symbolic_link_to_registered_type()) { class_("QueryRequest", doxygen::class_doc(), no_init) @@ -132,10 +132,10 @@ HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS .DEF_RW_CLASS_ATTRIB(QueryRequest, enable_timings) .DEF_CLASS_FUNC(QueryRequest, updateGuess); } -HPP_FCL_COMPILER_DIAGNOSTIC_POP + HPP_FCL_COMPILER_DIAGNOSTIC_POP -HPP_FCL_COMPILER_DIAGNOSTIC_PUSH -HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS + HPP_FCL_COMPILER_DIAGNOSTIC_PUSH + HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS if (!eigenpy::register_symbolic_link_to_registered_type()) { class_ >( "CollisionRequest", doxygen::class_doc(), no_init) @@ -174,7 +174,7 @@ HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS class_ >("StdVec_CollisionRequest") .def(vector_indexing_suite >()); } -HPP_FCL_COMPILER_DIAGNOSTIC_POP + HPP_FCL_COMPILER_DIAGNOSTIC_POP if (!eigenpy::register_symbolic_link_to_registered_type()) { class_("Contact", doxygen::class_doc(), diff --git a/python/distance.cc b/python/distance.cc index 36d4ea014..0231814da 100644 --- a/python/distance.cc +++ b/python/distance.cc @@ -67,8 +67,8 @@ struct DistanceResultWrapper { }; void exposeDistanceAPI() { -HPP_FCL_COMPILER_DIAGNOSTIC_PUSH -HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS + HPP_FCL_COMPILER_DIAGNOSTIC_PUSH + HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS if (!eigenpy::register_symbolic_link_to_registered_type()) { class_ >( "DistanceRequest", doxygen::class_doc(), @@ -110,7 +110,7 @@ HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS .DEF_RW_CLASS_ATTRIB(DistanceRequest, abs_err) .def(SerializableVisitor()); } -HPP_FCL_COMPILER_DIAGNOSTIC_POP + HPP_FCL_COMPILER_DIAGNOSTIC_POP if (!eigenpy::register_symbolic_link_to_registered_type< std::vector >()) { diff --git a/src/narrowphase/support_functions.cpp b/src/narrowphase/support_functions.cpp index 898a002ea..5b39f152f 100644 --- a/src/narrowphase/support_functions.cpp +++ b/src/narrowphase/support_functions.cpp @@ -134,12 +134,13 @@ void getShapeSupport(const TriangleP* triangle, const Vec3f& dir, } // clang-format off getShapeSupportTplInstantiation(TriangleP) -// clang-format on + // clang-format on -// ============================================================================ -template -inline void getShapeSupport(const Box* box, const Vec3f& dir, Vec3f& support, - int& /*unused*/, ShapeSupportData& /*unused*/) { + // ============================================================================ + template + inline void getShapeSupport(const Box* box, const Vec3f& dir, + Vec3f& support, int& /*unused*/, + ShapeSupportData& /*unused*/) { // The inflate value is simply to make the specialized functions with box // have a preferred side for edge cases. static const FCL_REAL inflate = (dir.array() == 0).any() ? 1 + 1e-10 : 1.; @@ -156,13 +157,13 @@ inline void getShapeSupport(const Box* box, const Vec3f& dir, Vec3f& support, } // clang-format off getShapeSupportTplInstantiation(Box) -// clang-format on + // clang-format on -// ============================================================================ -template -inline void getShapeSupport(const Sphere* sphere, const Vec3f& dir, - Vec3f& support, int& /*unused*/, - ShapeSupportData& /*unused*/) { + // ============================================================================ + template + inline void getShapeSupport(const Sphere* sphere, const Vec3f& dir, + Vec3f& support, int& /*unused*/, + ShapeSupportData& /*unused*/) { if (_SupportOptions == SupportOptions::WithSweptSphere) { support.noalias() = (sphere->radius + sphere->getSweptSphereRadius()) * dir.normalized(); @@ -175,13 +176,13 @@ inline void getShapeSupport(const Sphere* sphere, const Vec3f& dir, } // clang-format off getShapeSupportTplInstantiation(Sphere) -// clang-format on + // clang-format on -// ============================================================================ -template -inline void getShapeSupport(const Ellipsoid* ellipsoid, const Vec3f& dir, - Vec3f& support, int& /*unused*/, - ShapeSupportData& /*unused*/) { + // ============================================================================ + template + inline void getShapeSupport(const Ellipsoid* ellipsoid, const Vec3f& dir, + Vec3f& support, int& /*unused*/, + ShapeSupportData& /*unused*/) { FCL_REAL a2 = ellipsoid->radii[0] * ellipsoid->radii[0]; FCL_REAL b2 = ellipsoid->radii[1] * ellipsoid->radii[1]; FCL_REAL c2 = ellipsoid->radii[2] * ellipsoid->radii[2]; @@ -198,13 +199,13 @@ inline void getShapeSupport(const Ellipsoid* ellipsoid, const Vec3f& dir, } // clang-format off getShapeSupportTplInstantiation(Ellipsoid) -// clang-format on + // clang-format on -// ============================================================================ -template -inline void getShapeSupport(const Capsule* capsule, const Vec3f& dir, - Vec3f& support, int& /*unused*/, - ShapeSupportData& /*unused*/) { + // ============================================================================ + template + inline void getShapeSupport(const Capsule* capsule, const Vec3f& dir, + Vec3f& support, int& /*unused*/, + ShapeSupportData& /*unused*/) { static const FCL_REAL dummy_precision = Eigen::NumTraits::dummy_precision(); support.setZero(); @@ -221,12 +222,12 @@ inline void getShapeSupport(const Capsule* capsule, const Vec3f& dir, } // clang-format off getShapeSupportTplInstantiation(Capsule) -// clang-format on + // clang-format on -// ============================================================================ -template -void getShapeSupport(const Cone* cone, const Vec3f& dir, Vec3f& support, - int& /*unused*/, ShapeSupportData& /*unused*/) { + // ============================================================================ + template + void getShapeSupport(const Cone* cone, const Vec3f& dir, Vec3f& support, + int& /*unused*/, ShapeSupportData& /*unused*/) { static const FCL_REAL dummy_precision = Eigen::NumTraits::dummy_precision(); @@ -273,12 +274,13 @@ void getShapeSupport(const Cone* cone, const Vec3f& dir, Vec3f& support, } // clang-format off getShapeSupportTplInstantiation(Cone) -// clang-format on + // clang-format on -// ============================================================================ -template -void getShapeSupport(const Cylinder* cylinder, const Vec3f& dir, Vec3f& support, - int& /*unused*/, ShapeSupportData& /*unused*/) { + // ============================================================================ + template + void getShapeSupport(const Cylinder* cylinder, const Vec3f& dir, + Vec3f& support, int& /*unused*/, + ShapeSupportData& /*unused*/) { static const FCL_REAL dummy_precision = Eigen::NumTraits::dummy_precision(); @@ -315,13 +317,13 @@ void getShapeSupport(const Cylinder* cylinder, const Vec3f& dir, Vec3f& support, } // clang-format off getShapeSupportTplInstantiation(Cylinder) -// clang-format on + // clang-format on -// ============================================================================ -template -void getShapeSupportLog(const ConvexBase* convex, const Vec3f& dir, - Vec3f& support, int& hint, - ShapeSupportData& support_data) { + // ============================================================================ + template + void getShapeSupportLog(const ConvexBase* convex, const Vec3f& dir, + Vec3f& support, int& hint, + ShapeSupportData& support_data) { assert(convex->neighbors != nullptr && "Convex has no neighbors."); // Use warm start if current support direction is distant from last support @@ -435,26 +437,26 @@ void getShapeSupport(const ConvexBase* convex, const Vec3f& dir, Vec3f& support, } // clang-format off getShapeSupportTplInstantiation(ConvexBase) -// clang-format on + // clang-format on -// ============================================================================ -template -inline void getShapeSupport(const SmallConvex* convex, const Vec3f& dir, - Vec3f& support, int& hint, - ShapeSupportData& support_data) { + // ============================================================================ + template + inline void getShapeSupport(const SmallConvex* convex, const Vec3f& dir, + Vec3f& support, int& hint, + ShapeSupportData& support_data) { getShapeSupportLinear<_SupportOptions>( reinterpret_cast(convex), dir, support, hint, support_data); } // clang-format off getShapeSupportTplInstantiation(SmallConvex) -// clang-format on + // clang-format on -// ============================================================================ -template -inline void getShapeSupport(const LargeConvex* convex, const Vec3f& dir, - Vec3f& support, int& hint, - ShapeSupportData& support_data) { + // ============================================================================ + template + inline void getShapeSupport(const LargeConvex* convex, const Vec3f& dir, + Vec3f& support, int& hint, + ShapeSupportData& support_data) { getShapeSupportLog<_SupportOptions>( reinterpret_cast(convex), dir, support, hint, support_data); @@ -468,9 +470,9 @@ getShapeSupportTplInstantiation(LargeConvex) getShapeSupportSet<_SupportOptions>(static_cast(shape), \ support_set, hint, support_data, \ max_num_supports, tol) -template -void getSupportSet(const ShapeBase* shape, SupportSet& support_set, int& hint, - size_t max_num_supports, FCL_REAL tol) { + template + void getSupportSet(const ShapeBase* shape, SupportSet& support_set, + int& hint, size_t max_num_supports, FCL_REAL tol) { ShapeSupportData support_data; switch (shape->getNodeType()) { case GEOM_TRIANGLE: