nCine  2025.04.r498-9d36345
A cross-platform 2D game engine
Classes | Public Member Functions | List of all members
ncine::Camera Class Reference

The camera class that handles matrices for shaders. More...

#include <Camera.h>

Classes

struct  ProjectionValues
 
struct  ViewValues
 

Public Member Functions

 Camera ()
 Creates a camera with default matrices.
 
const ProjectionValuesprojectionValues () const
 Returns the projection values that are used to create the projection matrix.
 
const ViewValuesviewValues () const
 Returns the view values that are used to create the model matrix.
 
const Matrix4x4fprojection () const
 Returns the current projection matrix.
 
const Matrix4x4fview () const
 Returns the current model matrix.
 
void setOrthoProjection (float left, float right, float top, float bottom)
 Updates the projection matrix using the projection values.
 
void setOrthoProjection (const ProjectionValues &values)
 Updates the projection matrix using the projection values from the structure.
 
void setView (const Vector2f &pos, float rotation, float scale)
 Updates the model matrix using the view values (with position as a Vector2f)
 
void setView (float x, float y, float rotation, float scale)
 Updates the model matrix using the view values.
 
void setView (const ViewValues &values)
 Updates the model matrix using the view values from the structure.
 
unsigned long int updateFrameProjectionMatrix () const
 Returns the last frame when the projection matrix was changed.
 
unsigned long int updateFrameViewMatrix () const
 Returns the last frame when the model matrix was changed.
 

Detailed Description

The camera class that handles matrices for shaders.


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