00001
00002
00003
00004
00005
00006
00007
00008 #ifndef CAMERA_H_
00009 #define CAMERA_H_
00010
00011 #include "../Common/Types.h"
00012 #include "../Common/Vector.h"
00013 #include "../Common/Constants.h"
00014
00015 class Camera {
00016 private:
00017 Vector eye;
00018 Vector u,v,n;
00019 real viewAngle, aspect, nearDist, farDist;
00020 void setModelViewMatrix();
00021
00022 public:
00023 Camera();
00024 void set(Vector eye, Vector look, Vector up);
00025 void roll(real angle);
00026 void yaw(real angle);
00027 void pitch(real angle);
00028 void slide(real delU, real delV, real delN);
00029 void setShape(real vAng, real asp, real nearD, real farD);
00030 void rotate(real angle);
00031
00032 Vector getN() const {
00033 return Vector(n.getX(),0.0,n.getZ()).unit();
00034 }
00035 };
00036
00037 #endif