mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update to treat view transforms as native-relative
This commit is contained in:
parent
a97dcd9ad6
commit
d627476893
6 changed files with 74 additions and 85 deletions
|
@ -791,11 +791,14 @@ impl XRSessionMethods for XRSession {
|
|||
|
||||
// The pose of an object in native-space. Should never be exposed.
|
||||
pub type ApiPose = RigidTransform3D<f32, ApiSpace, webxr_api::Native>;
|
||||
// The pose of the viewer in some api-space.
|
||||
pub type ApiViewerPose = RigidTransform3D<f32, webxr_api::Viewer, ApiSpace>;
|
||||
// A transform between objects in some API-space
|
||||
pub type ApiRigidTransform = RigidTransform3D<f32, ApiSpace, ApiSpace>;
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct BaseSpace;
|
||||
|
||||
pub type BaseTransform = RigidTransform3D<f32, webxr_api::Native, BaseSpace>;
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
pub fn cast_transform<T, U, V, W>(
|
||||
transform: RigidTransform3D<f32, T, U>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue