Index: Source/modules/vr/HMDVRDevice.h |
diff --git a/Source/modules/vr/HMDVRDevice.h b/Source/modules/vr/HMDVRDevice.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..19c85f73f8dc28e01a491e5311147b2c2f187f98 |
--- /dev/null |
+++ b/Source/modules/vr/HMDVRDevice.h |
@@ -0,0 +1,59 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
sof
2015/02/24 12:35:29
nit: s/2014/2015/g
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef HMDVRDevice_h |
+#define HMDVRDevice_h |
+ |
+#include "core/dom/DOMPoint.h" |
+#include "core/dom/DOMRect.h" |
+#include "modules/vr/VRDevice.h" |
+#include "platform/heap/Handle.h" |
+#include "public/platform/WebVR.h" |
+#include "wtf/RefCounted.h" |
sof
2015/02/24 12:35:28
not needed (here and elsewhere in this directory,
|
+#include "wtf/text/WTFString.h" |
+ |
+namespace blink { |
+ |
+class VRPoint3D; |
+class VRFieldOfView; |
+class VRRect; |
+ |
+class HMDVRDevice final : public VRDevice { |
+ DEFINE_WRAPPERTYPEINFO(); |
+public: |
+ enum VREye { |
+ VREyeLeft, |
+ VREyeRight, |
+ VREyeNone, |
+ }; |
+ |
+ HMDVRDevice(VRHardwareUnit*); |
sof
2015/02/24 12:35:29
this is an 'explicit' conversion, right?
|
+ |
+ typedef Vector<double> DoubleVector; |
+ |
+ virtual void updateFromWebVRDevice(const WebVRDevice&) override; |
+ |
+ DOMPoint* getEyeTranslation(const String& whichEye); |
sof
2015/02/24 12:35:28
nit/suggestion: the use of 'whichEye' in these dec
|
+ VRFieldOfView* getCurrentEyeFieldOfView(const String& whichEye); |
+ VRFieldOfView* getRecommendedEyeFieldOfView(const String& whichEye); |
+ VRFieldOfView* getMaximumEyeFieldOfView(const String& whichEye); |
+ DOMRect* getRecommendedEyeRenderRect(const String& whichEye); |
+ void setFieldOfView(VRFieldOfView* leftFov = 0, VRFieldOfView* rightFov = 0); |
+ |
+ virtual void trace(Visitor*) override; |
+ |
+private: |
+ static VREye StringToVREye(const String& whichEye); |
+ |
+ Member<VRFieldOfView> m_recommendedFOVLeft; |
+ Member<VRFieldOfView> m_recommendedFOVRight; |
+ Member<VRFieldOfView> m_maximumFOVLeft; |
+ Member<VRFieldOfView> m_maximumFOVRight; |
+ Member<DOMPoint> m_eyeTranslationLeft; |
+ Member<DOMPoint> m_eyeTranslationRight; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // HMDVRDevice_h |