31#include "hpl1/engine/math/Frustum.h"
32#include "hpl1/engine/math/MathTypes.h"
33#include "hpl1/engine/scene/Camera.h"
34#include "hpl1/engine/scene/Node3D.h"
41 eCameraMoveMode_LastEnum
44enum eCameraRotateMode {
45 eCameraRotateMode_EulerAngles,
46 eCameraRotateMode_Matrix,
47 eCameraRotateMode_LastEnum
50class iLowLevelGraphics;
58 const cVector3f &GetPosition()
const {
return mvPosition; }
77 void SetFOV(
float afAngle) {
79 mbProjectionUpdated =
true;
81 float GetFOV() {
return mfFOV; }
83 void SetAspect(
float afAngle) {
85 mbProjectionUpdated =
true;
87 float GetAspect() {
return mfAspect; }
89 void SetFarClipPlane(
float afX) {
91 mbProjectionUpdated =
true;
93 float GetFarClipPlane() {
return mfFarClipPlane; }
95 void SetNearClipPlane(
float afX) {
96 mfNearClipPlane = afX;
97 mbProjectionUpdated =
true;
99 float GetNearClipPlane() {
return mfNearClipPlane; }
108 mbProjectionUpdated =
true;
110 bool GetInifintiveFarPlane() {
return mbInfFarPlane; }
112 cFrustum *GetFrustum();
114 eCameraRotateMode GetRotateMode() {
return mRotateMode; }
116 eCameraMoveMode GetMoveMode() {
return mMoveMode; }
142 cNode3D *GetAttachmentNode() {
return &mNode; }
143 void ClearAttachedEntities();
149 void SetPitch(
float afAngle);
150 void SetYaw(
float afAngle);
151 void SetRoll(
float afAngle);
153 void AddPitch(
float afAngle);
154 void AddYaw(
float afAngle);
155 void AddRoll(
float afAngle);
157 float GetPitch()
const {
return mfPitch; }
158 float GetYaw()
const {
return mfYaw; }
159 float GetRoll()
const {
return mfRoll; }
166 const cVector2f &GetPitchLimits() {
return mvPitchLimits; }
172 const cVector2f &GetYawLimits() {
return mvYawLimits; }
178 const cMatrixf &GetViewMatrix();
179 const cMatrixf &GetProjectionMatrix();
181 const cMatrixf &GetMoveMatrix();
184 void SetModelViewMatrix(iLowLevelGraphics *apLowLevel);
185 void SetProjectionMatrix(iLowLevelGraphics *apLowLevel);
186 cVector3f GetEyePosition();
188 eCameraType GetType() {
return eCameraType_3D; }
190 cVector3f GetForward();
191 cVector3f GetRight();
198 void SetPrevView(
const cMatrixf &a_mtxA) { m_mtxPrevView = a_mtxA; }
199 void SetPrevProjection(
const cMatrixf &a_mtxA) { m_mtxPrevProjection = a_mtxA; }
201 cMatrixf &GetPrevView() {
return m_mtxPrevView; }
202 cMatrixf &GetPrevProjection() {
return m_mtxPrevProjection; }
205 void UpdateMoveMatrix();
207 cVector3f mvPosition;
211 float mfFarClipPlane;
212 float mfNearClipPlane;
217 cVector2f mvPitchLimits;
218 cVector2f mvYawLimits;
220 eCameraRotateMode mRotateMode;
221 eCameraMoveMode mMoveMode;
224 cMatrixf m_mtxProjection;
227 cMatrixf m_mtxPrevView;
228 cMatrixf m_mtxPrevProjection;
237 bool mbProjectionUpdated;
Definition: Camera3D.h:53
void SetPitchLimits(cVector2f avLimits)
Definition: Camera3D.h:165
void SetYawLimits(cVector2f avLimits)
Definition: Camera3D.h:171
cVector3f UnProject(const cVector2f &avScreenPos, iLowLevelGraphics *apLowLevel)
void MoveForward(float afDist)
void SetMoveMode(eCameraMoveMode aMode)
void MoveRight(float afDist)
void SetInifintiveFarPlane(bool abX)
Definition: Camera3D.h:106
void MoveUp(float afDist)
void SetRotateMode(eCameraRotateMode aMode)
Definition: Entity3D.h:81
Definition: LowLevelGraphics.h:200