#ifndef _MOOF_SHAPE_HH_
#define _MOOF_SHAPE_HH_
-#include <Moof/Drawable.hh>
-#include <Moof/Math.hh>
-#include <Moof/OpenGL.hh>
-#include <Moof/Ray.hh>
-
-
-// Frustum
-// Plane (can construct from Triangle3)
-// Ray
-// Shape<>
-// +- Line<>
-// - Line2 Line<2>
-// - Line3 Line<3>
-// +- Sphere<>
-// | Sphere2, Circle Sphere<2>
-// | Sphere3 Sphere<3>
-// +- Aabb<>
-// | Aabb2, Rectangle Aabb<2>
-// | Aabb3 Aabb<3>
-// +- Polygon<>
-// | Triangle2 Polygon<2,3>
-// | Triangle3 Polygon<3,3>
-
-
-namespace Mf {
+/**
+ * \file shape.hh
+ * Declares an interface for shapes.
+ */
+
+#include <moof/drawable.hh>
+#include <moof/math.hh>
+#include <moof/opengl.hh>
+#include <moof/ray.hh>
+
+
+// frustum
+// plane (can construct from triangle2)
+// ray
+// shape<>
+// +- line<>
+// - line2 line<2>
+// - line3 line<3>
+// +- sphere<>
+// | sphere2, circle sphere<2>
+// | sphere3 sphere<3>
+// +- aabb<>
+// | aabb2, rectangle aabb<2>
+// | aabb3 aabb<3>
+// +- polygon<>
+// | triangle2 polygon<2,3>
+// | triangle3 polygon<3,3>
+
+
+namespace moof {
template <int D>
-class Shape
+class shape
{
public:
- virtual ~Shape() {}
+ virtual ~shape() {}
/**
* Checks if this shape is intersected by a given ray. If so, returns
* about the contact via the 2nd parameter. A negative value is
* returned if there is no contact.
*/
- virtual bool intersectRay(const Ray<D>& ray,
- typename Ray<D>::Contact& hit) const
+ virtual bool intersect_ray(const ray<D>& ray,
+ typename ray<D>::contact& hit) const
{
return false;
}
};
-typedef Shape<2> Shape2;
-typedef Shape<3> Shape3;
+typedef shape<2> shape2;
+typedef shape<3> shape3;
-} // namespace Mf
+} // namespace moof
#endif // _MOOF_SHAPE_HH_