Virtual Testbed
Ship dynamics simulator for extreme conditions
src
vtestbed
core
propulsor.hh
1
#ifndef VTESTBED_CORE_PROPULSOR_HH
2
#define VTESTBED_CORE_PROPULSOR_HH
3
4
#include <vtestbed/core/propeller.hh>
5
#include <vtestbed/core/rudder.hh>
6
#include <vtestbed/base/blitz.hh>
7
#include <vtestbed/base/constants.hh>
8
9
#include <vector>
10
11
namespace
vtb
{
12
13
namespace
core {
14
15
template
<
class
T>
16
class
Propulsor
{
17
18
public
:
19
using
vec = blitz::TinyVector<T,3>;
20
using
propeller_type
=
Propeller<T>
;
21
using
rudder_type
=
Rudder<T>
;
22
using
propeller_array
=
std::vector<propeller_type>
;
23
using
rudder_array
=
std::vector<rudder_type>
;
24
25
private
:
26
propeller_array
_propellers;
27
rudder_array
_rudders;
28
29
public
:
30
31
Propulsor
();
32
33
vec thrust()
const
;
34
35
inline
const
propeller_array
& propellers()
const
{
return
this->_propellers; }
36
inline
const
rudder_array
& rudders()
const
{
return
this->_rudders; }
37
inline
propeller_array
& propellers() {
return
this->_propellers; }
38
inline
rudder_array
& rudders() {
return
this->_rudders; }
39
40
};
41
}
42
}
43
44
#endif // vim:filetype=cpp
vtb::core::Propulsor
Definition:
propulsor.hh:16
vtb::core::Rudder
Definition:
rudder.hh:9
vtb
Main namespace.
Definition:
convert.hh:9
std::vector< propeller_type >
vtb::core::Propeller
Definition:
propeller.hh:9
Generated by
1.8.15