Marine systems simulation
ForceReceiver.h
1#ifndef ForceReceiver_h__
2#define ForceReceiver_h__
3
8#include <ISimObjectCreator.h>
9#include <Eigen/Eigen>
10#ifdef FH_VISUALIZATION
11#include "sfh/ogre/CMovableText.h"
12#include "sfh/ogre/C3DArrow.h"
13#endif
14
15class CFhSimMgr;
16
17namespace Ship{
18 class ForceReceiver: public SimObject
19 {
20 public:
21 ForceReceiver(const string simObjectName, ISimObjectCreator* const creator);
23
25 virtual void OdeFcn(const double T, const double* const X, double* const XDot, const bool bIsMajorTimeStep);
26
27 #ifdef FH_VISUALIZATION
28
30 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
31
33 virtual void RenderUpdate( const double T, const double* const X);
34 #endif
35
36 const double* Force(const double T, const double* const X);
37 const double* Torque(const double T, const double* const X);
38
39
40 private:
41
42 ISignalPort *m_InTargetPosition;
43 ISignalPort *m_InForcePosition;
44 ISignalPort *m_InForce;
45
46 double m_Force[3];
47 double m_Torque[3];
48
49
50 Eigen::Matrix<double,3,1> m_TargetPosition;
51 Eigen::Matrix<double,3,1> m_ForcePosition;
52
53
54 #ifdef FH_VISUALIZATION
55 std::string m_sMaterial;
56 std::string m_sMesh;
57 double m_dScale;
58 Ogre::Entity* m_RenderMass;
59 Ogre::SceneNode* m_RenderNode;
60
61 C3DArrow *m_ForceArrow;
62 Ogre::CMovableText *m_TextDisplay;
63
64 #endif
65 };
66}
67#endif // ForceReceiver_h__
Definition: ForceReceiver.h:19
virtual void OdeFcn(const double T, const double *const X, double *const XDot, const bool bIsMajorTimeStep)
Method for calculating the derivative of the object states, which must be implemented in the individu...
Simple waypoint object.
Definition: CableAttach.h:16