Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
engineslot.h
1 #pragma once
2 
3 #include <memory>
4 
5 #include <glm/glm.hpp>
6 
7 #include "worldobjectslot.h"
8 
9 
10 class Engine;
11 class EngineSlotVoxel;
13 
14 /*
15  Slot with interchangeable engines
16 */
17 class EngineSlot: public WorldObjectSlot {
18 public:
20 
21  const EngineSlotVoxel* voxel() const;
22 
23  const glm::vec3& direction();
24  void setDirection(const glm::vec3& direction);
25 
26  const std::shared_ptr<Engine>& engine();
27  void setEngine(const std::shared_ptr<Engine>& engine);
28 
29  void update(float deltaSec);
30 
31  void onVoxelRemoval();
32 
33 
34 protected:
35  EngineSlotVoxel* m_voxel;
36  std::shared_ptr<Engine> m_engine;
37 
38  glm::vec3 m_direction;
39 };
40 
Definition: worldobjectslot.h:14
Definition: engineslot.h:17
Definition: worldobjectcomponents.h:22
Definition: engineslotvoxel.h:10
Definition: engine.h:19