Advertisement
thecplusplusguy

GLSL tutorial 1 - camera.h

Jul 26th, 2012
3,315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.92 KB | None | 0 0
  1. //http://www.youtube.com/user/thecplusplusguy
  2. #ifndef CAMERA_H
  3. #define CAMERA_H
  4. #include <cmath>
  5. #include <iostream>
  6. #include <SDL/SDL.h>
  7. #include <GL/gl.h>
  8. #include <GL/glu.h>
  9. #include "vector3d.h"
  10.  
  11. class camera{
  12.     vector3d loc;
  13.     float camPitch,camYaw;
  14.     float movevel;
  15.     float mousevel;
  16.     bool mi,ismoved;
  17.     void lockCamera();
  18.     void moveCamera(float dir);
  19.     void moveCameraUp(float dir);
  20.     public:
  21.         camera();
  22.         camera(vector3d loc);
  23.         camera(vector3d loc,float yaw,float pitch);
  24.         camera(vector3d loc,float yaw,float pitch,float mv,float mov);
  25.         void Control();
  26.         void UpdateCamera();
  27.         vector3d getVector();
  28.         vector3d getLocation();
  29.         float getPitch();
  30.         float getYaw();
  31.         float getMovevel();
  32.         float getMousevel();
  33.         bool isMouseIn();
  34.        
  35.         void setLocation(vector3d vec);
  36.         void lookAt(float pitch,float yaw);
  37.         void mouseIn(bool b);
  38.         void setSpeed(float mv,float mov);
  39.        
  40.         bool isMoved();
  41. };
  42.  
  43. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement