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

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: nit Created 3 years, 8 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
« no previous file with comments | « chrome/browser/android/vr_shell/elbow_model.cc ('k') | chrome/browser/android/vr_shell/vr_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9cc0b3d4b38c3a86139131225a75a97a87314b97..d3afda8513b8175f875e1b821eb8a4ecd6b454f0 100644
--- a/chrome/browser/android/vr_shell/vr_controller.h
+++ b/chrome/browser/android/vr_shell/vr_controller.h
@@ -25,6 +25,11 @@ class ControllerState;
namespace vr_shell {
+class ElbowModel;
+
+// Angle (radians) the beam down from the controller axis, for wrist comfort.
+constexpr float kErgoAngleOffset = 0.26f;
+
class VrController {
public:
// Controller API entry point.
@@ -43,7 +48,7 @@ class VrController {
device::GvrGamepadData GetGamepadData();
// Must be called when the GL renderer gets OnDrawFrame().
- void UpdateState();
+ void UpdateState(const gfx::Vector3dF& head_direction);
std::vector<std::unique_ptr<WebGestureEvent>> DetectGestures();
@@ -54,8 +59,9 @@ class VrController {
float TouchPosY();
vr::Quatf Orientation() const;
-
void GetTransform(vr::Mat4f* out) const;
+ float GetOpacity() const;
+ gfx::Point3F GetPointerStart() const;
VrControllerModel::State GetModelState() const;
@@ -170,6 +176,8 @@ class VrController {
// Number of consecutively extrapolated touch points
int extrapolated_touch_ = 0;
+ std::unique_ptr<ElbowModel> elbow_model_;
+
DISALLOW_COPY_AND_ASSIGN(VrController);
};
« no previous file with comments | « chrome/browser/android/vr_shell/elbow_model.cc ('k') | chrome/browser/android/vr_shell/vr_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698