Chromium Code Reviews| 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..1897b53573bc7b529db9e3bf48a3908f7f48ae67 |
| --- /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_DEVICE_VR_TYPES_H_ |
|
cjgrant
2017/04/11 13:44:40
DEVICE_VR_VR_TYPES_H_
mthiesse
2017/04/11 14:46:44
Done.
|
| +#define DEVICE_VR_DEVICE_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 Matf = std::array<std::array<float, 4>, 4>; |
|
acondor_
2017/04/11 15:00:00
I'd keep the 4 in the name. It makes it clearer th
mthiesse
2017/04/11 19:21:06
Done.
|
| + |
| +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_DEVICE_VR_TYPES_H_ |