pub trait EnginePlugin: Any {
    // Required methods
    fn update_events(
        &mut self,
        _renderer: &mut Renderer,
        _window: &Window,
        _objects: &mut ObjectStorage,
        _events: &Event<()>,
        _input: &InputHelper,
        _camera: &mut Camera
    );
    fn update(
        &mut self,
        _renderer: &mut Renderer,
        _window: &Window,
        _objects: &mut ObjectStorage,
        _camera: &mut Camera,
        _input: &InputHelper,
        _encoder: &mut CommandEncoder,
        _view: &TextureView
    );
}
Expand description

Allows all events to be fetched directly, making it easier to add custom additions to the engine.

Required Methods§

source

fn update_events( &mut self, _renderer: &mut Renderer, _window: &Window, _objects: &mut ObjectStorage, _events: &Event<()>, _input: &InputHelper, _camera: &mut Camera )

This is ran before any of the render events, it’s generally used to capture raw input.

source

fn update( &mut self, _renderer: &mut Renderer, _window: &Window, _objects: &mut ObjectStorage, _camera: &mut Camera, _input: &InputHelper, _encoder: &mut CommandEncoder, _view: &TextureView )

ran after an update loop code is done on each frame

Implementations§

source§

impl dyn EnginePlugin

source

pub fn is<_T>(&self) -> bool
where _T: Any, Self: Downcast<_T>,

source

pub fn downcast_ref<_T>(&self) -> Result<&_T, TypeMismatch>
where _T: Any, Self: Downcast<_T>,

source

pub fn downcast_mut<_T>(&mut self) -> Result<&mut _T, TypeMismatch>
where _T: Any, Self: Downcast<_T>,

source

pub fn downcast<_T>( self: Box<Self> ) -> Result<Box<_T>, DowncastError<Box<Self>>>
where _T: Any, Self: Downcast<_T>,

source

pub fn downcast_rc<_T>( self: Rc<Self> ) -> Result<Rc<_T>, DowncastError<Rc<Self>>>
where _T: Any, Self: Downcast<_T>,

Trait Implementations§

source§

impl<_T> Downcast<_T> for dyn EnginePlugin
where _T: Any,

Implementors§