forked from Dzejrou/tdt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MovementHelper.hpp
58 lines (50 loc) · 1.52 KB
/
MovementHelper.hpp
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
53
54
55
56
57
58
#pragma once
#include <Ogre.h>
#include <cstdlib>
class EntitySystem;
/**
* Auxiliary namespace containing functions that help with the management of
* the movement component.
*/
namespace MovementHelper
{
/**
* Brief: Returns the speed modifier of a given entity.
* Param: ID of the entity.
*/
Ogre::Real get_speed_modifier(EntitySystem&, std::size_t);
/**
* Brief: Changes the speed modifier of a given entity to a given value.
* Param: ID of the entity.
* Param: New speed value.
*/
void set_speed_modifier(EntitySystem&, std::size_t, Ogre::Real);
/**
* Brief: Returns the direction from a given entity to another given entity.
* Param: ID of the first entity.
* Param: ID of the second entity.
*/
Ogre::Vector3 dir_to(EntitySystem&, std::size_t, std::size_t);
/**
* Brief: Returns the direction a given entity is facing.
* Param: ID of the entity.
*/
Ogre::Vector3 get_dir(EntitySystem&, std::size_t);
/**
* Brief: Returns the opposite direction to the direction a given entity is facing.
* Param: ID of the entity.
*/
Ogre::Vector3 get_dir_back(EntitySystem&, std::size_t);
/**
* Brief: Returns the direction perpendicular to the direction a given entity is facing.
* (To the left.)
* Param: ID of the entity.
*/
Ogre::Vector3 get_dir_left(EntitySystem&, std::size_t);
/**
* Brief: Returns the direction perpendicular to the direction a given entity is facing.
* (To the right.)
* Param: ID of the entity.
*/
Ogre::Vector3 get_dir_right(EntitySystem&, std::size_t);
}