20 #ifndef ANTKEEPER_GAME_ASTRONOMY_SYSTEM_HPP
21 #define ANTKEEPER_GAME_ASTRONOMY_SYSTEM_HPP
52 virtual void update(
float t,
float dt);
87 [[nodiscard]]
inline double get_time() const noexcept
103 void observer_modified();
106 void reference_body_modified();
109 void reference_orbit_modified();
112 void reference_atmosphere_modified();
115 void update_bcbf_to_eus(const ::observer_component& observer, const ::celestial_body_component& body);
118 void update_icrf_to_eus(const ::celestial_body_component& body, const ::orbit_component& orbit);
128 math::dvec3 integrate_transmittance(const ::observer_component& observer, const ::celestial_body_component& body, const ::atmosphere_component& atmosphere,
geom::ray<double, 3> ray)
const;
134 double time_centuries;
140 std::size_t transmittance_samples;
Calculates apparent properties of celestial bodies as seen by an observer.
void set_time(double t)
Sets the current time.
void set_moon_light(scene::directional_light *light)
virtual void update(float t, float dt)
Adds the timestep dt, scaled by set time scale, to the current time, then calculates apparent propert...
astronomy_system(entity::registry ®istry)
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_sky_pass(::render::sky_pass *pass)
void set_observer(entity::id eid)
Sets the observer entity.
void set_starlight_illuminance(const math::dvec3 &illuminance)
void set_sun_light(scene::directional_light *light)
void set_transmittance_samples(std::size_t samples)
Sets the number of samples to take when integrating atmospheric transmittance.
double get_time() const noexcept
Light source with parallel rays and constant intensity.
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.
Half of a line proceeding from an initial point.