InVoxel() for all Primitives, including fix for Triangle::CalcBounds()
authorRoland Hieber <rhieber@gaffel.ibr.cs.tu-bs.de>
Wed, 3 Feb 2010 02:16:41 +0000 (03:16 +0100)
committerRoland Hieber <rhieber@gaffel.ibr.cs.tu-bs.de>
Wed, 3 Feb 2010 02:16:41 +0000 (03:16 +0100)
InfinitePlane.cxx
Sphere.cxx
Triangle.cxx

index 13d6e53..93e165f 100644 (file)
@@ -55,5 +55,5 @@ InfinitePlane::CalcBounds()
 bool
 InfinitePlane::InVoxel(const Box& box)
 {
-  return false;
+  return CalcBounds().Overlaps(box);
 }
index 6060361..137ce8f 100644 (file)
@@ -62,5 +62,5 @@ Sphere::CalcBounds()
 bool
 Sphere::InVoxel(const Box& box)
 {
-  return false;
+  return CalcBounds().Overlaps(box);
 }
index b718555..873f440 100644 (file)
@@ -68,11 +68,11 @@ Triangle::CalcBounds()
   bounds.Extend(m_a);
   bounds.Extend(m_b);
   bounds.Extend(m_c);
-  return Box();
+  return bounds;
 }
 
 bool
 Triangle::InVoxel(const Box& box)
 {
-  return false;
+  return CalcBounds().Overlaps(box);
 }
This page took 0.025716 seconds and 4 git commands to generate.