Qt 5.7 | Qt 3D | C++ Classes | QPickEvent

Qt 5.7.1 Reference Documentation

# QPickEvent Class

(Qt3DRender::QPickEvent)

The 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::QPickTriangleEvent

- List of all members, including inherited members

## Properties

accepted : bool distance : const float localIntersection : const QVector3D | position : const QPointF worldIntersection : const QVector3D

## Public Functions

| QPickEvent()
| QPickEvent(const QPointF &position, const QVector3D &intersection, const QVector3D &localIntersection, float distance)
float | distance() const
bool | isAccepted() const
QVector3D | localIntersection() const
QPointF | position() const
QVector3D | worldIntersection() const

## Public Slots

void | setAccepted(bool accepted)

## Signals

void | acceptedChanged(bool accepted)

## Detailed Description

The QPickEvent class holds information when an object is picked

See also QPickingSettings, QPickTriangleEvent, and QObjectPicker.

## Property Documentation

### accepted : bool

Specifies if event has been accepted

Access functions:

bool | isAccepted() const
void | setAccepted(bool accepted)

Notifier signal:

void | acceptedChanged(bool accepted)

### distance : const float

Specifies the distance of the event

Access functions:

float | distance() const

### localIntersection : const QVector3D

Specifies the local intersection of the event

Access functions:

QVector3D | localIntersection() const

### position : const QPointF

Specifies the position of the event

Access functions:

QPointF | position() const

### worldIntersection : const QVector3D

Specifies the world intersection of the event

Access functions:

QVector3D | worldIntersection() const

## Member Function Documentation

### QPickEvent::QPickEvent()

Constructs a new QPickEvent.

### 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

### float QPickEvent::distance() const

QPickEvent::distance Returns distance from camera to pick point

Note: Getter function for property distance.

### bool QPickEvent::isAccepted() const

QPickEvent::isAccepted Returns true if the event has been accepted

Note: Getter function for property accepted.

### QVector3D QPickEvent::localIntersection() const

QPickEvent::localIntersection Returns local coordinate of pick point

Note: Getter function for property localIntersection.

### QPointF QPickEvent::position() const

QPickEvent::position Returns mouse pointer coordinate of the pick query

Note: Getter function for property position.

### `[slot]` void QPickEvent::setAccepted(bool accepted)

QPickEvent::setAccepted set if the event has been accepted to accepted

Note: Setter function for property accepted.

See also isAccepted().

### QVector3D QPickEvent::worldIntersection() const

QPickEvent::worldIntersection Returns world coordinate of the pick point

Note: Getter function for property worldIntersection.