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

Side by Side Diff: device/vr/vr_types.h

Issue 2814443004: Refactor VR math off of GVR types, onto gfx types where possible. (Closed)
Patch Set: Fix tests Created 3 years, 8 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 | « device/vr/vr_math.cc ('k') | no next file » | 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 2017 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 #ifndef DEVICE_VR_VR_TYPES_H_
6 #define DEVICE_VR_VR_TYPES_H_
7
8 #include <array>
9
10 #include "ui/gfx/geometry/point3_f.h"
11 #include "ui/gfx/geometry/point_f.h"
12 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/geometry/rect_f.h"
14 #include "ui/gfx/geometry/size.h"
15 #include "ui/gfx/geometry/vector3d_f.h"
16
17 namespace vr {
18
19 using Mat4f = std::array<std::array<float, 4>, 4>;
20
21 typedef struct RotationAxisAngle {
22 float x;
23 float y;
24 float z;
25 float angle;
26 } RotationAxisAngle;
27
28 typedef struct Colorf {
29 float r;
30 float g;
31 float b;
32 float a;
33 } Colorf;
34
35 // A floating point quaternion, in JPL format.
36 typedef struct Quatf {
37 /// qx, qy, qz are the vector component.
38 float qx;
39 float qy;
40 float qz;
41 /// qw is the linear component.
42 float qw;
43 } Quatf;
44
45 } // namespace vr
46
47 #endif // DEVICE_VR_VR_TYPES_H_
OLDNEW
« no previous file with comments | « device/vr/vr_math.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698