mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Validate spaces passed to getViewerPose()
This commit is contained in:
parent
e33896f3ec
commit
3d790278f1
3 changed files with 16 additions and 5 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue