QPickingSettings Class

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

This class was introduced in Qt 5.7.

Public Types

enum PickMethod { BoundingVolumePicking, TrianglePicking, LinePicking, PointPicking, PrimitivePicking }

Public Functions

float worldSpaceTolerance() const

Detailed Description

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

When using QObjectPicker components, picking is triggered by mouse events.

When using QRayCaster or QScreenRayCaster components, picking can be explicitly triggered by the application.

In both cases, a ray will be cast through the scene to find geometry intersecting the ray.

See also QObjectPicker, QPickEvent, QPickTriangleEvent, QRayCaster, and QScreenRayCaster.

Member Type Documentation

enum QPickingSettings::PickMethod

Specifies the picking method.

ConstantValueDescription
Qt3DRender::QPickingSettings::BoundingVolumePicking0x00An entity is considered picked if the picking ray intersects the bounding volume of the entity (default).
Qt3DRender::QPickingSettings::TrianglePicking0x01An entity is considered picked if the picking ray intersects with any triangle of the entity's mesh component.
Qt3DRender::QPickingSettings::LinePicking0x02An entity is considered picked if the picking ray intersects with any edge of the entity's mesh component.
Qt3DRender::QPickingSettings::PointPicking0x04An entity is considered picked if the picking ray intersects with any point of the entity's mesh component.
Qt3DRender::QPickingSettings::PrimitivePickingTrianglePicking | LinePicking | PointPickingAn entity is considered picked if the picking ray intersects with any point, edge or triangle of the entity's mesh component.

Member Function Documentation

float QPickingSettings::worldSpaceTolerance() const

Returns the line and point precision worldSpaceTolerance