Skip to main content

SkyRotationSystem

Struct SkyRotationSystem 

Source
pub struct SkyRotationSystem { /* private fields */ }
Expand description

Advances the world’s celestial-sphere rotation on the fixed timestep.

Publishes the tick’s SkyOrientation and writes it onto the SkyRotation entity’s Transform, so the renderer, the lights and the transform hierarchy all read one rotation. Frozen while a world-pausing screen is open, like the rest of the simulation.

Implementations§

Source§

impl SkyRotationSystem

Source

pub fn new(rotation: &SkyRotation) -> Self

The system for a world’s authored rotation.

Trait Implementations§

Source§

impl Debug for SkyRotationSystem

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl System for SkyRotationSystem

Source§

fn init(&mut self, ctx: &mut PipelineContext<'_>)

Run once at World::start, before the first step.
Source§

fn step(&mut self, ctx: &mut PipelineContext<'_>) -> StepResult

Run once per tick.
Source§

fn access(&self) -> Access

The data step may touch, consulted once when the schedule is built (after init, so a data-dependent system can compute it from its compiled state). The default claims everything: an undeclared system is ordered against all others and never runs concurrently, which is always safe. Declaring narrower access is what admits a system to shared waves and to debug-build access validation.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.