Rune Engine  Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
rune::Camera Class Reference

This class is used to control the viewport of the scene. More...

#include <camera.h>

Public Member Functions

 Camera (void)
 Default constructor to create a Camera object.
 
void setZoom (double)
 Set the zoom factor of the camera. More...
 
void setViewPort (FloatRect)
 Set the viewport size of a camera.
 
void setCenter (rune::Vec2)
 Set the center position of the camera. More...
 
Vec2 getCenter (void)
 Get the current camera position. More...
 
double getZoom (void)
 Get the current zoom level. More...
 
void move (rune::Vec2)
 Move the camera in a certain direction. More...
 

Detailed Description

This class is used to control the viewport of the scene.

Author
Thomas Montano
Date
May 17 2020

Member Function Documentation

◆ getCenter()

rune::Vec2 rune::Camera::getCenter ( void  )

Get the current camera position.

Returns
A vector the describes the current center position of the camera.

◆ getZoom()

double rune::Camera::getZoom ( void  )

Get the current zoom level.

Returns
The current zoom factor of the camera.

◆ move()

void rune::Camera::move ( rune::Vec2  speed)

Move the camera in a certain direction.

Parameters
speedA vector that will be added to the camera's current velocity vector.

◆ setCenter()

void rune::Camera::setCenter ( rune::Vec2  newCenter)

Set the center position of the camera.

Parameters
newCenterThe new center coordinate of the camera.

◆ setZoom()

void rune::Camera::setZoom ( double  newZoom)

Set the zoom factor of the camera.

Parameters
newZoomThe new zoom level to be used by the camera.

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