]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Plane.cc
the massive refactoring effort
[chaz/yoink] / src / Moof / Plane.cc
diff --git a/src/Moof/Plane.cc b/src/Moof/Plane.cc
deleted file mode 100644 (file)
index 5c4d9fd..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-
-/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
-**]  All rights reserved.
-*
-* vi:ts=4 sw=4 tw=75
-*
-* Distributable under the terms and conditions of the 2-clause BSD license;
-* see the file COPYING for a complete text of the license.
-*
-**************************************************************************/
-
-#include "Aabb.hh"
-#include "Plane.hh"
-#include "Sphere.hh"
-
-
-namespace Mf {
-
-
-Plane::Halfspace Plane::intersects(const Aabb<3>& aabb) const
-{
-       Vector3 corners[8];
-       int nPositive = 8;
-
-       aabb.getCorners(corners);
-
-       for (int i = 0; i < 8; ++i)
-       {
-               if (intersects(corners[i]) == NEGATIVE)
-               {
-                       --nPositive;
-               }
-       }
-
-       if (nPositive == 0)      return NEGATIVE;
-       else if (nPositive == 8) return POSITIVE;
-       else                     return INTERSECT;
-}
-
-Plane::Halfspace Plane::intersects(const Sphere<3>& sphere) const
-{
-       Scalar distance = getDistanceToPoint(sphere.point);
-
-       if (distance < -sphere.radius)     return NEGATIVE;
-       else if (distance < sphere.radius) return INTERSECT;
-       else                               return POSITIVE;
-}
-
-
-} // namespace Mf
-
This page took 0.02074 seconds and 4 git commands to generate.