Validate spaces passed to getViewerPose()

This commit is contained in:
Manish Goregaokar 2019-04-04 16:09:53 -07:00
parent e33896f3ec
commit 3d790278f1
3 changed files with 16 additions and 5 deletions

View file

@ -44,7 +44,6 @@ impl XRSpace {
/// The reference origin used is common between all
/// get_pose calls for spaces from the same device, so this can be used to compare
/// with other spaces
#[allow(unused)]
pub fn get_pose(&self, base_pose: &WebVRFrameData) -> RigidTransform3D<f64> {
if let Some(reference) = self.downcast::<XRReferenceSpace>() {
reference.get_pose(base_pose)
@ -65,4 +64,8 @@ impl XRSpace {
);
RigidTransform3D::new(rotation, translation)
}
pub fn session(&self) -> &XRSession {
&self.session
}
}