src/scene.cc
branchpyrit
changeset 8 e6567b740c5e
parent 7 bf17f9f84c91
child 12 f4fcabf05785
--- a/src/scene.cc	Thu Nov 22 17:53:34 2007 +0100
+++ b/src/scene.cc	Thu Nov 22 18:10:10 2007 +0100
@@ -71,6 +71,18 @@
 	return false;
 }
 
+BBox Sphere::get_bbox()
+{	
+	BBox bbox = BBox();
+	bbox.L.x = center.x - radius;
+	bbox.L.y = center.y - radius;
+	bbox.L.z = center.z - radius;
+	bbox.R.x = center.x + radius;
+	bbox.R.y = center.y + radius;
+	bbox.R.z = center.z + radius;
+	return bbox;
+}
+
 bool Plane::intersect(const Ray &ray, float &dist)
 {
 	float dir = dot(N, ray.dir);
@@ -85,6 +97,11 @@
 	return false;
 }
 
+BBox Plane::get_bbox()
+{	
+	return BBox();
+}
+
 // this initialization and following intersection methods implements
 // Fast Triangle Intersection algorithm from
 // http://www.mpi-inf.mpg.de/~wald/PhD/