summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ogilvie <colin.ogilvie@kdab.com>2016-05-24 09:38:44 +0100
committerSean Harmer <sean.harmer@kdab.com>2016-05-28 16:01:17 +0000
commitc55e51e17dcaecac7cb2f7f53c656636f1fdf1bf (patch)
tree7251d09a6d24fe51d63b5fd55203313236a18651
parentca953401eb721b322c2dec86d9fa0cc7bd7db13a (diff)
downloadqt3d-c55e51e17dcaecac7cb2f7f53c656636f1fdf1bf.tar.gz
Skeletal Doc for render-lights
Task-number: QTBUG-46037 Change-Id: I045b7ff77827de2410fc785c16508ff1429f14fb Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r--src/render/lights/qabstractlight.cpp15
-rw-r--r--src/render/lights/qdirectionallight.cpp31
-rw-r--r--src/render/lights/qpointlight.cpp30
-rw-r--r--src/render/lights/qspotlight.cpp45
4 files changed, 111 insertions, 10 deletions
diff --git a/src/render/lights/qabstractlight.cpp b/src/render/lights/qabstractlight.cpp
index ea8fd13d6..a826654c7 100644
--- a/src/render/lights/qabstractlight.cpp
+++ b/src/render/lights/qabstractlight.cpp
@@ -53,6 +53,14 @@ namespace Qt3DRender
* \since 5.6
*/
+/*!
+ \enum QAbstractLight::Type
+
+ This enum type identifies the particular type of light.
+ \value PointLight
+ \value DirectionalLight
+ \value SpotLight
+*/
QAbstractLightPrivate::QAbstractLightPrivate(QAbstractLight::Type type)
: m_type(type)
@@ -79,6 +87,8 @@ Qt3DCore::QNodeCreatedChangeBasePtr QAbstractLight::createNodeCreationChange() c
/*!
\class Qt3DRender::QAbstractLight
\inmodule Qt3DRender
+ \brief Encapsulate a QAbstractLight object in a Qt 3D scene.
+ \since 5.6
*/
/*! \internal */
@@ -93,6 +103,11 @@ QAbstractLight::~QAbstractLight()
{
}
+/*!
+ \property Qt3DRender::QAbstractLight::type
+
+ Holds the current QAbstractLight type.
+*/
QAbstractLight::Type QAbstractLight::type() const
{
Q_D(const QAbstractLight);
diff --git a/src/render/lights/qdirectionallight.cpp b/src/render/lights/qdirectionallight.cpp
index 57b5c85cd..14bdb2c38 100644
--- a/src/render/lights/qdirectionallight.cpp
+++ b/src/render/lights/qdirectionallight.cpp
@@ -70,6 +70,28 @@ QDirectionalLightPrivate::QDirectionalLightPrivate()
m_shaderData->setProperty("direction", QVector3D(0.0f, -1.0f, 0.0f));
}
+/*!
+ \class Qt3DRender::QDirectionalLight
+ \inmodule Qt3DRender
+ \since 5.7
+ \brief Encapsulate a Directional Light object in a Qt 3D scene.
+
+ */
+
+/*!
+ \qmltype DirectionalLight
+ \instantiates Qt3DRender::QDirectionalLight
+ \inherits AbstractLight
+ \inqmlmodule Qt3D.Render
+ \since 5.7
+ \brief Encapsulate a Directional Light object in a Qt 3D scene.
+
+*/
+
+/*!
+ \fn Qt3DRender::QDirectionalLight::QDirectionalLight(Qt3DCore::QNode *parent)
+ Constructs a new QDirectionalLight with the specified \a parent.
+ */
QDirectionalLight::QDirectionalLight(QNode *parent)
: QAbstractLight(*new QDirectionalLightPrivate, parent)
{
@@ -86,6 +108,15 @@ QDirectionalLight::QDirectionalLight(QDirectionalLightPrivate &dd, QNode *parent
{
}
+/*!
+ \qmlproperty vector3d Qt3D.Render::DirectionalLight::worldDirection
+ Specifies the world direction of the directional light
+*/
+
+/*!
+ \property Qt3DRender::QDirectionalLight::worldDirection
+ Specifies the world direction of the directional light
+ */
void QDirectionalLight::setWorldDirection(const QVector3D &direction)
{
Q_D(QDirectionalLight);
diff --git a/src/render/lights/qpointlight.cpp b/src/render/lights/qpointlight.cpp
index c94078995..28dd265b8 100644
--- a/src/render/lights/qpointlight.cpp
+++ b/src/render/lights/qpointlight.cpp
@@ -73,6 +73,7 @@ QPointLightPrivate::QPointLightPrivate()
\class Qt3DRender::QPointLight
\inmodule Qt3DRender
\since 5.5
+ \brief Encapsulate a Point Light object in a Qt 3D scene.
*/
@@ -82,7 +83,7 @@ QPointLightPrivate::QPointLightPrivate()
\inherits AbstractLight
\inqmlmodule Qt3D.Render
\since 5.5
- \brief For OpenGL ...
+ \brief Encapsulate a Point Light object in a Qt 3D scene.
*/
/*!
@@ -105,6 +106,15 @@ QPointLight::QPointLight(QPointLightPrivate &dd, QNode *parent)
{
}
+/*!
+ \qmlproperty float Qt3D.Render::PointLight::constantAttenuation
+ Specifies the constant attenuation of the point light
+*/
+
+/*!
+ \property Qt3DRender::QPointLight::constantAttenuation
+ Specifies the constant attenuation of the point light
+ */
float QPointLight::constantAttenuation() const
{
Q_D(const QPointLight);
@@ -120,6 +130,15 @@ void QPointLight::setConstantAttenuation(float value)
}
}
+/*!
+ \qmlproperty float Qt3D.Render::PointLight::linearAttenuation
+ Specifies the linear attenuation of the point light
+*/
+
+/*!
+ \property Qt3DRender::QPointLight::linearAttenuation
+ Specifies the linear attenuation of the point light
+ */
float QPointLight::linearAttenuation() const
{
Q_D(const QPointLight);
@@ -135,6 +154,15 @@ void QPointLight::setLinearAttenuation(float value)
}
}
+/*!
+ \qmlproperty float Qt3D.Render::PointLight::quadraticAttenuation
+ Specifies the quadratic attenuation of the point light
+*/
+
+/*!
+ \property Qt3DRender::QPointLight::quadraticAttenuation
+ Specifies the quadratic attenuation of the point light
+ */
float QPointLight::quadraticAttenuation() const
{
Q_D(const QPointLight);
diff --git a/src/render/lights/qspotlight.cpp b/src/render/lights/qspotlight.cpp
index a3dd91a6f..79bb592b6 100644
--- a/src/render/lights/qspotlight.cpp
+++ b/src/render/lights/qspotlight.cpp
@@ -79,6 +79,7 @@ QSpotLightPrivate::QSpotLightPrivate()
\class Qt3DRender::QSpotLight
\inmodule Qt3DRender
\since 5.5
+ \brief Encapsulate a Spot Light object in a Qt 3D scene.
*/
@@ -88,7 +89,8 @@ QSpotLightPrivate::QSpotLightPrivate()
\inherits AbstractLight
\inqmlmodule Qt3D.Render
\since 5.5
- \brief For OpenGL ...
+ \brief Encapsulate a Spot Light object in a Qt 3D scene.
+
*/
/*!
@@ -112,15 +114,14 @@ QSpotLight::QSpotLight(QSpotLightPrivate &dd, QNode *parent)
}
/*!
- \qmlproperty vector3d Qt3D.Render::SpotLight::localDirection
-
+ \qmlproperty float Qt3D.Render::SpotLight::constantAttenuation
+ Specifies the constant attenuation of the spot light
*/
/*!
- \property Qt3DRender::QSpotLight::localDirection
-
+ \property Qt3DRender::QSpotLight::constantAttenuation
+ Specifies the constant attenuation of the spot light
*/
-
float QSpotLight::constantAttenuation() const
{
Q_D(const QSpotLight);
@@ -136,6 +137,15 @@ void QSpotLight::setConstantAttenuation(float value)
}
}
+/*!
+ \qmlproperty float Qt3D.Render::SpotLight::linearAttenuation
+ Specifies the linear attenuation of the spot light
+*/
+
+/*!
+ \property Qt3DRender::QSpotLight::linearAttenuation
+ Specifies the linear attenuation of the spot light
+ */
float QSpotLight::linearAttenuation() const
{
Q_D(const QSpotLight);
@@ -151,6 +161,15 @@ void QSpotLight::setLinearAttenuation(float value)
}
}
+/*!
+ \qmlproperty float Qt3D.Render::SpotLight::quadraticAttenuation
+ Specifies the quadratic attenuation of the spot light
+*/
+
+/*!
+ \property Qt3DRender::QSpotLight::quadraticAttenuation
+ Specifies the quadratic attenuation of the spot light
+ */
float QSpotLight::quadraticAttenuation() const
{
Q_D(const QSpotLight);
@@ -166,21 +185,29 @@ void QSpotLight::setQuadraticAttenuation(float value)
}
}
+/*!
+ \qmlproperty vector3d Qt3D.Render::SpotLight::localDirection
+ Specifies the local direction of the spot light
+*/
+
+/*!
+ \property Qt3DRender::QSpotLight::localDirection
+ Specifies the local direction of the spot light
+ */
QVector3D QSpotLight::localDirection() const
{
Q_D(const QSpotLight);
return d->m_shaderData->property("direction").value<QVector3D>();
}
-
/*!
\qmlproperty float Qt3D.Render::SpotLight::cutOffAngle
-
+ Specifies the cut off angle of the spot light
*/
/*!
\property Qt3DRender::QSpotLight::cutOffAngle
-
+ Specifies the cut off angle of the spot light
*/
float QSpotLight::cutOffAngle() const
{