Virtual Testbed
Ship dynamics simulator for extreme conditions
ShipCompartments.hh
1 #ifndef VTESTBED_GRAPHICS_SHIPCOMPARTMENTS_HH
2 #define VTESTBED_GRAPHICS_SHIPCOMPARTMENTS_HH
3 
4 #include <vector>
5 
6 #include <vtestbed/core/compartment.hh>
7 #include <vtestbed/core/types.hh>
8 #include <vtestbed/graphics/ShipCompartmentObject.hh>
9 #include <vtestbed/graphics/types.hh>
10 
11 namespace vtb {
12 
13  namespace graphics {
14 
15  template <class T>
16  class ShipCompartments: public Object3D, public Drawable3D {
17 
18  public:
23 
24  private:
25  room_array _rooms;
26  DrawableGroup3D _drawables;
27  bool _show = true;
28 
29  public:
30 
32 
33  void init(const testbed_type& testbed);
34  void update(const core_room_array& rooms);
35  void draw(const Matrix4& m, Camera3D& camera) override;
36 
37  inline void show(bool b) { this->_show = b; }
38  inline room_array& rooms() { return this->_rooms; }
39  inline const room_array& rooms() const { return this->_rooms; }
40 
41  };
42 
43  }
44 
45 }
46 
47 #endif // vim:filetype=cpp
Main namespace.
Definition: convert.hh:9