summaryrefslogtreecommitdiffstats
path: root/src/render/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/frontend')
-rw-r--r--src/render/frontend/qcameralens.cpp287
-rw-r--r--src/render/frontend/qpickingsettings.cpp89
-rw-r--r--src/render/frontend/qrendersettings.cpp96
3 files changed, 295 insertions, 177 deletions
diff --git a/src/render/frontend/qcameralens.cpp b/src/render/frontend/qcameralens.cpp
index 8c730c763..4725251b5 100644
--- a/src/render/frontend/qcameralens.cpp
+++ b/src/render/frontend/qcameralens.cpp
@@ -45,8 +45,164 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- \internal
-*/
+ * \class Qt3DRender::QCameraLens
+ * \inmodule Qt3DRender
+ *
+ * \brief Qt3DRender::QCameraLens specifies the projection matrix that will be used to
+ * define a Camera for a 3D scene.
+ *
+ * \since 5.5
+ */
+
+/*!
+ * \qmltype CameraLens
+ * \instantiates Qt3DRender::QCameraLens
+ * \inqmlmodule Qt3D.Render
+ * \inherits Component3D
+ * \since 5.5
+ * \brief Provides the projection matrix that is used to define a Camera for 3D scene.
+ */
+
+/*!
+ * \enum Qt3DRender::QCameraLens::ProjectionType
+ *
+ * Specifies which parameters of Qt3DRender::QCameraLens are used to compute the projection matrix.
+ *
+ * \value OrthographicProjection Orthogonal projection
+ * \value PerspectiveProjection Perspective projection
+ * \value FrustumProjection Frustum projection
+ * \value CustomProjection Custom user-defined projection
+ */
+
+/*!
+ * \qmlproperty enumeration CameraLens::projectionType
+ *
+ * Holds the type of the camera projection.
+ *
+ * \list
+ * \li CameraLens.OrthographicProjection
+ * \li CameraLens.PerspectiveProjection
+ * \li CameraLens.FrustumProjection
+ * \li CameraLens.CustomProjection
+ * \endlist
+ * \sa Qt3DRender::QCameraLens::ProjectionType
+ */
+
+/*!
+ * \qmlproperty real CameraLens::nearPlane
+ * Holds the current near plane of the camera lens.
+ */
+
+/*!
+ * \qmlproperty real CameraLens::farPlane
+ * Holds the current near plane of the camera lens.
+ */
+
+/*!
+ * \qmlproperty real CameraLens::fieldOfView
+ * Holds the current field of view of the camera lens in degrees.
+ */
+
+/*!
+ * \qmlproperty real CameraLens::aspectRatio
+ * Holds the current aspect ratio of the camera lens.
+ */
+
+/*!
+ * \qmlproperty real CameraLens::left
+ * Holds the current left plane of the camera lens.
+ */
+
+/*!
+ * \qmlproperty real CameraLens::right
+ * Holds the current right plane of the camera lens.
+ */
+
+/*!
+ * \qmlproperty real CameraLens::bottom
+ * Holds the current bottom plane of the camera lens.
+ */
+
+/*!
+ * \qmlproperty real CameraLens::top
+ * Holds the current top plane of the camera lens.
+ */
+
+/*!
+ * \qmlproperty matrix4x4 CameraLens::projectionMatrix
+ * Holds the current projection matrix of the camera lens.
+ * \readonly
+ */
+
+
+/*!
+ * \property QCameraLens::projectionType
+ *
+ * Holds the type of the camera projection.
+ * \sa Qt3DRender::QCameraLens::ProjectionType
+ */
+
+/*!
+ * \property QCameraLens::nearPlane
+ * Holds the current near plane of the camera lens.
+ */
+
+/*!
+ * \property QCameraLens::farPlane
+ * Holds the current near plane of the camera lens.
+ */
+
+/*!
+ * \property QCameraLens::fieldOfView
+ * Holds the current field of view of the camera lens.
+ * \note: The return value may be undefined if the projection type is not
+ * Qt3DRender::QCameraLens::PerspectiveProjection.
+ */
+
+/*!
+ * \property QCameraLens::aspectRatio
+ * Holds the current aspect ratio of the camera lens.
+ * \note: The return value may be undefined if the projection type is not
+ * Qt3DRender::QCameraLens::PerspectiveProjection.
+ */
+
+/*!
+ * \property QCameraLens::left
+ * Holds the current left plane of the camera lens.
+ * \note The return value may be undefined if the projection type is
+ * Qt3DRender::QCameraLens::PerspectiveProjection.
+ */
+
+/*!
+ * \property QCameraLens::right
+ * Holds the current right plane of the camera lens.
+ * \note The return value may be undefined if the projection type is
+ * Qt3DRender::QCameraLens::PerspectiveProjection.
+ */
+
+/*!
+ * \property QCameraLens::bottom
+ * Holds the current bottom plane of the camera lens.
+ * \note The return value may be undefined if the projection type is
+ * Qt3DRender::QCameraLens::PerspectiveProjection.
+ */
+
+/*!
+ * \property QCameraLens::top
+ * Holds the current top plane of the camera lens.
+ * \note The return value may be undefined if the projection type is
+ * Qt3DRender::QCameraLens::PerspectiveProjection.
+ */
+
+/*!
+ * \property QCameraLens::projectionMatrix
+ * Holds the current projection matrix of the camera lens.
+ * \readonly
+ */
+
+/*!
+ * \internal
+ */
QCameraLensPrivate::QCameraLensPrivate()
: Qt3DCore::QComponentPrivate()
, m_projectionType(QCameraLens::PerspectiveProjection)
@@ -61,6 +217,9 @@ QCameraLensPrivate::QCameraLensPrivate()
{
}
+/*!
+ * Constructs a QCameraLens with given \a parent
+ */
QCameraLens::QCameraLens(QNode *parent)
: Qt3DCore::QComponent(*new QCameraLensPrivate, parent)
{
@@ -73,14 +232,6 @@ QCameraLens::~QCameraLens()
{
}
-/*! \class Qt3DRender::QCameraLens
- * \inmodule Qt3DCore
- *
- * \brief Qt3DRender::QCameraLens specifies the projection matrix that will be used to
- * define a Camera for a 3D scene.
- *
- * \since 5.5
- */
QCameraLens::QCameraLens(QCameraLensPrivate &dd, QNode *parent)
: QComponent(dd, parent)
{
@@ -89,17 +240,6 @@ QCameraLens::QCameraLens(QCameraLensPrivate &dd, QNode *parent)
}
/*!
- * \enum Qt3DRender::QCameraLens::ProjectionType
- *
- * Specifies which parameters of Qt3DRender::QCameraLens are used to compute the projection matrix.
- *
- * \value OrthographicProjection
- * \value PerspectiveProjection
- * \value FrustumProjection
- * \value CustomProjection
- */
-
-/*!
* Sets the lens' projection type \a projectionType.
*
* \note Qt3DRender::QCameraLens::Frustum and
@@ -120,9 +260,6 @@ void QCameraLens::setProjectionType(QCameraLens::ProjectionType projectionType)
}
}
-/*!
- * Returns the lens' projection type.
- */
QCameraLens::ProjectionType QCameraLens::projectionType() const
{
Q_D(const QCameraLens);
@@ -207,9 +344,6 @@ void QCameraLens::setNearPlane(float nearPlane)
d->updateProjectionMatrix();
}
-/*!
- * Returns the projection's near plane.
- */
float QCameraLens::nearPlane() const
{
Q_D(const QCameraLens);
@@ -234,9 +368,6 @@ void QCameraLens::setFarPlane(float farPlane)
d->updateProjectionMatrix();
}
-/*!
- * Returns the projection's far plane.
- */
float QCameraLens::farPlane() const
{
Q_D(const QCameraLens);
@@ -264,12 +395,6 @@ void QCameraLens::setFieldOfView(float fieldOfView)
d->updateProjectionMatrix();
}
-/*!
- * Returns the projection's field of view in degrees.
- *
- * \note: The return value may be undefined if the projection type is not
- * Qt3DRender::QCameraLens::PerspectiveProjection.
- */
float QCameraLens::fieldOfView() const
{
Q_D(const QCameraLens);
@@ -297,12 +422,6 @@ void QCameraLens::setAspectRatio(float aspectRatio)
d->updateProjectionMatrix();
}
-/*!
- * Returns the projection's aspect ratio.
- *
- * \note: The return value may be undefined if the projection type is not
- * Qt3DRender::QCameraLens::PerspectiveProjection.
- */
float QCameraLens::aspectRatio() const
{
Q_D(const QCameraLens);
@@ -330,12 +449,6 @@ void QCameraLens::setLeft(float left)
d->updateProjectionMatrix();
}
-/*!
- * Returns the lower left window coordinate of the projection.
- *
- * \note The return value may be undefined if the projection type is
- * Qt3DRender::QCameraLens::PerspectiveProjection.
- */
float QCameraLens::left() const
{
Q_D(const QCameraLens);
@@ -363,12 +476,6 @@ void QCameraLens::setRight(float right)
d->updateProjectionMatrix();
}
-/*!
- * Returns the upper right window coordinate of the projection.
- *
- * \note The return value may be undefined if the projection type is
- * Qt3DRender::QCameraLens::PerspectiveProjection.
- */
float QCameraLens::right() const
{
Q_D(const QCameraLens);
@@ -396,12 +503,6 @@ void QCameraLens::setBottom(float bottom)
d->updateProjectionMatrix();
}
-/*!
- * Returns the bottom window coordinate of the projection.
- *
- * \note The return value may be undefined if the projection type is
- * Qt3DRender::QCameraLens::PerspectiveProjection.
- */
float QCameraLens::bottom() const
{
Q_D(const QCameraLens);
@@ -429,12 +530,6 @@ void QCameraLens::setTop(float top)
d->updateProjectionMatrix();
}
-/*!
- * Returns the bottom window coordinate of the projection.
- *
- * \note The return value may be undefined if the projection type is
- * Qt3DRender::QCameraLens::PerspectiveProjection.
- */
float QCameraLens::top() const
{
Q_D(const QCameraLens);
@@ -442,7 +537,7 @@ float QCameraLens::top() const
}
/*!
- * Sets the project matrix.
+ * Sets the project matrix to \a projectionMatrix.
*
* \note This will set the projection type to Qt3DRender::QCameraLens::CustomProjection and thus
* ignore all other camera parameters that might have been specified.
@@ -457,9 +552,6 @@ void QCameraLens::setProjectionMatrix(const QMatrix4x4 &projectionMatrix)
emit projectionMatrixChanged(projectionMatrix);
}
-/*!
- * Returns the projection matrix.
- */
QMatrix4x4 QCameraLens::projectionMatrix() const
{
Q_D(const QCameraLens);
@@ -476,59 +568,4 @@ Qt3DCore::QNodeCreatedChangeBasePtr QCameraLens::createNodeCreationChange() cons
} // Qt3DRender
-/*!
- \qmltype CameraLens
- \instantiates Qt3DRender::QCameraLens
- \inqmlmodule Qt3D.Core
- \inherits Component3D
- \since 5.5
- \brief Provides the projection matrix that is used to define a Camera for 3D scene.
-*/
-
-/*!
- \qmlproperty enumeration Qt3DCore::CameraLens::projectionType
-
- Holds the type of the camera projection (orthogonal or perspective).
-
- \value CameraLens.OrthographicProjection Orthogonal projection
- \value CameraLens.PerspectiveProjection Perspective projection
-*/
-
-/*!
- \qmlproperty float Qt3DCore::CameraLens::nearPlane
-*/
-
-/*!
- \qmlproperty float Qt3DCore::CameraLens::farPlane
-*/
-
-/*!
- \qmlproperty float Qt3DCore::CameraLens::fieldOfView
-*/
-
-/*!
- \qmlproperty float Qt3DCore::CameraLens::aspectRatio
-*/
-
-/*!
- \qmlproperty float Qt3DCore::CameraLens::left
-*/
-
-/*!
- \qmlproperty float Qt3DCore::CameraLens::right
-*/
-
-/*!
- \qmlproperty float Qt3DCore::CameraLens::bottom
-*/
-
-/*!
- \qmlproperty float Qt3DCore::CameraLens::top
-*/
-
-/*!
- \qmlproperty matrix4x4 Qt3DCore::CameraLens::projectionMatrix
- \readonly
-*/
-
QT_END_NAMESPACE
diff --git a/src/render/frontend/qpickingsettings.cpp b/src/render/frontend/qpickingsettings.cpp
index 2805ec5a8..c1524547c 100644
--- a/src/render/frontend/qpickingsettings.cpp
+++ b/src/render/frontend/qpickingsettings.cpp
@@ -45,12 +45,25 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * \class Qt3DRender::QPickingSettings
- * \brief The QPickingSettings class specifies the current framegraph to be used
- * by the renderer and specifies whether rendering is always active or updated
- * only on changes.
- * \since 5.7
- * \inmodule Qt3DRender
+ \class Qt3DRender::QPickingSettings
+ \brief The QPickingSettings class specifies how entity picking is handled.
+ \since 5.7
+ \inmodule Qt3DRender
+ \inherits Qt3DCore::QNode
+
+ The picking settings determine how the entity picking is handled. For more details about
+ entity picking, see QObjectPicker component documentation.
+ */
+
+/*!
+ \qmltype PickingSettings
+ \brief The PickingSettings class specifies how entity picking is handled.
+ \since 5.7
+ \inqmlmodule Qt3D.Render
+ \instantiates Qt3DRender::QPickingSettings
+
+ The picking settings determine how the entity picking is handled. For more details about
+ entity picking, see Qt3DRender::QObjectPicker component documentation.
*/
QPickingSettingsPrivate::QPickingSettingsPrivate()
@@ -61,11 +74,6 @@ QPickingSettingsPrivate::QPickingSettingsPrivate()
{
}
-/*!
- * The constructor creates a new Qt3DRender::QPickingSettings
- * instance with the specified \a parent.
- * \param parent
- */
QPickingSettings::QPickingSettings(Qt3DCore::QNode *parent)
: Qt3DCore::QNode(*new QPickingSettingsPrivate, parent)
{
@@ -82,18 +90,12 @@ QPickingSettings::QPickingSettings(QPickingSettingsPrivate &dd, Qt3DCore::QNode
{
}
-/*!
- * \return the current pick method.
- */
QPickingSettings::PickMethod QPickingSettings::pickMethod() const
{
Q_D(const QPickingSettings);
return d->m_pickMethod;
}
-/*!
- * \return the current pick result mode.
- */
QPickingSettings::PickResultMode QPickingSettings::pickResultMode() const
{
Q_D(const QPickingSettings);
@@ -112,16 +114,31 @@ QPickingSettings::FaceOrientationPickingMode QPickingSettings::faceOrientationPi
/*!
* \enum Qt3DRender::QPickingSettings::PickMethod
*
- * Specifies which parameters of Qt3DRender::QPickingSettings are used.
+ * Specifies the picking method.
*
- * \value BoundingVolumePicking
- * \value TrianglePicking
+ * \value BoundingVolumePicking An entity is considered picked if the picking ray intersects
+ * the bounding volume of the entity.
+ * \value TrianglePicking An entity is considered picked if the picking ray intersects with
+ * any triangle of the entity's mesh component.
*/
/*!
- * Sets the pick method to \a pickMethod
- * \param pickMethod
- */
+ \qmlproperty enumeration PickingSettings::pickMethod
+
+ Holds the current pick method.
+
+ \list
+ \li PickingSettings.BoundingVolumePicking
+ \li PickingSettings.TrianglePicking
+ \endlist
+
+ \sa Qt3DRender::QPickingSettings::PickMethod
+*/
+/*!
+ \property QPickingSettings::pickMethod
+
+ Holds the current pick method.
+*/
void QPickingSettings::setPickMethod(QPickingSettings::PickMethod pickMethod)
{
Q_D(QPickingSettings);
@@ -135,16 +152,30 @@ void QPickingSettings::setPickMethod(QPickingSettings::PickMethod pickMethod)
/*!
* \enum Qt3DRender::QPickingSettings::PickResultMode
*
- * Specifies which parameters of Qt3DRender::PickResultMode are used.
+ * Specifies what is included into the picking results.
*
- * \value NearestPick
- * \value AllPicks
+ * \value NearestPick Only the nearest entity to picking ray origin intersected by the picking ray
+ * is picked.
+ * \value AllPicks All entities that intersect the picking ray are picked.
*/
/*!
- * Sets the pick result mode to \a pickResultMode
- * \param pickResultMode
- */
+ \qmlproperty enumeration PickingSettings::pickResultMode
+
+ Holds the current pick results mode.
+
+ \list
+ \li PickingSettings.NearestPick
+ \li PickingSettings.AllPicks
+ \endlist
+
+ \sa Qt3DRender::QPickingSettings::PickResultMode
+*/
+/*!
+ \property QPickingSettings::pickResultMode
+
+ Holds the current pick results mode.
+*/
void QPickingSettings::setPickResultMode(QPickingSettings::PickResultMode pickResultMode)
{
Q_D(QPickingSettings);
diff --git a/src/render/frontend/qrendersettings.cpp b/src/render/frontend/qrendersettings.cpp
index fd0e75b4e..616c3a64e 100644
--- a/src/render/frontend/qrendersettings.cpp
+++ b/src/render/frontend/qrendersettings.cpp
@@ -46,10 +46,29 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * \class Qt3DRender::QRenderSettings
- * \brief The QRenderSettings class
- * \since 5.7
- * \inmodule Qt3DRender
+ \class Qt3DRender::QRenderSettings
+ \brief The QRenderSettings class holds settings related to rendering process and host the active
+ \l{Qt 3D Render Framegraph}{FrameGraph}.
+ \since 5.7
+ \inmodule Qt3DRender
+ \inherits Qt3DCore::QComponent
+
+ The QRenderSettings component must be set as a component of the scene root entity. It specifies
+ render policy and picking settings, as well as hosts the active
+ \l{Qt 3D Render Framegraph}{FrameGraph}.
+ */
+
+/*!
+ \qmltype RenderSettings
+ \brief The RenderSettings type holds settings related to rendering process and host the active
+ \l{Qt 3D Render Framegraph}{FrameGraph}.
+ \since 5.7
+ \inqmlmodule Qt3D.Render
+ \instantiates Qt3DRender::QRenderSettings
+
+ The RenderSettings component must be set as a component of the scene root entity. It specifies
+ render policy and picking settings, as well as hosts the active
+ \l{Qt 3D Render Framegraph}{FrameGraph}.
*/
/*! \internal */
@@ -90,11 +109,6 @@ void QRenderSettingsPrivate::_q_onFaceOrientationPickingModeChanged(QPickingSett
notifyPropertyChange("faceOrientationPickingMode", faceOrientationPickingMode);
}
-/*!
- * The constructor creates a new QRenderSettings::QRenderSettings instance with the
- * specified \a parent.
- * \param parent
- */
QRenderSettings::QRenderSettings(Qt3DCore::QNode *parent)
: QRenderSettings(*new QRenderSettingsPrivate, parent) {}
@@ -112,8 +126,19 @@ QRenderSettings::~QRenderSettings()
}
/*!
- * \return the current picking settings.
- */
+ \qmlproperty PickingSettings RenderSettings::pickingSettings
+
+ Holds the current pick settings for the \l{Qt 3D Render Framegraph}{FrameGraph}.
+
+ \readonly
+*/
+/*!
+ \property QRenderSettings::pickingSettings
+
+ Holds the current pick settings for the \l{Qt 3D Render Framegraph}{FrameGraph}.
+
+ \readonly
+*/
QPickingSettings *QRenderSettings::pickingSettings()
{
Q_D(QRenderSettings);
@@ -121,27 +146,56 @@ QPickingSettings *QRenderSettings::pickingSettings()
}
/*!
- * \return the current active framegraph.
- */
+ \qmlproperty FrameGraphNode RenderSettings::activeFrameGraph
+
+ Holds the currently active \l{Qt 3D Render Framegraph}{FrameGraph}.
+*/
+/*!
+ \property QRenderSettings::activeFrameGraph
+
+ Holds the currently active \l{Qt 3D Render Framegraph}{FrameGraph}.
+*/
QFrameGraphNode *QRenderSettings::activeFrameGraph() const
{
Q_D(const QRenderSettings);
return d->m_activeFrameGraph;
}
+
/*!
- * \return the current render policy
- */
+ \enum QRenderSettings::RenderPolicy
+
+ The render policy.
+
+ \value OnDemand The \l{Qt 3D Render Framegraph}{FrameGraph} is rendered only when something
+ changes.
+ \value Always The \l{Qt 3D Render Framegraph}{FrameGraph} is rendered continuously, even if
+ nothing has changed.
+*/
+
+/*!
+ \qmlproperty enumeration RenderSettings::renderPolicy
+
+ Holds the current render policy.
+
+ \list
+ \li RenderSettings.OnDemand
+ \li RenderSettings.Always
+ \endlist
+
+ \sa Qt3DRender::QRenderSettings::RenderPolicy
+*/
+/*!
+ \property QRenderSettings::renderPolicy
+
+ Holds the current render policy.
+*/
QRenderSettings::RenderPolicy QRenderSettings::renderPolicy() const
{
Q_D(const QRenderSettings);
return d->m_renderPolicy;
}
-/*!
- * Sets the active framegraph to \a activeFrameGraph.
- * \param activeFrameGraph
- */
void QRenderSettings::setActiveFrameGraph(QFrameGraphNode *activeFrameGraph)
{
Q_D(QRenderSettings);
@@ -163,10 +217,6 @@ void QRenderSettings::setActiveFrameGraph(QFrameGraphNode *activeFrameGraph)
emit activeFrameGraphChanged(activeFrameGraph);
}
-/*!
- * Sets the render policy to \a renderPolicy.
- * \param renderPolicy
- */
void QRenderSettings::setRenderPolicy(QRenderSettings::RenderPolicy renderPolicy)
{
Q_D(QRenderSettings);