include/scene.h
branchpyrit
changeset 79 062b1c4143f7
parent 78 9569e9f35374
child 80 907929fa9b59
--- a/include/scene.h	Wed Apr 23 10:38:33 2008 +0200
+++ b/include/scene.h	Wed Apr 23 14:39:33 2008 +0200
@@ -81,22 +81,6 @@
 };
 
 /**
- * axis-aligned bounding box
- */
-class BBox
-{
-public:
-	Vector3 L;
-	Vector3 H;
-	BBox(): L(), H() {};
-	BBox(const Vector3 aL, const Vector3 aH): L(aL), H(aH) {};
-	Float w() { return H.x-L.x; };
-	Float h() { return H.y-L.y; };
-	Float d() { return H.z-L.z; };
-	bool intersect(const Ray &ray, Float &a, Float &b);
-};
-
-/**
  * light object
  */
 class Light
@@ -114,45 +98,19 @@
 };
 
 /**
- * texture
+ * axis-aligned bounding box
  */
-class Texture
-{
-public:
-	virtual ~Texture() {};
-	virtual Colour evaluate(Vector3 point) = 0;
-};
-
-/**
- * material
- */
-class Material
+class BBox
 {
 public:
-	Colour colour;
-	Texture *texture;
-	Float ambient, diffuse, specular, shininess; // Phong constants
-	Float reflectivity; // how much reflective is the surface
-	Float transmissivity, refract_index; // part of light which can be refracted; index of refraction
-	bool smooth; // triangle smoothing
-
-	Material(const Colour &acolour): colour(acolour), texture(NULL), smooth(false)
-	{
-		ambient = 0.2;
-		diffuse = 0.8;
-		specular = 0.2;
-		shininess = 0.5;
-		reflectivity = 0.2;
-		transmissivity = 0.0;
-		refract_index = 1.3;
-	}
-
-	void setPhong(const Float amb, const Float dif, const Float spec, const Float shin)
-		{ ambient = amb; diffuse = dif; specular = spec; shininess = shin; };
-	void setReflectivity(const Float refl) { reflectivity = refl; };
-	void setTransmissivity(const Float trans, const Float rindex)
-		{ transmissivity = trans; refract_index = rindex; };
-	void setSmooth(bool sm) { smooth = sm; };
+	Vector3 L;
+	Vector3 H;
+	BBox(): L(), H() {};
+	BBox(const Vector3 aL, const Vector3 aH): L(aL), H(aH) {};
+	Float w() { return H.x-L.x; };
+	Float h() { return H.y-L.y; };
+	Float d() { return H.z-L.z; };
+	bool intersect(const Ray &ray, Float &a, Float &b);
 };
 
 #endif