forked from Dzejrou/tdt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphicsSystem.hpp
More file actions
52 lines (45 loc) · 989 Bytes
/
GraphicsSystem.hpp
File metadata and controls
52 lines (45 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#pragma once
#include <Ogre.h>
#include "System.hpp"
#include "EntitySystem.hpp"
/**
* System that performs all graphics related updates.
*/
class GraphicsSystem : public System
{
public:
/**
* Constructor.
* Param: The game's entity system.
*/
GraphicsSystem(EntitySystem&);
/**
* Destructor.
*/
~GraphicsSystem() = default;
/**
* Brief: Performs all graphics updates.
* Param: Time since the last frame.
*/
void update(Ogre::Real) override;
/**
* Brief: Sets the time period before the next update.
* Param: The new period.
*/
void set_update_period(Ogre::Real);
/**
* Brief: Returns the time period between updates.
*/
Ogre::Real get_update_period() const;
private:
/**
* Entity system that contains entities this system is
* working with.
*/
EntitySystem& entities_;
/**
* Used to avoid per frame updates and allows dynamic
* update periods.
*/
Ogre::Real update_timer_, update_period_;
};