Marine systems simulation
CToCollar.h
1
9
10#ifndef CToCollar_H
11#define CToCollar_H
12
13#include <stdio.h>
14#include <string>
15#include "ISimObjectCreator.h"
16#include "sfh/math.h"
17
18
19namespace Netcage {
20
21const double m_PI = 3.1415926;
22
23class CToCollar : public SimObject
24{
25public:
26
28 CToCollar(const string& simobjectname, ISimObjectCreator* const creator);
29
32
34 virtual void OdeFcn(const double T, const double *const X, double *const XDot, const bool bIsMajorTimeStep);
35
37 const double* outputConnectorPos(const double T, const double* const X, const int index);
38 const double* outputCentrePos(const double T, const double* const X);
39
40#ifdef FH_VISUALIZATION
41
43 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
44
46 virtual void RenderUpdate(const double T, const double* const X);
47
48#endif
49
50protected:
51 //const double** m_OutputArrays; ///< holds pointers to all output port arrays
52 double** m_NetConnectPos;
53 double** m_NetConnectPosGlobal;
54 double m_CentrePos[3];
55
56 //unsigned short* m_aIOutConnectorPos;
58
59 double m_Diameter;
60 int m_iNumConnectors;
61
62#ifdef FH_VISUALIZATION
63 Ogre::Entity* m_RenderMass;
64 Ogre::SceneNode* m_RenderNode;
65 Ogre::Quaternion m_InitOrientation;
66 double m_Scale;
67 std::string m_MeshName;
68 //CFhCamera* m_pCamera; ///< Pointer to the camera
69#endif
70
71};
72
73
74#endif
75
76} // namespace
Definition: CToCollar.h:24
~CToCollar()
The destructor cleans up.
virtual void OdeFcn(const double T, const double *const X, double *const XDot, const bool bIsMajorTimeStep)
Calculates the state derivatives.
double ** m_NetConnectPos
holds pointers to all net connection pos arrays
Definition: CToCollar.h:52
const double * outputConnectorPos(const double T, const double *const X, const int index)
Writes to the output ports.
CToCollar(const string &simobjectname, ISimObjectCreator *const creator)
The constructor sets the pointer to the output object and the parser object.
int m_IStatePos
Centre position of ring.
Definition: CToCollar.h:57
Class modelling a Net cage.
Definition: CBottomRing.h:35