QPickEvent#
The QPickEvent
class holds information when an object is picked. More…
Inherited by: QPickTriangleEvent, QPickPointEvent, QPickLineEvent
Synopsis#
Functions#
def
button
()def
buttons
()def
distance
()def
entity
()def
isAccepted
()def
localIntersection
()def
modifiers
()def
position
()def
viewport
()def
worldIntersection
()
Slots#
def
setAccepted
(accepted)
Signals#
def
acceptedChanged
(accepted)
Detailed Description#
This is received as a parameter in most of the QObjectPicker
component signals when picking succeeds.
See also
QPickingSettings
QPickTriangleEvent
QObjectPicker
- class PySide6.Qt3DRender.Qt3DRender.QPickEvent#
PySide6.Qt3DRender.Qt3DRender.QPickEvent(position, worldIntersection, localIntersection, distance)
PySide6.Qt3DRender.Qt3DRender.QPickEvent(position, worldIntersection, localIntersection, distance, button, buttons, modifiers)
- Parameters
position –
PySide6.QtCore.QPointF
buttons – int
distance – float
button –
Buttons
worldIntersection –
PySide6.QtGui.QVector3D
modifiers – int
localIntersection –
PySide6.QtGui.QVector3D
Constructs a new QPickEvent
.
Constructs a new QPickEvent
with the given parameters: position
, intersection
, localIntersection
and distance
Constructs a new QPickEvent
with the given parameters: position
, worldIntersection
, localIntersection
, distance
, button
, buttons
and modifiers
- PySide6.Qt3DRender.Qt3DRender.QPickEvent.Buttons#
Constant
Description
Qt3DRender.QPickEvent.LeftButton
Qt3DRender.QPickEvent.RightButton
Qt3DRender.QPickEvent.MiddleButton
Qt3DRender.QPickEvent.BackButton
Qt3DRender.QPickEvent.NoButton
- PySide6.Qt3DRender.Qt3DRender.QPickEvent.Modifiers#
Constant
Description
Qt3DRender.QPickEvent.NoModifier
Qt3DRender.QPickEvent.ShiftModifier
Qt3DRender.QPickEvent.ControlModifier
Qt3DRender.QPickEvent.AltModifier
Qt3DRender.QPickEvent.MetaModifier
Qt3DRender.QPickEvent.KeypadModifier
- PySide6.Qt3DRender.Qt3DRender.QPickEvent.acceptedChanged(accepted)#
- Parameters
accepted – bool
Specifies mouse button that caused the event
- PySide6.Qt3DRender.Qt3DRender.QPickEvent.buttons()#
- Return type
int
Specifies state of the mouse buttons for the event
- PySide6.Qt3DRender.Qt3DRender.QPickEvent.distance()#
- Return type
float
Specifies the distance of the hit to the camera
- PySide6.Qt3DRender.Qt3DRender.QPickEvent.entity()#
- Return type
The entity that the picked geometry belongs to.
If the object picker is not attached to a leaf node in the scene graph, this is useful to find which child entity was actually picked.
- PySide6.Qt3DRender.Qt3DRender.QPickEvent.isAccepted()#
- Return type
bool
Specifies if event has been accepted
- PySide6.Qt3DRender.Qt3DRender.QPickEvent.localIntersection()#
- Return type
Specifies the coordinates of the hit in the local coordinate system of the picked entity
- PySide6.Qt3DRender.Qt3DRender.QPickEvent.modifiers()#
- Return type
int
Specifies state of the mouse buttons for the event
- PySide6.Qt3DRender.Qt3DRender.QPickEvent.position()#
- Return type
Specifies the mouse position with respect to the render area (window or quick item)
- PySide6.Qt3DRender.Qt3DRender.QPickEvent.setAccepted(accepted)#
- Parameters
accepted – bool
Specifies if event has been accepted
- PySide6.Qt3DRender.Qt3DRender.QPickEvent.viewport()#
- Return type
The viewport in which this event originated. A null value means the event originated from a frame graph branch without a QViewport
. If a frame graph branch has a Viewport inside a Viewport the property will contain the leaf viewport.
- PySide6.Qt3DRender.Qt3DRender.QPickEvent.worldIntersection()#
- Return type
Specifies the coordinates of the hit in world coordinate system