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 VRPose_h |
| 6 #define VRPose_h |
| 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "core/dom/DOMTypedArray.h" |
| 10 #include "platform/heap/Handle.h" |
| 11 #include "public/platform/modules/vr/WebVR.h" |
| 12 #include "wtf/Forward.h" |
| 13 |
| 14 namespace blink { |
| 15 |
| 16 class VRPose final : public GarbageCollectedFinalized<VRPose>, public ScriptWrap
pable { |
| 17 DEFINE_WRAPPERTYPEINFO(); |
| 18 public: |
| 19 static VRPose* create() |
| 20 { |
| 21 return new VRPose(); |
| 22 } |
| 23 |
| 24 double timeStamp() const { return m_timeStamp; } |
| 25 DOMFloat32Array* orientation() const { return m_orientation; } |
| 26 DOMFloat32Array* position() const { return m_position; } |
| 27 DOMFloat32Array* angularVelocity() const { return m_angularVelocity; } |
| 28 DOMFloat32Array* linearVelocity() const { return m_linearVelocity; } |
| 29 DOMFloat32Array* angularAcceleration() const { return m_angularAcceleration;
} |
| 30 DOMFloat32Array* linearAcceleration() const { return m_linearAcceleration; } |
| 31 |
| 32 void setPose(const WebHMDSensorState&); |
| 33 |
| 34 DECLARE_VIRTUAL_TRACE(); |
| 35 |
| 36 private: |
| 37 VRPose(); |
| 38 |
| 39 double m_timeStamp; |
| 40 Member<DOMFloat32Array> m_orientation; |
| 41 Member<DOMFloat32Array> m_position; |
| 42 Member<DOMFloat32Array> m_angularVelocity; |
| 43 Member<DOMFloat32Array> m_linearVelocity; |
| 44 Member<DOMFloat32Array> m_angularAcceleration; |
| 45 Member<DOMFloat32Array> m_linearAcceleration; |
| 46 }; |
| 47 |
| 48 } // namespace blink |
| 49 |
| 50 #endif // VRPose_h |
OLD | NEW |