20 #ifndef ANTKEEPER_GAME_ORBIT_SYSTEM_HPP
21 #define ANTKEEPER_GAME_ORBIT_SYSTEM_HPP
28 #include <unordered_set>
46 virtual void update(
float t,
float dt);
73 std::shared_ptr<physics::orbit::ephemeris<double>> ephemeris;
76 std::vector<math::dvec3> positions;
77 std::unordered_set<int> ephemeris_indices;
Updates the Cartesian position and velocity of orbiting bodies given their Keplerian orbital elements...
void set_time_scale(double scale)
Sets the factor by which the timestep dt will be scaled before being added to the current time.
void set_time(double time)
Sets the current time.
virtual void update(float t, float dt)
Scales then adds the timestep dt to the current time, then recalculates the positions of orbiting bod...
void set_ephemeris(std::shared_ptr< physics::orbit::ephemeris< double >> ephemeris)
Sets the ephemeris used to calculate orbital positions.
orbit_system(entity::registry ®istry)
Abstract base class for updatable systems.
entity::registry & registry
Registry on which the system operate.
entt::registry registry
Component registry type.
entt::entity id
Entity ID type.
constexpr mat4< T > scale(const vec3< T > &v)
Constructs a scale matrix.
Table of orbital trajectories.