From 85783316365181491a3e3c0c63659972477cebba Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Wed, 26 May 2010 13:56:18 -0600 Subject: [PATCH] fixes for newer versions of g++ --- src/moof/line.hh | 5 +++-- src/moof/plane.hh | 2 +- src/moof/shape.hh | 2 +- src/moof/sphere.hh | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/moof/line.hh b/src/moof/line.hh index b40e7cf..35ebf29 100644 --- a/src/moof/line.hh +++ b/src/moof/line.hh @@ -138,7 +138,7 @@ struct line : public drawable, public shape } - bool intersect_ray(const ray<2>& ray, ray<2>::contact& hit) const + bool intersect_ray(const ray<2>& ray, moof::ray<2>::contact& hit) const { vector2 v1 = a - ray.point; scalar a1 = signed_angle_2D(v1, b - ray.point); @@ -247,7 +247,8 @@ struct polygon : public drawable, public shape polygon() {} - bool intersect_ray(const ray& ray, typename ray::contact& hit) + bool intersect_ray(const ray& ray, + typename moof::ray::contact& hit) { return false; } diff --git a/src/moof/plane.hh b/src/moof/plane.hh index 3de87e4..5605831 100644 --- a/src/moof/plane.hh +++ b/src/moof/plane.hh @@ -53,7 +53,7 @@ struct plane : public shape<3> d(scalar) {} - bool intersect_ray(const ray<3>& ray, ray<3>::contact& hit) + bool intersect_ray(const ray3& ray, ray3::contact& hit) { // solve: [(ray.point + t*ray.direction) dot normal] + d = 0 diff --git a/src/moof/shape.hh b/src/moof/shape.hh index 7f97503..25c8c2a 100644 --- a/src/moof/shape.hh +++ b/src/moof/shape.hh @@ -58,7 +58,7 @@ public: * returned if there is no contact. */ virtual bool intersect_ray(const ray& ray, - typename ray::contact& hit) const + typename moof::ray::contact& hit) const { return false; } diff --git a/src/moof/sphere.hh b/src/moof/sphere.hh index dd4dece..cf1bba7 100644 --- a/src/moof/sphere.hh +++ b/src/moof/sphere.hh @@ -109,7 +109,8 @@ struct sphere : public cullable, public drawable, public shape } // a ray inside the sphere will not intersect on its way out - bool intersect(const ray& ray, typename ray::contact& hit) const + bool intersect(const ray& ray, + typename moof::ray::contact& hit) const { vector b = point - ray.point; scalar z = dot(b, ray.direction); -- 2.45.2