OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef VRHardwareUnit_h | 5 #ifndef VRHardwareUnit_h |
6 #define VRHardwareUnit_h | 6 #define VRHardwareUnit_h |
7 | 7 |
8 #include "modules/vr/VRFieldOfView.h" | 8 #include "modules/vr/VRFieldOfView.h" |
9 #include "modules/vr/VRPositionState.h" | 9 #include "modules/vr/VRPositionState.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 unsigned frameIndex() const { return m_frameIndex; } | 38 unsigned frameIndex() const { return m_frameIndex; } |
39 | 39 |
40 VRPositionState* getPositionState(); | 40 VRPositionState* getPositionState(); |
41 | 41 |
42 void setFieldOfView(VREye, VRFieldOfView*); | 42 void setFieldOfView(VREye, VRFieldOfView*); |
43 VRFieldOfView* getCurrentEyeFieldOfView(VREye) const; | 43 VRFieldOfView* getCurrentEyeFieldOfView(VREye) const; |
44 | 44 |
45 HMDVRDevice* hmd() const { return m_hmd; } | 45 HMDVRDevice* hmd() const { return m_hmd; } |
46 PositionSensorVRDevice* positionSensor() const { return m_positionSensor; } | 46 PositionSensorVRDevice* positionSensor() const { return m_positionSensor; } |
47 | 47 |
48 virtual void trace(Visitor*); | 48 DECLARE_VIRTUAL_TRACE(); |
49 | 49 |
50 private: | 50 private: |
51 unsigned m_index; | 51 unsigned m_index; |
52 String m_hardwareUnitId; | 52 String m_hardwareUnitId; |
53 | 53 |
54 unsigned m_frameIndex; | 54 unsigned m_frameIndex; |
55 | 55 |
56 Member<VRPositionState> m_positionState; | 56 Member<VRPositionState> m_positionState; |
57 Member<VRFieldOfView> m_currentFOVLeft; | 57 Member<VRFieldOfView> m_currentFOVLeft; |
58 Member<VRFieldOfView> m_currentFOVRight; | 58 Member<VRFieldOfView> m_currentFOVRight; |
59 | 59 |
60 // Device types | 60 // Device types |
61 Member<HMDVRDevice> m_hmd; | 61 Member<HMDVRDevice> m_hmd; |
62 Member<PositionSensorVRDevice> m_positionSensor; | 62 Member<PositionSensorVRDevice> m_positionSensor; |
63 }; | 63 }; |
64 | 64 |
65 } // namespace blink | 65 } // namespace blink |
66 | 66 |
67 #endif // VRHardwareUnit_h | 67 #endif // VRHardwareUnit_h |
OLD | NEW |