Trait blue_engine::Signal

source ·
pub trait Signal: Any {
    // Provided methods
    fn events(
        &mut self,
        _renderer: &mut Renderer,
        _window: &Window,
        _objects: &mut ObjectStorage,
        _events: &Event<()>,
        _input: &InputHelper,
        _camera: &mut Camera,
    ) { ... }
    fn frame(
        &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.

Provided Methods§

source

fn 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 frame( &mut self, _renderer: &mut Renderer, _window: &Window, _objects: &mut ObjectStorage, _camera: &mut Camera, _input: &InputHelper, _encoder: &mut CommandEncoder, _view: &TextureView, )

ran before the frame is rendered

Implementations§

source§

impl dyn Signal

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 Signal
where _T: Any,

Implementors§