#pragma once #include "gfx.hpp" #include "icosphere.hpp" #include "widget.hpp" #include #include class Orbiter { public: Orbiter(Icosphere& sphere, Orbit& orbit, GLuint shaderProgram); ~Orbiter(); void render(const float time); void cycleAnimation(); private: void updateModelMatrix(); float getMeanAnomaly(); glm::vec3 getPosition(const float time); void getOrbitalElements(const float time, Vector6& keplerianElements); Icosphere& _sphere; Orbit& _orbit; Widget _widget; const float ORBITAL_PERIOD = 6.284; // TODO: convert these to an enum const int ANIM_ORBITING = 0; const int ANIM_ECCENTRICITY = 1; int _animation = ANIM_ORBITING; };