| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_ANDROID_VR_SHELL_VR_MATH_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_MATH_H_ |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_MATH_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_MATH_H_ |
| 7 | 7 |
| 8 #include <array> | 8 #include <array> |
| 9 | 9 |
| 10 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
gvr_types.h" | 10 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
gvr_types.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 float height; | 27 float height; |
| 28 } Rectf; | 28 } Rectf; |
| 29 | 29 |
| 30 typedef struct RotationAxisAngle { | 30 typedef struct RotationAxisAngle { |
| 31 float x; | 31 float x; |
| 32 float y; | 32 float y; |
| 33 float z; | 33 float z; |
| 34 float angle; | 34 float angle; |
| 35 } RotationAxisAngle; | 35 } RotationAxisAngle; |
| 36 | 36 |
| 37 typedef struct Colorf { |
| 38 float r; |
| 39 float g; |
| 40 float b; |
| 41 float a; |
| 42 } Colorf; |
| 43 |
| 37 void SetIdentityM(gvr::Mat4f& mat); | 44 void SetIdentityM(gvr::Mat4f& mat); |
| 38 | 45 |
| 39 void TranslateM(gvr::Mat4f& tmat, gvr::Mat4f& mat, float x, float y, float z); | 46 void TranslateM(gvr::Mat4f& tmat, gvr::Mat4f& mat, float x, float y, float z); |
| 40 void TranslateMRight(gvr::Mat4f& tmat, | 47 void TranslateMRight(gvr::Mat4f& tmat, |
| 41 gvr::Mat4f& mat, | 48 gvr::Mat4f& mat, |
| 42 float x, | 49 float x, |
| 43 float y, | 50 float y, |
| 44 float z); | 51 float z); |
| 45 | 52 |
| 46 void ScaleM(gvr::Mat4f& tmat, const gvr::Mat4f& mat, float x, float y, float z); | 53 void ScaleM(gvr::Mat4f& tmat, const gvr::Mat4f& mat, float x, float y, float z); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 88 |
| 82 gvr::Quatf QuatFromAxisAngle(const gvr::Vec3f& axis, float angle); | 89 gvr::Quatf QuatFromAxisAngle(const gvr::Vec3f& axis, float angle); |
| 83 | 90 |
| 84 gvr::Vec3f GetRayPoint(const gvr::Vec3f& rayOrigin, | 91 gvr::Vec3f GetRayPoint(const gvr::Vec3f& rayOrigin, |
| 85 const gvr::Vec3f& rayVector, | 92 const gvr::Vec3f& rayVector, |
| 86 float scale); | 93 float scale); |
| 87 | 94 |
| 88 } // namespace vr_shell | 95 } // namespace vr_shell |
| 89 | 96 |
| 90 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_MATH_H_ | 97 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_MATH_H_ |
| OLD | NEW |