]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Sphere.hh
game loop tweaks; shapes hierarchy defined
[chaz/yoink] / src / Moof / Sphere.hh
index 3cd1ec7a073c05b00988ea97c2c4565afb89ba8c..d42bfd8a98fa8e643494c7b242f8e659c1893da9 100644 (file)
@@ -61,7 +61,7 @@ struct Sphere : public Cullable, public Drawable, public Shape<D>
 
 
        // a ray inside the sphere will not intersect on its way out
-       bool intersectRay(const Ray<D>& ray, typename Ray<D>::Intersection& hit)
+       bool intersectRay(const Ray<D>& ray, typename Ray<D>::Contact& hit)
        {
                Vector b = point - ray.point;
                Scalar z = cml::dot(b, ray.direction);
@@ -163,6 +163,11 @@ inline bool checkCollision(const Sphere<D>& a, const Sphere<D>& b)
 }
 
 
+typedef Sphere<2>      Sphere2;
+typedef Sphere2        Circle;
+typedef Sphere<3>      Sphere3;
+
+
 } // namespace Mf
 
 #endif // _MOOF_SPHERE_HH_
This page took 0.020643 seconds and 4 git commands to generate.