Enum ark_api::applet::TouchInput
source · [−]pub enum TouchInput {
Started {
finger_id: u32,
pos: Vec2,
ray_origin: Vec3,
ray_dir: Vec3,
},
Ended {
finger_id: u32,
pos: Vec2,
ray_origin: Vec3,
ray_dir: Vec3,
},
Move {
finger_id: u32,
pos: Vec2,
ray_origin: Vec3,
ray_dir: Vec3,
},
RelativeMove {
finger_id: u32,
delta_logical_pixels: Vec2,
delta_angle: Vec2,
},
}Expand description
Represents a touch input event.
Variants
Started
Fields
finger_id: u32Unique identifier of a finger
pos: Vec2Coordinate in logical pixels
ray_origin: Vec3World space origin of the ray (intersect this to find what you clicked on).
ray_dir: Vec3World space direction of the ray.
Every time a user touches the screen a new TouchInput::Started event is generated
Ended
Fields
finger_id: u32Unique identifier of a finger
pos: Vec2Coordinate in logical pixels
ray_origin: Vec3World space origin of the ray (intersect this to find what you clicked on).
ray_dir: Vec3World space direction of the ray.
When the finger is lifted, an TouchInput::Ended event is generated
Move
Fields
finger_id: u32Unique identifier of a finger
pos: Vec2Coordinate in logical pixels
ray_origin: Vec3World space origin of the ray (intersect this to find what you clicked on).
ray_dir: Vec3World space direction of the ray.
After a TouchInput::Started event has been emitted, there may be zero or more TouchInput::Move
events when the finger is moved.
RelativeMove
Fields
finger_id: u32Unique identifier of a finger
delta_logical_pixels: Vec2Movement delta in logical pixels (approximate).
delta_angle: Vec2Movement delta in radians. This is affected by the ark “mouse sensitivity” setting as well as “invert y axis”.
After a TouchInput::Started event has been emitted, there may be zero or more TouchInput::RelativeMove
events when the finger is moved.
Trait Implementations
sourceimpl Clone for TouchInput
impl Clone for TouchInput
sourcefn clone(&self) -> TouchInput
fn clone(&self) -> TouchInput
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 TouchInput
impl Debug for TouchInput
impl Copy for TouchInput
Auto Trait Implementations
impl RefUnwindSafe for TouchInput
impl Send for TouchInput
impl Sync for TouchInput
impl Unpin for TouchInput
impl UnwindSafe for TouchInput
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
