Virtual Testbed
Ship dynamics simulator for extreme conditions
src
vtestbed
gui
ShipCompartmentsWindow.hh
1
#ifndef VTESTBED_GUI_SHIPCOMPARTMENTSWINDOW_HH
2
#define VTESTBED_GUI_SHIPCOMPARTMENTSWINDOW_HH
3
4
#include <vtestbed/core/types.hh>
5
#include <vtestbed/graphics/ShipCompartmentObject.hh>
6
#include <vtestbed/graphics/ShipCompartments.hh>
7
#include <vtestbed/gui/InputNumber.hh>
8
#include <vtestbed/gui/Window.hh>
9
#include <vtestbed/gui/imgui.hh>
10
#include <vtestbed/gui/types.hh>
11
12
namespace
vtb
{
13
14
namespace
gui {
15
16
template
<
class
T>
17
class
ShipCompartmentsWindow
:
public
Window
{
18
19
public
:
20
using
room_array
=
vtb::core::Compartment_array<T>
;
21
using
room_type
=
vtb::core::Compartment<T>
;
22
23
private
:
24
using
iterator =
typename
room_array::iterator;
25
26
private
:
27
vtb::graphics::ShipCompartments<T>
* _compartments =
nullptr
;
28
std::vector<InputNumber<T>
> _waterVolume;
29
bool
_size_column =
true
;
30
31
public
:
32
33
ShipCompartmentsWindow
();
34
35
void
draw();
36
37
inline
void
compartments(
vtb::graphics::ShipCompartments<T>
* rhs) {
38
this->_compartments = rhs;
39
}
40
41
};
42
43
}
44
45
}
46
47
#endif // vim:filetype=cpp
vtb::gui::ShipCompartmentsWindow
Definition:
ShipCompartmentsWindow.hh:17
vtb::core::Compartment_array
Definition:
compartment.hh:67
vtb::graphics::ShipCompartments
Definition:
ShipCompartments.hh:16
vtb::core::Compartment
Definition:
compartment.hh:18
vtb
Main namespace.
Definition:
convert.hh:9
std::vector
vtb::gui::Window
Definition:
Window.hh:12
Generated by
1.8.15