QPickingSettings Class
(Qt3DRender::QPickingSettings)The QPickingSettings class specifies how entity picking is handled. 更多...
头文件: | #include <QPickingSettings> |
qmake: | QT += 3drender |
开始支持版本: | Qt 5.7 |
Instantiated By: | PickingSettings |
基类: | Qt3DCore::QNode |
公有类型
enum | FaceOrientationPickingMode { FrontFace, BackFace, FrontAndBackFace } |
enum | PickMethod { BoundingVolumePicking, TrianglePicking } |
enum | PickResultMode { NearestPick, AllPicks } |
属性
- faceOrientationPickingMode : FaceOrientationPickingMode
- pickMethod : PickMethod
- pickResultMode : PickResultMode
- 3 个属性继承自 Qt3DCore::QNode
- 1 个属性继承自 QObject
公有函数
QPickingSettings(Qt3DCore::QNode *parent = nullptr) | |
FaceOrientationPickingMode | faceOrientationPickingMode() const |
PickMethod | pickMethod() const |
PickResultMode | pickResultMode() const |
- 11 个公有函数继承自 Qt3DCore::QNode
- 32 个公有函数继承自 QObject
公有槽函数
void | setFaceOrientationPickingMode(FaceOrientationPickingMode faceOrientationPickingMode) |
void | setPickMethod(PickMethod pickMethod) |
void | setPickResultMode(PickResultMode pickResultMode) |
- 3 个公有槽函数继承自 Qt3DCore::QNode
- 1 个公有槽函数继承自 QObject
信号
void | faceOrientationPickingModeChanged(QPickingSettings::FaceOrientationPickingMode faceOrientationPickingMode) |
void | pickMethodChanged(QPickingSettings::PickMethod pickMethod) |
void | pickResultModeChanged(QPickingSettings::PickResultMode pickResult) |
- 4 个信号继承自 Qt3DCore::QNode
- 2 个信号继承自 QObject
其他继承的成员
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 2 个受保护的函数继承自 Qt3DCore::QNode
- 9 个受保护的函数继承自 QObject
- 2 个受保护的变量继承自 QObject
详细描述
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.
Picking is triggered by mouse events. It will cast a ray through the scene and look for geometry intersecting the ray.
参见 QObjectPicker, QPickEvent, and QPickTriangleEvent.
成员类型
enum QPickingSettings::FaceOrientationPickingMode
Specifies how face orientation affects triangle picking
Constant | Value | Description |
---|---|---|
Qt3DRender::QPickingSettings::FrontFace | 0x01 | Only front-facing triangles will be picked (default). |
Qt3DRender::QPickingSettings::BackFace | 0x02 | Only back-facing triangles will be picked. |
Qt3DRender::QPickingSettings::FrontAndBackFace | 0x03 | Both front- and back-facing triangles will be picked. |
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 (default). |
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 (default). |
Qt3DRender::QPickingSettings::AllPicks | 1 | All entities that intersect the picking ray are picked. |
属性
faceOrientationPickingMode : FaceOrientationPickingMode
Specifies how face orientation affects triangle picking
访问函数:
FaceOrientationPickingMode | faceOrientationPickingMode() const |
void | setFaceOrientationPickingMode(FaceOrientationPickingMode faceOrientationPickingMode) |
Notifier signal:
void | faceOrientationPickingModeChanged(QPickingSettings::FaceOrientationPickingMode faceOrientationPickingMode) |
pickMethod : PickMethod
Holds the current pick method.
By default, for performance reasons, ray casting will use bounding volume picking. This may however lead to unexpected results if a small object is englobed in the bounding sphere of a large object behind it.
Triangle picking will produce exact results but is computationally more expensive.
访问函数:
PickMethod | pickMethod() const |
void | setPickMethod(PickMethod pickMethod) |
Notifier signal:
void | pickMethodChanged(QPickingSettings::PickMethod pickMethod) |
pickResultMode : PickResultMode
Holds the current pick results mode.
By default, pick results will only be produced for the entity closest to the camera.
When setting the pick method to AllPicks, events will be triggered for all the entities with a QObjectPicker along the ray.
If a QObjectPicker is assigned to an entity with multiple children, an event will be triggered for each child entity that intersects the ray.
访问函数:
PickResultMode | pickResultMode() const |
void | setPickResultMode(PickResultMode pickResultMode) |
Notifier signal:
void | pickResultModeChanged(QPickingSettings::PickResultMode pickResult) |