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

Unified Diff: chrome/browser/android/vr_shell/vr_controller.h

Issue 2795793002: Implementation of elbow model for the controller position and rotation. (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/vr_controller.h
diff --git a/chrome/browser/android/vr_shell/vr_controller.h b/chrome/browser/android/vr_shell/vr_controller.h
index 3b9ff1ca8e757d0383896d55e687d75ad7686d29..debbf9f6bdf23d86f60ff33cc6acd3b7c5c4abe4 100644
--- a/chrome/browser/android/vr_shell/vr_controller.h
+++ b/chrome/browser/android/vr_shell/vr_controller.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/macros.h"
+#include "chrome/browser/android/vr_shell/elbow_model.h"
#include "chrome/browser/android/vr_shell/vr_controller_model.h"
#include "device/vr/android/gvr/gvr_gamepad_data_provider.h"
#include "third_party/WebKit/public/platform/WebGestureEvent.h"
@@ -24,6 +25,9 @@ class ControllerState;
namespace vr_shell {
+// Angle (radians) the beam down from the controller axis, for wrist comfort.
+static constexpr float kErgoAngleOffset = 0.26f;
asimjour1 2017/04/19 18:58:12 Why does it need to be static and outside of contr
acondor_ 2017/04/21 21:04:32 Removed the static, but it's also used in VrShellG
+
class VrController {
public:
// Controller API entry point.
@@ -42,7 +46,7 @@ class VrController {
device::GvrGamepadData GetGamepadData();
// Must be called when the GL renderer gets OnDrawFrame().
- void UpdateState();
+ void UpdateState(const gvr::Vec3f& head_direction);
std::vector<std::unique_ptr<WebGestureEvent>> DetectGestures();
@@ -53,8 +57,9 @@ class VrController {
float TouchPosY();
gvr::Quatf Orientation() const;
-
gvr::Mat4f GetTransform() const;
+ float GetOpacity() const;
+ gvr::Vec3f GetPointerStart() const;
VrControllerModel::State GetModelState() const;
@@ -169,6 +174,8 @@ class VrController {
// Number of consecutively extrapolated touch points
int extrapolated_touch_ = 0;
+ std::unique_ptr<ElbowModel> elbow_model_;
+
DISALLOW_COPY_AND_ASSIGN(VrController);
};

Powered by Google App Engine
This is Rietveld 408576698