/************************************************ * * Project Information: Classe Caméra * * Filename: CCamera.h * Version : 0.0.2-dev * Last Update: 23-01-2004 * * Author: Romain Gaucher -- nEUrOO * E-mail: neuroo@kouette.com * Date : 23-01-2004 * * Comment: Utilisation d'une caméra dans OpenGL * ***********************************************/ #ifndef __O_CCAMERA_H #define __O_CCAMERA_H #include "CMaths.hpp" #include "CVector3.hpp" class CCamera { CVector3 EyeDir; CVector3 RightVector; CVector3 UpVector; CVector3 Position; float masse; float inertie; float RotX, RotY, RotZ; public: CCamera(): EyeDir(MakeVect3(0.0f,0.0f,-1.0f)), RightVector(MakeVect3(1.0f,0.0f,0.0f)), UpVector(MakeVect3(0.0f,1.0f,0.0f)), Position(NULL_VECTOR), RotX(0.0f), RotY(0.0f), RotZ(0.0f), inertie(0.0f), masse(0.0f) {} CCamera(float z) { EyeDir = MakeVect3(0.0f,0.0f,-1.0f), RightVector = MakeVect3(1.0f,0.0f,0.0f), UpVector = MakeVect3(0.0f,1.0f,0.0f), Position = MakeVect3(0.0f,0.0f,z), RotX = (0.0f), RotY = (0.0f), inertie = (0.0f), masse = (10.0f), RotZ = (0.0f); } ~CCamera() {} void Rendering(); void Init(); void RotateX (float angle); void RotateY (float angle); void RotateZ (float angle); void Move (CVector3 direction); void MoveForward (float len); void MoveUpward (float len); void StrafeRight (float len); void StrafeLeft (float len); void GetEyeDir(float &u, float &v, float &w, float &z); }; #endif /************************************************ * * 23-01-2004: Creation du source (Romain) * Debugage des rotations * (fonction m_sin/m_cos p-ê pas assez * précises) * ***********************************************/