diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2019-04-04 16:09:53 -0700 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2019-04-04 17:22:08 -0700 |
commit | 3d790278f1033c1fbefd3d227ff3da7d842fb24d (patch) | |
tree | fc83c79a951d7887f107804576e16f478a31706d /components/script/dom/xrspace.rs | |
parent | e33896f3ecc21a4a16d830bbf7076dcbd4d3c55f (diff) | |
download | servo-3d790278f1033c1fbefd3d227ff3da7d842fb24d.tar.gz servo-3d790278f1033c1fbefd3d227ff3da7d842fb24d.zip |
Validate spaces passed to getViewerPose()
Diffstat (limited to 'components/script/dom/xrspace.rs')
-rw-r--r-- | components/script/dom/xrspace.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/dom/xrspace.rs b/components/script/dom/xrspace.rs index d9b5a1fc983..d9bbad8cd86 100644 --- a/components/script/dom/xrspace.rs +++ b/components/script/dom/xrspace.rs @@ -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 + } } |