XrSpatialAnchorListModel QML Type | Qt Quick 3D | Qt 6.11.0
Description: Provides a model containing spatial anchors.

- Qt 6.11
- Qt Quick 3D
- QML Types
- QtQuick3D.Xr (Technology Preview)
- XrSpatialAnchorListModel
- Qt Quick 3D | Commercial or GPLv3

# XrSpatialAnchorListModel QML Type

Provides a model containing spatial anchors. More...

Import Statement: | `import QtQuick3D.Xr`
Since: | Qt 6.8
Inherits: | ListModel
Status: | Technology Preview

- List of all members, including inherited members

## Properties

- classificationFilter : enumeration
- classificationStringFilter : list<string>
- filterMode : enumeration
- identifierFilter : list<string>

## Methods

- void requestSceneCapture()

## Detailed Description

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...
         }
     }

## Property Documentation

### classificationFilter : enumeration

Holds the classification flag used for filtering spatial anchors.

The ClassificationFlag filter is represented as a combination of flags:

Constant | Value
--- | ---
`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.

If the filterMode is set to `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.

Note: Only spatial anchors that are classified as Other 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:

Constant | Description
--- | ---
`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.

## Method Documentation

### 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.

Note: 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.