Fling Engine  0.00.1
Fling Engine is a game engine written in Vulkan
Public Member Functions | Protected Attributes
Fling::Camera Class Referenceabstract

Base class for camera, meant to be overridden. More...

#include <Camera.h>

Inherited by Fling::FirstPersonCamera.

Public Member Functions

 Camera ()
 
virtual ~Camera ()=default
 
virtual void Update (float dt)=0
 
const float GetNearPlane () const
 Gets the near plane of the view frustrum. More...
 
void SetNearPlane (const float &nearPlane)
 
const float GetFarPlane () const
 Gets the far plane of the view frustrum. More...
 
void SetFarPlane (const float &farPlane)
 
const float GetFieldOfView () const
 Gets the field of view angle from the view frustrum. More...
 
void SetFieldOfView (const float &fieldOfView)
 
const glm::vec3 & GetPosition () const
 
const glm::vec3 & GetRotation () const
 
const float GetSpeed () const
 
const float GetAspectRatio () const
 
const glm::mat4 & GetViewMatrix () const
 Gets the view matrix created by the current camera position and rotation. More...
 
const glm::mat4 & GetProjectionMatrix () const
 Gets the projection matrix used by camera. More...
 

Protected Attributes

glm::mat4 m_viewMatrix
 
glm::mat4 m_projectionMatrix
 
glm::vec3 m_position
 
float m_speed
 
glm::vec3 m_rotation
 
float m_aspectRatio
 
float m_nearPlane
 
float m_farPlane
 
float m_fieldOfView
 

Detailed Description

Base class for camera, meant to be overridden.

Constructor & Destructor Documentation

◆ Camera()

Fling::Camera::Camera ( )
inline

◆ ~Camera()

virtual Fling::Camera::~Camera ( )
virtualdefault

Member Function Documentation

◆ GetAspectRatio()

const float Fling::Camera::GetAspectRatio ( ) const
inline

◆ GetFarPlane()

const float Fling::Camera::GetFarPlane ( ) const
inline

Gets the far plane of the view frustrum.

Returns
const float& m_farPlane

◆ GetFieldOfView()

const float Fling::Camera::GetFieldOfView ( ) const
inline

Gets the field of view angle from the view frustrum.

Returns
const float& m_fieldOfView

◆ GetNearPlane()

const float Fling::Camera::GetNearPlane ( ) const
inline

Gets the near plane of the view frustrum.

Returns
const float& m_nearPlane

◆ GetPosition()

const glm::vec3& Fling::Camera::GetPosition ( ) const
inline

◆ GetProjectionMatrix()

const glm::mat4& Fling::Camera::GetProjectionMatrix ( ) const
inline

Gets the projection matrix used by camera.

Returns
const glm::mat4& projectionMatrix

◆ GetRotation()

const glm::vec3& Fling::Camera::GetRotation ( ) const
inline

◆ GetSpeed()

const float Fling::Camera::GetSpeed ( ) const
inline

◆ GetViewMatrix()

const glm::mat4& Fling::Camera::GetViewMatrix ( ) const
inline

Gets the view matrix created by the current camera position and rotation.

Returns
const glm::mat4& viewMatrix

◆ SetFarPlane()

void Fling::Camera::SetFarPlane ( const float &  farPlane)
inline

◆ SetFieldOfView()

void Fling::Camera::SetFieldOfView ( const float &  fieldOfView)
inline

◆ SetNearPlane()

void Fling::Camera::SetNearPlane ( const float &  nearPlane)
inline

◆ Update()

virtual void Fling::Camera::Update ( float  dt)
pure virtual

Implemented in Fling::FirstPersonCamera.

Field Documentation

◆ m_aspectRatio

float Fling::Camera::m_aspectRatio
protected

◆ m_farPlane

float Fling::Camera::m_farPlane
protected

◆ m_fieldOfView

float Fling::Camera::m_fieldOfView
protected

◆ m_nearPlane

float Fling::Camera::m_nearPlane
protected

◆ m_position

glm::vec3 Fling::Camera::m_position
protected

◆ m_projectionMatrix

glm::mat4 Fling::Camera::m_projectionMatrix
protected

◆ m_rotation

glm::vec3 Fling::Camera::m_rotation
protected

◆ m_speed

float Fling::Camera::m_speed
protected

◆ m_viewMatrix

glm::mat4 Fling::Camera::m_viewMatrix
protected

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