Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
|
#include <perspective_camera.h>
Public Member Functions | |
void | SetFovRadians (float fov_in_radians) |
void | SetFovDegrees (float fov_in_degrees) |
float | GetFOVRadians () const |
float | GetFOVDegrees () 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 | fov_in_radians_ |
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 perspective projection, useful for 3D stuff.
This class extends the base Camera class and offers functionality for creating perspective cameras, which are useful for many things.
float blowbox::PerspectiveCamera::GetFOVDegrees | ( | ) | const |
float blowbox::PerspectiveCamera::GetFOVRadians | ( | ) | const |
void blowbox::PerspectiveCamera::SetFovDegrees | ( | float | fov_in_degrees | ) |
Sets the field of view for the camera in degrees.
[in] | fov_in_degrees | The field of view in degrees |
void blowbox::PerspectiveCamera::SetFovRadians | ( | float | fov_in_radians | ) |
Sets the field of view for the camera in radians.
[in] | fov_in_radians | The field of view in radians |
|
overrideprotectedvirtual |
(Re)-calculates the projection matrix of the camera.
Implements blowbox::Camera.
|
protected |
The field of view of the camera in radians.