Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b5281306a8
Fetching contributors…

Cannot retrieve contributors at this time

executable file 34 lines (31 sloc) 0.705 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
#ifndef CAMERA
#define CAMERA
#include "math/Vector3.h"
#include "math/Utility.h"
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif

//Enumeration used in some camera functions
enum Direction {UP, DOWN, LEFT, RIGHT};

/* Class Camera
* Contains the necesary information about the camera
*/
class Camera
{
 private:
  Vector3 pos, dir;
  GLfloat angleXZ, angleXY, r;

 public:
  Camera(void);
  Camera(Vector3 dest, GLfloat angleXZ, GLfloat angleXY, GLfloat r);
  void setUp(void);
  Vector3 getPos(void);
  Vector3 getDir(void);
  void setPos(Vector3 pos);
  void setDir(Vector3 dir);
  void rotate(Direction d, GLfloat delta);
  void move(Direction d, GLfloat delta);
};
#endif
Something went wrong with that request. Please try again.