Marine systems simulation
CMass.h
1#ifndef CMass_H
2#define CMass_H
3
81#include "SimObject.h"
82
83#include <string>
84
85
86class CMass : public SimObject
87{
88 public:
90 CMass(std::string sSimObjectName, ISimObjectCreator* pCreator);
91
92#ifdef FH_VISUALIZATION
94 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
95
97 virtual void RenderUpdate(const double T, const double* const X);
98#endif
99
101 virtual void OdeFcn(const double dT, const double* const adX,
102 double* const adXDot, const bool bIsMajorTimeStep);
103
104 protected:
105 virtual const double* Position(const double dT, const double* const adX);
106 virtual const double* Velocity(const double dT, const double* const adX);
107
108 double m_dMass;
109 ISignalPort* m_pInForce;
110 int m_IStatePos;
111 int m_IStateVel;
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
125#endif
Class containing a 3dof mass simObjec without gravity.
Definition: CMass.h:19
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