28 #ifndef HPL_CAMERA3D_H 29 #define HPL_CAMERA3D_H 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" 38 enum eCameraMoveMode {
41 eCameraMoveMode_LastEnum
44 enum eCameraRotateMode {
45 eCameraRotateMode_EulerAngles,
46 eCameraRotateMode_Matrix,
47 eCameraRotateMode_LastEnum
50 class 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; }
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; }
179 const cMatrixf &GetProjectionMatrix();
188 eCameraType GetType() {
return eCameraType_3D; }
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();
211 float mfFarClipPlane;
212 float mfNearClipPlane;
220 eCameraRotateMode mRotateMode;
221 eCameraMoveMode mMoveMode;
237 bool mbProjectionUpdated;
243 #endif // HPL_CAMERA3D_H
void SetYawLimits(cVector2f avLimits)
Definition: Camera3D.h:171
void SetInifintiveFarPlane(bool abX)
Definition: Camera3D.h:106
cVector3f UnProject(const cVector2f &avScreenPos, iLowLevelGraphics *apLowLevel)
void SetPitchLimits(cVector2f avLimits)
Definition: Camera3D.h:165
void MoveRight(float afDist)
Definition: Entity3D.h:81
void SetRotateMode(eCameraRotateMode aMode)
void SetMoveMode(eCameraMoveMode aMode)
Definition: LowLevelGraphics.h:200
void MoveUp(float afDist)
Definition: Camera3D.h:53
void MoveForward(float afDist)