FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
NetWithAttractor.h
1
9
10#pragma once
11
12// Includes
13#include "AttractorBase.h"
14#include <string>
15#include <vector>
16
17#include <net/NetStructure.h>
18
19// Class definition
21{
22public:
24 NetWithAttractor(std::string simObjectName, ISimObjectCreator* creator);
25
28
29 virtual void OdeFcn(const double dT, const double* const adX, double* const adXDot) const;
30 virtual void FinalSetup(const double dT, const double* const adX, ISimObjectCreator* const creator);
31
32protected:
33 void AddNetForces(const double dT, const double* const adX);
34 void AddAttractorForces(const double* const adX);
35
36 std::vector<AttractorBase*> m_VAttractors;
37 // unsigned long m_IInAttractorPos; ///< The index of the input port with position of the attractor (such as a net bin).
38 // unsigned long m_IInAttractorVel; ///< The index of the input port with velocity of the attractor (such as a net bin).
39 std::string m_attractorName;
40
41 double* m_padZero;
42 bool* m_isInBin;
43 // double m_breakawayForce;
44
45 // sfh::filters::IIR* m_forceFilter;
46};
Definition NetStructure.h:307
Class containing a net object with functionality to be affected by attractors.
Definition NetWithAttractor.h:21
NetWithAttractor(std::string simObjectName, ISimObjectCreator *creator)
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
Does nothing, as the object contains no states.
~NetWithAttractor()
The destructor deletes dynamically allocated memory.
std::string m_attractorName
The name of the attractor.
Definition NetWithAttractor.h:39