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

Qt 5.7.1 Reference Documentation

# QPickingSettings Class

(Qt3DRender::QPickingSettings)

The QPickingSettings class specifies how entity picking is handled. More...

Header: | #include <QPickingSettings>
qmake: | QT += 3drender
Since: | Qt 5.7
Instantiated By: | PickingSettings
Inherits: | Qt3DCore::QNode

- List of all members, including inherited members

## Public Types

enum | PickMethod { BoundingVolumePicking, TrianglePicking }
enum | PickResultMode { NearestPick, AllPicks }

## Properties

- pickMethod : PickMethod
- pickResultMode : PickResultMode

- 2 properties inherited from Qt3DCore::QNode

## Public Functions

| QPickingSettings(Qt3DCore::QNode *parent = nullptr)
PickMethod | pickMethod() const
PickResultMode | pickResultMode() const

- 6 public functions inherited from Qt3DCore::QNode

## Public Slots

void | setPickMethod(PickMethod pickMethod)
void | setPickResultMode(PickResultMode pickResultMode)

- 2 public slots inherited from Qt3DCore::QNode

## Signals

void | pickMethodChanged(QPickingSettings::PickMethod pickMethod)
void | pickResultModeChanged(QPickingSettings::PickResultMode pickResult)

- 3 signals inherited from Qt3DCore::QNode

### Additional Inherited Members

- 2 protected functions inherited from Qt3DCore::QNode

## Detailed Description

The QPickingSettings class specifies how entity picking is handled.

The picking settings determine how the entity picking is handled. For more details about entity picking, see QObjectPicker component documentation.

## Member Type Documentation

### enum QPickingSettings::PickMethod

Specifies the picking method.

Constant | Value | Description
--- | --- | ---
`Qt3DRender::QPickingSettings::BoundingVolumePicking` | `0` | An entity is considered picked if the picking ray intersects the bounding volume of the entity.
`Qt3DRender::QPickingSettings::TrianglePicking` | `1` | An entity is considered picked if the picking ray intersects with any triangle of the entity's mesh component.

### enum QPickingSettings::PickResultMode

Specifies what is included into the picking results.

Constant | Value | Description
--- | --- | ---
`Qt3DRender::QPickingSettings::NearestPick` | `0` | Only the nearest entity to picking ray origin intersected by the picking ray is picked.
`Qt3DRender::QPickingSettings::AllPicks` | `1` | All entities that intersect the picking ray are picked.

## Property Documentation

### pickMethod : PickMethod

Holds the current pick method.

Access functions:

PickMethod | pickMethod() const
void | setPickMethod(PickMethod pickMethod)

Notifier signal:

void | pickMethodChanged(QPickingSettings::PickMethod pickMethod)

### pickResultMode : PickResultMode

Holds the current pick results mode.

Access functions:

PickResultMode | pickResultMode() const
void | setPickResultMode(PickResultMode pickResultMode)

Notifier signal:

void | pickResultModeChanged(QPickingSettings::PickResultMode pickResult)

## Member Function Documentation

### QPickingSettings::QPickingSettings(Qt3DCore::QNode *parent = nullptr)

Default constructs an instance of QPickingSettings.