diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-08-19 14:18:05 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-08-19 14:18:05 +0200 |
commit | 42e2578ef9fcbb62ad6e07933ccf531f6f7cd1b3 (patch) | |
tree | 90cef174284cad35f0d13d4b991db83335554caf /unsupported/test/BVH.cpp | |
parent | 5734ee6df42991e59609ffd26aaeb3c7aacd61e2 (diff) |
the min/max macros to detect unprotected min/max were undefined by some std header,
so let's declare them after and do the respective fixes ;)
Diffstat (limited to 'unsupported/test/BVH.cpp')
-rw-r--r-- | unsupported/test/BVH.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/unsupported/test/BVH.cpp b/unsupported/test/BVH.cpp index d773afb77..e77e84b6d 100644 --- a/unsupported/test/BVH.cpp +++ b/unsupported/test/BVH.cpp @@ -90,13 +90,13 @@ struct BallPointStuff //this class provides functions to be both an intersector } double minimumOnVolume(const BoxType &r) { ++calls; return r.squaredExteriorDistance(p); } - double minimumOnObject(const BallType &b) { ++calls; return std::max(0., (b.center - p).squaredNorm() - SQR(b.radius)); } + double minimumOnObject(const BallType &b) { ++calls; return (std::max)(0., (b.center - p).squaredNorm() - SQR(b.radius)); } double minimumOnVolumeVolume(const BoxType &r1, const BoxType &r2) { ++calls; return r1.squaredExteriorDistance(r2); } - double minimumOnVolumeObject(const BoxType &r, const BallType &b) { ++calls; return SQR(std::max(0., r.exteriorDistance(b.center) - b.radius)); } - double minimumOnObjectVolume(const BallType &b, const BoxType &r) { ++calls; return SQR(std::max(0., r.exteriorDistance(b.center) - b.radius)); } - double minimumOnObjectObject(const BallType &b1, const BallType &b2){ ++calls; return SQR(std::max(0., (b1.center - b2.center).norm() - b1.radius - b2.radius)); } + double minimumOnVolumeObject(const BoxType &r, const BallType &b) { ++calls; return SQR((std::max)(0., r.exteriorDistance(b.center) - b.radius)); } + double minimumOnObjectVolume(const BallType &b, const BoxType &r) { ++calls; return SQR((std::max)(0., r.exteriorDistance(b.center) - b.radius)); } + double minimumOnObjectObject(const BallType &b1, const BallType &b2){ ++calls; return SQR((std::max)(0., (b1.center - b2.center).norm() - b1.radius - b2.radius)); } double minimumOnVolumeObject(const BoxType &r, const VectorType &v) { ++calls; return r.squaredExteriorDistance(v); } - double minimumOnObjectObject(const BallType &b, const VectorType &v){ ++calls; return SQR(std::max(0., (b.center - v).norm() - b.radius)); } + double minimumOnObjectObject(const BallType &b, const VectorType &v){ ++calls; return SQR((std::max)(0., (b.center - v).norm() - b.radius)); } VectorType p; int calls; |