summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/xr/xr_stationary_reference_space.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-02-13 16:23:34 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-02-14 10:37:21 +0000
commit38a9a29f4f9436cace7f0e7abf9c586057df8a4e (patch)
treec4e8c458dc595bc0ddb435708fa2229edfd00bd4 /chromium/third_party/blink/renderer/modules/xr/xr_stationary_reference_space.h
parente684a3455bcc29a6e3e66a004e352dea4e1141e7 (diff)
downloadqtwebengine-chromium-38a9a29f4f9436cace7f0e7abf9c586057df8a4e.tar.gz
BASELINE: Update Chromium to 73.0.3683.37
Change-Id: I08c9af2948b645f671e5d933aca1f7a90ea372f2 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/xr/xr_stationary_reference_space.h')
-rw-r--r--chromium/third_party/blink/renderer/modules/xr/xr_stationary_reference_space.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/chromium/third_party/blink/renderer/modules/xr/xr_stationary_reference_space.h b/chromium/third_party/blink/renderer/modules/xr/xr_stationary_reference_space.h
new file mode 100644
index 00000000000..d1065509bf6
--- /dev/null
+++ b/chromium/third_party/blink/renderer/modules/xr/xr_stationary_reference_space.h
@@ -0,0 +1,47 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_XR_XR_STATIONARY_REFERENCE_SPACE_H_
+#define THIRD_PARTY_BLINK_RENDERER_MODULES_XR_XR_STATIONARY_REFERENCE_SPACE_H_
+
+#include "third_party/blink/renderer/modules/xr/xr_reference_space.h"
+#include "third_party/blink/renderer/platform/transforms/transformation_matrix.h"
+
+namespace blink {
+
+class XRStationaryReferenceSpace final : public XRReferenceSpace {
+ DEFINE_WRAPPERTYPEINFO();
+
+ public:
+ enum Subtype {
+ kSubtypeEyeLevel,
+ kSubtypeFloorLevel,
+ kSubtypePositionDisabled
+ };
+
+ XRStationaryReferenceSpace(XRSession*, Subtype);
+ ~XRStationaryReferenceSpace() override;
+
+ std::unique_ptr<TransformationMatrix> TransformBasePose(
+ const TransformationMatrix& base_pose) override;
+ std::unique_ptr<TransformationMatrix> TransformBaseInputPose(
+ const TransformationMatrix& base_input_pose,
+ const TransformationMatrix& base_pose) override;
+
+ const String& subtype() const { return subtype_string_; }
+
+ void Trace(blink::Visitor*) override;
+
+ private:
+ void UpdateFloorLevelTransform();
+
+ unsigned int display_info_id_ = 0;
+ Subtype subtype_;
+ String subtype_string_;
+ std::unique_ptr<TransformationMatrix> floor_level_transform_;
+};
+
+} // namespace blink
+
+#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_XR_XR_STATIONARY_REFERENCE_SPACE_H_