]> Dogcows Code - chaz/yoink/blobdiff - src/moof/plane.cc
remove some unused stlplus modules
[chaz/yoink] / src / moof / plane.cc
index 4a175b0932cc0ded5f8039bcf3491cc6d215b3c3..dc9ce2d62a4116e8735327ea9fd9130cc4ef10da 100644 (file)
@@ -1,13 +1,11 @@
 
-/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+/*]  Copyright (c) 2009-2011, 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"
 namespace moof {
 
 
-plane::halfspace plane::intersects(const aabb<3>& aabb) const
+plane::halfspace plane::intersects(const aabb3& aabb) const
 {
-       vector3 corners[8];
        int nPositive = 8;
-
+       vector3 corners[8];
        aabb.get_corners(corners);
 
        for (int i = 0; i < 8; ++i)
        {
-               if (intersects(corners[i]) == negative)
-               {
-                       --nPositive;
-               }
+               if (intersects(corners[i]) == negative) --nPositive;
        }
 
-       if (nPositive == 0)      return negative;
+       if (nPositive == 0) return negative;
        else if (nPositive == 8) return positive;
-       else                     return intersecting;
+       return intersecting;
 }
 
-plane::halfspace plane::intersects(const sphere<3>& sphere) const
+plane::halfspace plane::intersects(const sphere3& sphere) const
 {
        scalar distance = distance_to_point(sphere.point);
 
-       if (distance < -sphere.radius)     return negative;
+       if (distance < -sphere.radius) return negative;
        else if (distance < sphere.radius) return intersecting;
-       else                               return positive;
+       return positive;
 }
 
 
This page took 0.022723 seconds and 4 git commands to generate.