Rune Engine  Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
camera.h
1 #pragma once
2 
11 #ifndef CAMERA_H_DEFINED
12 #define CAMERA_H_DEFINED
13 
14 #include "core.h"
15 #include <Math\vec2.h>
16 #include <Math\mat2.h>
17 #include "rect.h"
18 
19 namespace rune{
20 
21 class RUNE_ENGINE Camera
22 {
23 private:
24  Vec2 centerPosition = Vec2(0,0);
25  Vec2 cameraSize = Vec2(1,1);
26  double zoomFactor = 1;
27 public:
29  Camera(void);
31  void setZoom(double);
33  void setViewPort(FloatRect);
35  void setCenter(rune::Vec2);
37  Vec2 getCenter(void);
39  double getZoom(void);
41  void move(rune::Vec2);
42 };
43 }
44 
45 #endif
rune::Rect
A rectangle that can be used for specifying a dimension.
Definition: rect.h:18
rune::Camera
This class is used to control the viewport of the scene.
Definition: camera.h:22
rune::Vec2
1 x 2 vector to be used for math.
Definition: vec2.h:20
rune
The main namespace to be used for interfacing with the engine.
Definition: animator.h:21