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

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: Rebasing. 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
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..ce055755256a424998bfbf379064cf03d884c928 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;
@@ -127,6 +133,8 @@ class VrController {
void UpdateOverallVelocity();
+ float DeltaTimeSeconds();
+
// State of gesture detector.
GestureDetectorState state_;
@@ -170,6 +178,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