cpp/motions/base.h
2024-08-23 18:33:38 +02:00

40 lines
901 B
C++

//
// Created by dominik on 8/12/24.
//
#ifndef RWSIM_MOTIONBASE_H
#define RWSIM_MOTIONBASE_H
#include "coordinates.h"
#include <random>
class Motion {
public:
virtual ~Motion() = default;
Motion(double, double, std::mt19937_64&);
explicit Motion(std::mt19937_64&);
SphericalPos draw_position();
[[nodiscard]] double omega_q(double, double) const;
[[nodiscard]] double omega_q(const SphericalPos&) const;
virtual void initialize() = 0;
virtual double jump() = 0;
[[nodiscard]] double getDelta() const { return m_delta; }
void setDelta(const double delta) { m_delta = delta; }
[[nodiscard]] double getEta() const { return m_eta; }
void setEta(const double eta) { m_eta = eta; }
protected:
double m_delta{1.};
double m_eta{0.};
std::mt19937_64& m_rng;
std::uniform_real_distribution<> m_uni_dist;
};
#endif //RWSIM_MOTIONBASE_H