Simplify TrackedDevicePoses

This commit is contained in:
Benjamin Saunders
2017-05-14 12:31:27 -07:00
parent c19014ba8c
commit 36d345caf8
4 changed files with 5 additions and 21 deletions

View File

@ -65,20 +65,4 @@ pub enum TrackedControllerRole {
RightHand = sys::ETrackedControllerRole_ETrackedControllerRole_TrackedControllerRole_RightHand as isize,
}
#[derive(Debug, Copy, Clone)]
pub struct TrackedDevicePoses {
data: [TrackedDevicePose; sys::k_unMaxTrackedDeviceCount as usize]
}
impl TrackedDevicePoses {
pub fn iter(&self) -> slice::Iter<TrackedDevicePose> { self.data.iter() }
pub fn len(&self) -> usize { self.data.len() }
}
impl ::std::ops::Index<TrackedDeviceIndex> for TrackedDevicePoses {
type Output = TrackedDevicePose;
fn index(&self, index: TrackedDeviceIndex) -> &TrackedDevicePose {
&self.data[index as usize]
}
}
pub type TrackedDevicePoses = [TrackedDevicePose; sys::k_unMaxTrackedDeviceCount as usize];