summaryrefslogtreecommitdiffstats
path: root/src/render/picking/qobjectpicker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/picking/qobjectpicker.cpp')
-rw-r--r--src/render/picking/qobjectpicker.cpp44
1 files changed, 39 insertions, 5 deletions
diff --git a/src/render/picking/qobjectpicker.cpp b/src/render/picking/qobjectpicker.cpp
index 1842b7fee..49f608a67 100644
--- a/src/render/picking/qobjectpicker.cpp
+++ b/src/render/picking/qobjectpicker.cpp
@@ -55,14 +55,25 @@ namespace Qt3DRender {
\brief The QObjectPicker class instantiates a component that can
be used to interact with a QEntity by a process known as picking.
+ For every combination of viewport and camera, picking casts a ray through the scene to
+ find entities who's bounding volume intersects the ray. The bounding volume is computed using
+ the values in the attribute buffer specified by the boundingVolumePositionAttribute of the
+ geometry.
+
The signals pressed(), released(), clicked(), moved(), entered(), and exited() are
emitted when the bounding volume defined by the pickAttribute property intersects
with a ray.
+ Most signals carry a QPickEvent instance. If QPickingSettings::pickMode() is set to
+ QPickingSettings::TrianglePicking, the actual type of the pick parameter will be
+ QPickTriangleEvent.
+
Pick queries are performed on mouse press and mouse release.
If drag is enabled, queries also happen on each mouse move while any button is pressed.
If hover is enabled, queries happen on every mouse move even if no button is pressed.
- \sa QPickingSettings
+
+ \sa Qt3DRender::QPickingSettings, Qt3DRender::QGeometry, Qt3DRender::QAttribute,
+ Qt3DRender::QPickEvent, Qt3DRender::QPickTriangleEvent
\note Instances of this component shouldn't be shared, not respecting that
condition will most likely result in undefined behavior.
@@ -76,28 +87,51 @@ namespace Qt3DRender {
* \inqmlmodule Qt3D.Render
* \brief The ObjectPicker class instantiates a component that can
be used to interact with an Entity by a process known as picking.
+
+ For every combination of viewport and camera, picking casts a ray through the scene to
+ find entities who's bounding volume intersects the ray. The bounding volume is computed using
+ the values in the attribute buffer specified by the boundingVolumePositionAttribute of the
+ geometry.
+
+ The signals pressed(), released(), clicked(), moved(), entered(), and exited() are
+ emitted when the bounding volume defined by the pickAttribute property intersects
+ with a ray.
+
+ Most signals carry a PickEvent instance. If PickingSettings.pickMode is set to
+ PickingSettings.TrianglePicking, the actual type of the pick parameter will be
+ PickTriangleEvent.
+
+ Pick queries are performed on mouse press and mouse release.
+ If drag is enabled, queries also happen on each mouse move while any button is pressed.
+ If hover is enabled, queries happen on every mouse move even if no button is pressed.
+
+ \sa PickingSettings, Geometry, Attribute, PickEvent, PickTriangleEvent
+
+ \note Instances of this component shouldn't be shared, not respecting that
+ condition will most likely result in undefined behavior.
+
*/
/*!
- \qmlsignal Qt3D.Render::ObjectPicker::pressed()
+ \qmlsignal Qt3D.Render::ObjectPicker::pressed(PickEvent pick)
This signal is emitted when the bounding volume defined by the pickAttribute property intersects
with a ray on a mouse press.
*/
/*!
- \qmlsignal Qt3D.Render::ObjectPicker::released()
+ \qmlsignal Qt3D.Render::ObjectPicker::released(PickEvent pick)
This signal is emitted when the bounding volume defined by the pickAttribute property intersects
with a ray on a mouse release.
*/
/*!
- \qmlsignal Qt3D.Render::ObjectPicker::clicked()
+ \qmlsignal Qt3D.Render::ObjectPicker::clicked(PickEvent pick)
This signal is emitted when the bounding volume defined by the pickAttribute property intersects
with a ray on a mouse click.
*/
/*!
- \qmlsignal Qt3D.Render::ObjectPicker::moved()
+ \qmlsignal Qt3D.Render::ObjectPicker::moved(PickEvent pick)
This signal is emitted when the bounding volume defined by the pickAttribute property intersects
with a ray on a mouse move with a button pressed.
*/