pub struct ElementPointerState {}Expand description
Per-element continuous pointer state
Fields§
§x: f32Normalized X position in configured range
y: f32Normalized Y position in configured range
vx: f32X velocity (normalized units/sec)
vy: f32Y velocity (normalized units/sec)
speed: f32Total speed (sqrt(vx² + vy²))
distance: f32Distance from origin (in normalized units)
angle: f32Angle from origin (radians, 0 = right, π/2 = up)
inside: boolWhether the pointer is inside the element’s bounds (raw boolean)
smooth_inside: f32Smoothed inside value (0.0 → 1.0 with exponential smoothing)
active: boolWhether the pointer button is pressed while over this element
pressure: f32Smoothed pointer pressure (0.0-1.0) Touch: actual hardware pressure. Mouse: 0.0 released, 1.0 pressed.
touch_count: u32Number of active touch points (0 for mouse-only input)
hover_duration: f32Seconds since pointer entered (0 if not inside)
Implementations§
Source§impl ElementPointerState
impl ElementPointerState
Sourcepub fn resolve_env(&self, name: &str) -> Option<f32>
pub fn resolve_env(&self, name: &str) -> Option<f32>
Resolve an environment variable name to its current value
Trait Implementations§
Source§impl Clone for ElementPointerState
impl Clone for ElementPointerState
Source§fn clone(&self) -> ElementPointerState
fn clone(&self) -> ElementPointerState
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 ElementPointerState
impl Debug for ElementPointerState
Auto Trait Implementations§
impl Freeze for ElementPointerState
impl RefUnwindSafe for ElementPointerState
impl Send for ElementPointerState
impl Sync for ElementPointerState
impl Unpin for ElementPointerState
impl UnsafeUnpin for ElementPointerState
impl UnwindSafe for ElementPointerState
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