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

camera.h

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   //added by Dave
00035   void Set (Vector pos, Vector fwd, Vector up);
00036 
00037 private:
00038   /* realigns the camera axes */
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   /* position vector */
00049   Vector p;
00050 
00051   /* forward vector */
00052   Vector f;
00053 
00054   /* up vector */
00055   Vector u;
00056 
00057   /* right vector */
00058   Vector r;
00059 
00060   /* velocity */
00061   double vf, vu, vr;
00062 
00063   /* timer */
00064   Timer timer;
00065 };
00066 
00067 #endif

Generated on Fri Jan 12 14:15:02 2007 for Construct by  doxygen 1.4.3-20050530