Overload  1.1
Game engine with editor
Public Member Functions | List of all members
OvRendering::LowRenderer::Camera Class Reference

#include <Camera.h>

Public Member Functions

 Camera ()
 
void CacheMatrices (uint16_t p_windowWidth, uint16_t p_windowHeight, const OvMaths::FVector3 &p_position)
 
void CacheProjectionMatrix (uint16_t p_windowWidth, uint16_t p_windowHeight)
 
void CacheViewMatrix (const OvMaths::FVector3 &p_position)
 
void CacheFrustum (const OvMaths::FMatrix4 &p_view, const OvMaths::FMatrix4 &p_projection)
 
const OvMaths::FVector3GetForward () const
 
const OvMaths::FVector3GetUp () const
 
const OvMaths::FVector3GetRight () const
 
float GetYaw () const
 
float GetPitch () const
 
float GetRoll () const
 
float GetFov () const
 
float GetNear () const
 
float GetFar () const
 
const OvMaths::FVector3GetClearColor () const
 
const OvMaths::FMatrix4GetProjectionMatrix () const
 
const OvMaths::FMatrix4GetViewMatrix () const
 
const OvRendering::Data::FrustumGetFrustum () const
 
bool HasFrustumGeometryCulling () const
 
bool HasFrustumLightCulling () const
 
void SetYaw (float p_value)
 
void SetPitch (float p_value)
 
void SetRoll (float p_value)
 
void SetFov (float p_value)
 
void SetNear (float p_value)
 
void SetFar (float p_value)
 
void SetClearColor (const OvMaths::FVector3 &p_clearColor)
 
void SetFrustumGeometryCulling (bool p_enable)
 
void SetFrustumLightCulling (bool p_enable)
 
void SetRotation (const OvMaths::FQuaternion &p_rotation)
 

Detailed Description

Represents a camera. Wraps projection and view calculation based on applied rotation and the given positions

Constructor & Destructor Documentation

◆ Camera()

OvRendering::LowRenderer::Camera::Camera ( )

Constructor

@project: Overload

Author
: Overload Tech. @restrictions: This software may not be resold, redistributed or otherwise conveyed to a third party.

Member Function Documentation

◆ CacheFrustum()

void OvRendering::LowRenderer::Camera::CacheFrustum ( const OvMaths::FMatrix4 p_view,
const OvMaths::FMatrix4 p_projection 
)

Calculate and cache the result frustum. This method should be called after projection and view matrices are cached.

Parameters
p_view
p_projection

◆ CacheMatrices()

void OvRendering::LowRenderer::Camera::CacheMatrices ( uint16_t  p_windowWidth,
uint16_t  p_windowHeight,
const OvMaths::FVector3 p_position 
)

Cache the projection, view and frustum matrices

Parameters
p_windowWidth
p_windowHeight
p_position

◆ CacheProjectionMatrix()

void OvRendering::LowRenderer::Camera::CacheProjectionMatrix ( uint16_t  p_windowWidth,
uint16_t  p_windowHeight 
)

Calculate and cache the result projection matrix

Parameters
p_windowWidth
p_windowHeight

◆ CacheViewMatrix()

void OvRendering::LowRenderer::Camera::CacheViewMatrix ( const OvMaths::FVector3 p_position)

Calculate and cache the result view matrix

Parameters
p_position

◆ GetClearColor()

const OvMaths::FVector3 & OvRendering::LowRenderer::Camera::GetClearColor ( ) const

Returns the clear color of the camera

◆ GetFar()

float OvRendering::LowRenderer::Camera::GetFar ( ) const

Returns the far of the camera

◆ GetForward()

const OvMaths::FVector3 & OvRendering::LowRenderer::Camera::GetForward ( ) const

Returns the forward vector of the camera

◆ GetFov()

float OvRendering::LowRenderer::Camera::GetFov ( ) const

Returns the fov of the camera

◆ GetFrustum()

const OvRendering::Data::Frustum & OvRendering::LowRenderer::Camera::GetFrustum ( ) const

Retursn the cached frustum

◆ GetNear()

float OvRendering::LowRenderer::Camera::GetNear ( ) const

Returns the near of the camera

◆ GetPitch()

float OvRendering::LowRenderer::Camera::GetPitch ( ) const

Returns the pitch of the camera

◆ GetProjectionMatrix()

const OvMaths::FMatrix4 & OvRendering::LowRenderer::Camera::GetProjectionMatrix ( ) const

Returns the cached projection matrix

◆ GetRight()

const OvMaths::FVector3 & OvRendering::LowRenderer::Camera::GetRight ( ) const

Returns the right vector of the camera

◆ GetRoll()

float OvRendering::LowRenderer::Camera::GetRoll ( ) const

Returns the roll of the camera

◆ GetUp()

const OvMaths::FVector3 & OvRendering::LowRenderer::Camera::GetUp ( ) const

Returns the up vector of the camera

◆ GetViewMatrix()

const OvMaths::FMatrix4 & OvRendering::LowRenderer::Camera::GetViewMatrix ( ) const

Returns the cached view matrix

◆ GetYaw()

float OvRendering::LowRenderer::Camera::GetYaw ( ) const

Returns the yaw of the camera

◆ HasFrustumGeometryCulling()

bool OvRendering::LowRenderer::Camera::HasFrustumGeometryCulling ( ) const

Returns true if the frustum culling for geometry is enabled

◆ HasFrustumLightCulling()

bool OvRendering::LowRenderer::Camera::HasFrustumLightCulling ( ) const

Returns true if the frustum culling for lights is enabled

◆ SetClearColor()

void OvRendering::LowRenderer::Camera::SetClearColor ( const OvMaths::FVector3 p_clearColor)

Sets the clear color of the camera to the given value

Parameters
p_value

◆ SetFar()

void OvRendering::LowRenderer::Camera::SetFar ( float  p_value)

Sets the far of the camera to the given value

Parameters
p_value

◆ SetFov()

void OvRendering::LowRenderer::Camera::SetFov ( float  p_value)

Sets the fov of the camera to the given value

Parameters
p_value

◆ SetFrustumGeometryCulling()

void OvRendering::LowRenderer::Camera::SetFrustumGeometryCulling ( bool  p_enable)

Defines if the camera should apply frustum culling to geometry while rendering

Parameters
p_enable

◆ SetFrustumLightCulling()

void OvRendering::LowRenderer::Camera::SetFrustumLightCulling ( bool  p_enable)

Defines if the camera should apply frustum culling to lights while rendering

Parameters
p_enable

◆ SetNear()

void OvRendering::LowRenderer::Camera::SetNear ( float  p_value)

Sets the near of the camera to the given value

Parameters
p_value

◆ SetPitch()

void OvRendering::LowRenderer::Camera::SetPitch ( float  p_value)

Sets the pitch of the camera to the given value

Parameters
p_value

◆ SetRoll()

void OvRendering::LowRenderer::Camera::SetRoll ( float  p_value)

Sets the roll of the camera to the given value

Parameters
p_value

◆ SetRotation()

void OvRendering::LowRenderer::Camera::SetRotation ( const OvMaths::FQuaternion p_rotation)

Sets the rotation to the camera with a quaternion

Parameters
p_rotation

◆ SetYaw()

void OvRendering::LowRenderer::Camera::SetYaw ( float  p_value)

Sets the yaw of the camera to the given value

Parameters
p_value

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