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

Side by Side Diff: chrome/browser/android/vr_shell/vr_math.h

Issue 2668093002: VrShell background implemented in JS. (Closed)
Patch Set: Replaced content_quad with CONTENT filling, gradient renderer respects opacity, nits Created 3 years, 10 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
OLDNEW
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
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 {
cjgrant 2017/02/01 14:36:40 Is there a GL or gfx:: struct we could use instead
tiborg1 2017/02/01 20:38:58 So, gfx uses SkColor, which is a 32 bit integer. T
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698