Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
hardpoint.h
1 #pragma once
2 
3 #include <memory>
4 
5 #include <glm/glm.hpp>
6 
7 #include "worldobjectslot.h"
8 
9 
10 class Weapon;
11 class HardpointVoxel;
13 
18 class Hardpoint: public WorldObjectSlot {
19 public:
20  Hardpoint(WorldObjectComponents* components, HardpointVoxel* voxel);
21 
22  HardpointVoxel* voxel();
23 
24  const std::shared_ptr<Weapon>& weapon();
25  void setWeapon(const std::shared_ptr<Weapon>& weapon);
26 
27  const glm::vec3& direction() const;
28  void setDirection(const glm::vec3& direction);
29 
30  float fieldOfAim() const;
31  void setFieldOfAim(float fieldOfAim);
32 
33  bool inFieldOfAim(const glm::vec3& point);
34 
35  void update(float deltaSec);
36 
37  void onVoxelRemoval();
38 
39 
40 protected:
41  HardpointVoxel* m_voxel;
42  std::shared_ptr<Weapon> m_weapon;
43 
44  glm::vec3 m_direction;
45  float m_fieldOfAim;
46 };
47 
Definition: weapon.h:24
Definition: worldobjectslot.h:14
Definition: hardpoint.h:18
Definition: worldobjectcomponents.h:22
Definition: hardpointvoxel.h:10