Struct ovr_sys::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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.