Virtual Testbed
Ship dynamics simulator for extreme conditions
WavySurfaceWindow.hh
1 #ifndef VTESTBED_GUI_WAVYSURFACEWINDOW_HH
2 #define VTESTBED_GUI_WAVYSURFACEWINDOW_HH
3 
4 #include <typeindex>
5 
6 #include <vtestbed/core/grid.hh>
7 #include <vtestbed/core/types.hh>
8 #include <vtestbed/gui/ApplicationBase.hh>
9 #include <vtestbed/gui/Window.hh>
10 
11 namespace vtb {
12 
13  namespace gui {
14 
15  template <class T>
16  class WavySurfaceWindow: public Window {
17 
18  private:
22  using vec2 = vtb::core::Vector<T,2>;
23  using int2 = vtb::core::int2;
25 
26  private:
30  int _selectedIndex = 0;
31  vec2 _size;
32  int2 _num_points;
33  ApplicationBase* _app;
34 
35  public:
36 
37  explicit WavySurfaceWindow(ApplicationBase* app);
38 
39  void draw();
40  void apply();
41  void init(const testbed_type& testbed);
42 
43  private:
44 
45  void add_generator(generator_panel* panel, const char* name, std::type_index type);
46 
47  };
48 
49  }
50 
51 }
52 
53 #endif // vim:filetype=cpp
Main namespace.
Definition: convert.hh:9