Marine systems simulation
CMathfunction.h
1#ifndef CMathfunction_H
2#define CMathfunction_H
3
73#include "SimObject.h"
74
75#include <math.h>
76#include <string>
77
78class CMathfunction : public SimObject
79{
80 public:
82 CMathfunction(std::string sSimObjectName, ISimObjectCreator* pCreator);
84 virtual void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep) { }
85
86 const double* Output(const double T, const double* const X);
87
88
89#ifdef FH_VISUALIZATION
91 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator) { }
92
94 virtual void RenderUpdate(const double T, const double* const X) { }
95#endif
96
97 protected:
98 ISignalPort* m_Input1;
99 ISignalPort* m_Input2;
100
101 double* m_Signal;
102
106
108 {
109 MathType_Exp,
110 MathType_Log,
111 MathType_Log10,
112 MathType_Pow,
113 MathType_Sqrt,
114 MathType_Root,
115 };
118};
119
120
121#endif
Definition: CMathfunction.h:79
int m_iPortWidth
Definition: CMathfunction.h:104
int m_iNumInports
Number of Inputports.
Definition: CMathfunction.h:105
CMathfunction(std::string sSimObjectName, ISimObjectCreator *pCreator)
Constructor.
EMathType m_EMathType
Definition: CMathfunction.h:116
EMathType
< Enumerator for the kind of mathoperation
Definition: CMathfunction.h:108