![]() |
Rune Engine
Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
|
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... | |
This class is used to control the viewport of the scene.
rune::Vec2 rune::Camera::getCenter | ( | void | ) |
Get the current camera position.
double rune::Camera::getZoom | ( | void | ) |
Get the current zoom level.
void rune::Camera::move | ( | rune::Vec2 | speed | ) |
Move the camera in a certain direction.
speed | A vector that will be added to the camera's current velocity vector. |
void rune::Camera::setCenter | ( | rune::Vec2 | newCenter | ) |
Set the center position of the camera.
newCenter | The new center coordinate of the camera. |
void rune::Camera::setZoom | ( | double | newZoom | ) |
Set the zoom factor of the camera.
newZoom | The new zoom level to be used by the camera. |