Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
player.h
1 #pragma once
2 
3 #include <memory>
4 
5 #include <glm/glm.hpp>
6 #include <glm/gtc/quaternion.hpp>
7 
8 #include "equipment/enginestate.h"
9 
10 #include "utils/handle/handle.h"
11 
12 
13 class Aimer;
14 class Camera;
15 class CameraHead;
16 class CameraDolly;
17 class HUD;
18 class Mission;
19 class MissionSystem;
20 class TargetSelector;
21 
22 class Player {
23 public:
24  Player();
25  ~Player();
26 
27  Ship* ship();
28  void setShip(Ship *ship);
29 
30  void update(float deltaSec);
31 
32  CameraHead& cameraHead();
33 
34  HUD& hud();
35 
36  void fire();
37 
38  void move(const glm::vec3& vec);
39  void rotate(const glm::vec3& euler);
40 
41  void selectTarget(bool next);
42  void setTarget(WorldObject* target);
43 
44 
45 protected:
46  Handle<Ship> m_ship;
47  std::unique_ptr<CameraDolly> m_cameraDolly;
48  std::unique_ptr<HUD> m_hud;
49  std::unique_ptr<TargetSelector> m_targetSelector;
50  std::unique_ptr<Aimer> m_aimer;
51  EngineState m_engineState;
52 };
53 
Definition: camerahead.h:12
Definition: worldobject.h:43
Definition: camera.h:10
Definition: aimer.h:16
Definition: missionsystem.h:9
Definition: mission.h:20
Definition: hud.h:34
Definition: cameradolly.h:12
Definition: abstractmove.h:5
Definition: player.h:22
Definition: targetselector.h:8
Definition: ship.h:23