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

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

Issue 2396663002: Reland gvr upgrade (Closed)
Patch Set: Created 4 years, 2 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 #include "chrome/browser/android/vr_shell/vr_math.h" 5 #include "chrome/browser/android/vr_shell/vr_math.h"
6 6
7 #include <array> 7 #include <array>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/g vr_types.h" 10 #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_ty pes.h"
11 11
12 namespace vr_shell { 12 namespace vr_shell {
13 13
14 // Internal matrix layout: 14 // Internal matrix layout:
15 // 15 //
16 // m[0][0], m[0][1], m[0][2], m[0][3], 16 // m[0][0], m[0][1], m[0][2], m[0][3],
17 // m[1][0], m[1][1], m[1][2], m[1][3], 17 // m[1][0], m[1][1], m[1][2], m[1][3],
18 // m[2][0], m[2][1], m[2][2], m[2][3], 18 // m[2][0], m[2][1], m[2][2], m[2][3],
19 // m[3][0], m[3][1], m[3][2], m[3][3], 19 // m[3][0], m[3][1], m[3][2], m[3][3],
20 // 20 //
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 const gvr::Vec3f& rayVector, 295 const gvr::Vec3f& rayVector,
296 float scale) { 296 float scale) {
297 gvr::Vec3f v; 297 gvr::Vec3f v;
298 v.x = rayOrigin.x + scale * rayVector.x; 298 v.x = rayOrigin.x + scale * rayVector.x;
299 v.y = rayOrigin.y + scale * rayVector.y; 299 v.y = rayOrigin.y + scale * rayVector.y;
300 v.z = rayOrigin.z + scale * rayVector.z; 300 v.z = rayOrigin.z + scale * rayVector.z;
301 return v; 301 return v;
302 } 302 }
303 303
304 } // namespace vr_shell 304 } // namespace vr_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698