00001
00008 #ifndef _CAMERA_H_
00009 #define _CAMERA_H_
00010
00011 #include "globals.h"
00012 #include "mat.h"
00013
00018 class TCamera
00019 {
00020 protected:
00022 TVector pos;
00024 TVector rot;
00026 TVector look;
00028 TMatrix projection;
00030 TMatrix modelview;
00032 TMatrix transform;
00033
00034 public:
00035 TCamera();
00036 ~TCamera(){}
00037
00038 TMatrix Move(GLfloat wx, GLfloat wy, GLfloat wz);
00039 TMatrix MoveAbs(GLfloat wx, GLfloat wy, GLfloat wz);
00040
00041 TMatrix Rotate(GLfloat angle, GLint axis);
00042 TMatrix RotateAbs(GLfloat angle, GLint axis);
00043
00044 TMatrix LookAt(GLfloat wx, GLfloat wy, GLfloat wz);
00045
00046 void UpdateMatrix();
00047
00049 TVector GetPos() { return pos; }
00051 TVector GetRot() { return rot; }
00053 TVector GetLook() { return look; }
00054
00056 void Reset()
00057 { pos.Set(0,0,0,0); rot.Set(0,0,0,0); look.Set(0,0,0,0); }
00058
00060 void RenderCamera()
00061 { glMultMatrixf(transform); }
00062 };
00063
00064 #endif