#[repr(C)]pub struct MouseInput {
pub event_type: MouseEventType,
pub button: MouseButton,
pub x: f32,
pub y: f32,
pub ray_origin: [f32; 3],
pub ray_dir: [f32; 3],
}
Fields§
§event_type: MouseEventType
If event_type == ButtonPress
or ButtonRelease
, indicates which button was pressed.
x: f32
Position, wheel or relative movement on the X axis. For positions, values are in logical pixels.
y: f32
Position, wheel or relative movement on the Y axis. For positions, values are in logical pixels.
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.
Trait Implementations§
Source§impl CheckedBitPattern for MouseInput
impl CheckedBitPattern for MouseInput
Source§type Bits = MouseInputBits
type Bits = MouseInputBits
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: &MouseInputBits) -> bool
fn is_valid_bit_pattern(bits: &MouseInputBits) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.Source§impl Clone for MouseInput
impl Clone for MouseInput
Source§fn clone(&self) -> MouseInput
fn clone(&self) -> MouseInput
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 MouseInput
impl Debug for MouseInput
Source§impl PartialEq for MouseInput
impl PartialEq for MouseInput
impl Copy for MouseInput
impl NoUninit for MouseInput
impl StructuralPartialEq for MouseInput
Auto Trait Implementations§
impl Freeze for MouseInput
impl RefUnwindSafe for MouseInput
impl Send for MouseInput
impl Sync for MouseInput
impl Unpin for MouseInput
impl UnwindSafe for MouseInput
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