Enum ark_api::applet::MouseInput
source · [−]pub enum MouseInput {
Move {
pos: Vec2,
ray_origin: Vec3,
ray_dir: Vec3,
},
ButtonPress {
button: MouseButton,
pos: Vec2,
ray_origin: Vec3,
ray_dir: Vec3,
},
ButtonRelease {
button: MouseButton,
pos: Vec2,
ray_origin: Vec3,
ray_dir: Vec3,
},
RelativeMove {
delta_logical_pixels: Vec2,
delta_angle: Vec2,
},
Scroll {
delta: Vec2,
},
}
Expand description
Represents a mouse input event.
Variants
Move
Fields
pos: Vec2
Coordinate in logical pixels
ray_origin: Vec3
World space origin of the ray (intersect this to find what you clicked on).
ray_dir: Vec3
World space direction of the ray.
Mouse move
ButtonPress
Fields
Which pointer button was pressed
pos: Vec2
Coordinate in logical pixels
ray_origin: Vec3
World space origin of the click ray (intersect this to find what you clicked on).
ray_dir: Vec3
World space direction of the click ray.
Mouse button press
ButtonRelease
Fields
Which pointer button was released
pos: Vec2
Coordinate in logical pixels
ray_origin: Vec3
World space origin of the click ray (intersect this to find what you clicked on).
ray_dir: Vec3
World space direction of the click ray.
Mouse button release
RelativeMove
Fields
delta_logical_pixels: Vec2
Raw (unaccelerated) mouse movement in unspecified units. Different devices may use different units, but in practice it should be close to logical pixels.
delta_angle: Vec2
Movement delta in radians. This is affected by the ark “mouse sensitivity” setting as well as “invert y axis”.
Relative cursor movement (higher precision, works at screen border).
This event is disabled and won’t be emitted when the window is not focused or when the Ark developer UI is visible. Press tab to show and hide the developer UI.
Scroll
Fields
delta: Vec2
Movement vector
Mouse wheel/trackpad scroll movement.
Trait Implementations
sourceimpl Clone for MouseInput
impl Clone for MouseInput
sourcefn clone(&self) -> MouseInput
fn clone(&self) -> MouseInput
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MouseInput
impl Debug for MouseInput
impl Copy for MouseInput
Auto Trait Implementations
impl RefUnwindSafe for MouseInput
impl Send for MouseInput
impl Sync for MouseInput
impl Unpin for MouseInput
impl UnwindSafe for MouseInput
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more