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
sourceimpl PointerState
impl PointerState
Any mouse button is down (always true for primary touches).
Trait Implementations
sourceimpl Clone for PointerState
impl Clone for PointerState
sourcefn clone(&self) -> PointerState
fn clone(&self) -> PointerState
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more