Marine systems simulation
CCableConnector.h
1
70#ifndef RBCABLE__CCableConnector_h__
71#define RBCABLE__CCableConnector_h__
72
73#include <SimObject.h>
74
75namespace RbCable
76{
77 class CCableConnector : public SimObject
78 {
79 public:
80 CCableConnector(const string& simObjectName, ISimObjectCreator* const creator);
81 // ~CCableConnector();
82 void OdeFcn(const double T, const double* const X, double* const XDot, const bool bIsMajorTimeStep);
83 // void InitialConditionSetup(const double T, const double *const currentIC, double* const updatedIC, ISimObjectCreator* const creator);
84
85 const double* PositionA(const double dT, const double* const adX);
86 const double* VelocityA(const double dT, const double* const adX);
87 const double* PositionB(const double dT, const double* const adX);
88 const double* VelocityB(const double dT, const double* const adX);
89
90
91
92#ifdef FH_VISUALIZATION
94 virtual void RenderInit(Ogre::Root* const pOgreRoot, ISimObjectCreator* const pCreator);
95
97 virtual void RenderUpdate(const double dT, const double* const adX);
98#endif
99
100 protected:
101
102 double m_dMass;
103 double m_dGravity;
104 double m_adLength[3];
105 ISignalPort* m_pInForceA;
106 ISignalPort* m_pInForceB;
109
110 double m_posA[3];
111 double m_posB[3];
112
113
114#ifdef FH_VISUALIZATION
115 std::string m_sMaterial;
116 std::string m_sMeshName;
117 double m_dScale;
118 Ogre::Entity* m_pRenderEntity;
119 Ogre::SceneNode* m_pRenderNode;
120 Ogre::SceneManager* m_pSceneMgr;
121#endif
122 };
123}
124#endif // CCableConnector_h__
Definition: CCableConnector.h:78
double m_posB[3]
The position of connector B.
Definition: CCableConnector.h:111
ISignalPort * m_pInForceB
A pointer to input B force.
Definition: CCableConnector.h:106
CCableConnector(const string &simObjectName, ISimObjectCreator *const creator)
reads parameters, registers states, output and intput ports.
ISignalPort * m_pInForceA
A pointer to input A force.
Definition: CCableConnector.h:105
double m_dMass
The mass of the object.
Definition: CCableConnector.h:102
double m_posA[3]
The position of connector A.
Definition: CCableConnector.h:110
double m_dGravity
The gravitational acceleration.
Definition: CCableConnector.h:103
int m_IStatePos
The index of the position state.
Definition: CCableConnector.h:107
int m_IStateVel
The index of the velocity state.
Definition: CCableConnector.h:108
double m_adLength[3]
The vector between connectors;.
Definition: CCableConnector.h:104