• Main Page
  • Classes
  • Files
  • File List

Engine/Camera.h

00001 /*
00002  * Camera.h
00003  *
00004  *  Created on: 2010-11-21
00005  *      Author: krejziwan
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; // view volume shape
00020         void setModelViewMatrix(); // tell OpenGL where the camera is
00021 
00022 public:
00023         Camera();
00024         void set(Vector eye, Vector look, Vector up); // like gluLookAt()
00025         void roll(real angle); // roll it
00026         void yaw(real angle); // yaw it
00027         void pitch(real angle); // pitch it
00028         void slide(real delU, real delV, real delN); // slide it
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 /* CAMERA_H_ */

Generated on Sun Dec 5 2010 19:03:32 for Snook3d by  doxygen 1.7.2