Marine systems simulation
CMass.h
1
10
11#ifndef CMass_H
12#define CMass_H
13
14#include <string>
15#include "SimObject.h"
16
17
18class CMass : public SimObject
19{
20public:
22 CMass(std::string sSimObjectName, ISimObjectCreator* pCreator );
23
24#ifdef FH_VISUALIZATION
26 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
27
29 virtual void RenderUpdate(const double T, const double* const X);
30#endif
31
33 virtual void OdeFcn(const double dT, const double* const adX,
34 double* const adXDot, const bool bIsMajorTimeStep);
35
36protected:
37 virtual const double* Position(const double dT, const double* const adX);
38 virtual const double* Velocity(const double dT, const double* const adX);
39
40 double m_dMass;
41 double m_dg;
42 ISignalPort* m_pInForce;
45
46
47#ifdef FH_VISUALIZATION
48 std::string m_sMaterial;
49 std::string m_sMeshName;
50 double m_dScale;
51 Ogre::Entity* m_pRenderEntity;
52 Ogre::SceneNode* m_pRenderNode;
53 Ogre::SceneManager* m_pSceneMgr;
54#endif
55};
56
57
58#endif
Class containing a 3dof mass simObjec without gravity.
Definition: CMass.h:19
double m_dg
The acceleration of gravity.
Definition: CMass.h:41
int m_IStateVel
The index of the velocity state.
Definition: CMass.h:44
double m_dMass
The mass of the object.
Definition: CMass.h:40
virtual void OdeFcn(const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
Calculates the state derivatives.
CMass(std::string sSimObjectName, ISimObjectCreator *pCreator)
The constructor sets the pointer to the output object and the parser object.
int m_IStatePos
The index of the position state.
Definition: CMass.h:43
ISignalPort * m_pInForce
A pointer to the input force.
Definition: CMass.h:42