- class QPickingSettings¶
The
QPickingSettings
class specifies how entity picking is handled. More…Synopsis¶
Properties¶
Methods¶
def
__init__()
def
pickMethod()
def
pickResultMode()
Slots¶
Signals¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
The picking settings determine how the entity picking is handled. For more details about entity picking, see
QObjectPicker
andQRayCaster
component documentation.When using
QObjectPicker
components, picking is triggered by mouse events.When using
QRayCaster
orQScreenRayCaster
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
QScreenRayCaster
- class PickMethod¶
Specifies the picking method.
Constant
Description
Qt3DRender.QPickingSettings.BoundingVolumePicking
An entity is considered picked if the picking ray intersects the bounding volume of the entity (default).
Qt3DRender.QPickingSettings.TrianglePicking
An entity is considered picked if the picking ray intersects with any triangle of the entity’s mesh component.
Qt3DRender.QPickingSettings.LinePicking
An entity is considered picked if the picking ray intersects with any edge of the entity’s mesh component.
Qt3DRender.QPickingSettings.PointPicking
An entity is considered picked if the picking ray intersects with any point of the entity’s mesh component.
Qt3DRender.QPickingSettings.PrimitivePicking
An entity is considered picked if the picking ray intersects with any point, edge or triangle of the entity’s mesh component.
- class PickResultMode¶
Specifies what is included into the picking results.
Constant
Description
Qt3DRender.QPickingSettings.NearestPick
Only the nearest entity to picking ray origin intersected by the picking ray is picked (default).
Qt3DRender.QPickingSettings.AllPicks
All entities that intersect the picking ray are picked.
Qt3DRender.QPickingSettings.NearestPriorityPick
Selects the entity whose object picker has the highest value. If several object pickers have the same priority, the closest one on the ray is selected.
See also
QPickEvent
- class FaceOrientationPickingMode¶
Specifies how face orientation affects triangle picking
Constant
Description
Qt3DRender.QPickingSettings.FrontFace
Only front-facing triangles will be picked (default).
Qt3DRender.QPickingSettings.BackFace
Only back-facing triangles will be picked.
Qt3DRender.QPickingSettings.FrontAndBackFace
Both front- and back-facing triangles will be picked.
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property faceOrientationPickingModeᅟ: Qt3DRender.QPickingSettings.FaceOrientationPickingMode¶
Specifies how face orientation affects triangle picking
- Access functions:
- property pickMethodᅟ: Qt3DRender.QPickingSettings.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.
- Access functions:
- property pickResultModeᅟ: Qt3DRender.QPickingSettings.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 aQObjectPicker
along the ray.When setting the pick method to
NearestPriorityPick
, events will be triggered for the nearest highest priority picker. This can be used when a given element should always be selected even if others are in front of it.If a
QObjectPicker
is assigned to an entity with multiple children, an event will be triggered for each child entity that intersects the ray.- Access functions:
- property worldSpaceToleranceᅟ: float¶
Holds the threshold, in model space coordinates, used to evaluate line and point picking.
- Access functions:
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- faceOrientationPickingMode()¶
- Return type:
FaceOrientationPickingMode
See also
setFaceOrientationPickingMode()
Getter of property
faceOrientationPickingModeᅟ
.- faceOrientationPickingModeChanged(faceOrientationPickingMode)¶
- Parameters:
faceOrientationPickingMode –
FaceOrientationPickingMode
Notification signal of property
faceOrientationPickingModeᅟ
.- pickMethod()¶
- Return type:
PickMethod
See also
setPickMethod()
Getter of property
pickMethodᅟ
.- pickMethodChanged(pickMethod)¶
- Parameters:
pickMethod –
PickMethod
Notification signal of property
pickMethodᅟ
.- pickResultMode()¶
- Return type:
PickResultMode
See also
setPickResultMode()
Getter of property
pickResultModeᅟ
.- pickResultModeChanged(pickResult)¶
- Parameters:
pickResult –
PickResultMode
Notification signal of property
pickResultModeᅟ
.- setFaceOrientationPickingMode(faceOrientationPickingMode)¶
- Parameters:
faceOrientationPickingMode –
FaceOrientationPickingMode
See also
faceOrientationPickingMode()
Setter of property
faceOrientationPickingModeᅟ
.- setPickMethod(pickMethod)¶
- Parameters:
pickMethod –
PickMethod
See also
pickMethod()
Setter of property
pickMethodᅟ
.- setPickResultMode(pickResultMode)¶
- Parameters:
pickResultMode –
PickResultMode
See also
pickResultMode()
Setter of property
pickResultModeᅟ
.- setWorldSpaceTolerance(worldSpaceTolerance)¶
- Parameters:
worldSpaceTolerance – float
Sets the threshold used for line and point picking to
worldSpaceTolerance
.See also
worldSpaceTolerance()
Setter of property
worldSpaceToleranceᅟ
.- worldSpaceTolerance()¶
- Return type:
float
Returns the line and point precision worldSpaceTolerance
See also
setWorldSpaceTolerance()
Getter of property
worldSpaceToleranceᅟ
.- worldSpaceToleranceChanged(worldSpaceTolerance)¶
- Parameters:
worldSpaceTolerance – float
Notification signal of property
worldSpaceToleranceᅟ
.