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