Marine systems simulation
Section.h
1#ifndef Section2_h__
2#define Section2_h__
3
4#include <vector>
5#include <Eigen/Eigen>
6
7namespace Ship{
8 struct Section
9 {
10 EIGEN_MAKE_ALIGNED_OPERATOR_NEW;
11
12 Section( const std::vector<double> & x, const std::vector<double> & y,const std::vector<double> & z);
13
14 double GetStationArea( double T );
15
16 double GetStationDraught( double T );
17
18 double GetStationMaxBredth(double T);
19
20 double GetStationBredth(double T);
21
22 double GetStationPosition();
23
24 void SectionLewisData( double B, double T, double &LewisA1, double &LewisA3, double &LewisScaleFactor );
25
26 int FindSkegPoint();
27
28 int m_skegPoint;
29 std::vector< Eigen::Vector3d > Vertices;
30 double m_minZ;
31
32 static bool z_less( const Eigen::Vector3d & lhs, const Eigen::Vector3d & rhs )
33 {
34 return lhs.z() < rhs.z();
35 }
36
37 static bool z_grt( const Eigen::Vector3d & lhs, const Eigen::Vector3d & rhs )
38 {
39 return lhs.z() > rhs.z();
40 }
41
42 static bool y_less( const Eigen::Vector3d & lhs, const Eigen::Vector3d & rhs )
43 {
44 return lhs.y() < rhs.y();
45 }
46
47 static bool y_grt( const Eigen::Vector3d & lhs, const Eigen::Vector3d & rhs )
48 {
49 return lhs.y() > rhs.y();
50 }
51
52 static bool x_less( const Eigen::Vector3d & lhs, const Eigen::Vector3d & rhs )
53 {
54 return lhs.x() < rhs.x();
55 }
56
57 static bool x_grt( const Eigen::Vector3d & lhs, const Eigen::Vector3d & rhs )
58 {
59 return lhs.x() > rhs.x();
60 }
61 };
62}
63#endif // Section2_h__
Simple waypoint object.
Definition: CableAttach.h:16
Definition: Section.h:9