FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
RMCable.h
1#pragma once
62#include <string>
63
64#include <fhsim/simobject/SimObject.h>
65
66#ifdef FH_VISUALIZATION
67# include "sfh/ogre/C3DLine.h"
68#endif
69
70namespace RbCable
71{
72class RMCable : public SimObject
73{
74public:
75 RMCable(const std::string& simObjectName, ISimObjectCreator* const creator);
76 ~RMCable();
77 void OdeFcn(const double T, const double* const X, double* const XDot) const;
78
79
80 const double* totalLength(const double T, const double* const X);
81 const double* kineticEnergy(const double T, const double* const X);
82
83#ifdef FH_VISUALIZATION
84 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
85 void RenderUpdate(const double T, const double* const X);
86#endif
87
88protected:
89 int m_numElements;
90 int* m_pos;
91 int* m_vel;
92
93 double m_alpha;
94 double m_beta;
95 mutable int counter;
96
97 double m_totalLength;
98 double m_kineticEnergy;
99
100#ifdef FH_VISUALIZATION
101 C3DLine* m_line;
102#endif
103};
104
105} // namespace RbCable
Definition RMCable.h:73
RMCable(const std::string &simObjectName, ISimObjectCreator *const creator)
reads parameters, registers states, output and intput ports.