pickResult QML Value Type

Contains the results of a pick. More...

Import Statement: import QtQuick3D

Properties

Detailed Description

Created as a return object to View3D::pick.

Property Documentation

distance : float [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.

ConstantDescription
PickResult.NullThe pick did not hit anything.
PickResult.ModelThe pick hit a Model.
PickResult.ItemThe pick hit a QQuickItem.

This property was introduced in 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.

This property was introduced in 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 is not pickResult.Item.

This property was introduced in Qt 6.8.

See also objectHit.


normal : vector3d [read-only]

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

Note: 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 is not pickResult.Model.

See also itemHit.


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

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


© 2024 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.