ovrInputState

Struct ovrInputState 

Source
#[repr(C)]
pub struct ovrInputState {
Show 13 fields pub TimeInSeconds: f64, pub Buttons: c_uint, pub Touches: c_uint, pub IndexTrigger: [f32; 2], pub HandTrigger: [f32; 2], pub Thumbstick: [ovrVector2f; 2], pub ControllerType: ovrControllerType, pub IndexTriggerNoDeadzone: [f32; 2], pub HandTriggerNoDeadzone: [f32; 2], pub ThumbstickNoDeadzone: [ovrVector2f; 2], pub IndexTriggerRaw: [f32; 2], pub HandTriggerRaw: [f32; 2], pub ThumbstickRaw: [ovrVector2f; 2],
}
Expand description

ovrInputState describes the complete controller input state, including Oculus Touch, and XBox gamepad. If multiple inputs are connected and used at the same time, their inputs are combined.

Fields§

§TimeInSeconds: f64

System type when the controller state was last updated.

§Buttons: c_uint

Values for buttons described by ovrButton.

§Touches: c_uint

Touch values for buttons and sensors as described by ovrTouch.

§IndexTrigger: [f32; 2]

Left and right finger trigger values (ovrHand_Left and ovrHand_Right), in the range 0.0 to 1.0f. Returns 0 if the value would otherwise be less than 0.1176, for ovrControllerType_XBox. This has been formally named simply “Trigger”. We retain the name IndexTrigger for backwards code compatibility. User-facing documentation should refer to it as the Trigger.

§HandTrigger: [f32; 2]

Left and right hand trigger values (ovrHand_Left and ovrHand_Right), in the range 0.0 to 1.0f. This has been formally named “Grip Button”. We retain the name HandTrigger for backwards code compatibility. User-facing documentation should refer to it as the Grip Button or simply Grip.

§Thumbstick: [ovrVector2f; 2]

Horizontal and vertical thumbstick axis values (ovrHand_Left and ovrHand_Right), in the range -1.0f to 1.0f. Returns a deadzone (value 0) per each axis if the value on that axis would otherwise have been between -.2746 to +.2746, for ovrControllerType_XBox

§ControllerType: ovrControllerType

The type of the controller this state is for.

§IndexTriggerNoDeadzone: [f32; 2]

Left and right finger trigger values (ovrHand_Left and ovrHand_Right), in the range 0.0 to 1.0f. Does not apply a deadzone. Only touch applies a filter. This has been formally named simply “Trigger”. We retain the name IndexTrigger for backwards code compatibility. User-facing documentation should refer to it as the Trigger. Added in 1.7

§HandTriggerNoDeadzone: [f32; 2]

Left and right hand trigger values (ovrHand_Left and ovrHand_Right), in the range 0.0 to 1.0f. Does not apply a deadzone. Only touch applies a filter. This has been formally named “Grip Button”. We retain the name HandTrigger for backwards code compatibility. User-facing documentation should refer to it as the Grip Button or simply Grip. Added in 1.7

§ThumbstickNoDeadzone: [ovrVector2f; 2]

Horizontal and vertical thumbstick axis values (ovrHand_Left and ovrHand_Right), in the range -1.0f to 1.0f Does not apply a deadzone or filter. Added in 1.7

§IndexTriggerRaw: [f32; 2]

Left and right finger trigger values (ovrHand_Left and ovrHand_Right), in range 0.0 to 1.0f. No deadzone or filter This has been formally named “Grip Button”. We retain the name HandTrigger for backwards code compatibility. User-facing documentation should refer to it as the Grip Button or simply Grip.

§HandTriggerRaw: [f32; 2]

Left and right hand trigger values (ovrHand_Left and ovrHand_Right), in the range 0.0 to 1.0f. No deadzone or filter This has been formally named “Grip Button”. We retain the name HandTrigger for backwards code compatibility. User-facing documentation should refer to it as the Grip Button or simply Grip.

§ThumbstickRaw: [ovrVector2f; 2]

Horizontal and vertical thumbstick axis values (ovrHand_Left and ovrHand_Right), in the range -1.0f to 1.0f No deadzone or filter

Trait Implementations§

Source§

impl Clone for ovrInputState

Source§

fn clone(&self) -> ovrInputState

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ovrInputState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for ovrInputState

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.