aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorSadegh Taghavi <[email protected]>2025-05-12 10:38:25 +0300
committerNicholas Bennett <[email protected]>2025-06-03 07:57:46 +0000
commit90cbbe03e9ab9b070d1403658bb0bb9b806f5af1 (patch)
treebd242d1d952e8eea9b424b27495aec78547aa867 /examples
parent41f2fcd036671d2a530dc8d836b4ff0d0b5041a0 (diff)
Enable scene capture request for spatial anchorsHEADdev
Added necessary changes to demonstrate how to trigger a room scan for spatial anchors. Task-number: QTBUG-133988 Pick-to: 6.9 6.10 Change-Id: Ie28585fd2e6e0c9a49e35c8386ee5232bfe2ae23 Reviewed-by: Christian Strømme <[email protected]>
Diffstat (limited to 'examples')
-rw-r--r--examples/quick3d/xr_anchors/main.qml12
1 files changed, 10 insertions, 2 deletions
diff --git a/examples/quick3d/xr_anchors/main.qml b/examples/quick3d/xr_anchors/main.qml
index 39b53d3e..fc6acb03 100644
--- a/examples/quick3d/xr_anchors/main.qml
+++ b/examples/quick3d/xr_anchors/main.qml
@@ -76,10 +76,17 @@ XrView {
poseSpace: XrController.AimPose
XrInputAction {
- controller: XrInputAction.RightController
+ hand: XrInputAction.RightHand
actionId: [XrInputAction.Button2Pressed, XrInputAction.MiddleFingerPinch]
onTriggered: xrView.preferPassthrough = !xrView.preferPassthrough
}
+ XrInputAction {
+ hand: XrInputAction.RightHand
+ actionId: [XrInputAction.Button1Pressed]
+ onTriggered: {
+ spatialAnchors.model.requestSceneCapture()
+ }
+ }
onRotationChanged: {
const pickResult = xrView.rayPick(scenePosition, forward)
@@ -161,7 +168,7 @@ XrView {
anchors.fill: parent
anchors.margins: 10
textFormat: Text.StyledText
- text: "Total anchors: " + labelNode.numAnchors + "<br>" + "Selected: " + labelNode.anchorInfo
+ text: "Total anchors: " + labelNode.numAnchors + "<br>" + "Selected: " + labelNode.anchorInfo + "<br>" + "Press A to Capture/Update anchors"
}
}
}
@@ -171,6 +178,7 @@ XrView {
Repeater3D {
id: spatialAnchors
model: XrSpatialAnchorListModel {
+
}
delegate: Node {
id: anchorNode