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

Public Types

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

Properties

Public Functions

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

Public Slots

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

Signals

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

Additional Inherited Members

  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 2 protected functions inherited from Qt3DCore::QNode
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

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.

ConstantValueDescription
Qt3DRender::QPickingSettings::BoundingVolumePicking0An entity is considered picked if the picking ray intersects the bounding volume of the entity.
Qt3DRender::QPickingSettings::TrianglePicking1An 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.

ConstantValueDescription
Qt3DRender::QPickingSettings::NearestPick0Only the nearest entity to picking ray origin intersected by the picking ray is picked.
Qt3DRender::QPickingSettings::AllPicks1All 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.