Antkeeper
0.0.1
|
Calculates apparent properties of celestial bodies as seen by an observer. More...
#include <astronomy-system.hpp>
Public Member Functions | |
astronomy_system (entity::registry ®istry) | |
~astronomy_system () | |
virtual void | update (float t, float dt) |
Adds the timestep dt , scaled by set time scale, to the current time, then calculates apparent properties of celestial bodies as seen by an observer. More... | |
void | set_time (double t) |
Sets the current time. More... | |
void | set_time_scale (double scale) |
Sets the factor by which the timestep dt will be scaled before being added to the current time. More... | |
void | set_observer (entity::id eid) |
Sets the observer entity. More... | |
void | set_transmittance_samples (std::size_t samples) |
Sets the number of samples to take when integrating atmospheric transmittance. More... | |
void | set_sun_light (scene::directional_light *light) |
void | set_moon_light (scene::directional_light *light) |
void | set_starlight_illuminance (const math::dvec3 &illuminance) |
void | set_sky_pass (::render::sky_pass *pass) |
double | get_time () const noexcept |
![]() | |
updatable_system (entity::registry ®istry) | |
Creates an updatable system. More... | |
Additional Inherited Members | |
![]() | |
entity::registry & | registry |
Registry on which the system operate. More... | |
Calculates apparent properties of celestial bodies as seen by an observer.
Definition at line 39 of file astronomy-system.hpp.
|
explicit |
Definition at line 40 of file astronomy-system.cpp.
astronomy_system::~astronomy_system | ( | ) |
Definition at line 74 of file astronomy-system.cpp.
|
inlinenoexcept |
Definition at line 87 of file astronomy-system.hpp.
void astronomy_system::set_moon_light | ( | scene::directional_light * | light | ) |
Definition at line 360 of file astronomy-system.cpp.
void astronomy_system::set_observer | ( | entity::id | eid | ) |
Sets the observer entity.
eid | Entity ID of the observer. |
Definition at line 337 of file astronomy-system.cpp.
void astronomy_system::set_sky_pass | ( | ::render::sky_pass * | pass | ) |
Definition at line 370 of file astronomy-system.cpp.
void astronomy_system::set_starlight_illuminance | ( | const math::dvec3 & | illuminance | ) |
Definition at line 365 of file astronomy-system.cpp.
void astronomy_system::set_sun_light | ( | scene::directional_light * | light | ) |
Definition at line 355 of file astronomy-system.cpp.
void astronomy_system::set_time | ( | double | t | ) |
Sets the current time.
t | Time since epoch, in days. |
Definition at line 326 of file astronomy-system.cpp.
void astronomy_system::set_time_scale | ( | double | scale | ) |
Sets the factor by which the timestep dt
will be scaled before being added to the current time.
scale | Factor by which to scale the timestep. |
Definition at line 332 of file astronomy-system.cpp.
void astronomy_system::set_transmittance_samples | ( | std::size_t | samples | ) |
Sets the number of samples to take when integrating atmospheric transmittance.
samples | Number of integration samples. |
Definition at line 350 of file astronomy-system.cpp.
|
virtual |
Adds the timestep dt
, scaled by set time scale, to the current time, then calculates apparent properties of celestial bodies as seen by an observer.
t | Time, in seconds. |
dt | Delta time, in seconds. |
Implements updatable_system.
Definition at line 90 of file astronomy-system.cpp.