BambooIsland: C:/Users/easterbunny/Desktop/Echtzeitgraphik-LU/trunk/src/Camera.h Source File

BambooIsland Abgabe 2

- Main Page
- Related Pages
- Classes
- Files

- File List

# C:/Users/easterbunny/Desktop/Echtzeitgraphik-LU/trunk/src/Camera.h

    00001 /*
    00002  * header file for Camera class
    00003  * written by: christian moellinger <ch.moellinger@gmail.com>
    00004  * 10/2010
    00005  */
    00006
    00007 #pragma once
    00008
    00009 #ifndef __realtime_lu_camera
    00010 #define __realtime_lu_camera
    00011
    00012 #include <glm/glm.hpp>
    00013 #include <fstream>
    00014
    00015 class Camera
    00016 {
    00017     public:
    00019         enum CameraMode
    00020         {
    00021             Record, Replay
    00022         };
    00023
    00024     private:
    00026         CameraMode m_mode;
    00027
    00029         double m_dRecordReplayTimer;
    00030
    00032         double m_dLastReplayedTime;
    00033
    00035         glm::mat4 m_m4ProjectionMatrix;
    00036
    00038         glm::mat4 m_m4ModelViewMatrix;
    00039
    00041         glm::mat4 m_m4SavedModelViewMatrix;
    00042
    00044         glm::mat4 m_m4SavedProjectionMatrix;
    00045
    00047         //glm::mat4 m_m4TempModelViewMatrix;
    00048         glm::mat4 m_m4LightProjModelViewMatrix;
    00049
    00050         glm::mat4 m_m4LastFrameProjMatrix;
    00051         glm::mat4 m_m4LastFrameModelViewMatrix;
    00052
    00054         glm::vec3 m_v3Position;
    00055
    00057         glm::vec3 m_v3MovingVector;
    00058
    00060         double m_dRotationX;
    00061
    00063         double m_dRotationY;
    00064
    00066         std::ofstream m_camera_recorder;
    00067
    00069         std::ifstream m_camera_path;
    00070
    00072         Camera(glm::vec3 position, double dRotationX, double dRotationY);
    00073
    00074         //Disable by defining it as private (else, the compiler generates it per default as public)
    00075         Camera(Camera &p) {};
    00076
    00077         //Destructor
    00078         ~Camera();
    00079
    00080     public:
    00082         static Camera *instance();
    00083
    00085         void addToMoveVector(glm::vec3 v3Vector);
    00086
    00088         void incRotationX(float value);
    00089
    00091         void incRotationY(float value);
    00092
    00094         void setMode(CameraMode mode);
    00095
    00096         //void setTemporaryLookAt(glm::vec3 pos, glm::vec3 lookAtPoint, glm::vec3 upVector);
    00097
    00098         void setLightMatrixForShadowMapping();
    00099
    00100         void unsetLightMatrix();
    00101
    00103         glm::mat4 getModelviewMatrix() const;
    00104
    00106         glm::mat4 getInverseTranslationMatrix() const;
    00107
    00109         glm::mat4 getProjectionMatrix() const;
    00110
    00112         glm::mat4 getUsedTemporaryMatrix() const;
    00113         glm::mat4 getUsedLightProjModelViewMatrix() const;
    00114
    00115         glm::mat4 getLastFrameModelViewMatrix() const;
    00116
    00117         void move();
    00118 };
    00119
    00120 #endif // QFP_CAMERA_H

All Classes Functions Variables Enumerations Enumerator