Struct turtle::event::ControllerAxis[]

pub struct ControllerAxis {
    pub id: i32,
    pub axis: u8,
    pub position: f64,
}

Components of a controller axis move event. Not guaranteed consistent across backends.

Fields

Which controller moved.

The axis that moved.

Position of the controller. Usually [-1.0, 1.0], though backends may use a different range for various devices.

Methods

impl ControllerAxisArgs

Create a new ControllerAxisArgs object. Intended for use by backends when emitting events.

Trait Implementations

impl Clone for ControllerAxisArgs

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for ControllerAxisArgs

Formats the value using the given formatter. Read more

impl From<ControllerAxisArgs> for Motion

Performs the conversion.

impl From<ControllerAxisArgs> for Input

Performs the conversion.

impl<'de> Deserialize<'de> for ControllerAxisArgs

Deserialize this value from the given Serde deserializer. Read more

impl Serialize for ControllerAxisArgs

Serialize this value into the given Serde serializer. Read more

impl Copy for ControllerAxisArgs

impl PartialEq<ControllerAxisArgs> for ControllerAxisArgs

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations