Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
blowbox::OrthographicCamera Class Reference

#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_
 

Detailed Description

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.

Inheritance diagram for blowbox::OrthographicCamera:
blowbox::Camera

Member Function Documentation

float blowbox::OrthographicCamera::GetOrthographicSize ( ) const
Returns
The orthographic size that is currently set on the scene. Default is 1.
void blowbox::OrthographicCamera::SetOrthographicSize ( float  orthographic_size)

Sets the orthographic size of this camera.

Parameters
[in]orthographic_sizeThe orthographic size for the camera.
Remarks
Orthographic size can be used to "zoom" in or out on the scene. Default is 1.
void blowbox::OrthographicCamera::UpdateProjectionMatrix ( )
overrideprotectedvirtual

(Re)-calculates the projection matrix of the camera.

Implements blowbox::Camera.

Member Data Documentation

float blowbox::OrthographicCamera::orthographic_size_
protected

The orthographic size that should be used with this camera.


The documentation for this class was generated from the following files: