QPickEvent Class
class Qt3DRender::QPickEventThe QPickEvent class holds information when an object is picked. More...
Header: | #include <QPickEvent> |
qmake: | QT += 3drender |
Since: | Qt 5.7 |
Instantiated By: | PickEvent |
Inherited By: | Qt3DRender::QPickLineEvent, Qt3DRender::QPickPointEvent, and Qt3DRender::QPickTriangleEvent |
This class was introduced in Qt 5.7.
Public Types
enum | Buttons { LeftButton, RightButton, MiddleButton, BackButton, NoButton } |
Public Functions
QPickEvent(const QPointF &position, const QVector3D &worldIntersection, const QVector3D &localIntersection, float distance, Qt3DRender::QPickEvent::Buttons button, int buttons, int modifiers) | |
QPickEvent(const QPointF &position, const QVector3D &intersection, const QVector3D &localIntersection, float distance) | |
Qt3DRender::QPickEvent::Buttons | button() const |
int | buttons() const |
float | distance() const |
bool | isAccepted() const |
QVector3D | localIntersection() const |
int | modifiers() const |
QPointF | position() const |
void | setAccepted(bool accepted) |
QVector3D | worldIntersection() const |
Detailed Description
This is received as a parameter in most of the QObjectPicker component signals when picking succeeds.
See also QPickingSettings, QPickTriangleEvent, and QObjectPicker.
Member Type Documentation
enum QPickEvent::Buttons
Constant | Value |
---|---|
Qt3DRender::QPickEvent::LeftButton | Qt::LeftButton |
Qt3DRender::QPickEvent::RightButton | Qt::RightButton |
Qt3DRender::QPickEvent::MiddleButton | Qt::MiddleButton |
Qt3DRender::QPickEvent::BackButton | 5 |
Qt3DRender::QPickEvent::NoButton | Qt::NoButton |
Member Function Documentation
QPickEvent::QPickEvent(const QPointF &position, const QVector3D &worldIntersection, const QVector3D &localIntersection, float distance, Qt3DRender::QPickEvent::Buttons button, int buttons, int modifiers)
Constructs a new QPickEvent with the given parameters: position, worldIntersection, localIntersection, distance, button, buttons and modifiers
QPickEvent::QPickEvent(const QPointF &position, const QVector3D &intersection, const QVector3D &localIntersection, float distance)
Constructs a new QPickEvent with the given parameters: position, intersection, localIntersection and distance
Qt3DRender::QPickEvent::Buttons QPickEvent::button() const
QPickEvent::button Returns mouse button that caused the event
int QPickEvent::buttons() const
QPickEvent::buttons Returns bitfield to be used to check for mouse buttons that may be accompanying the pick event.
float QPickEvent::distance() const
QPickEvent::distance Returns distance from camera to pick point
bool QPickEvent::isAccepted() const
QPickEvent::isAccepted Returns true if the event has been accepted
QVector3D QPickEvent::localIntersection() const
QPickEvent::localIntersection Returns coordinates of the hit in the local coordinate system of the picked entity
int QPickEvent::modifiers() const
QPickEvent::modifiers Returns bitfield to be used to check for keyboard modifiers that may be accompanying the pick event.
QPointF QPickEvent::position() const
QPickEvent::position Returns mouse pointer coordinate of the pick query
void QPickEvent::setAccepted(bool accepted)
QPickEvent::setAccepted set if the event has been accepted to accepted
See also isAccepted().
QVector3D QPickEvent::worldIntersection() const
QPickEvent::worldIntersection Returns coordinates of the hit in world coordinate system