Marine systems simulation
CNetWithAttractor.h
1
9
10#ifndef CNetWithAttractor_H
11#define CNetWithAttractor_H
12
13// Includes
14#include <net/CNetStructure.h>
15#include "CAttractorBase.h"
16
17//Class definition
19{
20public:
21
23 CNetWithAttractor(std::string sSimObjectName, ISimObjectCreator* pCreator);
24
27
28 virtual void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep);
29 virtual void FinalSetup(const double dT, const double *const adX, ISimObjectCreator *const pCreator);
30protected:
31
32 void AddNetForces(const double dT, const double* const adX);
33 void AddAttractorForces(const double* const adX);
34
35 std::vector<CAttractorBase*> m_VAttractors;
36 //unsigned long m_IInAttractorPos; ///< The index of the input port with position of the attractor (such as a net bin).
37 //unsigned long m_IInAttractorVel; ///< The index of the input port with velocity of the attractor (such as a net bin).
38 std::string m_sAttractorName;
39
40 double* m_padZero;
41 bool* m_abIsInBin;
42 //double m_dBreakawayForce;
43
44 //sfh::filters::IIR* m_aForceFilter;
45};
46
47
48#endif
Definition: CNetStructure.h:203
Class containing a net object with functionality to be affected by attractors.
Definition: CNetWithAttractor.h:19
std::string m_sAttractorName
The name of the attractor.
Definition: CNetWithAttractor.h:38
~CNetWithAttractor()
The destructor deletes dynamically allocated memory.
CNetWithAttractor(std::string sSimObjectName, ISimObjectCreator *pCreator)
The constructor sets the pointer to the output object and the parser object.
virtual void OdeFcn(const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
Does nothing, as the object contains no states.