OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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/Forward.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 explicit HMDVRDevice(VRHardwareUnit*); |
| 26 |
| 27 typedef Vector<double> DoubleVector; |
| 28 |
| 29 virtual void updateFromWebVRDevice(const WebVRDevice&) override; |
| 30 |
| 31 DOMPoint* getEyeTranslation(const String&); |
| 32 VRFieldOfView* getCurrentEyeFieldOfView(const String&); |
| 33 VRFieldOfView* getRecommendedEyeFieldOfView(const String&); |
| 34 VRFieldOfView* getMaximumEyeFieldOfView(const String&); |
| 35 DOMRect* getRecommendedEyeRenderRect(const String&); |
| 36 void setFieldOfView(VRFieldOfView* leftFov = 0, VRFieldOfView* rightFov = 0)
; |
| 37 |
| 38 virtual void trace(Visitor*) override; |
| 39 |
| 40 private: |
| 41 static VREye StringToVREye(const String&); |
| 42 |
| 43 Member<VRFieldOfView> m_recommendedFOVLeft; |
| 44 Member<VRFieldOfView> m_recommendedFOVRight; |
| 45 Member<VRFieldOfView> m_maximumFOVLeft; |
| 46 Member<VRFieldOfView> m_maximumFOVRight; |
| 47 Member<DOMPoint> m_eyeTranslationLeft; |
| 48 Member<DOMPoint> m_eyeTranslationRight; |
| 49 }; |
| 50 |
| 51 } // namespace blink |
| 52 |
| 53 #endif // HMDVRDevice_h |
OLD | NEW |