Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: content/common/vr_service.mojom

Issue 829803003: Adding Chrome-side WebVR interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed one cardboard reference Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/BUILD.gn ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 content;
6
7 struct VRVector3 {
8 float x;
9 float y;
10 float z;
11 };
12
13 struct VRVector4 {
14 float x;
15 float y;
16 float z;
17 float w;
18 };
19
20 struct VRRect {
21 int32 x;
22 int32 y;
23 int32 width;
24 int32 height;
25 };
26
27 // A field of view, given by 4 degrees describing the view from a center point.
28 struct VRFieldOfView {
29 float upDegrees;
30 float downDegrees;
31 float leftDegrees;
32 float rightDegrees;
33 };
34
35 // A sensor's position, orientation, velocity, and acceleration state at the
36 // given timestamp.
37 struct VRSensorState {
38 double timestamp;
39 uint32 frameIndex;
40 VRVector4? orientation;
41 VRVector3? position;
42 VRVector3? angularVelocity;
43 VRVector3? linearVelocity;
44 VRVector3? angularAcceleration;
45 VRVector3? linearAcceleration;
46 };
47
48 // Information about the optical properties for an eye in an HMD.
49 struct VREyeParameters {
50 VRFieldOfView minimumFieldOfView;
51 VRFieldOfView maximumFieldOfView;
52 VRFieldOfView recommendedFieldOfView;
53 VRVector3 eyeTranslation;
54 VRRect renderRect;
55 };
56
57 // Information pertaining to Head Mounted Displays.
58 struct VRHMDInfo {
59 VREyeParameters leftEye;
60 VREyeParameters rightEye;
61 };
62
63 struct VRDeviceInfo {
64 uint32 index;
65 string deviceName;
66 VRHMDInfo? hmdInfo;
67 };
68
69 interface VRService {
70 GetDevices() => (array<VRDeviceInfo> devices);
71 GetSensorState(uint32 index) => (VRSensorState state);
72 ResetSensor(uint32 index);
73 };
OLDNEW
« no previous file with comments | « content/common/BUILD.gn ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698