Antkeeper  0.0.1
Public Member Functions | List of all members
astronomy_system Class Reference

Calculates apparent properties of celestial bodies as seen by an observer. More...

#include <astronomy-system.hpp>

Inheritance diagram for astronomy_system:
updatable_system

Public Member Functions

 astronomy_system (entity::registry &registry)
 
 ~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
 
- Public Member Functions inherited from updatable_system
 updatable_system (entity::registry &registry)
 Creates an updatable system. More...
 

Additional Inherited Members

- Protected Attributes inherited from updatable_system
entity::registryregistry
 Registry on which the system operate. More...
 

Detailed Description

Calculates apparent properties of celestial bodies as seen by an observer.

Definition at line 39 of file astronomy-system.hpp.

Constructor & Destructor Documentation

◆ astronomy_system()

astronomy_system::astronomy_system ( entity::registry registry)
explicit

Definition at line 40 of file astronomy-system.cpp.

◆ ~astronomy_system()

astronomy_system::~astronomy_system ( )

Definition at line 74 of file astronomy-system.cpp.

Member Function Documentation

◆ get_time()

double astronomy_system::get_time ( ) const
inlinenoexcept

Definition at line 87 of file astronomy-system.hpp.

◆ set_moon_light()

void astronomy_system::set_moon_light ( scene::directional_light light)

Definition at line 360 of file astronomy-system.cpp.

◆ set_observer()

void astronomy_system::set_observer ( entity::id  eid)

Sets the observer entity.

Parameters
eidEntity ID of the observer.

Definition at line 337 of file astronomy-system.cpp.

◆ set_sky_pass()

void astronomy_system::set_sky_pass ( ::render::sky_pass pass)

Definition at line 370 of file astronomy-system.cpp.

◆ set_starlight_illuminance()

void astronomy_system::set_starlight_illuminance ( const math::dvec3 illuminance)

Definition at line 365 of file astronomy-system.cpp.

◆ set_sun_light()

void astronomy_system::set_sun_light ( scene::directional_light light)

Definition at line 355 of file astronomy-system.cpp.

◆ set_time()

void astronomy_system::set_time ( double  t)

Sets the current time.

Parameters
tTime since epoch, in days.

Definition at line 326 of file astronomy-system.cpp.

◆ set_time_scale()

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.

Parameters
scaleFactor by which to scale the timestep.

Definition at line 332 of file astronomy-system.cpp.

◆ set_transmittance_samples()

void astronomy_system::set_transmittance_samples ( std::size_t  samples)

Sets the number of samples to take when integrating atmospheric transmittance.

Parameters
samplesNumber of integration samples.

Definition at line 350 of file astronomy-system.cpp.

◆ update()

void astronomy_system::update ( float  t,
float  dt 
)
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.

Parameters
tTime, in seconds.
dtDelta time, in seconds.

Implements updatable_system.

Definition at line 90 of file astronomy-system.cpp.


The documentation for this class was generated from the following files: