Virtual Testbed
Ship dynamics simulator for extreme conditions
src
vtestbed
gui
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
:
16
using
ship_type
=
vtb::core::Ship<T>
;
17
using
vec3 = vtb::core::Vector3<T>;
18
using
testbed_type
=
vtb::core::Testbed<T,3>
;
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
vtb::core::Ship
Rigid ship with a mass and translational and angular velocity.
Definition:
core/ship.hh:186
vtb::gui::HullWindow
Definition:
HullWindow.hh:13
vtb
Main namespace.
Definition:
convert.hh:9
vtb::core::Testbed< T, 3 >
vtb::gui::Window
Definition:
Window.hh:12
Generated by
1.8.15