mirror of
https://github.com/mii443/rust-openvr.git
synced 2025-08-23 16:49:31 +00:00
fixed minor bugs, opengl example is rendering now the lighthouse within the hmd
This commit is contained in:
@ -13,6 +13,14 @@ pub struct TrackedDevicePose {
|
||||
}
|
||||
|
||||
impl TrackedDevicePose {
|
||||
// returns the device class of the tracked object
|
||||
pub fn device_class(&self) -> openvr_sys::Enum_ETrackedDeviceClass {
|
||||
unsafe {
|
||||
let system = * { system().unwrap().0 as *mut openvr_sys::Struct_VR_IVRSystem_FnTable};
|
||||
system.GetTrackedDeviceClass.unwrap()(self.index as u32)
|
||||
}
|
||||
}
|
||||
|
||||
/// gets a propery as a string
|
||||
pub fn get_property_string(&self, property: openvr_sys::Enum_ETrackedDeviceProperty) -> Result<String, openvr_sys::Enum_ETrackedPropertyError> {
|
||||
unsafe {
|
||||
|
Reference in New Issue
Block a user