Struct ark_api::applet::input::PointerState
source · pub struct PointerState {
pub pos: Option<Vec2>,
pub ray: Option<Ray3>,
pub primary: bool,
pub secondary: bool,
pub middle: bool,
pub touch_id: Option<TouchId>,
}Expand description
The state of the pointer (mouse or touch).
Fields§
§pos: Option<Vec2>Logical point position of the pointer (mouse or touch).
Can be None if mouse is not on screen, or if there are no touches.
In case of multiple simultaneous touches, this will correspond to the first touch.
ray: Option<Ray3>World-space ray of the pointer (mouse or touch).
Can be None if mouse is not on screen, or if there are no touches.
In case of multiple simultaneous touches, this will correspond to the first touch.
primary: boolTrue if the primary button is currently down.
Left mouse button on most mice.
This is also set to true for the primary touch.
secondary: boolTrue if the secondary button is currently down. Left mouse button on most mice.
middle: boolTrue if the middle mouse button is currently down.
touch_id: Option<TouchId>The id of the first touch that went down (in case there are several touches).
This is the touch that is being represented by PointerState.
Implementations§
source§impl PointerState
impl PointerState
Any mouse button is down (always true for primary touches).
Trait Implementations§
source§impl Clone for PointerState
impl Clone for PointerState
source§fn clone(&self) -> PointerState
fn clone(&self) -> PointerState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for PointerState
impl Debug for PointerState
source§impl Default for PointerState
impl Default for PointerState
source§fn default() -> PointerState
fn default() -> PointerState
source§impl PartialEq<PointerState> for PointerState
impl PartialEq<PointerState> for PointerState
source§fn eq(&self, other: &PointerState) -> bool
fn eq(&self, other: &PointerState) -> bool
self and other values to be equal, and is used
by ==.