depth_cloud::framework

Trait Example

Source
pub trait Example {
    // Required methods
    fn title() -> &'static str;
    fn new(re_ctx: &RenderContext) -> Self;
    fn draw(
        &mut self,
        re_ctx: &RenderContext,
        resolution: [u32; 2],
        time: &Time,
        pixels_per_point: f32,
    ) -> Result<Vec<ViewDrawResult>>;

    // Provided methods
    fn on_key_event(&mut self, _event: KeyEvent) { ... }
    fn on_cursor_moved(&mut self, _position_in_pixel: UVec2) { ... }
}

Required Methods§

Source

fn title() -> &'static str

Source

fn new(re_ctx: &RenderContext) -> Self

Source

fn draw( &mut self, re_ctx: &RenderContext, resolution: [u32; 2], time: &Time, pixels_per_point: f32, ) -> Result<Vec<ViewDrawResult>>

Provided Methods§

Source

fn on_key_event(&mut self, _event: KeyEvent)

Source

fn on_cursor_moved(&mut self, _position_in_pixel: UVec2)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§