Struct client::daytime::DayTime [] [src]

pub struct DayTime {
    // some fields omitted
}

Methods

impl DayTime
[src]

fn set_time(&mut self, time_year: u32, time_day: u32, time_on_day: f32)

fn get_sun_color(&self) -> Vector3f

fn get_sky_light(&self) -> Vector3f

fn get_time_year(&self) -> u32

fn get_time_day(&self) -> u32

fn get_time_on_day(&self) -> f32

fn update(&mut self, delta: f32)

Updates time with the use of delta as additionally passed time DAY_LENGTH defines the length of a day in real-life seconds YEAR_LENGTH defines the length of a year in DAY_LENGTHs

fn get_sun_position(&self) -> Point3f

returns the position of the sun corresponding to time only mid summer

fn get_sun_light_vector(&self) -> Vector3f

returns the Vector3f for the directional sunlight

Trait Implementations

impl Debug for DayTime
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Default for DayTime
[src]

fn default() -> DayTime

Returns the "default value" for a type. Read more

impl EventHandler for DayTime
[src]

Handler to speed up time with use of '+' key

fn handle_event(&mut self, e: &Event) -> EventResponse