pickResult QML Value Type

包含拾取结果。 更多...

import 语句: import QtQuick3D

特性

详细描述

Created as a return object to View3D::pick .

特性文档编制

distance : real [read-only]

This property holds the distance between the pick origin and the hit position i.e. the length of the ray. In the case of using viewport coordinates for picking the pick origin will be the active camera's position.

hitType : enumeration [read-only, since 6.8]

This property holds the hit type of the pick result.

常量 描述
PickResult.Null The pick did not hit anything.
PickResult.Model The pick hit a Model.
PickResult.Item The pick hit a QQuickItem .

该特性在 Qt 6.8 引入。

instanceIndex : int [read-only, since 6.5]

This property holds the index in the instance table for the case where the pick hit an instance of an instanced model.

该特性在 Qt 6.5 引入。

itemHit : Item [read-only, since 6.8]

This property holds the Qt Quick Item hit by the pick. This value will be null if hitType 不是 pickResult.Item .

该特性在 Qt 6.8 引入。

另请参阅 objectHit .

normal : vector3d [read-only]

This property holds the normal of the face that was hit in local coordinate space.

注意: for 2D Items this will always be (0, 0, 1).

objectHit : Model [read-only]

This property holds the model object hit by the pick. This value will be null if hitType 不是 pickResult.Model .

另请参阅 itemHit .

位置 : vector3d [read-only]

This property holds the scene position of the hit in local coordinate space.

sceneNormal : vector3d [read-only]

This property holds the normal of the face that was hit in scene coordinate space.

scenePosition : vector3d [read-only]

This property holds the scene position of the hit.

uvPosition : vector2d [read-only]

This property holds the UV position of the hit. The UV position is calculated as the normalized local x and y coordinates of the hit point relative to the bounding volume. Useful for further picking against an offscreen-rendered object.

hitType is pickResult.Item this value will represent the position of the hit in the coordinate space of itemHit .