21 double pos[3] = {0.0, 0.0, 0.0};
22 double vel[3] = {0.0, 0.0, 0.0};
23 double relStrength = 1.0;
27 using PosAndVelSource = std::function<void(
double T,
const double* X,
double pos[3],
double vel[3])>;
32 void SetParams(
const double radius,
const double springStiffness,
const double damping);
51 void AddForce(
const Motion& motion,
double*
const adForce,
const double*
const adNodePos,
const double*
const adNodeVel)
const;
57 double m_radius = 0.0;
58 double m_springStiffness = 0.0;
59 double m_damping = 0.0;
64class ISimObjectCreator;
71AttractorNetBin& FindAttractor(ISimObjectCreator* creator,
const std::string& objectName,
const std::string& parameter,
const std::string& name);
The net bin of Seine/Vessel: a sphere that pulls the net and warp nodes inside it.
Definition AttractorNetBin.h:16
void AddForce(const Motion &motion, double *const adForce, const double *const adNodePos, const double *const adNodeVel) const
void SetPosAndVelSource(PosAndVelSource source)
Sets what moves the attractor (Seine/Vessel, when it creates it).
bool Contains(const Motion &motion, const double *const adNodePos) const
Whether adNodePos lies strictly inside the radius.
Motion MotionAt(double T, const double *X) const
std::function< double(double T)> StrengthSource
Gives the attractor's relative strength at time T.
Definition AttractorNetBin.h:30
void SetStrengthSource(StrengthSource source)
Sets what scales the attractor's pull (Seine/Operation, in its FinalSetup).
std::function< void(double T, const double *X, double pos[3], double vel[3])> PosAndVelSource
Gives the attractor's position and velocity at (T, X), X the model-global states.
Definition AttractorNetBin.h:27
Where the attractor is, how fast it moves, and how strongly it pulls.
Definition AttractorNetBin.h:20