summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2016-09-01 16:24:31 +0300
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2016-09-02 11:32:05 +0000
commit72f70ea3bdb2a0800412f35be90fa34b02adf243 (patch)
treec0a5523efd9b642bb90dbc88e215d6cf3a869178
parente2ec9ce9f9e91150cce067f5b3b0e04f9b4d12a8 (diff)
Qt3DExtra materials documentation fixes
Materials that were moved to Qt3DExtras were still part of Qt3DRender according to the documentation. Also added documentation for QML versions. Change-Id: Icd918599cf9a97a14e65f38a28309316a5f504dd Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r--src/doc/src/qmlextramaterials.qdoc568
-rw-r--r--src/extras/defaults/qdiffusemapmaterial.cpp37
-rw-r--r--src/extras/defaults/qdiffusespecularmapmaterial.cpp35
-rw-r--r--src/extras/defaults/qgoochmaterial.cpp21
-rw-r--r--src/extras/defaults/qnormaldiffusemapalphamaterial.cpp23
-rw-r--r--src/extras/defaults/qnormaldiffusemapmaterial.cpp40
-rw-r--r--src/extras/defaults/qnormaldiffusespecularmapmaterial.cpp42
-rw-r--r--src/extras/defaults/qpervertexcolormaterial.cpp19
-rw-r--r--src/extras/defaults/qphongalphamaterial.cpp65
-rw-r--r--src/extras/defaults/qphongmaterial.cpp28
10 files changed, 747 insertions, 131 deletions
diff --git a/src/doc/src/qmlextramaterials.qdoc b/src/doc/src/qmlextramaterials.qdoc
new file mode 100644
index 000000000..48f1a2326
--- /dev/null
+++ b/src/doc/src/qmlextramaterials.qdoc
@@ -0,0 +1,568 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \qmltype DiffuseMapMaterial
+ \inqmlmodule Qt3D.Extras
+ \brief The DiffuseMapMaterial provides a default implementation of the phong lighting effect
+ where the diffuse light component is read from a texture map.
+ \since 5.7
+ \inherits Qt3D.Render::Material
+
+ The specular lighting effect is based on the combination of 3 lighting components ambient,
+ diffuse and specular. The relative strengths of these components are controlled by means of
+ their reflectivity coefficients which are modelled as RGB triplets:
+
+ \list
+ \li Ambient is the color that is emitted by an object without any other light source.
+ \li Diffuse is the color that is emitted for rought surface reflections with the lights.
+ \li Specular is the color emitted for shiny surface reflections with the lights.
+ \li The shininess of a surface is controlled by a float property.
+ \endlist
+
+ This material uses an effect with a single render pass approach and performs per fragment
+ lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
+*/
+/*!
+ \qmlproperty color DiffuseMapMaterial::ambient
+
+ Holds the current ambient color.
+*/
+/*!
+ \qmlproperty color DiffuseMapMaterial::specular
+
+ Holds the current specular color.
+*/
+/*!
+ \qmlproperty real DiffuseMapMaterial::shininess
+
+ Holds the current shininess.
+*/
+/*!
+ \qmlproperty real DiffuseMapMaterial::textureScale
+
+ Holds the current texture scale. It is applied as a multiplier to texture
+ coordinates at render time. Defaults to 1.0.
+*/
+/*!
+ \qmlproperty TextureImage DiffuseMapMaterial::diffuse
+
+ Holds the current texture used as the diffuse map.
+
+ By default, the diffuse texture has the following properties:
+
+ \list
+ \li Linear minification and magnification filters
+ \li Linear mipmap with mipmapping enabled
+ \li Repeat wrap mode
+ \li Maximum anisotropy of 16.0
+ \endlist
+*/
+
+/*!
+ \qmltype DiffuseSpecularMapMaterial
+ \inqmlmodule Qt3D.Extras
+ \brief The DiffuseSpecularMapMaterial provides a default implementation of the phong lighting
+ effect where the diffuse and specular light components are read from texture maps.
+ \since 5.7
+ \inherits Qt3D.Render::Material
+
+ The specular lighting effect is based on the combination of 3 lighting components ambient,
+ diffuse and specular. The relative strengths of these components are controlled by means of
+ their reflectivity coefficients which are modelled as RGB triplets:
+
+ \list
+ \li Ambient is the color that is emitted by an object without any other light source.
+ \li Diffuse is the color that is emitted for rought surface reflections with the lights.
+ \li Specular is the color emitted for shiny surface reflections with the lights.
+ \li The shininess of a surface is controlled by a float property.
+ \endlist
+
+ This material uses an effect with a single render pass approach and performs per fragment
+ lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
+*/
+/*!
+ \qmlproperty color DiffuseSpecularMapMaterial::ambient
+
+ Holds the current ambient color.
+*/
+/*!
+ \qmlproperty TextureImage DiffuseSpecularMapMaterial::diffuse
+
+ Holds the current diffuse map texture.
+
+ By default, the diffuse texture has the following properties:
+
+ \list
+ \li Linear minification and magnification filters
+ \li Linear mipmap with mipmapping enabled
+ \li Repeat wrap mode
+ \li Maximum anisotropy of 16.0
+ \endlist
+*/
+/*!
+ \qmlproperty TextureImage DiffuseSpecularMapMaterial::specular
+
+ Holds the current specular map texture.
+
+ By default, the specular texture has the following properties:
+
+ \list
+ \li Linear minification and magnification filters
+ \li Linear mipmap with mipmapping enabled
+ \li Repeat wrap mode
+ \li Maximum anisotropy of 16.0
+ \endlist
+*/
+/*!
+ \qmlproperty real DiffuseSpecularMapMaterial::shininess
+
+ Holds the current shininess.
+*/
+/*!
+ \qmlproperty real DiffuseSpecularMapMaterial::textureScale
+
+ Holds the current texture scale. It is applied as a multiplier to texture
+ coordinates at render time. Defaults to 1.0.
+*/
+
+/*!
+ \qmltype GoochMaterial
+ \inqmlmodule Qt3D.Extras
+ \brief The GoochMaterial provides a material that implements the Gooch
+ shading model, popular in CAD and CAM applications.
+ \since 5.7
+ \inherits Qt3D.Render::Material
+
+ The Gooch lighting model uses both color and brightness to help show the
+ curvature of 3D surfaces. This is often better than models such as Phong
+ that rely purely upon changes in brightness. In situations such as in CAD
+ and CAM applications where photorealism is not a goal, the Gooch shading
+ model in conjunction with some kind of silhouette edge inking is a popular
+ solution.
+
+ The Gooch lighting model is explained fully in the \l{original Gooch
+ paper}. The Gooch model mixes a diffuse object color with a user-provided
+ cool color and warm color to produce the end points of a color ramp that is
+ used to shade the object based upon the cosine of the angle between the
+ vector from the fragment to the light source and the fragment's normal
+ vector. Optionally, a specular highlight can be added on top. The relative
+ contributions to the cool and warm colors by the diffuse color are
+ controlled by the alpha and beta properties respecitvely.
+
+ This material uses an effect with a single render pass approach and
+ performs per fragment lighting. Techniques are provided for OpenGL 2,
+ OpenGL 3 or above as well as OpenGL ES 2.
+*/
+/*!
+ \qmlproperty color GoochMaterial::diffuse
+
+ Holds the current diffuse color.
+*/
+/*!
+ \qmlproperty color GoochMaterial::specular
+
+ Holds the current specular color.
+*/
+/*!
+ \qmlproperty color GoochMaterial::coolColor
+
+ Holds the current coolColor color.
+*/
+/*!
+ \qmlproperty color GoochMaterial::warmColor
+
+ Holds the current warmColor color.
+*/
+/*!
+ \qmlproperty real GoochMaterial::alpha
+
+ Holds the current alpha value. The start point of the color ramp
+ used by the Gooch shader is calculated as {c = cool + alpha * diffuse}.
+*/
+/*!
+ \qmlproperty real GoochMaterial::beta
+
+ Holds the current beta value. The start point of the color ramp
+ used by the Gooch shader is calculated as {c = warm + beta * diffuse}.
+*/
+/*!
+ \qmlproperty real GoochMaterial::shininess
+
+ Holds the current shininess value. Higher values of shininess result in
+ a smaller and brighter highlight.
+*/
+
+/*!
+ \qmltype NormalDiffuseMapAlphaMaterial
+ \inqmlmodule Qt3D.Extras
+ \brief The NormalDiffuseMapAlphaMaterial provides a specialization of NormalDiffuseMapMaterial
+ with alpha coverage and a depth test performed in the rendering pass.
+ \since 5.7
+ \inherits Qt3D.Render::Material
+
+ The specular lighting effect is based on the combination of 3 lighting components ambient,
+ diffuse and specular. The relative strengths of these components are controlled by means of
+ their reflectivity coefficients which are modelled as RGB triplets:
+
+ \list
+ \li Ambient is the color that is emitted by an object without any other light source.
+ \li Diffuse is the color that is emitted for rought surface reflections with the lights.
+ \li Specular is the color emitted for shiny surface reflections with the lights.
+ \li The shininess of a surface is controlled by a float property.
+ \endlist
+
+ This material uses an effect with a single render pass approach and performs per fragment
+ lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
+*/
+/*!
+ \qmlproperty color NormalDiffuseMapAlphaMaterial::ambient
+
+ Holds the current ambient color.
+*/
+/*!
+ \qmlproperty TextureImage NormalDiffuseMapAlphaMaterial::diffuse
+
+ Holds the current diffuse map texture.
+
+ By default, the diffuse texture has the following properties:
+
+ \list
+ \li Linear minification and magnification filters
+ \li Linear mipmap with mipmapping enabled
+ \li Repeat wrap mode
+ \li Maximum anisotropy of 16.0
+ \endlist
+*/
+/*!
+ \qmlproperty color NormalDiffuseMapAlphaMaterial::specular
+
+ Holds the current specular color.
+*/
+/*!
+ \qmlproperty TextureImage NormalDiffuseMapAlphaMaterial::normal
+
+ Holds the current normal map texture.
+
+ By default, the normal texture has the following properties:
+
+ \list
+ \li Linear minification and magnification filters
+ \li Repeat wrap mode
+ \li Maximum anisotropy of 16.0
+ \endlist
+*/
+/*!
+ \qmlproperty real NormalDiffuseMapAlphaMaterial::shininess
+
+ Holds the current shininess.
+*/
+/*!
+ \qmlproperty real NormalDiffuseMapAlphaMaterial::textureScale
+
+ Holds the current texture scale. It is applied as a multiplier to texture
+ coordinates at render time. Defaults to 1.0.
+*/
+
+/*!
+ \qmltype NormalDiffuseMapMaterial
+ \inqmlmodule Qt3D.Extras
+ \brief The NormalDiffuseMapMaterial provides a default implementation of the phong lighting
+ and bump effect where the diffuse light component is read from a texture map and the normals of
+ the mesh being rendered from a normal texture map.
+ \since 5.7
+ \inherits Qt3D.Render::Material
+
+ The specular lighting effect is based on the combination of 3 lighting components ambient,
+ diffuse and specular. The relative strengths of these components are controlled by means of
+ their reflectivity coefficients which are modelled as RGB triplets:
+
+ \list
+ \li Ambient is the color that is emitted by an object without any other light source.
+ \li Diffuse is the color that is emitted for rought surface reflections with the lights.
+ \li Specular is the color emitted for shiny surface reflections with the lights.
+ \li The shininess of a surface is controlled by a float property.
+ \endlist
+
+ This material uses an effect with a single render pass approach and performs per fragment
+ lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
+*/
+/*!
+ \qmlproperty color NormalDiffuseMapMaterial::ambient
+
+ Holds the current ambient color.
+*/
+/*!
+ \qmlproperty TextureImage NormalDiffuseMapMaterial::diffuse
+
+ Holds the current diffuse map texture.
+
+ By default, the diffuse texture has the following properties:
+
+ \list
+ \li Linear minification and magnification filters
+ \li Linear mipmap with mipmapping enabled
+ \li Repeat wrap mode
+ \li Maximum anisotropy of 16.0
+ \endlist
+*/
+/*!
+ \qmlproperty color NormalDiffuseMapMaterial::specular
+
+ Holds the current specular color.
+*/
+/*!
+ \qmlproperty TextureImage NormalDiffuseMapMaterial::normal
+
+ Holds the current normal map texture.
+
+ By default, the normal texture has the following properties:
+
+ \list
+ \li Linear minification and magnification filters
+ \li Repeat wrap mode
+ \li Maximum anisotropy of 16.0
+ \endlist
+*/
+/*!
+ \qmlproperty real NormalDiffuseMapMaterial::shininess
+
+ Holds the current shininess.
+*/
+/*!
+ \qmlproperty real NormalDiffuseMapMaterial::textureScale
+
+ Holds the current texture scale. It is applied as a multiplier to texture
+ coordinates at render time. Defaults to 1.0.
+*/
+
+/*!
+ \qmltype NormalDiffuseSpecularMapMaterial
+ \inqmlmodule Qt3D.Extras
+ \brief The NormalDiffuseSpecularMapMaterial provides a default implementation of the phong
+ lighting and bump effect where the diffuse and specular light components are read from texture
+ maps and the normals of the mesh being rendered from a normal texture map.
+ \since 5.7
+ \inherits Qt3D.Render::Material
+
+ The specular lighting effect is based on the combination of 3 lighting components ambient,
+ diffuse and specular. The relative strengths of these components are controlled by means of
+ their reflectivity coefficients which are modelled as RGB triplets:
+
+ \list
+ \li Ambient is the color that is emitted by an object without any other light source.
+ \li Diffuse is the color that is emitted for rought surface reflections with the lights.
+ \li Specular is the color emitted for shiny surface reflections with the lights.
+ \li The shininess of a surface is controlled by a float property.
+ \endlist
+
+ This material uses an effect with a single render pass approach and performs per fragment
+ lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
+*/
+/*!
+ \qmlproperty color NormalDiffuseSpecularMapMaterial::ambient
+
+ Holds the current ambient color.
+*/
+/*!
+ \qmlproperty TextureImage NormalDiffuseSpecularMapMaterial::diffuse
+
+ Holds the current diffuse map texture.
+
+ By default, the diffuse texture has the following properties:
+
+ \list
+ \li Linear minification and magnification filters
+ \li Linear mipmap with mipmapping enabled
+ \li Repeat wrap mode
+ \li Maximum anisotropy of 16.0
+ \endlist
+*/
+/*!
+ \qmlproperty TextureImage NormalDiffuseSpecularMapMaterial::specular
+
+ Holds the current specular map texture.
+
+ By default, the specular texture has the following properties:
+
+ \list
+ \li Linear minification and magnification filters
+ \li Linear mipmap with mipmapping enabled
+ \li Repeat wrap mode
+ \li Maximum anisotropy of 16.0
+ \endlist
+*/
+/*!
+ \qmlproperty TextureImage NormalDiffuseSpecularMapMaterial::normal
+
+ Holds the current normal map texture.
+
+ By default, the normal texture has the following properties:
+
+ \list
+ \li Linear minification and magnification filters
+ \li Repeat wrap mode
+ \li Maximum anisotropy of 16.0
+ \endlist
+*/
+/*!
+ \qmlproperty real NormalDiffuseSpecularMapMaterial::shininess
+
+ Holds the current shininess.
+*/
+/*!
+ \qmlproperty real NormalDiffuseSpecularMapMaterial::textureScale
+
+ Holds the current texture scale. It is applied as a multiplier to texture
+ coordinates at render time. Defaults to 1.0.
+*/
+
+/*!
+ \qmltype PerVertexColorMaterial
+ \inqmlmodule Qt3D.Extras
+ \brief The PerVertexColorMaterial class provides a default implementation for rendering the
+ color properties set for each vertex.
+ \since 5.7
+ \inherits Qt3D.Render::Material
+
+ This lighting effect is based on the combination of 2 lighting components ambient and diffuse.
+ Ambient is set by the vertex color.
+ Diffuse takes in account the normal distribution of each vertex.
+
+ \list
+ \li Ambient is the color that is emitted by an object without any other light source.
+ \li Diffuse is the color that is emitted for rough surface reflections with the lights
+ \endlist
+
+ This material uses an effect with a single render pass approach and forms fragment lighting.
+ Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
+*/
+
+/*!
+ \qmltype PhongAlphaMaterial
+ \inqmlmodule Qt3D.Extras
+ \brief The PhongAlphaMaterial class provides a default implementation of
+ the phong lighting effect with alpha.
+ \since 5.7
+ \inherits Qt3D.Render::Material
+
+ The phong lighting effect is based on the combination of 3 lighting components ambient, diffuse
+ and specular. The relative strengths of these components are controlled by means of their
+ reflectivity coefficients which are modelled as RGB triplets:
+
+ \list
+ \li Ambient is the color that is emitted by an object without any other light source.
+ \li Diffuse is the color that is emitted for rought surface reflections with the lights.
+ \li Specular is the color emitted for shiny surface reflections with the lights.
+ \li The shininess of a surface is controlled by a float property.
+ \li Alpha is the transparency of the surface between 0 (fully transparent) and 1 (opaque).
+ \endlist
+
+ This material uses an effect with a single render pass approach and performs per fragment
+ lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
+*/
+/*!
+ \qmlproperty color PhongAlphaMaterial::ambient
+
+ Holds the current ambient color.
+*/
+/*!
+ \qmlproperty color PhongAlphaMaterial::diffuse
+
+ Holds the current diffuse color.
+*/
+/*!
+ \qmlproperty color PhongAlphaMaterial::specular
+
+ Holds the current specular color.
+*/
+/*!
+ \qmlproperty real PhongAlphaMaterial::shininess
+
+ Holds the current shininess.
+*/
+/*!
+ \qmlproperty real PhongAlphaMaterial::alpha
+
+ Holds the alpha component of the object which varies between 0 and 1.
+
+ The default value is 0.5.
+*/
+
+/*!
+ \qmltype PhongMaterial
+ \inqmlmodule Qt3D.Extras
+ \brief The PhongMaterial class provides a default implementation of the phong lighting effect.
+ \since 5.7
+ \inherits Qt3D.Render::Material
+
+ The phong lighting effect is based on the combination of 3 lighting components ambient, diffuse
+ and specular. The relative strengths of these components are controlled by means of their
+ reflectivity coefficients which are modelled as RGB triplets:
+
+ \list
+ \li Ambient is the color that is emitted by an object without any other light source.
+ \li Diffuse is the color that is emitted for rought surface reflections with the lights.
+ \li Specular is the color emitted for shiny surface reflections with the lights.
+ \li The shininess of a surface is controlled by a float property.
+ \endlist
+
+ This material uses an effect with a single render pass approach and performs per fragment
+ lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
+*/
+/*!
+ \qmlproperty color PhongMaterial::ambient
+
+ Holds the current ambient color.
+*/
+/*!
+ \qmlproperty color PhongMaterial::diffuse
+
+ Holds the current diffuse color.
+*/
+/*!
+ \qmlproperty color PhongMaterial::specular
+
+ Holds the current specular color.
+*/
+/*!
+ \qmlproperty real PhongMaterial::shininess
+
+ Holds the current shininess.
+*/
diff --git a/src/extras/defaults/qdiffusemapmaterial.cpp b/src/extras/defaults/qdiffusemapmaterial.cpp
index 854d0a809..b3aa3bf00 100644
--- a/src/extras/defaults/qdiffusemapmaterial.cpp
+++ b/src/extras/defaults/qdiffusemapmaterial.cpp
@@ -178,14 +178,16 @@ void QDiffuseMapMaterialPrivate::handleTextureScaleChanged(const QVariant &var)
}
/*!
- \class Qt3DRender::QDiffuseMapMaterial
- \brief The QDiffuseMapMaterial provides a default implementation of the phong lighting effect where the diffuse light component
- is read from a texture map.
- \inmodule Qt3DRender
- \since 5.5
+ \class Qt3DExtras::QDiffuseMapMaterial
+ \brief The QDiffuseMapMaterial provides a default implementation of the phong lighting effect
+ where the diffuse light component is read from a texture map.
+ \inmodule Qt3DExtras
+ \since 5.7
+ \inherits Qt3DRender::QMaterial
- The specular lighting effect is based on the combination of 3 lighting components ambient, diffuse and specular.
- The relative strengths of these components is controlled by means of their reflectivity coefficients which are modelled as RGB triplets:
+ The specular lighting effect is based on the combination of 3 lighting components ambient,
+ diffuse and specular. The relative strengths of these components are controlled by means of
+ their reflectivity coefficients which are modelled as RGB triplets:
\list
\li Ambient is the color that is emitted by an object without any other light source.
@@ -194,12 +196,12 @@ void QDiffuseMapMaterialPrivate::handleTextureScaleChanged(const QVariant &var)
\li The shininess of a surface is controlled by a float property.
\endlist
- This material uses an effect with a single render pass approach and performs per fragment lighting.
- Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
+ This material uses an effect with a single render pass approach and performs per fragment
+ lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
*/
/*!
- Constructs a new Qt3DRender::QDiffuseMapMaterial instance with parent object \a parent.
+ Constructs a new QDiffuseMapMaterial instance with parent object \a parent.
*/
QDiffuseMapMaterial::QDiffuseMapMaterial(QNode *parent)
: QMaterial(*new QDiffuseMapMaterialPrivate, parent)
@@ -216,7 +218,7 @@ QDiffuseMapMaterial::~QDiffuseMapMaterial()
}
/*!
- \property Qt3DRender::QDiffuseMapMaterial::ambient
+ \property QDiffuseMapMaterial::ambient
Holds the current ambient color.
*/
@@ -228,7 +230,7 @@ QColor QDiffuseMapMaterial::ambient() const
}
/*!
- \property Qt3DRender::QDiffuseMapMaterial::specular
+ \property QDiffuseMapMaterial::specular
Holds the current specular color.
*/
@@ -239,7 +241,7 @@ QColor QDiffuseMapMaterial::specular() const
}
/*!
- \property Qt3DRender::QDiffuseMapMaterial::shininess
+ \property QDiffuseMapMaterial::shininess
Holds the current shininess as a float value.
*/
@@ -250,9 +252,9 @@ float QDiffuseMapMaterial::shininess() const
}
/*!
- \property Qt3DRender::QDiffuseMapMaterial::diffuse
+ \property QDiffuseMapMaterial::diffuse
- Holds the current QTexture used as the diffuse map.
+ Holds the current texture used as the diffuse map.
By default, the diffuse texture has the following properties:
@@ -270,9 +272,10 @@ QAbstractTexture *QDiffuseMapMaterial::diffuse() const
}
/*!
- \property Qt3DRender::QDiffuseMapMaterial::textureScale
+ \property QDiffuseMapMaterial::textureScale
- Holds the current texture scale as a float value.
+ Holds the current texture scale. It is applied as a multiplier to texture
+ coordinates at render time. Defaults to 1.0.
*/
float QDiffuseMapMaterial::textureScale() const
diff --git a/src/extras/defaults/qdiffusespecularmapmaterial.cpp b/src/extras/defaults/qdiffusespecularmapmaterial.cpp
index a4ccb6121..4b79eea2b 100644
--- a/src/extras/defaults/qdiffusespecularmapmaterial.cpp
+++ b/src/extras/defaults/qdiffusespecularmapmaterial.cpp
@@ -185,14 +185,16 @@ void QDiffuseSpecularMapMaterialPrivate::handleTextureScaleChanged(const QVarian
}
/*!
- \class Qt3DRender::QDiffuseSpecularMapMaterial
- \brief The QDiffuseSpecularMapMaterial provides a default implementation of the phong lighting and bump effect where the diffuse and specular light components
- are read from texture maps.
- \inmodule Qt3DRender
- \since 5.5
+ \class Qt3DExtras::QDiffuseSpecularMapMaterial
+ \brief The QDiffuseSpecularMapMaterial provides a default implementation of the phong lighting
+ effect where the diffuse and specular light components are read from texture maps.
+ \inmodule Qt3DExtras
+ \since 5.7
+ \inherits Qt3DRender::QMaterial
- The specular lighting effect is based on the combination of 3 lighting components ambient, diffuse and specular.
- The relative strengths of these components is controlled by means of their reflectivity coefficients which are modelled as RGB triplets:
+ The specular lighting effect is based on the combination of 3 lighting components ambient,
+ diffuse and specular. The relative strengths of these components are controlled by means of
+ their reflectivity coefficients which are modelled as RGB triplets:
\list
\li Ambient is the color that is emitted by an object without any other light source.
@@ -201,12 +203,12 @@ void QDiffuseSpecularMapMaterialPrivate::handleTextureScaleChanged(const QVarian
\li The shininess of a surface is controlled by a float property.
\endlist
- This material uses an effect with a single render pass approach and performs per fragment lighting.
- Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
+ This material uses an effect with a single render pass approach and performs per fragment
+ lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
*/
/*!
- Constructs a new Qt3DRender::QDiffuseSpecularMapMaterial instance with parent object \a parent.
+ Constructs a new QDiffuseSpecularMapMaterial instance with parent object \a parent.
*/
QDiffuseSpecularMapMaterial::QDiffuseSpecularMapMaterial(QNode *parent)
: QMaterial(*new QDiffuseSpecularMapMaterialPrivate, parent)
@@ -223,7 +225,7 @@ QDiffuseSpecularMapMaterial::~QDiffuseSpecularMapMaterial()
}
/*!
- \property Qt3DRender::QDiffuseSpecularMapMaterial::ambient
+ \property QDiffuseSpecularMapMaterial::ambient
Holds the current ambient color.
*/
@@ -234,7 +236,7 @@ QColor QDiffuseSpecularMapMaterial::ambient() const
}
/*!
- \property Qt3DRender::QDiffuseSpecularMapMaterial::diffuse
+ \property QDiffuseSpecularMapMaterial::diffuse
Holds the current diffuse map texture.
@@ -254,7 +256,7 @@ QAbstractTexture *QDiffuseSpecularMapMaterial::diffuse() const
}
/*!
- \property Qt3DRender::QDiffuseSpecularMapMaterial::specular
+ \property QDiffuseSpecularMapMaterial::specular
Holds the current specular map texture.
@@ -274,7 +276,7 @@ QAbstractTexture *QDiffuseSpecularMapMaterial::specular() const
}
/*!
- \property Qt3DRender::QDiffuseSpecularMapMaterial::shininess
+ \property QDiffuseSpecularMapMaterial::shininess
Holds the current shininess as a float value.
*/
@@ -285,9 +287,10 @@ float QDiffuseSpecularMapMaterial::shininess() const
}
/*!
- \property Qt3DRender::QDiffuseSpecularMapMaterial::textureScale
+ \property QDiffuseSpecularMapMaterial::textureScale
- Holds the current texture scale as a float value.
+ Holds the current texture scale. It is applied as a multiplier to texture
+ coordinates at render time. Defaults to 1.0.
*/
float QDiffuseSpecularMapMaterial::textureScale() const
{
diff --git a/src/extras/defaults/qgoochmaterial.cpp b/src/extras/defaults/qgoochmaterial.cpp
index 6b6ea131a..f2f34fc84 100644
--- a/src/extras/defaults/qgoochmaterial.cpp
+++ b/src/extras/defaults/qgoochmaterial.cpp
@@ -191,7 +191,8 @@ void QGoochMaterialPrivate::handleShininessChanged(const QVariant &var)
\brief The QGoochMaterial provides a material that implements the Gooch
shading model, popular in CAD and CAM applications.
\inmodule Qt3DExtras
- \since 5.5
+ \since 5.7
+ \inherits Qt3DRender::QMaterial
The Gooch lighting model uses both color and brightness to help show the
curvature of 3D surfaces. This is often better than models such as Phong
@@ -201,7 +202,7 @@ void QGoochMaterialPrivate::handleShininessChanged(const QVariant &var)
solution.
The Gooch lighting model is explained fully in the \l{original Gooch
- paper}. The Gooch model mixes a diffuse objetc color with a user-provided
+ paper}. The Gooch model mixes a diffuse object color with a user-provided
cool color and warm color to produce the end points of a color ramp that is
used to shade the object based upon the cosine of the angle between the
vector from the fragment to the light source and the fragment's normal
@@ -215,7 +216,7 @@ void QGoochMaterialPrivate::handleShininessChanged(const QVariant &var)
*/
/*!
- Constructs a new Qt3DExtras::QGoochMaterial instance with parent object \a parent.
+ Constructs a new QGoochMaterial instance with parent object \a parent.
*/
QGoochMaterial::QGoochMaterial(QNode *parent)
: QMaterial(*new QGoochMaterialPrivate, parent)
@@ -237,7 +238,7 @@ QGoochMaterial::QGoochMaterial(QGoochMaterialPrivate &dd, QNode *parent)
}
/*!
- \property Qt3DExtras::QGoochMaterial::diffuse
+ \property QGoochMaterial::diffuse
Holds the current diffuse color.
*/
@@ -248,7 +249,7 @@ QColor QGoochMaterial::diffuse() const
}
/*!
- \property Qt3DExtras::QGoochMaterial::specular
+ \property QGoochMaterial::specular
Holds the current specular color.
*/
@@ -259,7 +260,7 @@ QColor QGoochMaterial::specular() const
}
/*!
- \property Qt3DExtras::QGoochMaterial::cool
+ \property QGoochMaterial::cool
Holds the current cool color.
*/
@@ -270,7 +271,7 @@ QColor QGoochMaterial::cool() const
}
/*!
- \property Qt3DExtras::QGoochMaterial::warm
+ \property QGoochMaterial::warm
Holds the current warm color.
*/
@@ -281,7 +282,7 @@ QColor QGoochMaterial::warm() const
}
/*!
- \property Qt3DExtras::QGoochMaterial::alpha
+ \property QGoochMaterial::alpha
Holds the current alpha value. The start point of the color ramp
used by the Gooch shader is calculated as {c = cool + alpha * diffuse}.
@@ -293,7 +294,7 @@ float QGoochMaterial::alpha() const
}
/*!
- \property Qt3DExtras::QGoochMaterial::beta
+ \property QGoochMaterial::beta
Holds the current beta value. The start point of the color ramp
used by the Gooch shader is calculated as {c = warm + beta * diffuse}.
@@ -305,7 +306,7 @@ float QGoochMaterial::beta() const
}
/*!
- \property Qt3DExtras::QGoochMaterial::shininess
+ \property QGoochMaterial::shininess
Holds the current shininess value. Higher values of shininess result in
a smaller and brighter highlight.
diff --git a/src/extras/defaults/qnormaldiffusemapalphamaterial.cpp b/src/extras/defaults/qnormaldiffusemapalphamaterial.cpp
index 61b8def84..92564ee3f 100644
--- a/src/extras/defaults/qnormaldiffusemapalphamaterial.cpp
+++ b/src/extras/defaults/qnormaldiffusemapalphamaterial.cpp
@@ -146,15 +146,16 @@ void QNormalDiffuseMapAlphaMaterialPrivate::init()
/*!
- \class Qt3DRender::QNormalDiffuseMapAlphaMaterial
- \brief The QNormalDiffuseMapAlphaMaterial provides a default implementation of the phong lighting and bump effect where the diffuse light component
- is read from a texture map and the normals of the mesh being rendered from a normal texture map. In addition, it defines an alpha to coverage and
- a depth test to be performed in the rendering pass.
- \inmodule Qt3DRender
- \since 5.5
+ \class Qt3DExtras::QNormalDiffuseMapAlphaMaterial
+ \brief The QNormalDiffuseMapAlphaMaterial provides a specialization of QNormalDiffuseMapMaterial
+ with alpha coverage and a depth test performed in the rendering pass.
+ \inmodule Qt3DExtras
+ \since 5.7
+ \inherits Qt3DExtras::QNormalDiffuseMapMaterial
- The specular lighting effect is based on the combination of 3 lighting components ambient, diffuse and specular.
- The relative strengths of these components is controlled by means of their reflectivity coefficients which are modelled as RGB triplets:
+ The specular lighting effect is based on the combination of 3 lighting components ambient,
+ diffuse and specular. The relative strengths of these components are controlled by means of
+ their reflectivity coefficients which are modelled as RGB triplets:
\list
\li Ambient is the color that is emitted by an object without any other light source.
@@ -163,11 +164,11 @@ void QNormalDiffuseMapAlphaMaterialPrivate::init()
\li The shininess of a surface is controlled by a float property.
\endlist
- This material uses an effect with a single render pass approach and performs per fragment lighting.
- Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
+ This material uses an effect with a single render pass approach and performs per fragment
+ lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
*/
/*!
- Constructs a new Qt3DRender::QNormalDiffuseMapAlphaMaterial instance with parent object \a parent.
+ Constructs a new QNormalDiffuseMapAlphaMaterial instance with parent object \a parent.
*/
QNormalDiffuseMapAlphaMaterial::QNormalDiffuseMapAlphaMaterial(QNode *parent)
: QNormalDiffuseMapMaterial(*new QNormalDiffuseMapAlphaMaterialPrivate, parent)
diff --git a/src/extras/defaults/qnormaldiffusemapmaterial.cpp b/src/extras/defaults/qnormaldiffusemapmaterial.cpp
index c38756c98..8373c4d5d 100644
--- a/src/extras/defaults/qnormaldiffusemapmaterial.cpp
+++ b/src/extras/defaults/qnormaldiffusemapmaterial.cpp
@@ -195,14 +195,17 @@ void QNormalDiffuseMapMaterialPrivate::handleTextureScaleChanged(const QVariant
}
/*!
- \class Qt3DRender::QNormalDiffuseMapMaterial
- \brief The QNormalDiffuseMapMaterial provides a default implementation of the phong lighting and bump effect where the diffuse light component
- is read from a texture map and the normals of the mesh being rendered from a normal texture map.
- \inmodule Qt3DRender
- \since 5.5
-
- The specular lighting effect is based on the combination of 3 lighting components ambient, diffuse and specular.
- The relative strengths of these components is controlled by means of their reflectivity coefficients which are modelled as RGB triplets:
+ \class Qt3DExtras::QNormalDiffuseMapMaterial
+ \brief The QNormalDiffuseMapMaterial provides a default implementation of the phong lighting
+ and bump effect where the diffuse light component is read from a texture map and the normals of
+ the mesh being rendered from a normal texture map.
+ \inmodule Qt3DExtras
+ \since 5.7
+ \inherits Qt3DRender::QMaterial
+
+ The specular lighting effect is based on the combination of 3 lighting components ambient,
+ diffuse and specular. The relative strengths of these components are controlled by means of
+ their reflectivity coefficients which are modelled as RGB triplets:
\list
\li Ambient is the color that is emitted by an object without any other light source.
@@ -211,12 +214,12 @@ void QNormalDiffuseMapMaterialPrivate::handleTextureScaleChanged(const QVariant
\li The shininess of a surface is controlled by a float property.
\endlist
- This material uses an effect with a single render pass approach and performs per fragment lighting.
- Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
+ This material uses an effect with a single render pass approach and performs per fragment
+ lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
*/
/*!
- Constructs a new Qt3DRender::QNormalDiffuseMapMaterial instance with parent object \a parent.
+ Constructs a new QNormalDiffuseMapMaterial instance with parent object \a parent.
*/
QNormalDiffuseMapMaterial::QNormalDiffuseMapMaterial(QNode *parent)
: QMaterial(*new QNormalDiffuseMapMaterialPrivate, parent)
@@ -241,7 +244,7 @@ QNormalDiffuseMapMaterial::~QNormalDiffuseMapMaterial()
}
/*!
- \property Qt3DRender::QNormalDiffuseMapMaterial::ambient
+ \property QNormalDiffuseMapMaterial::ambient
Holds the current ambient color.
*/
@@ -252,7 +255,7 @@ QColor QNormalDiffuseMapMaterial::ambient() const
}
/*!
- \property Qt3DRender::QNormalDiffuseMapMaterial::specular
+ \property QNormalDiffuseMapMaterial::specular
Holds the current specular color.
*/
@@ -263,7 +266,7 @@ QColor QNormalDiffuseMapMaterial::specular() const
}
/*!
- \property Qt3DRender::QNormalDiffuseMapMaterial::diffuse
+ \property QNormalDiffuseMapMaterial::diffuse
Holds the current diffuse map texture.
@@ -283,7 +286,7 @@ QAbstractTexture *QNormalDiffuseMapMaterial::diffuse() const
}
/*!
- \property Qt3DRender::QNormalDiffuseMapMaterial::normal
+ \property QNormalDiffuseMapMaterial::normal
Holds the current normal map texture.
@@ -302,7 +305,7 @@ QAbstractTexture *QNormalDiffuseMapMaterial::normal() const
}
/*!
- \property Qt3DRender::QNormalDiffuseMapMaterial::shininess
+ \property QNormalDiffuseMapMaterial::shininess
Holds the current shininess as a float value.
*/
@@ -313,9 +316,10 @@ float QNormalDiffuseMapMaterial::shininess() const
}
/*!
- \property Qt3DRender::QNormalDiffuseMapMaterial::textureScale
+ \property QNormalDiffuseMapMaterial::textureScale
- Holds the current texture scale as a float value.
+ Holds the current texture scale. It is applied as a multiplier to texture
+ coordinates at render time. Defaults to 1.0.
*/
float QNormalDiffuseMapMaterial::textureScale() const
{
diff --git a/src/extras/defaults/qnormaldiffusespecularmapmaterial.cpp b/src/extras/defaults/qnormaldiffusespecularmapmaterial.cpp
index 3c26fde5a..e4a83c50c 100644
--- a/src/extras/defaults/qnormaldiffusespecularmapmaterial.cpp
+++ b/src/extras/defaults/qnormaldiffusespecularmapmaterial.cpp
@@ -202,14 +202,17 @@ void QNormalDiffuseSpecularMapMaterialPrivate::handleTextureScaleChanged(const Q
}
/*!
- \class Qt3DRender::QNormalDiffuseSpecularMapMaterial
- \brief The QNormalDiffuseSpecularMapMaterial provides a default implementation of the phong lighting and bump effect where the diffuse and specular light components
- are read from texture maps and the normals of the mesh being rendered from a normal texture map.
- \inmodule Qt3DRender
- \since 5.5
-
- The specular lighting effect is based on the combination of 3 lighting components ambient, diffuse and specular.
- The relative strengths of these components is controlled by means of their reflectivity coefficients which are modelled as RGB triplets:
+ \class Qt3DExtras::QNormalDiffuseSpecularMapMaterial
+ \brief The QNormalDiffuseSpecularMapMaterial provides a default implementation of the phong
+ lighting and bump effect where the diffuse and specular light components are read from texture
+ maps and the normals of the mesh being rendered from a normal texture map.
+ \inmodule Qt3DExtras
+ \since 5.7
+ \inherits Qt3DRender::QMaterial
+
+ The specular lighting effect is based on the combination of 3 lighting components ambient,
+ diffuse and specular. The relative strengths of these components are controlled by means of
+ their reflectivity coefficients which are modelled as RGB triplets:
\list
\li Ambient is the color that is emitted by an object without any other light source.
@@ -218,12 +221,12 @@ void QNormalDiffuseSpecularMapMaterialPrivate::handleTextureScaleChanged(const Q
\li The shininess of a surface is controlled by a float property.
\endlist
- This material uses an effect with a single render pass approach and performs per fragment lighting.
- Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
+ This material uses an effect with a single render pass approach and performs per fragment
+ lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
*/
/*!
- Constructs a new Qt3DRender::QNormalDiffuseSpecularMapMaterial instance with parent object \a parent.
+ Constructs a new QNormalDiffuseSpecularMapMaterial instance with parent object \a parent.
*/
QNormalDiffuseSpecularMapMaterial::QNormalDiffuseSpecularMapMaterial(QNode *parent)
: QMaterial(*new QNormalDiffuseSpecularMapMaterialPrivate, parent)
@@ -241,14 +244,14 @@ QNormalDiffuseSpecularMapMaterial::QNormalDiffuseSpecularMapMaterial(QNormalDiff
}
/*!
- Destroys the Qt3DRender::QNormalDiffuseSpecularMapMaterial instance.
+ Destroys the QNormalDiffuseSpecularMapMaterial instance.
*/
QNormalDiffuseSpecularMapMaterial::~QNormalDiffuseSpecularMapMaterial()
{
}
/*!
- \property Qt3DRender::QNormalDiffuseSpecularMapMaterial::ambient
+ \property QNormalDiffuseSpecularMapMaterial::ambient
Holds the current ambient color.
*/
@@ -259,7 +262,7 @@ QColor QNormalDiffuseSpecularMapMaterial::ambient() const
}
/*!
- \property Qt3DRender::QNormalDiffuseSpecularMapMaterial::diffuse
+ \property QNormalDiffuseSpecularMapMaterial::diffuse
Holds the current diffuse map texture.
@@ -279,7 +282,7 @@ QAbstractTexture *QNormalDiffuseSpecularMapMaterial::diffuse() const
}
/*!
- \property Qt3DRender::QNormalDiffuseSpecularMapMaterial::normal
+ \property QNormalDiffuseSpecularMapMaterial::normal
Holds the current normal map texture.
@@ -298,7 +301,7 @@ QAbstractTexture *QNormalDiffuseSpecularMapMaterial::normal() const
}
/*!
- \property Qt3DRender::QNormalDiffuseSpecularMapMaterial::specular
+ \property QNormalDiffuseSpecularMapMaterial::specular
Holds the current specular map texture.
@@ -318,7 +321,7 @@ QAbstractTexture *QNormalDiffuseSpecularMapMaterial::specular() const
}
/*!
- \property Qt3DRender::QNormalDiffuseSpecularMapMaterial::shininess
+ \property QNormalDiffuseSpecularMapMaterial::shininess
Holds the current shininess as a float value.
*/
@@ -329,9 +332,10 @@ float QNormalDiffuseSpecularMapMaterial::shininess() const
}
/*!
- \property Qt3DRender::QNormalDiffuseSpecularMapMaterial::textureScale
+ \property QNormalDiffuseSpecularMapMaterial::textureScale
- Holds the current texture scale as a float value.
+ Holds the current texture scale. It is applied as a multiplier to texture
+ coordinates at render time. Defaults to 1.0.
*/
float QNormalDiffuseSpecularMapMaterial::textureScale() const
{
diff --git a/src/extras/defaults/qpervertexcolormaterial.cpp b/src/extras/defaults/qpervertexcolormaterial.cpp
index 2a301cd3f..514f994c1 100644
--- a/src/extras/defaults/qpervertexcolormaterial.cpp
+++ b/src/extras/defaults/qpervertexcolormaterial.cpp
@@ -73,12 +73,15 @@ QPerVertexColorMaterialPrivate::QPerVertexColorMaterialPrivate()
}
/*!
- \class Qt3DRender::QPerVertexColorMaterial
- \brief The QPerVertexColorMaterial class provides a default implementation for rendering the color properties set for each vertex.
- \inmodule Qt3DRender
- \since 5.5
-
- This lighting effect is based on the combination of 2 lighting components ambient and diffuse. Ambient is set by the vertex color.
+ \class Qt3DExtras::QPerVertexColorMaterial
+ \brief The QPerVertexColorMaterial class provides a default implementation for rendering the
+ color properties set for each vertex.
+ \inmodule Qt3DExtras
+ \since 5.7
+ \inherits Qt3DRender::QMaterial
+
+ This lighting effect is based on the combination of 2 lighting components ambient and diffuse.
+ Ambient is set by the vertex color.
Diffuse takes in account the normal distribution of each vertex.
\list
@@ -91,8 +94,6 @@ QPerVertexColorMaterialPrivate::QPerVertexColorMaterialPrivate()
*/
/*!
- \fn Qt3DRender::QPerVertexColorMaterial::QPerVertexColorMaterial(Qt3DCore::QNode *parent)
-
Constructs a new QPerVertexColorMaterial instance with parent object \a parent.
*/
QPerVertexColorMaterial::QPerVertexColorMaterial(QNode *parent)
@@ -103,8 +104,6 @@ QPerVertexColorMaterial::QPerVertexColorMaterial(QNode *parent)
}
/*!
- \fn Qt3DRender::QPerVertexColorMaterial::~QPerVertexColorMaterial()
-
Destroys the QPerVertexColorMaterial
*/
QPerVertexColorMaterial::~QPerVertexColorMaterial()
diff --git a/src/extras/defaults/qphongalphamaterial.cpp b/src/extras/defaults/qphongalphamaterial.cpp
index efc413a86..7a05610c2 100644
--- a/src/extras/defaults/qphongalphamaterial.cpp
+++ b/src/extras/defaults/qphongalphamaterial.cpp
@@ -194,15 +194,17 @@ void QPhongAlphaMaterialPrivate::handleAlphaChanged(const QVariant &var)
}
/*!
- \class Qt3DRender::QPhongAlphaMaterial
+ \class Qt3DExtras::QPhongAlphaMaterial
\brief The QPhongAlphaMaterial class provides a default implementation of
the phong lighting effect with alpha.
- \inmodule Qt3DRenderer
- \since 5.5
+ \inmodule Qt3DExtras
+ \since 5.7
+ \inherits Qt3DRender::QMaterial
- The phong lighting effect is based on the combination of 3 lighting components ambient, diffuse and specular.
- The relative strengths of these components is controlled by means of their reflectivity coefficients which are modelled as RGB triplets:
+ The phong lighting effect is based on the combination of 3 lighting components ambient, diffuse
+ and specular. The relative strengths of these components are controlled by means of their
+ reflectivity coefficients which are modelled as RGB triplets:
\list
\li Ambient is the color that is emitted by an object without any other light source.
@@ -212,13 +214,11 @@ void QPhongAlphaMaterialPrivate::handleAlphaChanged(const QVariant &var)
\li Alpha is the transparency of the surface between 0 (fully transparent) and 1 (opaque).
\endlist
- This material uses an effect with a single render pass approach and performs per fragment lighting.
- Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
+ This material uses an effect with a single render pass approach and performs per fragment
+ lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
*/
/*!
- \fn Qt3DRender::QPhongAlphaMaterial::QPhongAlphaMaterial(Qt3DCore::QNode *parent)
-
Constructs a new QPhongAlphaMaterial instance with parent object \a parent.
*/
QPhongAlphaMaterial::QPhongAlphaMaterial(QNode *parent)
@@ -247,7 +247,7 @@ QPhongAlphaMaterial::~QPhongAlphaMaterial()
}
/*!
- \property Qt3DRender::QPhongAlphaMaterial::ambient
+ \property QPhongAlphaMaterial::ambient
Holds the ambient color.
*/
@@ -258,7 +258,7 @@ QColor QPhongAlphaMaterial::ambient() const
}
/*!
- \property Qt3DRender::QPhongAlphaMaterial::diffuse
+ \property QPhongAlphaMaterial::diffuse
Holds the diffuse color.
*/
@@ -269,7 +269,7 @@ QColor QPhongAlphaMaterial::diffuse() const
}
/*!
- \property Qt3DRender::QPhongAlphaMaterial::specular
+ \property QPhongAlphaMaterial::specular
Holds the specular color.
*/
@@ -280,7 +280,7 @@ QColor QPhongAlphaMaterial::specular() const
}
/*!
- \property Qt3DRender::QPhongAlphaMaterial::shininess
+ \property QPhongAlphaMaterial::shininess
Holds the shininess exponent.
*/
@@ -291,11 +291,11 @@ float QPhongAlphaMaterial::shininess() const
}
/*!
- \property Qt3DRender::QPhongAlphaMaterial::alpha
+ \property QPhongAlphaMaterial::alpha
Holds the alpha component of the object which varies between 0 and 1.
- \note: default value is 0.5f
+ The default value is 0.5f.
*/
float QPhongAlphaMaterial::alpha() const
{
@@ -303,30 +303,65 @@ float QPhongAlphaMaterial::alpha() const
return d->m_alphaParameter->value().toFloat();
}
+/*!
+ \property QPhongAlphaMaterial::sourceRgbArg
+
+ Holds the blend equation source RGB blending argument.
+
+ \sa Qt3DRender::QBlendEquationArguments::Blending
+*/
QBlendEquationArguments::Blending QPhongAlphaMaterial::sourceRgbArg() const
{
Q_D(const QPhongAlphaMaterial);
return d->m_blendState->sourceRgb();
}
+/*!
+ \property QPhongAlphaMaterial::destinationRgbArg
+
+ Holds the blend equation destination RGB blending argument.
+
+ \sa Qt3DRender::QBlendEquationArguments::Blending
+*/
QBlendEquationArguments::Blending QPhongAlphaMaterial::destinationRgbArg() const
{
Q_D(const QPhongAlphaMaterial);
return d->m_blendState->destinationRgb();
}
+/*!
+ \property QPhongAlphaMaterial::sourceAlphaArg
+
+ Holds the blend equation source alpha blending argument.
+
+ \sa Qt3DRender::QBlendEquationArguments::Blending
+*/
QBlendEquationArguments::Blending QPhongAlphaMaterial::sourceAlphaArg() const
{
Q_D(const QPhongAlphaMaterial);
return d->m_blendState->sourceAlpha();
}
+/*!
+ \property QPhongAlphaMaterial::destinationAlphaArg
+
+ Holds the blend equation destination alpha blending argument.
+
+ \sa Qt3DRender::QBlendEquationArguments::Blending
+*/
QBlendEquationArguments::Blending QPhongAlphaMaterial::destinationAlphaArg() const
{
Q_D(const QPhongAlphaMaterial);
return d->m_blendState->destinationAlpha();
}
+/*!
+ \property QPhongAlphaMaterial::blendFunctionArg
+
+ Holds the blend equation function argument.
+
+ \sa Qt3DRender::QBlendEquation::BlendFunction
+*/
QBlendEquation::BlendFunction QPhongAlphaMaterial::blendFunctionArg() const
{
Q_D(const QPhongAlphaMaterial);
diff --git a/src/extras/defaults/qphongmaterial.cpp b/src/extras/defaults/qphongmaterial.cpp
index f9c51bae8..c294984b6 100644
--- a/src/extras/defaults/qphongmaterial.cpp
+++ b/src/extras/defaults/qphongmaterial.cpp
@@ -162,13 +162,15 @@ void QPhongMaterialPrivate::handleShininessChanged(const QVariant &var)
}
/*!
- \class Qt3DRender::QPhongMaterial
+ \class Qt3DExtras::QPhongMaterial
\brief The QPhongMaterial class provides a default implementation of the phong lighting effect.
- \inmodule Qt3DRender
- \since 5.5
+ \inmodule Qt3DExtras
+ \since 5.7
+ \inherits Qt3DRender::QMaterial
- The phong lighting effect is based on the combination of 3 lighting components ambient, diffuse and specular.
- The relative strengths of these components is controlled by means of their reflectivity coefficients which are modelled as RGB triplets:
+ The phong lighting effect is based on the combination of 3 lighting components ambient, diffuse
+ and specular. The relative strengths of these components are controlled by means of their
+ reflectivity coefficients which are modelled as RGB triplets:
\list
\li Ambient is the color that is emitted by an object without any other light source.
@@ -177,13 +179,11 @@ void QPhongMaterialPrivate::handleShininessChanged(const QVariant &var)
\li The shininess of a surface is controlled by a float property.
\endlist
- This material uses an effect with a single render pass approach and performs per fragment lighting.
- Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
+ This material uses an effect with a single render pass approach and performs per fragment
+ lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
*/
/*!
- \fn Qt3DRender::QPhongMaterial::QPhongMaterial(Qt3DCore::QNode *parent)
-
Constructs a new QPhongMaterial instance with parent object \a parent.
*/
QPhongMaterial::QPhongMaterial(QNode *parent)
@@ -194,8 +194,6 @@ QPhongMaterial::QPhongMaterial(QNode *parent)
}
/*!
- \fn Qt3DRender::QPhongMaterial::~QPhongMaterial()
-
Destroys the QPhongMaterial.
*/
QPhongMaterial::~QPhongMaterial()
@@ -203,7 +201,7 @@ QPhongMaterial::~QPhongMaterial()
}
/*!
- \property Qt3DRender::QPhongMaterial::ambient
+ \property QPhongMaterial::ambient
Holds the ambient color.
*/
@@ -214,7 +212,7 @@ QColor QPhongMaterial::ambient() const
}
/*!
- \property Qt3DRender::QPhongMaterial::diffuse
+ \property QPhongMaterial::diffuse
Holds the diffuse color.
*/
@@ -225,7 +223,7 @@ QColor QPhongMaterial::diffuse() const
}
/*!
- \property Qt3DRender::QPhongMaterial::specular
+ \property QPhongMaterial::specular
Holds the specular color.
*/
@@ -236,7 +234,7 @@ QColor QPhongMaterial::specular() const
}
/*!
- \property Qt3DRender::QPhongMaterial::shininess
+ \property QPhongMaterial::shininess
Holds the shininess exponent.
*/