[][src]Struct keeshond::scene::Scene

pub struct Scene { /* fields omitted */ }

A world in which Entities, Components, and ThinkerSystems/DrawerSystems reside.

Methods

impl Scene[src]

pub fn new() -> Scene[src]

Creates a new Scene

pub fn component_control(&self) -> &ComponentControl[src]

Returns a reference to the control used to access ComponentStores. You normally don't need to call this yourself.

pub fn component_control_mut(&mut self) -> &mut ComponentControl[src]

Returns a mutable reference to the control used to access ComponentStores. You normally don't need to call this yourself.

pub fn register_component_type<T: Component + 'static>(&mut self) -> bool[src]

pub fn add_component<T: Component + 'static>(
    &mut self,
    entity: &Entity,
    component: T
) -> bool
[src]

Attaches a Component to the given Entity. Returns true if successful.

pub fn remove_component<T: Component + 'static>(
    &mut self,
    entity: &Entity
) -> bool
[src]

Detaches a Component from the given Entity. Returns true if successful.

pub fn add_entity(&mut self) -> Entity[src]

Creates a new Entity within the scene, returning its handler.

pub fn remove_entity(&mut self, entity: &Entity) -> bool[src]

Removes the Entity with the given handle from the scene. Returns true if successful.

pub fn has_entity(&self, entity: &Entity) -> bool[src]

Returns true if the scene has the given Entity.

pub fn entity_count(&self) -> usize[src]

Returns the number of Entities in the scene

pub fn add_thinker_system(&mut self, system: Box<dyn ThinkerSystem>)[src]

Adds the given ThinkerSystem to the scene

pub fn add_drawer_system(&mut self, system: Box<dyn DrawerSystem>)[src]

Adds the given DrawerSystem to the scene

pub fn think(&mut self, game: &mut GameControl)[src]

Processes all the ThinkerSystems in this scene. You normally do not need to call this yourself, as the Gameloop handles this for you.

pub fn draw(
    &mut self,
    drawing: &mut Box<dyn DrawControl>,
    transform: &Mat3,
    interpolation: f32
)
[src]

Processes all the DrawerSystems in this scene. You normally do not need to call this yourself, as the Gameloop handles this for you.

Auto Trait Implementations

impl !Send for Scene

impl !Sync for Scene

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<S> FromSample<S> for S

impl<T, U> ToSample<U> for T where
    U: FromSample<T>, 

impl<S, T> Duplex<S> for T where
    T: FromSample<S> + ToSample<S>, 

impl<T> Erased for T

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>,