Virtual Testbed
Ship dynamics simulator for extreme conditions
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>;
21  using rudder_type = Rudder<T>;
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
Main namespace.
Definition: convert.hh:9