XrSpatialAnchorListModel QML Type

Provides a model containing spatial anchors. 更多...

import 语句: import QtQuick3D.Xr
Since: Qt 6.8
继承:

ListModel

状态: 技术预览

特性

方法

详细描述

This type provides a list of spatial anchors, which are points in the physical world that can be tracked and associated with virtual content.

The list contains elements that have an anchor property with the type XrSpatialAnchor .

You can use it like this:

Repeater3D {
    model: XrSpatialAnchorListModel {
    }
    delegate: Node {
        required property XrSpatialAnchor anchor
        position: anchor.position
        rotation: anchor.rotation
        // Further use of anchor properties...
    }
}
					

特性文档编制

classificationFilter : enumeration

Holds the classification flag used for filtering spatial anchors.

The ClassificationFlag filter is represented as a combination of flags:

常量
XrSpatialAnchorListModel.Wall
XrSpatialAnchorListModel.Ceiling
XrSpatialAnchorListModel.Floor
XrSpatialAnchorListModel.Table
XrSpatialAnchorListModel.Seat
XrSpatialAnchorListModel.Window
XrSpatialAnchorListModel.Door
XrSpatialAnchorListModel.Other

classificationStringFilter : list < string >

Holds the classification strings used for filtering spatial anchors.

filterMode 被设为 Classification , this property can be used to provide a list of additional classification string to filter on. These labels will then be matched against the same value as reported by XrSpatialAnchor::classificationString property of the spatial anchor.

注意: spatial anchors that are classified as 其它 will be checked against this filter.

filterMode : enumeration

Specifies the filter mode for spatial anchors.

Holds the filter mode. The filter mode can be one of the following:

常量 描述
XrSpatialAnchorListModel.All Show all spatial anchors.
XrSpatialAnchorListModel.Classification Show spatial anchors based on the provided classification filter flag.
XrSpatialAnchorListModel.Identifier Show spatial anchors based on matching the provided Identifiers.

identifierFilter : list < string >

Holds the list of identifiers for filtering spatial anchors.

方法文档编制

void requestSceneCapture ()

This method triggers a scan to capture or update spatial data for the current environment.

This method triggers the underlying XR system to perform a scene capture of the user's current physical environment, to update or refine the spatial mesh, enabling more accurate placement and tracking of spatial anchors.

注意: Some platforms do not perform this operation automatically. For example, on Quest 3, if the user is in a previously uncaptured space, this method will not be called automatically, resulting in no available anchors until a capture is manually triggered.