Struct ovr_sys::ovrInputState
[−]
[src]
#[repr(C)]pub struct ovrInputState { 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], }
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
impl Debug for ovrInputState
[src]
impl Copy for ovrInputState
[src]
impl Clone for ovrInputState
[src]
fn clone(&self) -> ovrInputState
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more