include/scene.h
branchpyrit
changeset 53 228cb8bfdd54
parent 50 14a727b70d07
child 60 a23b5089b9c3
equal deleted inserted replaced
52:a6413a3d741d 53:228cb8bfdd54
    72 	void setEye(const Vector3 &aeye) { eye = aeye; };
    72 	void setEye(const Vector3 &aeye) { eye = aeye; };
    73 	void setFocalLength(const Float af) { f = af; F = 0.5/f; };
    73 	void setFocalLength(const Float af) { f = af; F = 0.5/f; };
    74 	void rotate(const Quaternion &q);
    74 	void rotate(const Quaternion &q);
    75 	void move(const Float fw, const Float left, const Float up);
    75 	void move(const Float fw, const Float left, const Float up);
    76 
    76 
    77 	Ray makeRay(Sample *samp);
    77 	Ray makeRay(Sample &samp)
       
    78 	{
       
    79 		Vector3 dir = p + (u*samp.x - v*samp.y)*F;
       
    80 		dir.normalize();
       
    81 		return Ray(eye, dir);
       
    82 	};
    78 };
    83 };
    79 
    84 
    80 /**
    85 /**
    81  * axis-aligned bounding box
    86  * axis-aligned bounding box
    82  */
    87  */