Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
Loading...
Searching...
No Matches
Camera.h
Go to the documentation of this file.
1#ifndef ULT_CAMERA_H_INCLUDED
2#define ULT_CAMERA_H_INCLUDED
3
4#include <Ult/Math/Vector3D.h>
5
6namespace Ult
7{
8
12class Camera
13{
14public:
18 Camera();
22 Camera(
23 const Vector3D& pos,
24 const Vector3D& lookAt,
25 const Vector3D& up,
26 const Vector3D& right
27 );
28
32 void MoveCamera(const Vector3D& direction, const float speed);
36 void StrafeCam(const float speed);
37
43 void RotateCamera(const float angle, const Vector3D& axis);
49 void RotateCamera(const float deltaX, const float deltaY);
50
52 void SetPosition(const Vector3D& pos) { mPos = pos; }
53
55 void SetLookDirection(const Vector3D& at) { mLookAt = at; }
56
58 void SetUpDirection(const Vector3D& up) { mUp = up; }
59
61 void SetRightDirection(const Vector3D& right) { mRight = right; }
62
63
65 Vector3D GetPosition() const { return mPos; }
66
68 Vector3D GetLookDirection() const { return mLookAt; }
69
71 Vector3D GetUpDirection() const { return mUp; }
72
74 Vector3D GetRightDirection() const { return mRight; }
75
76private:
77 Vector3D mPos, mLookAt, mUp, mRight;
78};
79
80} // namespace Ult
81
82#endif // ULT_CAMERA_H_INCLUDED
void SetUpDirection(const Vector3D &up)
Definition Camera.h:58
void MoveCamera(const Vector3D &direction, const float speed)
Definition Camera.cpp:26
Vector3D GetRightDirection() const
Definition Camera.h:74
void SetLookDirection(const Vector3D &at)
Definition Camera.h:55
Vector3D GetUpDirection() const
Definition Camera.h:71
Vector3D GetLookDirection() const
Definition Camera.h:68
void SetPosition(const Vector3D &pos)
Definition Camera.h:52
Vector3D GetPosition() const
Definition Camera.h:65
void StrafeCam(const float speed)
Definition Camera.cpp:31
void RotateCamera(const float angle, const Vector3D &axis)
Definition Camera.cpp:36
Camera()
Definition Camera.cpp:7
void SetRightDirection(const Vector3D &right)
Definition Camera.h:61
Definition Vector3D.h:12
Definition Archive.h:13