Virtual Testbed
Ship dynamics simulator for extreme conditions
src
vtestbed
gui
SimulationWindow.hh
1
#ifndef VTESTBED_GUI_SIMULATIONWINDOW_HH
2
#define VTESTBED_GUI_SIMULATIONWINDOW_HH
3
4
#include <vtestbed/core/types.hh>
5
#include <vtestbed/gui/Window.hh>
6
7
namespace
vtb
{
8
9
namespace
gui {
10
11
template
<
class
T>
12
class
SimulationWindow
:
public
Window
{
13
14
private
:
15
using
testbed_type
=
vtb::core::Testbed<T,3>
;
16
17
private
:
18
T _timeInstant{0};
19
bool
_recording =
false
;
20
21
public
:
22
23
SimulationWindow
();
24
25
inline
void
step(T t) { this->_timeInstant = t; }
26
inline
void
rendering(
bool
rhs) { this->_recording = rhs; }
27
inline
bool
rendering()
const
{
return
this->_recording; }
28
29
void
draw();
30
void
init(
const
testbed_type
& testbed);
31
32
};
33
34
}
35
36
}
37
38
#endif // vim:filetype=cpp
vtb::gui::SimulationWindow
Definition:
SimulationWindow.hh:12
vtb
Main namespace.
Definition:
convert.hh:9
vtb::core::Testbed< T, 3 >
vtb::gui::Window
Definition:
Window.hh:12
Generated by
1.8.15