summaryrefslogtreecommitdiffstats
path: root/src/render/picking/qobjectpicker.cpp
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2017-02-20 11:36:32 +0000
committerMike Krus <mike.krus@kdab.com>2017-03-01 19:31:44 +0000
commitb8f5f4447caef56be5500b5c35383b5d65836072 (patch)
treef4eb205614ef5b937855cf96105ea7820f4111d2 /src/render/picking/qobjectpicker.cpp
parentbec33082f5ec09e067b30c8a560ffb5e8a20c154 (diff)
Update documentation related to picking
Change-Id: I67f37da8d4534938e252a0c96735e6efe58cb6e3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
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 9fa8b774c..45f7ff135 100644
--- a/src/render/picking/qobjectpicker.cpp
+++ b/src/render/picking/qobjectpicker.cpp
@@ -56,14 +56,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.
@@ -77,28 +88,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.
*/