| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 module device; | 5 module device; |
| 6 | 6 |
| 7 // A field of view, given by 4 degrees describing the view from a center point. | 7 // A field of view, given by 4 degrees describing the view from a center point. |
| 8 struct VRFieldOfView { | 8 struct VRFieldOfView { |
| 9 float upDegrees; | 9 float upDegrees; |
| 10 float downDegrees; | 10 float downDegrees; |
| 11 float leftDegrees; | 11 float leftDegrees; |
| 12 float rightDegrees; | 12 float rightDegrees; |
| 13 }; | 13 }; |
| 14 | 14 |
| 15 // A display's position, orientation, velocity, and acceleration state at the | 15 // A display's position, orientation, velocity, and acceleration state at the |
| 16 // given timestamp. | 16 // given timestamp. |
| 17 struct VRPose { | 17 struct VRPose { |
| 18 double timestamp; | 18 double timestamp; |
| 19 array<float, 4>? orientation; | 19 array<float, 4>? orientation; |
| 20 array<float, 3>? position; | 20 array<float, 3>? position; |
| 21 array<float, 3>? angularVelocity; | 21 array<float, 3>? angularVelocity; |
| 22 array<float, 3>? linearVelocity; | 22 array<float, 3>? linearVelocity; |
| 23 array<float, 3>? angularAcceleration; | 23 array<float, 3>? angularAcceleration; |
| 24 array<float, 3>? linearAcceleration; | 24 array<float, 3>? linearAcceleration; |
| 25 // The poseIndex is a sequential ID that's incremented on each distinct |
| 26 // getPose result, it may wrap around for long sessions. |
| 27 uint32 poseIndex; |
| 25 }; | 28 }; |
| 26 | 29 |
| 27 struct VRDisplayCapabilities { | 30 struct VRDisplayCapabilities { |
| 28 bool hasOrientation; | 31 bool hasOrientation; |
| 29 bool hasPosition; | 32 bool hasPosition; |
| 30 bool hasExternalDisplay; | 33 bool hasExternalDisplay; |
| 31 bool canPresent; | 34 bool canPresent; |
| 32 }; | 35 }; |
| 33 | 36 |
| 34 // Information about the optical properties for an eye in a VRDisplay. | 37 // Information about the optical properties for an eye in a VRDisplay. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 SubmitFrame(uint32 index, VRPose? pose); | 77 SubmitFrame(uint32 index, VRPose? pose); |
| 75 UpdateLayerBounds(uint32 index, VRLayerBounds leftBounds, VRLayerBounds rightB
ounds); | 78 UpdateLayerBounds(uint32 index, VRLayerBounds leftBounds, VRLayerBounds rightB
ounds); |
| 76 }; | 79 }; |
| 77 | 80 |
| 78 interface VRServiceClient { | 81 interface VRServiceClient { |
| 79 OnDisplayChanged(VRDisplay display); | 82 OnDisplayChanged(VRDisplay display); |
| 80 OnExitPresent(uint32 index); | 83 OnExitPresent(uint32 index); |
| 81 OnDisplayConnected(VRDisplay display); | 84 OnDisplayConnected(VRDisplay display); |
| 82 OnDisplayDisconnected(uint32 index); | 85 OnDisplayDisconnected(uint32 index); |
| 83 }; | 86 }; |
| OLD | NEW |