00001
00027 #ifndef _CCAMERA_
00028 #define _CCAMERA_
00029
00030 #include "structures.h"
00031 #include "Singleton.h"
00032
00033 class CCamera: public CSingleton<CCamera> {
00034
00035 public:
00036
00041 void setPosition(Vertex3f position) {
00042 m_position = position;
00043 }
00044
00049 void setRotation(Vertex3f rotation) {
00050 m_rotation = rotation;
00051 }
00052
00057 void setTarget(Vertex3f position) {
00058 m_target = position;
00059 }
00060
00067 void setPosition(float x, float y, float z) {
00068 m_position . x = x;
00069 m_position . y = y;
00070 m_position . z = z;
00071 }
00072
00079 void setRotation(float x, float y, float z) {
00080 m_rotation . x = x;
00081 m_rotation . y = y;
00082 m_rotation . z = z;
00083 }
00084
00091 void setTarget(float x, float y, float z) {
00092 m_target . x = x;
00093 m_target . y = y;
00094 m_target . z = z;
00095 }
00096
00101 void setPositionX(float x) {
00102 m_position . x = x;
00103 }
00104
00109 void setPositionY(float y) {
00110 m_position . y = y;
00111 }
00112
00117 void setPositionZ(float z) {
00118 m_position . z = z;
00119 }
00120
00125 void setTargetX(float x) {
00126 m_target . x = x;
00127 }
00128
00133 void setTargetY(float y) {
00134 m_target . y = y;
00135 }
00136
00141 void setTargetZ(float z) {
00142 m_target . z = z;
00143 }
00144
00149 void movePositionX(float step) {
00150 m_position . x += step;
00151 }
00152
00157 void movePositionY(float step) {
00158 m_position . y += step;
00159 }
00160
00165 void movePositionZ(float step) {
00166 m_position . z += step;
00167 }
00168
00173 void setAngle(GLfloat angle) {
00174 m_angle = angle;
00175 }
00176
00181 GLfloat getAngle() {
00182 return m_angle;
00183 }
00184
00188 void look();
00189
00190 private:
00191
00195 Vertex3f m_position;
00196
00200 Vertex3f m_rotation;
00201
00205 Vertex3f m_target;
00206
00210 GLfloat m_angle;
00211
00212 };
00213
00214 #endif
00215