Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
|
#include <orthographic_camera.h>
Public Member Functions | |
void | SetOrthographicSize (float orthographic_size) |
float | GetOrthographicSize () const |
Public Member Functions inherited from blowbox::Camera | |
void | Translate (const DirectX::XMFLOAT3 &translation) |
void | Rotate (const DirectX::XMFLOAT3 &rotation) |
void | SetPosition (const DirectX::XMFLOAT3 &position) |
void | SetRotation (const DirectX::XMFLOAT3 &rotation) |
const DirectX::XMFLOAT3 & | GetPosition () const |
const DirectX::XMFLOAT3 & | GetRotation () const |
void | SetNearPlane (float near_plane) |
void | SetFarPlane (float far_plane) |
float | GetNearPlane () const |
float | GetFarPlane () const |
const DirectX::XMMATRIX & | GetViewMatrix () |
const DirectX::XMMATRIX & | GetProjectionMatrix () |
Protected Member Functions | |
void | UpdateProjectionMatrix () override |
Protected Member Functions inherited from blowbox::Camera | |
void | UpdateViewMatrix () |
Protected Attributes | |
float | orthographic_size_ |
Protected Attributes inherited from blowbox::Camera | |
DirectX::XMFLOAT3 | position_ |
DirectX::XMFLOAT3 | rotation_ |
DirectX::XMMATRIX | view_ |
DirectX::XMMATRIX | projection_ |
bool | view_dirty_ |
bool | projection_dirty_ |
float | near_plane_ |
float | far_plane_ |
A camera with orthographic projection, useful for 2D stuff.
This class extends the base Camera class and offers functionality for creating orthographic cameras, which are useful for many things.
float blowbox::OrthographicCamera::GetOrthographicSize | ( | ) | const |
void blowbox::OrthographicCamera::SetOrthographicSize | ( | float | orthographic_size | ) |
Sets the orthographic size of this camera.
[in] | orthographic_size | The orthographic size for the camera. |
|
overrideprotectedvirtual |
(Re)-calculates the projection matrix of the camera.
Implements blowbox::Camera.
|
protected |
The orthographic size that should be used with this camera.