src/scene.h
branchpyrit
changeset 19 4e0955fca797
parent 15 a0a3e334744f
child 20 f22952603f29
equal deleted inserted replaced
18:25b7c445cf61 19:4e0955fca797
    20 {
    20 {
    21 public:
    21 public:
    22 	Vector3 o, dir;
    22 	Vector3 o, dir;
    23 	Ray(const Vector3 &ao, const Vector3 &adir):
    23 	Ray(const Vector3 &ao, const Vector3 &adir):
    24 		o(ao), dir(adir) {};
    24 		o(ao), dir(adir) {};
       
    25 };
       
    26 
       
    27 class Camera
       
    28 {
       
    29 public:
       
    30 	Vector3 eye, p, u, v;
       
    31 	float f;
       
    32 
       
    33 	Camera(): eye(0,0,10), p(0,0,-1), u(-1,0,0), v(0,1,0), f(3.14/4.0) {};
       
    34 	Camera(const Vector3 &C, const Vector3 &ap, const Vector3 &au, const Vector3 &av):
       
    35 		eye(C), p(ap), u(au), v(av), f(3.14/4.0) {};
       
    36 	void setEye(const Vector3 &aeye) { eye = aeye; };
       
    37 	void setFocusLength(const float af) { f = af; };
    25 };
    38 };
    26 
    39 
    27 /* axis-aligned bounding box */
    40 /* axis-aligned bounding box */
    28 class BBox
    41 class BBox
    29 {
    42 {