Virtual Testbed
Ship dynamics simulator for extreme conditions
HullWindow.hh
1 #ifndef VTESTBED_GUI_HULLWINDOW_HH
2 #define VTESTBED_GUI_HULLWINDOW_HH
3 
4 #include <vtestbed/core/types.hh>
5 #include <vtestbed/gui/Window.hh>
6 #include <vtestbed/gui/types.hh>
7 
8 namespace vtb {
9 
10  namespace gui {
11 
12  template <class T>
13  class HullWindow: public Window {
14 
15  private:
17  using vec3 = vtb::core::Vector3<T>;
19 
20  private:
21  T _mass{};
22  vec3 _dimensions{T{}};
23  int _nvertices = 0;
24  int _nfaces = 0;
25  T _average_face_area{};
26  T _volume{};
27  vec3 _centroid{T{}};
28  T _volume_ratio{};
29 
30  public:
31 
32  void ship(const ship_type& ship);
33  void draw();
34  void init(const testbed_type& testbed);
35 
36  };
37 
38  }
39 
40 }
41 
42 #endif // vim:filetype=cpp
Rigid ship with a mass and translational and angular velocity.
Definition: core/ship.hh:186
Main namespace.
Definition: convert.hh:9