Virtual Testbed
Ship dynamics simulator for extreme conditions
src
vtestbed
gui
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
:
19
using
generator_panel
=
GeneratorPanel<T>
;
20
using
generator_panel_ptr
=
std::unique_ptr<generator_panel>
;
21
using
grid2
=
vtb::core::Grid<T,2>
;
22
using
vec2 = vtb::core::Vector<T,2>;
23
using
int2 = vtb::core::int2;
24
using
testbed_type
=
vtb::core::Testbed<T,3>
;
25
26
private
:
27
std::vector<generator_panel_ptr>
_panels;
28
std::vector<const char*>
_names;
29
std::vector<std::type_index>
_types;
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
vtb::gui::ApplicationBase
Definition:
ApplicationBase.hh:21
vtb::core::Grid< T, 2 >
std::type_index
vtb
Main namespace.
Definition:
convert.hh:9
std::vector
vtb::core::Testbed< T, 3 >
std::unique_ptr
vtb::gui::Window
Definition:
Window.hh:12
vtb::gui::WavySurfaceWindow
Definition:
WavySurfaceWindow.hh:16
vtb::gui::GeneratorPanel
Definition:
GeneratorPanel.hh:13
Generated by
1.8.15