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_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_H_ |
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "chrome/browser/android/vr_shell/vr_gesture.h" | 9 #include "chrome/browser/android/vr_shell/vr_gesture.h" |
10 #include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/g vr.h" | 10 #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr.h" |
bajones
2016/10/04 06:33:57
I think you've gotten some changes in here that yo
klausw
2016/10/04 06:47:04
This is intentional though messy. Top-of-tree is s
klausw
2016/10/04 17:52:46
Rebased, this should no longer be visible.
| |
11 #include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/g vr_controller.h" | 11 #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_co ntroller.h" |
12 #include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/g vr_types.h" | 12 #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_ty pes.h" |
13 | 13 |
14 namespace vr_shell { | 14 namespace vr_shell { |
15 | 15 |
16 class VrController { | 16 class VrController { |
17 public: | 17 public: |
18 // Controller API entry point. | 18 // Controller API entry point. |
19 explicit VrController(gvr_context* gvr_context); | 19 explicit VrController(gvr_context* gvr_context); |
20 ~VrController(); | 20 ~VrController(); |
21 | 21 |
22 // Must be called when the Activity gets OnResume(). | 22 // Must be called when the Activity gets OnResume(). |
(...skipping 14 matching lines...) Expand all Loading... | |
37 float TouchPosX(); | 37 float TouchPosX(); |
38 | 38 |
39 float TouchPosY(); | 39 float TouchPosY(); |
40 | 40 |
41 const gvr::Quatf Orientation(); | 41 const gvr::Quatf Orientation(); |
42 | 42 |
43 bool IsTouchDown(); | 43 bool IsTouchDown(); |
44 | 44 |
45 bool IsTouchUp(); | 45 bool IsTouchUp(); |
46 | 46 |
47 bool IsButtonUp(const int32_t button); | 47 bool IsButtonUp(const gvr::ControllerButton button); |
48 bool IsButtonDown(const int32_t button); | 48 bool IsButtonDown(const gvr::ControllerButton button); |
49 | 49 |
50 bool IsConnected(); | 50 bool IsConnected(); |
51 | 51 |
52 private: | 52 private: |
53 enum GestureDetectorState { | 53 enum GestureDetectorState { |
54 WAITING, // waiting for user to touch down | 54 WAITING, // waiting for user to touch down |
55 TOUCHING, // touching the touch pad but not scrolling | 55 TOUCHING, // touching the touch pad but not scrolling |
56 SCROLLING // scrolling on the touch pad | 56 SCROLLING // scrolling on the touch pad |
57 }; | 57 }; |
58 | 58 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 | 128 |
129 // Overall velocity | 129 // Overall velocity |
130 gvr::Vec2f overall_velocity_; | 130 gvr::Vec2f overall_velocity_; |
131 | 131 |
132 DISALLOW_COPY_AND_ASSIGN(VrController); | 132 DISALLOW_COPY_AND_ASSIGN(VrController); |
133 }; | 133 }; |
134 | 134 |
135 } // namespace vr_shell | 135 } // namespace vr_shell |
136 | 136 |
137 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_H_ | 137 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_H_ |
OLD | NEW |