Marine systems simulation
CSeineConnector.h
1#pragma once
2
14#include <stdio.h>
15#include <string>
16
17#include "SimObject.h"
18
19class CSeineConnector : public SimObject
20{
21public:
23 CSeineConnector(std::string sSimObjectName, ISimObjectCreator *pCreator);
24
27
29 virtual void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep);
30
32
33#ifdef FH_VISUALIZATION
35 virtual void RenderInit(Ogre::Root* const pOgreRoot, ISimObjectCreator* const pCreator);
36
38 virtual void RenderUpdate(const double dT, const double* const adX);
39#endif
40
41 const virtual double * Pos(const double dT, const double *const adX);
42
43 const double *const GetPos( const double dT, const double *const adX );
44
45 const virtual double * Vel(const double dT, const double *const adX);
46
47
48protected:
49
50 ISignalPort* m_pInIsConnected;
51 ISignalPort* m_pInPos1;
52 ISignalPort* m_pInVel1;
53 ISignalPort* m_pInPos2;
54 ISignalPort* m_pInVel2;
55
56
57
58 int m_IOutPos;
59 int m_IOutVel;
60 int m_IInConnected;
61
62
63 int m_IInPos1;
64 int m_IInVel1;
65 int m_IInPos2;
66 int m_IInVel2;
67
68 //double m_adPos[3];
69 //double m_adVel[3];
70 //bool m_bIsConnected;
71
72#ifdef FH_VISUALIZATION
73 Ogre::Entity* m_RenderMass;
74 Ogre::SceneNode* m_RenderNode;
75#endif
76
77};
Definition: CSeineConnector.h:20
virtual void OdeFcn(const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
Calculates the state derivatives.
ISignalPort * m_pInVel1
A pointer to the input velocity 1.
Definition: CSeineConnector.h:52
CSeineConnector(std::string sSimObjectName, ISimObjectCreator *pCreator)
The constructor sets the pointer to the output object and the parser object.
~CSeineConnector()
The destructor cleans up.
ISignalPort * m_pInPos1
A pointer to the input position 1.
Definition: CSeineConnector.h:51
ISignalPort * m_pInVel2
A pointer to the input velocity 2.
Definition: CSeineConnector.h:54
virtual const double * Pos(const double dT, const double *const adX)
Writes to the output ports.
ISignalPort * m_pInIsConnected
A pointer to the input telling if the connector is connected to pos 1 or pos 2.
Definition: CSeineConnector.h:50
ISignalPort * m_pInPos2
A pointer to the input position 2.
Definition: CSeineConnector.h:53