![]() |
Qt 6.x
The Qt SDK
|
#include <qquick3dpickresult_p.h>
Public Member Functions | |
QQuick3DPickResult () | |
\qmltype PickResult \inqmlmodule QtQuick3D | |
QQuick3DPickResult (QQuick3DModel *hitObject, float distanceFromCamera, const QVector2D &uvPosition, const QVector3D &scenePosition, const QVector3D &position, const QVector3D &normal, int instanceIndex) | |
QQuick3DModel * | objectHit () const |
\qmlproperty Model PickResult::objectHit \readonly | |
float | distance () const |
\qmlproperty float PickResult::distance \readonly | |
QVector2D | uvPosition () const |
\qmlproperty vector2d PickResult::uvPosition \readonly | |
QVector3D | scenePosition () const |
\qmlproperty vector3d PickResult::scenePosition \readonly | |
QVector3D | position () const |
\qmlproperty vector3d PickResult::position \readonly | |
QVector3D | normal () const |
\qmlproperty vector3d PickResult::normal \readonly | |
QVector3D | sceneNormal () const |
\qmlproperty vector3d PickResult::sceneNormal \readonly | |
int | instanceIndex () const |
\qmlproperty int PickResult::instanceIndex \readonly | |
Properties | |
QQuick3DModel * | objectHit |
float | distance |
QVector2D | uvPosition |
QVector3D | scenePosition |
QVector3D | position |
QVector3D | normal |
QVector3D | sceneNormal |
int | instanceIndex |
Definition at line 28 of file qquick3dpickresult_p.h.
QT_BEGIN_NAMESPACE QQuick3DPickResult::QQuick3DPickResult | ( | ) |
\qmltype PickResult \inqmlmodule QtQuick3D
Contains the results of a pick.
Created as a return object to View3D::pick.
Definition at line 17 of file qquick3dpickresult.cpp.
|
explicit |
Definition at line 24 of file qquick3dpickresult.cpp.
float QQuick3DPickResult::distance | ( | ) | const |
\qmlproperty float PickResult::distance \readonly
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.
Definition at line 60 of file qquick3dpickresult.cpp.
int QQuick3DPickResult::instanceIndex | ( | ) | const |
\qmlproperty int PickResult::instanceIndex \readonly
This property holds the index in the instance table for the case where the pick hit an instance of an instanced model.
Definition at line 138 of file qquick3dpickresult.cpp.
QVector3D QQuick3DPickResult::normal | ( | ) | const |
\qmlproperty vector3d PickResult::normal \readonly
This property holds the normal of the face that was hit in local coordinate space.
Definition at line 108 of file qquick3dpickresult.cpp.
QQuick3DModel * QQuick3DPickResult::objectHit | ( | ) | const |
\qmlproperty Model PickResult::objectHit \readonly
This property holds the model object hit by the pick.
Definition at line 47 of file qquick3dpickresult.cpp.
QVector3D QQuick3DPickResult::position | ( | ) | const |
\qmlproperty vector3d PickResult::position \readonly
This property holds the scene position of the hit in local coordinate space.
Definition at line 96 of file qquick3dpickresult.cpp.
QVector3D QQuick3DPickResult::sceneNormal | ( | ) | const |
\qmlproperty vector3d PickResult::sceneNormal \readonly
This property holds the normal of the face that was hit in scene coordinate space.
Definition at line 121 of file qquick3dpickresult.cpp.
References QQuick3DNode::mapDirectionToScene().
QVector3D QQuick3DPickResult::scenePosition | ( | ) | const |
\qmlproperty vector3d PickResult::scenePosition \readonly
This property holds the scene position of the hit.
Definition at line 84 of file qquick3dpickresult.cpp.
QVector2D QQuick3DPickResult::uvPosition | ( | ) | const |
\qmlproperty vector2d PickResult::uvPosition \readonly
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.
Definition at line 73 of file qquick3dpickresult.cpp.
|
read |
Definition at line 69 of file qquick3dpickresult_p.h.
|
read |
Definition at line 69 of file qquick3dpickresult_p.h.
|
read |
Definition at line 69 of file qquick3dpickresult_p.h.
|
read |
Definition at line 69 of file qquick3dpickresult_p.h.
|
read |
Definition at line 69 of file qquick3dpickresult_p.h.
|
read |
Definition at line 69 of file qquick3dpickresult_p.h.
|
read |
Definition at line 69 of file qquick3dpickresult_p.h.
|
read |
Definition at line 69 of file qquick3dpickresult_p.h.