#pragma once #include #include #include #include "Vector.h" #include "GLWidget.h" class QPainter; class Pendulum { public: explicit Pendulum(const std::vector &M, const std::vector &L, QColor color, double startAngle); void draw(QPainter*, double) const; void update(double, double); private: friend class GLWidget; std::vector X, V; std::vector M, L; QColor color; };