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
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more