Last active
April 19, 2017 16:36
-
-
Save MortimerGoro/e06b6b5e9625cc98a7aa467ca5afeb67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub trait VRGamepad { | |
fn id(&self) -> u32; | |
// Constant data for the gamepad. | |
fn data(&self) -> VRGamepadData; | |
// Data that should be polled every frame. | |
fn state(&self) -> VRGamepadState; | |
} | |
pub struct VRGamepadState { | |
pub connected: bool, | |
pub timestamp: f64, | |
pub axes: Vec<f64>, | |
pub buttons: Vec<VRGamepadButton>, | |
pub pose: VRPose | |
} | |
pub struct VRGamepadData { | |
pub display_id: u32, | |
pub name: String, | |
pub hand: VRGamepadHand | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment