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

Side by Side Diff: Source/modules/vr/HMDVRDevice.h

Issue 848053002: Adding WebVR interface to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef HMDVRDevice_h
6 #define HMDVRDevice_h
7
8 #include "core/dom/DOMPoint.h"
9 #include "core/dom/DOMRect.h"
10 #include "modules/vr/VRDevice.h"
11 #include "platform/heap/Handle.h"
12 #include "public/platform/WebVR.h"
13 #include "wtf/RefCounted.h"
14 #include "wtf/text/WTFString.h"
15
16 namespace blink {
17
18 class VRPoint3D;
19 class VRFieldOfView;
20 class VRRect;
21
22 class HMDVRDevice final : public VRDevice {
23 DEFINE_WRAPPERTYPEINFO();
24 public:
25 enum VREye {
26 VREyeLeft,
27 VREyeRight
28 };
29
30 HMDVRDevice(VRHardwareUnit*);
31
32 typedef Vector<double> DoubleVector;
33
34 virtual void updateFromWebVRDevice(const WebVRDevice&) override;
35
36 DOMPoint* getEyeTranslation(const String& whichEye);
37 VRFieldOfView* getCurrentEyeFieldOfView(const String& whichEye);
38 VRFieldOfView* getRecommendedEyeFieldOfView(const String& whichEye);
39 VRFieldOfView* getMaximumEyeFieldOfView(const String& whichEye);
40 void setFieldOfView(VRFieldOfView* leftFov = 0, VRFieldOfView* rightFov = 0) ;
41 DOMRect* getRecommendedEyeRenderRect(const String& whichEye);
42
43 virtual void trace(Visitor*) override;
44
45 private:
46 static VREye StringToVREye(const String& whichEye);
47
48 Member<VRFieldOfView> m_recommendedFOVLeft;
49 Member<VRFieldOfView> m_recommendedFOVRight;
50 Member<VRFieldOfView> m_maximumFOVLeft;
51 Member<VRFieldOfView> m_maximumFOVRight;
52 Member<DOMPoint> m_eyeTranslationLeft;
53 Member<DOMPoint> m_eyeTranslationRight;
54 };
55
56 } // namespace blink
57
58 #endif // HMDVRDevice_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698