XrController QML Type
一个用于追踪输入控制器位置和方向的空间节点。更多内容...
| Import Statement: | import QtQuick3D.Xr |
| Since: | Qt 6.8 |
| Inherits: | |
| Status: | Technology preview |
此类型处于技术预览阶段,可能会发生变更。
属性
- controller : enumeration
- isActive : bool
- jointPositions : list<vector3d>
- jointRotations : list<quaternion>
- pokePosition : vector3d
- poseSpace : enumeration
详细说明
XrController 是一个带追踪功能的空间节点,用于追踪输入控制器的位置和方向。
由于这是一个被追踪的节点,其空间属性应视为只读。
另请参阅 XrInputAction 。
属性文档
controller : enumeration
指定要跟踪的控制器。
可以是以下之一:
| 常量 | 描述 |
|---|---|
XrController.LeftController | |
XrController.RightController | |
XrController.UnknownController | |
XrController.LeftHand | (LeftController 的别名) |
XrController.RightHand | (RightController 的别名) |
isActive : bool [read-only]
指示控制器是否正在提供输入。
如果相应的物理控制器存在且正在进行跟踪,则该属性为true。
jointPositions : list<vector3d> [read-only]
在使用手部追踪时,该属性存储手部所有骨骼的位置。
另请参阅 jointRotations 和XrHandModel 。
jointRotations : list<quaternion> [read-only]
在使用手部追踪时,该属性存储手部所有骨骼的姿态信息。
另请参阅 jointPositions 和XrHandModel 。
pokePosition : vector3d [read-only]
该属性存储用于触摸交互的位置。通常,在追踪手部时,该位置即为食指的指尖。
另请参阅 XrView::processTouch 和XrView::setTouchpoint 。
poseSpace : enumeration [default: XrController.AimPose]
指定要跟踪的控制器姿态,即相对于物理控制器的方向和位置。
可以是以下选项之一:
| 常量 | 描述 |
|---|---|
XrController.AimPose | 用于瞄准某物,例如使用XrVirtualMouse 时。 |
XrController.GripPose | 用于抓取物体,例如用手握住物体时。 |
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.