From: Charles McGarvey Date: Wed, 26 May 2010 19:56:18 +0000 (-0600) Subject: fixes for newer versions of g++ X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=commitdiff_plain;h=85783316365181491a3e3c0c63659972477cebba fixes for newer versions of g++ --- 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);