Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
enginepower.h
1 #pragma once
2 
3 #include <string>
4 
5 #include <glm/glm.hpp>
6 
7 #include "geometry/acceleration.h"
8 
9 #include "enginestate.h"
10 
11 
12 /*
13  Max acceleration per mass an engine - or mutiple engines accumulated -
14  are able to perform.
15 
16  The glm::vec4 is coded like
17  x = max accel in -x and +x direction
18  y = max accel in -y and +y direction
19  z = max accel in -z direction
20  w = max accel in +z direction
21 */
22 class EnginePower {
23 public:
24  EnginePower();
25  EnginePower(const glm::vec4& directional, const glm::vec3& angular);
26 
27  const glm::vec4& directional() const;
28  void setDirectional(const glm::vec4& directional);
29 
30  const glm::vec3& angular() const;
31  void setAngular(const glm::vec3& angular);
32 
33  Acceleration accelerationAt(const EngineState& engineState);
34 
35  EnginePower& operator+=(const EnginePower& other);
36 
37 
38  static EnginePower fromProperties(const std::string& prefix);
39 
40 
41 protected:
42  glm::vec4 m_directional;
43  glm::vec3 m_angular;
44 };
45 
Definition: enginepower.h:22
Definition: abstractmove.h:5