Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

camera.h

Go to the documentation of this file.
00001 #ifndef __camera_h_
00002 #define __camera_h_
00003 
00008 #include <iostream>
00009 //#include <GL/glut.h>
00010 //#include "graphics.h"
00011 #include "mymath.h"
00012 #include "player_base.h"
00013 
00014 class vehicle;
00021 class camera
00022 {
00023 public:
00024 
00025   //friend class player;
00026   //friend class ai;
00027   friend class plane;
00028   //friend class gun;
00029   //friend class hud;
00030   friend class scene;
00031 
00032   camera(void);
00033   virtual ~camera(void);
00034 
00035   void reset();
00036 
00037   void LookAt(player_base* const play);
00038   void LookAtSpecial(player_base* const play);
00039 
00040   void detect_collision(player_base* const play);
00041 
00043   void LookAt();
00044 
00045   void RotateLeft(double degrees);
00046   void RotateRight(double degrees);
00047   void RotateUp(double degrees);
00048   void RotateDown(double degrees);
00049 
00050   void Forward(double speed);
00051   void Backward(double speed);
00052   void Left(double speed);
00053   void Right(double speed);
00054 
00056   void mouse_special(int x,int y);
00057 
00058   virtual void process_keyboard( bool keydown[256]);
00059   virtual void process_special( bool keydown[256]){};
00060 
00062   void RotateView(double angle, double X, double Y, double Z);
00063 
00065   double fact;
00066 
00067   bool look_behind;
00068 
00069 protected:
00070 
00072   myvector eye;    
00074   myvector f;      
00076   myvector up;     
00078   myvector l;      
00079 
00080 };
00081 
00082 #endif