Untitled Game engine no.5  1.0
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Engine::Camera Class Reference

Singleton, the current view! More...

#include <Camera.hpp>

Collaboration diagram for Engine::Camera:
Collaboration graph
[legend]

Public Member Functions

 Camera ()
 Creates a new camera.
 
glm::mat4 GetView () const
 

Static Public Member Functions

static Ref< CameraMain ()
 
static void Update (const Scene &s)
 
static void UpdateCameras (ECS &ecs, const EntityID &e)
 

Public Attributes

Transform transform
 Transform of this camera.
 
Transform offset
 offset to the subject of this camera
 
float w
 Bounding box of this camera.
 
float h
 
float snap_delay_factor = 2.0f
 

Static Public Attributes

static Ref< Cameramain = nullptr
 

Detailed Description

Singleton, the current view!

Member Function Documentation

◆ GetView()

glm::mat4 Engine::Camera::GetView ( ) const
inline
Returns
the inverted matrix of the camera's view

◆ Main()

static Ref<Camera> Engine::Camera::Main ( )
inlinestatic
Returns
a reference to the currently rendering camera

◆ Update()

static void Engine::Camera::Update ( const Scene s)
inlinestatic

Update all cameras present in the scene.

Parameters
sscene reference

◆ UpdateCameras()

static void Engine::Camera::UpdateCameras ( ECS ecs,
const EntityID &  e 
)
inlinestatic

Given that an entity with id: e has a camera and a transform. Move the camera so that it is behind the player.

Parameters
ecsentity lookup
eentity id

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