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 #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/include/vr/gvr/capi/include/gvr_ty
pes.h" | 10 #include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/g
vr_types.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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 const gvr::Vec3f& rayVector, | 306 const gvr::Vec3f& rayVector, |
307 float scale) { | 307 float scale) { |
308 gvr::Vec3f v; | 308 gvr::Vec3f v; |
309 v.x = rayOrigin.x + scale * rayVector.x; | 309 v.x = rayOrigin.x + scale * rayVector.x; |
310 v.y = rayOrigin.y + scale * rayVector.y; | 310 v.y = rayOrigin.y + scale * rayVector.y; |
311 v.z = rayOrigin.z + scale * rayVector.z; | 311 v.z = rayOrigin.z + scale * rayVector.z; |
312 return v; | 312 return v; |
313 } | 313 } |
314 | 314 |
315 } // namespace vr_shell | 315 } // namespace vr_shell |
OLD | NEW |