Krig Game Engine
Camera.h
Go to the documentation of this file.
1 
7 #ifndef _CAMERA_H_
8 #define _CAMERA_H_
9 
10 #include "Object.h"
11 #include "Frustum.h"
12 
13 class Camera : public Object {
14  public:
15  Camera();
16  Camera(const int&);
17  virtual ~Camera();
18 
19  void update(const float&);
20  void setCamera(const Vector&, const Vector&, const Quaternion&, const Vector&);
21  void prepareGLView();
22 
23  // accessor functions
24  void getRotationMatrix(Matrix &m) const;
25 
26  void printTypeName() { PRINT_DEBUG("Camera\n"); }
27  void buildLuaObjectTable(lua_State *L);
28 
29  void draw(Object*);
30 
31  Frustum *getFrustum();
32 
33  void drawOutline(Object*) {}; // Camera*
34  void drawShadow(Vector*) {}
35 
36  void handleCollision(Object*) {};
37  void update(Vector*) {};
38  void prepare() {};
39  void animate(const float&, Object*) {}; // Camera*
40 
41  void setProjectionMatrix();
42 
43  Matrix rotationMatrix; // send to rendering library
44  Frustum frustum;
45  Matrix projectionMatrix;
46  Matrix modelViewMatrix;
47 
48  Quaternion worldRotation;
49 
50  Matrix final;
51  int id_;
52 
53  private:
54  void initialize();
55 };
56 
57 #endif
Definition: Quaternion.h:14
Definition: Object.h:35
Representation of the view's Frustum.
Definition: Vector.h:15
Definition: matrix.h:15
Base game object from which all concrete types are defined.
Definition: Camera.h:13
Definition: Frustum.h:15