| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef DEVICE_VR_VR_TYPES_H_ | 5 #ifndef DEVICE_VR_VR_TYPES_H_ |
| 6 #define DEVICE_VR_VR_TYPES_H_ | 6 #define DEVICE_VR_VR_TYPES_H_ |
| 7 | 7 |
| 8 #include <array> | 8 #include <array> |
| 9 | 9 |
| 10 #include "ui/gfx/geometry/point3_f.h" | 10 #include "ui/gfx/geometry/point3_f.h" |
| 11 #include "ui/gfx/geometry/point_f.h" | 11 #include "ui/gfx/geometry/point_f.h" |
| 12 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
| 13 #include "ui/gfx/geometry/rect_f.h" | 13 #include "ui/gfx/geometry/rect_f.h" |
| 14 #include "ui/gfx/geometry/size.h" | 14 #include "ui/gfx/geometry/size.h" |
| 15 #include "ui/gfx/geometry/vector3d_f.h" | 15 #include "ui/gfx/geometry/vector3d_f.h" |
| 16 | 16 |
| 17 namespace vr { | 17 namespace vr { |
| 18 | 18 |
| 19 using Mat4f = std::array<std::array<float, 4>, 4>; | 19 using Mat4f = std::array<std::array<float, 4>, 4>; |
| 20 | 20 |
| 21 typedef struct RotationAxisAngle { | 21 typedef struct RotationAxisAngle { |
| 22 float x; | 22 float x; |
| 23 float y; | 23 float y; |
| 24 float z; | 24 float z; |
| 25 float angle; | 25 float angle; |
| 26 } RotationAxisAngle; | 26 } RotationAxisAngle; |
| 27 | 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. | 28 // A floating point quaternion, in JPL format. |
| 36 typedef struct Quatf { | 29 typedef struct Quatf { |
| 37 /// qx, qy, qz are the vector component. | 30 /// qx, qy, qz are the vector component. |
| 38 float qx; | 31 float qx; |
| 39 float qy; | 32 float qy; |
| 40 float qz; | 33 float qz; |
| 41 /// qw is the linear component. | 34 /// qw is the linear component. |
| 42 float qw; | 35 float qw; |
| 43 } Quatf; | 36 } Quatf; |
| 44 | 37 |
| 45 } // namespace vr | 38 } // namespace vr |
| 46 | 39 |
| 47 #endif // DEVICE_VR_VR_TYPES_H_ | 40 #endif // DEVICE_VR_VR_TYPES_H_ |
| OLD | NEW |