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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/vr/vr_math.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/vr_types.h
diff --git a/device/vr/vr_types.h b/device/vr/vr_types.h
new file mode 100644
index 0000000000000000000000000000000000000000..a030bd987dc52560f0661311df5322bb7a6d275c
--- /dev/null
+++ b/device/vr/vr_types.h
@@ -0,0 +1,47 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DEVICE_VR_VR_TYPES_H_
+#define DEVICE_VR_VR_TYPES_H_
+
+#include <array>
+
+#include "ui/gfx/geometry/point3_f.h"
+#include "ui/gfx/geometry/point_f.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/geometry/rect_f.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/geometry/vector3d_f.h"
+
+namespace vr {
+
+using Mat4f = std::array<std::array<float, 4>, 4>;
+
+typedef struct RotationAxisAngle {
+ float x;
+ float y;
+ float z;
+ float angle;
+} RotationAxisAngle;
+
+typedef struct Colorf {
+ float r;
+ float g;
+ float b;
+ float a;
+} Colorf;
+
+// A floating point quaternion, in JPL format.
+typedef struct Quatf {
+ /// qx, qy, qz are the vector component.
+ float qx;
+ float qy;
+ float qz;
+ /// qw is the linear component.
+ float qw;
+} Quatf;
+
+} // namespace vr
+
+#endif // DEVICE_VR_VR_TYPES_H_
« 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