X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FSphere.hh;h=d42bfd8a98fa8e643494c7b242f8e659c1893da9;hp=3cd1ec7a073c05b00988ea97c2c4565afb89ba8c;hb=76b3f4be992514a740ac03cdbdd57844142a0b4c;hpb=b714ba98cb92a1be42acba91d44fe5bfb0783a3b diff --git a/src/Moof/Sphere.hh b/src/Moof/Sphere.hh index 3cd1ec7..d42bfd8 100644 --- a/src/Moof/Sphere.hh +++ b/src/Moof/Sphere.hh @@ -61,7 +61,7 @@ struct Sphere : public Cullable, public Drawable, public Shape // a ray inside the sphere will not intersect on its way out - bool intersectRay(const Ray& ray, typename Ray::Intersection& hit) + bool intersectRay(const Ray& ray, typename Ray::Contact& hit) { Vector b = point - ray.point; Scalar z = cml::dot(b, ray.direction); @@ -163,6 +163,11 @@ inline bool checkCollision(const Sphere& a, const Sphere& b) } +typedef Sphere<2> Sphere2; +typedef Sphere2 Circle; +typedef Sphere<3> Sphere3; + + } // namespace Mf #endif // _MOOF_SPHERE_HH_