include/scene.h
branchpyrit
changeset 73 a5127346fbcd
parent 72 7c3f38dff082
child 78 9569e9f35374
--- a/include/scene.h	Sun Apr 20 16:48:24 2008 +0200
+++ b/include/scene.h	Sun Apr 20 19:27:59 2008 +0200
@@ -66,18 +66,18 @@
 	Vector3 eye, p, u, v;
 	Float F;
 
-	Camera(): eye(0,0,10), p(0,0,-1), u(-1,0,0), v(0,1,0), F(0.7071) {};
+	Camera(): eye(0,0,10), p(0,0,-1), u(-1,0,0), v(0,1,0), F(2.*tan(M_PI/8.)) {};
 	Camera(const Vector3 &C, const Vector3 &ap, const Vector3 &au, const Vector3 &av):
-		eye(C), p(ap), u(au), v(av), F(0.7071) {};
+		eye(C), p(ap), u(au), v(av), F(2.*tan(M_PI/8.)) {};
 	Camera(const Vector3 &from, const Vector3 &lookat, const Vector3 &up):
-		eye(from), F(0.7071)
+		eye(from), F(2.*tan(M_PI/8.))
 	{
 		p = lookat - from; u = cross(up, p);
 		p.normalize(); u.normalize();
 		v = cross(p, u);
 	};
 	void setEye(const Vector3 &aeye) { eye = aeye; };
-	void setAngle(const Float angle) { F = sin(angle); };
+	void setAngle(const Float angle) { F = 2.*tan(angle/2.); };
 	void rotate(const Quaternion &q);
 	void move(const Float fw, const Float left, const Float up);