3 #include <DirectXMath.h> 23 void Translate(
const DirectX::XMFLOAT3& translation);
29 void Rotate(
const DirectX::XMFLOAT3& rotation);
35 void SetPosition(
const DirectX::XMFLOAT3& position);
41 void SetRotation(
const DirectX::XMFLOAT3& rotation);
void Translate(const DirectX::XMFLOAT3 &translation)
Translates the camera in a given direction relative to its current orientation.
Definition: camera.cc:27
DirectX::XMFLOAT3 translation_acculumator_
Accumulator for how much the camera should be translated relative to its current orientation.
Definition: camera.h:91
const DirectX::XMMATRIX & GetViewMatrix()
Definition: camera.cc:97
void Rotate(const DirectX::XMFLOAT3 &rotation)
Rotates the camera by a certain rotation relative to its current rotation.
Definition: camera.cc:36
void SetFarPlane(float far_plane)
Sets the far plane of the camera.
Definition: camera.cc:78
A camera through which the scene is rendered.
Definition: camera.h:13
DirectX::XMFLOAT3 position_
The position of the camera.
Definition: camera.h:79
const DirectX::XMMATRIX & GetProjectionMatrix()
Definition: camera.cc:108
void SetPosition(const DirectX::XMFLOAT3 &position)
Sets the position of the camera in world space.
Definition: camera.cc:45
void SetRotation(const DirectX::XMFLOAT3 &rotation)
Sets the rotation of the camera in world space.
Definition: camera.cc:52
float GetFarPlane() const
Definition: camera.cc:91
const DirectX::XMFLOAT3 & GetPosition() const
Definition: camera.cc:59
virtual void UpdateProjectionMatrix()=0
(Re)-calculates the projection matrix of the camera.
DirectX::XMMATRIX projection_
The projection matrix of the camera.
Definition: camera.h:83
float GetNearPlane() const
Definition: camera.cc:85
DirectX::XMFLOAT3 rotation_
The rotation of the camera.
Definition: camera.h:80
float near_plane_
The near plane z-value of the camera.
Definition: camera.h:87
bool view_dirty_
Whether the view matrix has to be updated before it can be used again.
Definition: camera.h:84
void UpdateViewMatrix()
(Re)-calculates the view matrix of the camera.
Definition: camera.cc:119
DirectX::XMMATRIX view_
The view matrix of the camera.
Definition: camera.h:82
The main Blowbox namespace.
Definition: image.cc:8
const DirectX::XMFLOAT3 & GetRotation() const
Definition: camera.cc:65
float far_plane_
The far plane z-value of the camera.
Definition: camera.h:88
bool projection_dirty_
Whether the projection matrix has to be updated before it can be used again.
Definition: camera.h:85
void SetNearPlane(float near_plane)
Sets the near plane of the camera.
Definition: camera.cc:71