pickResult QML Value Type
包含挑选结果。更多
Import Statement: | import QtQuick3D |
属性
- distance : real
- hitType : enumeration
(since 6.8)
- instanceIndex : int
(since 6.5)
- itemHit : Item
(since 6.8)
- normal : vector3d
- objectHit : Model
- position : vector3d
- sceneNormal : vector3d
- scenePosition : vector3d
- uvPosition : vector2d
详细说明
作为View3D::pick 的返回对象创建。
属性文档
distance : real |
该属性保存拾取原点与命中位置之间的距离,即射线的长度。在使用视口坐标进行拾取的情况下,拾取原点将是活动摄像机的位置。
hitType : enumeration |
该属性用于保存拾取结果的命中类型。
常数 | 说明 |
---|---|
PickResult.Null | 拾取没有命中任何物体。 |
PickResult.Model | 拾取结果击中了一个模型。 |
PickResult.Item | 选取结果命中了QQuickItem 。 |
此属性在 Qt 6.8 中引入。
instanceIndex : int |
该属性保存拾取击中实例模型的实例表中的索引。
此属性在 Qt 6.5 中引入。
itemHit : Item |
normal : vector3d |
该属性保存在局部坐标空间中被击中的面的法线。
注意: 对于 2D 项目,该值始终为 (0,0,1)。
position : vector3d |
此属性保存被拾取对象在局部坐标空间中的场景位置。
sceneNormal : vector3d |
该属性保存被击中的面在场景坐标空间中的法线。
scenePosition : vector3d |
此属性保存被击中的场景位置。
uvPosition : vector2d |
© 2025 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.