-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSMovementSystem.h
More file actions
32 lines (26 loc) · 813 Bytes
/
SMovementSystem.h
File metadata and controls
32 lines (26 loc) · 813 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
#ifndef SMOVEMENTSYSTEM_H
#define SMOVEMENTSYSTEM_H
#include <lf/Lightfeather.h>
#include "util.h"
#include "entityx.h"
#include "events.h"
#include "components.h"
using namespace lf;
using namespace entityx;
struct SMovementSystem : public System<SMovementSystem>, Receiver<SMovementSystem>
{
public:
entityx::ptr<EventManager> events;
f32 rotX[3];
f32 rotY[3];
f32 rotXAvg;
f32 rotYAvg;
SMovementSystem();
virtual ~SMovementSystem();
void configure(entityx::ptr<EventManager> event_manager);
void update(entityx::ptr<EntityManager> es, entityx::ptr<EventManager> events, double dt);
btVector3 GetForwardVector(btQuaternion q) const;
btVector3 GetUpVector(btQuaternion q) const;
btVector3 GetRightVector(btQuaternion q) const;
};
#endif // SMOVEMENTSYSTEM_H