pub struct Input { /* private fields */ }
Implementations
sourceimpl Input
impl Input
pub fn new() -> Self
pub fn update(
&mut self,
event: &WindowEvent<'_>,
camera_pos: Vec2<f32>,
window_size: Vec2<u32>,
fov: Vec2<f32>
)
pub fn get_last_input(&self) -> InputCode
pub fn get_cursor_pos(&self) -> Vec2<f32>
pub fn get_absolute_cursor_pos(&self) -> Vec2<f32>
pub fn add_event(&mut self, name: &'static str, key: InputCode)
pub fn remove_event(&mut self, name: &'static str)
pub fn clear(&mut self)
pub fn get_event(&mut self, name: &'static str) -> &mut InputEvent
pub fn is_touch(&self) -> bool
Auto Trait Implementations
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnwindSafe for Input
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more