Trait ascending_camera::controls::Controls

source ·
pub trait Controls {
    // Required methods
    fn eye(&self) -> [f32; 3];
    fn update(&mut self, delta: f32) -> bool;
    fn view(&self) -> Mat4;

    // Provided method
    fn scale(&self) -> f32 { ... }
}

Required Methods§

source

fn eye(&self) -> [f32; 3]

Retrieves the eye position.

source

fn update(&mut self, delta: f32) -> bool

Processes the inputs and recalculates the view matrix and eye position if the state changed. Returns true if anything was updated, otherwise returns false.

source

fn view(&self) -> Mat4

Retrieves the view matrix.

Provided Methods§

source

fn scale(&self) -> f32

returns the scale if one exists. otherwise 1.0

Implementors§