| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 module blink.mojom; | |
| 6 | |
| 7 // A field of view, given by 4 degrees describing the view from a center point. | |
| 8 struct VRFieldOfView { | |
| 9 float upDegrees; | |
| 10 float downDegrees; | |
| 11 float leftDegrees; | |
| 12 float rightDegrees; | |
| 13 }; | |
| 14 | |
| 15 // A display's position, orientation, velocity, and acceleration state at the | |
| 16 // given timestamp. | |
| 17 struct VRPose { | |
| 18 double timestamp; | |
| 19 array<float, 4>? orientation; | |
| 20 array<float, 3>? position; | |
| 21 array<float, 3>? angularVelocity; | |
| 22 array<float, 3>? linearVelocity; | |
| 23 array<float, 3>? angularAcceleration; | |
| 24 array<float, 3>? linearAcceleration; | |
| 25 }; | |
| 26 | |
| 27 struct VRDisplayCapabilities { | |
| 28 bool hasOrientation; | |
| 29 bool hasPosition; | |
| 30 bool hasExternalDisplay; | |
| 31 bool canPresent; | |
| 32 }; | |
| 33 | |
| 34 // Information about the optical properties for an eye in a VRDisplay. | |
| 35 struct VREyeParameters { | |
| 36 VRFieldOfView fieldOfView; | |
| 37 array<float, 3> offset; | |
| 38 uint32 renderWidth; | |
| 39 uint32 renderHeight; | |
| 40 }; | |
| 41 | |
| 42 struct VRStageParameters { | |
| 43 array<float, 16> standingTransform; | |
| 44 float sizeX; | |
| 45 float sizeZ; | |
| 46 }; | |
| 47 | |
| 48 struct VRDisplay { | |
| 49 uint32 index; | |
| 50 string displayName; | |
| 51 VRDisplayCapabilities capabilities; | |
| 52 VRStageParameters? stageParameters; | |
| 53 VREyeParameters leftEye; | |
| 54 VREyeParameters rightEye; | |
| 55 }; | |
| 56 | |
| 57 interface VRService { | |
| 58 GetDisplays() => (array<VRDisplay> displays); | |
| 59 [Sync] | |
| 60 GetPose(uint32 index) => (VRPose pose); | |
| 61 ResetPose(uint32 index); | |
| 62 }; | |
| OLD | NEW |