XrSpatialAnchor QML Type
Represents a spatial anchor in an OpenXR session. More...
Import Statement: | import QtQuick3D.Xr |
Since: | Qt 6.8 |
Inherits: | |
Status: | Technical Preview |
Properties
- extent2D : vector2d
- extent3D : vector3d
- has2DBounds : bool
- has3DBounds : bool
- offset3D : vector3d
- position : vector3d
- rotation : quaternion
- semanticLabels : string
- uuid : QUuid
Signals
- extent3DChanged()
- has2DBoundsChanged()
- has3DBoundsChanged()
- offset3DChanged()
- positionChanged()
- rotationChanged()
- semanticLabelsChanged()
Detailed Description
This type represents a spatial anchor that can be used to track a specific location or object in real space. It provides information about the anchor's position, rotation, semantic labels, and bounds.
They are accessed through an XrSpatialAnchorModel.
Note: You can not create these in QML.
Property Documentation
extent2D : vector2d |
The 2D extent of the spatial anchor.
This property specifies the 2D size (width and height) of the spatial anchor within the 2D plane.
extent3D : vector3d |
The 3D extent of the spatial anchor.
This property specifies the 3D size (width, height, and depth) of the spatial anchor within the 3D space.
has2DBounds : bool |
Indicates whether the spatial anchor has 2D bounds.
This property returns true if the spatial anchor has 2D bounds, indicating that it represents a flat surface (for example, a floor or wall)
Otherwise, it returns false.
has3DBounds : bool |
Indicates whether the spatial anchor has 3D bounds.
This property returns true if the spatial anchor has 3D bounds, indicating that it represents a volume (for example, a table). Otherwise, it returns false.
offset3D : vector3d |
The 3D offset of the spatial anchor.
This property provides the 3D offset (in meters) from the anchor's origin to its position within the 3D space.
position : vector3d |
The position of the spatial anchor.
This property returns the 3D position (in meters) of the spatial anchor within the session's coordinate system. It emits the `positionChanged` signal when updated.
rotation : quaternion |
The rotation of the spatial anchor.
This property provides the 3D rotation (as a quaternion) of the spatial anchor. It emits the `rotationChanged` signal when updated.
semanticLabels : string |
The semantic labels associated with the spatial anchor.
This property returns a comma-separated string containing semantic labels (for example,table
or chair
) describing the anchor's purpose or context.
uuid : QUuid |
The unique identifier (UUID) of the spatial anchor.
This property returns a universally unique identifier (UUID) associated with the spatial anchor. This is what is referenced by a XrSpatialAnchorModel.
Signal Documentation
extent3DChanged() |
Emitted when the 3D extent of the spatial anchor changes.
This signal indicates that the extent3D property has been updated.
Note: The corresponding handler is onExtent3DChanged
.
has2DBoundsChanged() |
Emitted when the 2D bounds state of the spatial anchor changes.
This signal indicates that the has2DBounds property has been updated.
Note: The corresponding handler is onHas2DBoundsChanged
.
has3DBoundsChanged() |
Emitted when the 3D bounds state of the spatial anchor changes.
This signal indicates that the has3DBounds property has been updated.
Note: The corresponding handler is onHas3DBoundsChanged
.
offset3DChanged() |
Emitted when the 3D offset of the spatial anchor changes.
This signal indicates that the offset3D property has been updated.
Note: The corresponding handler is onOffset3DChanged
.
positionChanged() |
Emitted when the position of the spatial anchor changes.
This signal indicates that the `position` property has been updated.
Note: The corresponding handler is onPositionChanged
.
rotationChanged() |
Emitted when the rotation of the spatial anchor changes.
This signal indicates that the rotation property has been updated.
Note: The corresponding handler is onRotationChanged
.
semanticLabelsChanged() |
Emitted when the semantic labels associated with the spatial anchor change.
This signal indicates that the semanticLabels property has been updated.
Note: The corresponding handler is onSemanticLabelsChanged
.