#[repr(C)]pub struct TouchInput {
pub event_type: TouchEventType,
pub id: u32,
pub x: f32,
pub y: f32,
pub delta_angle: [f32; 2],
pub ray_origin: [f32; 3],
pub ray_dir: [f32; 3],
}
Fields§
§event_type: TouchEventType
Represents a touch event
id: u32
Unique identifier of a finger.
x: f32
Position or relative movement on the X axis. For positions, values are in logical pixels.
y: f32
Position or relative movement on the Y axis. For positions, values are in logical pixels.
delta_angle: [f32; 2]
Only for TouchEventType::RelativeMove
.
Rotation in radians, taking into account mouse sensitivity and optional invert y axis.
ray_origin: [f32; 3]
Ray origin (world space). Applicable for moves and button presses.
ray_dir: [f32; 3]
Ray direction (world space). Applicable for moves and button presses.
Implementations§
Source§impl TouchInput
impl TouchInput
pub fn to_touch_input_v0(self) -> TouchInput
Trait Implementations§
Source§impl CheckedBitPattern for TouchInput
impl CheckedBitPattern for TouchInput
Source§type Bits = TouchInputBits
type Bits = TouchInputBits
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(bits: &TouchInputBits) -> bool
fn is_valid_bit_pattern(bits: &TouchInputBits) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.Source§impl Clone for TouchInput
impl Clone for TouchInput
Source§fn clone(&self) -> TouchInput
fn clone(&self) -> TouchInput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TouchInput
impl Debug for TouchInput
Source§impl PartialEq for TouchInput
impl PartialEq for TouchInput
impl Copy for TouchInput
impl NoUninit for TouchInput
impl StructuralPartialEq for TouchInput
Auto Trait Implementations§
impl Freeze for TouchInput
impl RefUnwindSafe for TouchInput
impl Send for TouchInput
impl Sync for TouchInput
impl Unpin for TouchInput
impl UnwindSafe for TouchInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more