00001
00006 #ifndef CAMERA_H
00007 #define CAMERA_H
00008
00009 #include "ConMath.h"
00010 #include "timer.h"
00011
00012 class IO_Window;
00013
00014 class Camera
00015 {
00016 public:
00018 Camera (void) { }
00019
00022 Camera (Vector pos, Vector fwd, Vector up);
00023
00025 void WritePosition (void);
00026
00028 void Update (IO_Window *win);
00029
00031 void Get (Vector *pos, Vector *fwd, Vector *up, Vector *right) const;
00032
00033
00035 void Set (Vector pos, Vector fwd, Vector up);
00036
00037 private:
00038
00039 void realign (void)
00040 {
00041 f.Normalize ();
00042 r = u.Cross (f);
00043 r.Normalize ();
00044 u = f.Cross (r);
00045 u.Normalize ();
00046 }
00047
00048
00049 Vector p;
00050
00051
00052 Vector f;
00053
00054
00055 Vector u;
00056
00057
00058 Vector r;
00059
00060
00061 double vf, vu, vr;
00062
00063
00064 Timer timer;
00065 };
00066
00067 #endif