Commit 7afe483a authored by Tobias Kunz's avatar Tobias Kunz
Browse files

Fix compiler/linker errors in Visual Studio introduced by recent commits

M_PI is not part of the C++ standard and thus Visual Studio does not define it by default.
parent 9cbd349b
...@@ -598,6 +598,11 @@ struct GJKSolver_indep ...@@ -598,6 +598,11 @@ struct GJKSolver_indep
FCL_REAL gjk_max_iterations; FCL_REAL gjk_max_iterations;
}; };
template<>
bool GJKSolver_indep::shapeIntersect<Sphere, Capsule>(const Sphere &s1, const Transform3f& tf1,
const Capsule &s2, const Transform3f& tf2,
Vec3f* contact_points, FCL_REAL* penetration_depth, Vec3f* normal) const;
/// @brief Fast implementation for sphere-sphere collision /// @brief Fast implementation for sphere-sphere collision
template<> template<>
bool GJKSolver_indep::shapeIntersect<Sphere, Sphere>(const Sphere& s1, const Transform3f& tf1, bool GJKSolver_indep::shapeIntersect<Sphere, Sphere>(const Sphere& s1, const Transform3f& tf1,
...@@ -699,6 +704,11 @@ bool GJKSolver_indep::shapeTriangleIntersect(const Plane& s, const Transform3f& ...@@ -699,6 +704,11 @@ bool GJKSolver_indep::shapeTriangleIntersect(const Plane& s, const Transform3f&
const Vec3f& P1, const Vec3f& P2, const Vec3f& P3, const Transform3f& tf2, Vec3f* contact_points, FCL_REAL* penetration_depth, Vec3f* normal) const; const Vec3f& P1, const Vec3f& P2, const Vec3f& P3, const Transform3f& tf2, Vec3f* contact_points, FCL_REAL* penetration_depth, Vec3f* normal) const;
template<>
bool GJKSolver_indep::shapeDistance<Sphere, Capsule>(const Sphere& s1, const Transform3f& tf1,
const Capsule& s2, const Transform3f& tf2,
FCL_REAL* dist) const;
/// @brief Fast implementation for sphere-sphere distance /// @brief Fast implementation for sphere-sphere distance
template<> template<>
bool GJKSolver_indep::shapeDistance<Sphere, Sphere>(const Sphere& s1, const Transform3f& tf1, bool GJKSolver_indep::shapeDistance<Sphere, Sphere>(const Sphere& s1, const Transform3f& tf1,
......
...@@ -41,6 +41,10 @@ ...@@ -41,6 +41,10 @@
#include "fcl/shape/geometric_shapes.h" #include "fcl/shape/geometric_shapes.h"
#include "fcl/narrowphase/narrowphase.h" #include "fcl/narrowphase/narrowphase.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
using namespace fcl; using namespace fcl;
BOOST_AUTO_TEST_CASE(Sphere_Capsule_Intersect_test_separated_z) BOOST_AUTO_TEST_CASE(Sphere_Capsule_Intersect_test_separated_z)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment