Marine systems simulation
ShipCrane.h
1#ifndef CShipCrane_h__
2#define CShipCrane_h__
3
8#include <Eigen/Eigen>
9#include <SimObject.h>
10
11#ifdef FH_VISUALIZATION
12#include "sfh/ogre/C3DLine.h"
13#endif
14
15
16namespace Ship{
17 class ShipCrane: public SimObject
18 {
19 public:
20 EIGEN_MAKE_ALIGNED_OPERATOR_NEW;
21 ShipCrane(const string simObjectName, ISimObjectCreator* const creator);
22
23 void OdeFcn(const double T, const double* const X, double* const XDot, const bool bIsMajorTimeStep){};
24
25 #ifdef FH_VISUALIZATION
26 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
27 void RenderUpdate( const double T, const double* const X);
28 #endif
29 void Compute( const double T, const double* const _X );
30
31 const double * CraneTipPosition(const double T, const double* const X);
32 const double * CraneTipVelocity(const double T, const double* const X);
33
34 const double * ForceAtBase(const double T, const double* const X);
35 const double * TorqueAtBase(const double T, const double* const X);
36
37 private:
38
39 int m_numberOfJoints;
40 Eigen::Vector3d *m_jointPosition;
41 Eigen::Vector3d *m_jointVelocity;
42
43 ISignalPort *m_InBasePosition;
44 ISignalPort *m_InBaseVelocity;
45 ISignalPort *m_InBaseOrientation;
46 ISignalPort *m_InBaseOmega;
47
48 ISignalPort *m_InBaseAngle;
49 ISignalPort *m_InBaseAngleRate;
50
51 ISignalPort **m_InJointAngle;
52 ISignalPort **m_InJointAngleRate;
53 ISignalPort **m_InJointLength;
54
55 ISignalPort *m_InForceAtTip;
56
57 ICommonComputation *m_Compute;
58
59 Eigen::Vector3d m_BaseTorque;
60 Eigen::Vector3d m_TipVelocity;
61
62 #ifdef FH_VISUALIZATION
63 C3DLine * m_line;
64 Ogre::SceneNode** m_RenderNodes;
65 #endif
66
67 };
68}
69#endif // CWindForce_h__
Definition: ShipCrane.h:18
Simple waypoint object.
Definition: CableAttach.h:16