OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
sof
2015/02/24 12:35:29
nit: s/2014/2015/g
| |
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" | |
sof
2015/02/24 12:35:28
not needed (here and elsewhere in this directory,
| |
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 VREyeNone, | |
29 }; | |
30 | |
31 HMDVRDevice(VRHardwareUnit*); | |
sof
2015/02/24 12:35:29
this is an 'explicit' conversion, right?
| |
32 | |
33 typedef Vector<double> DoubleVector; | |
34 | |
35 virtual void updateFromWebVRDevice(const WebVRDevice&) override; | |
36 | |
37 DOMPoint* getEyeTranslation(const String& whichEye); | |
sof
2015/02/24 12:35:28
nit/suggestion: the use of 'whichEye' in these dec
| |
38 VRFieldOfView* getCurrentEyeFieldOfView(const String& whichEye); | |
39 VRFieldOfView* getRecommendedEyeFieldOfView(const String& whichEye); | |
40 VRFieldOfView* getMaximumEyeFieldOfView(const String& whichEye); | |
41 DOMRect* getRecommendedEyeRenderRect(const String& whichEye); | |
42 void setFieldOfView(VRFieldOfView* leftFov = 0, VRFieldOfView* rightFov = 0) ; | |
43 | |
44 virtual void trace(Visitor*) override; | |
45 | |
46 private: | |
47 static VREye StringToVREye(const String& whichEye); | |
48 | |
49 Member<VRFieldOfView> m_recommendedFOVLeft; | |
50 Member<VRFieldOfView> m_recommendedFOVRight; | |
51 Member<VRFieldOfView> m_maximumFOVLeft; | |
52 Member<VRFieldOfView> m_maximumFOVRight; | |
53 Member<DOMPoint> m_eyeTranslationLeft; | |
54 Member<DOMPoint> m_eyeTranslationRight; | |
55 }; | |
56 | |
57 } // namespace blink | |
58 | |
59 #endif // HMDVRDevice_h | |
OLD | NEW |