summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-09-05 09:47:19 +0200
committerLiang Qi <liang.qi@qt.io>2016-09-05 09:47:19 +0200
commitd5bb02ffe04b9b5ca7d86c8b905b352cc265df32 (patch)
tree83831d332763c1974e512de14cfc2757b89a5d84
parent4bbdcc1fac6b21a6d4607c93a5f8759145248f07 (diff)
parent79aeeba87d3c17b4f652423a660a213f9e2faf25 (diff)
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts: tests/manual/manual.pro Change-Id: Ie1186d3465516d8d50b8261f72e64d8d454d377b
-rw-r--r--src/core/nodes/qentity.cpp44
-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
-rw-r--r--src/extras/geometries/qconegeometry.cpp200
-rw-r--r--src/extras/geometries/qconemesh.cpp93
-rw-r--r--src/extras/geometries/qcuboidgeometry.cpp48
-rw-r--r--src/extras/geometries/qcuboidmesh.cpp58
-rw-r--r--src/extras/geometries/qcylindergeometry.cpp27
-rw-r--r--src/extras/geometries/qcylindermesh.cpp12
-rw-r--r--src/extras/geometries/qplanegeometry.cpp27
-rw-r--r--src/extras/geometries/qplanemesh.cpp16
-rw-r--r--src/extras/geometries/qspheregeometry.cpp31
-rw-r--r--src/extras/geometries/qspheremesh.cpp16
-rw-r--r--src/extras/geometries/qtorusgeometry.cpp27
-rw-r--r--src/extras/geometries/qtorusmesh.cpp16
-rw-r--r--src/plugins/sceneparsers/assimp/assimpio.cpp1
-rw-r--r--src/quick3d/quick3d/items/quick3dentity.cpp27
-rw-r--r--src/render/backend/renderer.cpp6
-rw-r--r--src/render/frontend/qabstractfunctor.cpp36
-rw-r--r--src/render/frontend/qcamera.cpp391
-rw-r--r--src/render/graphicshelpers/graphicscontext.cpp5
-rw-r--r--src/render/graphicshelpers/graphicscontext_p.h1
-rw-r--r--src/render/jobs/loadscenejob.cpp20
-rw-r--r--src/render/jobs/loadscenejob_p.h8
-rw-r--r--src/render/renderstates/qblendequation.cpp43
-rw-r--r--src/render/renderstates/qblendequationarguments.cpp38
-rw-r--r--src/render/renderstates/qblendequationarguments.h1
-rw-r--r--src/render/renderstates/qpointsize.cpp31
-rw-r--r--src/render/texture/qabstracttextureimage.cpp41
-rw-r--r--src/render/texture/qtextureimage.cpp81
-rw-r--r--tests/manual/manual.pro7
-rw-r--r--tests/manual/multiplewindows-qml/Scene.qml152
-rw-r--r--tests/manual/multiplewindows-qml/main.cpp68
-rw-r--r--tests/manual/multiplewindows-qml/main.qml77
-rw-r--r--tests/manual/multiplewindows-qml/multiplewindows-qml.pro16
-rw-r--r--tests/manual/multiplewindows-qml/qml.qrc6
44 files changed, 2116 insertions, 433 deletions
diff --git a/src/core/nodes/qentity.cpp b/src/core/nodes/qentity.cpp
index 67238ca7e..ea3523c0c 100644
--- a/src/core/nodes/qentity.cpp
+++ b/src/core/nodes/qentity.cpp
@@ -55,15 +55,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DCore {
-QEntityPrivate::QEntityPrivate()
- : QNodePrivate()
- , m_parentEntityId()
-{}
-
-QEntityPrivate::~QEntityPrivate()
-{
-}
-
/*!
\class Qt3DCore::QEntity
\inmodule Qt3DCore
@@ -78,14 +69,25 @@ QEntityPrivate::~QEntityPrivate()
backend aspect will be able to interpret and process an Entity by
recognizing which components it is made up of. One aspect may decide to only
process entities composed of a single Qt3DCore::QTransform component whilst
- another may focus on Qt3DCore::QMouseHandler.
+ another may focus on Qt3DInput::QMouseHandler.
\sa Qt3DCore::QComponent, Qt3DCore::QTransform
-*/
+ */
+
+/*! \internal */
+QEntityPrivate::QEntityPrivate()
+ : QNodePrivate()
+ , m_parentEntityId()
+{}
+
+/*! \internal */
+QEntityPrivate::~QEntityPrivate()
+{
+}
/*!
Constructs a new Qt3DCore::QEntity instance with \a parent as parent.
-*/
+ */
QEntity::QEntity(QNode *parent)
: QEntity(*new QEntityPrivate, parent) {}
@@ -113,11 +115,11 @@ QEntity::~QEntity()
\relates Qt3DCore::QEntity
List of QComponent pointers.
-*/
+ */
/*!
Returns the list of Qt3DCore::QComponent instances the entity is referencing.
-*/
+ */
QComponentVector QEntity::components() const
{
Q_D(const QEntity);
@@ -129,7 +131,7 @@ QComponentVector QEntity::components() const
\note If the Qt3DCore::QComponent has no parent, the Qt3DCore::QEntity will set
itself as its parent thereby taking ownership of the component.
-*/
+ */
void QEntity::addComponent(QComponent *comp)
{
Q_D(QEntity);
@@ -161,7 +163,7 @@ void QEntity::addComponent(QComponent *comp)
/*!
Removes the reference to \a comp.
-*/
+ */
void QEntity::removeComponent(QComponent *comp)
{
Q_CHECK_PTR(comp);
@@ -186,7 +188,7 @@ void QEntity::removeComponent(QComponent *comp)
immediate parent isn't a Qt3DCore::QEntity, this function traverses up the
scene hierarchy until a parent Qt3DCore::QEntity is found. If no
Qt3DCore::QEntity parent can be found, returns null.
-*/
+ */
QEntity *QEntity::parentEntity() const
{
Q_D(const QEntity);
@@ -208,10 +210,10 @@ QEntity *QEntity::parentEntity() const
}
/*!
- Returns the Qt3DCore::QNodeId id of the parent Qt3DCore::QEntity instance of the
- current Qt3DCore::QEntity object. The QNodeId isNull method will return true if
- there is no Qt3DCore::QEntity parent of the current Qt3DCore::QEntity in the scene
- hierarchy.
+ Returns the Qt3DCore::QNodeId id of the parent Qt3DCore::QEntity instance of the
+ current Qt3DCore::QEntity object. The QNodeId isNull method will return true if
+ there is no Qt3DCore::QEntity parent of the current Qt3DCore::QEntity in the scene
+ hierarchy.
*/
QNodeId QEntityPrivate::parentEntityId() const
{
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.
*/
diff --git a/src/extras/geometries/qconegeometry.cpp b/src/extras/geometries/qconegeometry.cpp
index ab652b5dd..9db7e2b46 100644
--- a/src/extras/geometries/qconegeometry.cpp
+++ b/src/extras/geometries/qconegeometry.cpp
@@ -38,18 +38,16 @@
****************************************************************************/
/*!
- * \class QConeGeometry
+ * \class Qt3DExtras::QConeGeometry
+ * \inmodule Qt3DExtras
* \brief The QConeGeometry class allows creation of a cone in 3D space.
* \since 5.7
* \ingroup geometries
+ * \inherits Qt3DRender::QGeometry
*
- * The Cone is a common sight in 3D software shape libraries.
- *
- * The QConeGeometry class is most commonly used as part of the QConeMesh
- * but can also be used in custom QGeometryRenderer subclasses. The class
- * allows for creation of both the cone and truncated cone.
- *
- * \sa Qt3DExtras::QCylinderGeometry, Qt3DExtras::QConeMesh, Qt3DExtras::QGeometryRenderer
+ * The QConeGeometry class is most commonly used internally by the QConeMesh
+ * but can also be used in custom Qt3DRender::QGeometryRenderer subclasses. The class
+ * allows for creation of both a cone and a truncated cone.
*/
#ifndef _USE_MATH_DEFINES
@@ -417,6 +415,83 @@ void QConeGeometryPrivate::init()
q->addAttribute(m_indexAttribute);
}
+/*!
+ * \qmltype ConeGeometry
+ * \instantiates Qt3DExtras::QConeGeometry
+ * \inqmlmodule Qt3D.Extras
+ * \brief ConeGeometry allows creation of a cone in 3D space.
+ *
+ * The ConeGeometry type is most commonly used internally by the ConeMesh type
+ * but can also be used in custom GeometryRenderer types.
+ * The ConeGeometry type allows for creation of both a cone and a truncated cone.
+ */
+
+/*!
+ * \qmlproperty bool ConeGeometry::hasTopEndcap
+ *
+ * Determines if the cone top is capped or open.
+ */
+
+/*!
+ * \qmlproperty bool ConeGeometry::hasBottomEndcap
+ *
+ * Determines if the cone bottom is capped or open.
+ */
+
+/*!
+ * \qmlproperty int ConeGeometry::rings
+ *
+ * Holds the number of rings in the geometry.
+ */
+
+/*!
+ * \qmlproperty int ConeGeometry::slices
+ *
+ * Holds the number of slices in the geometry.
+ */
+
+/*!
+ * \qmlproperty real ConeGeometry::topRadius
+ *
+ * Holds the top radius of the cone.
+ */
+
+/*!
+ * \qmlproperty real ConeGeometry::bottomRadius
+ *
+ * Holds the bottom radius of the cone.
+ */
+
+/*!
+ * \qmlproperty real ConeGeometry::length
+ *
+ * Holds the length of the cone.
+ */
+
+/*!
+ * \qmlproperty Attribute ConeGeometry::positionAttribute
+ *
+ * Holds the geometry position attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute ConeGeometry::normalAttribute
+ *
+ * Holds the geometry normal attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute ConeGeometry::texCoordAttribute
+ *
+ * Holds the geometry texture coordinate attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute ConeGeometry::indexAttribute
+ *
+ * Holds the geometry index attribute.
+ */
+
QConeGeometry::QConeGeometry(QNode *parent)
: QGeometry(*new QConeGeometryPrivate, parent)
{
@@ -437,6 +512,9 @@ QConeGeometry::~QConeGeometry()
{
}
+/*!
+ * Updates vertices based on geometry properties.
+ */
void QConeGeometry::updateVertices()
{
Q_D(QConeGeometry);
@@ -448,6 +526,9 @@ void QConeGeometry::updateVertices()
d->m_topRadius, d->m_bottomRadius, d->m_length));
}
+/*!
+ * Updates indices based on geometry properties.
+ */
void QConeGeometry::updateIndices()
{
Q_D(QConeGeometry);
@@ -462,8 +543,70 @@ void QConeGeometry::updateIndices()
}
/*!
- * Sets whether the cone has a sealed top to \a hasTopEndcap.
+ * \property QConeGeometry::hasTopEndcap
+ *
+ * Determines if the cone top is capped or open.
+ */
+/*!
+ * \property QConeGeometry::hasBottomEndcap
+ *
+ * Determines if the cone bottom is capped or open.
*/
+
+/*!
+ * \property QConeGeometry::rings
+ *
+ * Holds the number of rings in the geometry.
+ */
+
+/*!
+ * \property QConeGeometry::slices
+ *
+ * Holds the number of slices in the geometry.
+ */
+
+/*!
+ * \property QConeGeometry::topRadius
+ *
+ * Holds the top radius of the cone.
+ */
+
+/*!
+ * \property QConeGeometry::bottomRadius
+ *
+ * Holds the bottom radius of the cone.
+ */
+
+/*!
+ * \property QConeGeometry::length
+ *
+ * Holds the length of the cone.
+ */
+
+/*!
+ * \property QConeGeometry::positionAttribute
+ *
+ * Holds the geometry position attribute.
+ */
+
+/*!
+ * \property QConeGeometry::normalAttribute
+ *
+ * Holds the geometry normal attribute.
+ */
+
+/*!
+ * \property QConeGeometry::texCoordAttribute
+ *
+ * Holds the geometry texture coordinate attribute.
+ */
+
+/*!
+ * \property QConeGeometry::indexAttribute
+ *
+ * Holds the geometry index attribute.
+ */
+
void QConeGeometry::setHasTopEndcap(bool hasTopEndcap)
{
Q_D(QConeGeometry);
@@ -474,9 +617,6 @@ void QConeGeometry::setHasTopEndcap(bool hasTopEndcap)
}
}
-/*!
- * Sets whether the cone has a sealed bottom to \a hasBottomEndcap.
- */
void QConeGeometry::setHasBottomEndcap(bool hasBottomEndcap)
{
Q_D(QConeGeometry);
@@ -487,9 +627,6 @@ void QConeGeometry::setHasBottomEndcap(bool hasBottomEndcap)
}
}
-/*!
- * Sets the number of rings used in the cone's construction tp \a rings.
- */
void QConeGeometry::setRings(int rings)
{
Q_D(QConeGeometry);
@@ -501,9 +638,6 @@ void QConeGeometry::setRings(int rings)
}
}
-/*!
- * Sets the number of slices used in the cone's construction to \a slices.
- */
void QConeGeometry::setSlices(int slices)
{
Q_D(QConeGeometry);
@@ -515,9 +649,6 @@ void QConeGeometry::setSlices(int slices)
}
}
-/*!
- * Sets the radius for the top of the cone tp \a topRadius.
- */
void QConeGeometry::setTopRadius(float topRadius)
{
Q_D(QConeGeometry);
@@ -528,9 +659,6 @@ void QConeGeometry::setTopRadius(float topRadius)
}
}
-/*!
- * Sets the radius for the bottom of the cone to \a bottomRadius.
- */
void QConeGeometry::setBottomRadius(float bottomRadius)
{
Q_D(QConeGeometry);
@@ -541,9 +669,6 @@ void QConeGeometry::setBottomRadius(float bottomRadius)
}
}
-/*!
- * Sets the cone's length to \a length.
- */
void QConeGeometry::setLength(float length)
{
Q_D(QConeGeometry);
@@ -555,63 +680,42 @@ void QConeGeometry::setLength(float length)
}
}
-/*!
- * \return whether the cone has a top endcap.
- */
bool QConeGeometry::hasTopEndcap() const
{
Q_D(const QConeGeometry);
return d->m_hasTopEndcap;
}
-/*!
- * \return whether the cone has a bottom endcap.
- */
bool QConeGeometry::hasBottomEndcap() const
{
Q_D(const QConeGeometry);
return d->m_hasBottomEndcap;
}
-/*!
- * \return the top radius of the cone.
- */
float QConeGeometry::topRadius() const
{
Q_D(const QConeGeometry);
return d->m_topRadius;
}
-/*!
- * \return the bottom radius of the cone.
- */
float QConeGeometry::bottomRadius() const
{
Q_D(const QConeGeometry);
return d->m_bottomRadius;
}
-/*!
- * \return the number of rings used in the construction of the cone.
- */
int QConeGeometry::rings() const
{
Q_D(const QConeGeometry);
return d->m_rings;
}
-/*!
- * \return the number of slices used in the construction of the cone.
- */
int QConeGeometry::slices() const
{
Q_D(const QConeGeometry);
return d->m_slices;
}
-/*!
- * \return the cone's length.
- */
float QConeGeometry::length() const
{
Q_D(const QConeGeometry);
diff --git a/src/extras/geometries/qconemesh.cpp b/src/extras/geometries/qconemesh.cpp
index e2f43b16d..385c469e0 100644
--- a/src/extras/geometries/qconemesh.cpp
+++ b/src/extras/geometries/qconemesh.cpp
@@ -53,6 +53,64 @@ QT_BEGIN_NAMESPACE
namespace Qt3DExtras {
+/*!
+ * \qmltype ConeMesh
+ * \instantiates Qt3DExtras::QConeMesh
+ * \inqmlmodule Qt3D.Extras
+ * \brief A conical mesh.
+ */
+
+/*!
+ * \qmlproperty int ConeMesh::rings
+ *
+ * Holds the number of rings in the mesh.
+ */
+
+/*!
+ * \qmlproperty int ConeMesh::slices
+ *
+ * Holds the number of slices in the mesh.
+ */
+
+/*!
+ * \qmlproperty bool ConeMesh::hasTopEndcap
+ *
+ * Determines if the cone top is capped or open.
+ */
+
+/*!
+ * \qmlproperty bool ConeMesh::hasBottomEndcap
+ *
+ * Determines if the cone bottom is capped or open.
+ */
+
+/*!
+ * \qmlproperty real ConeMesh::topRadius
+ *
+ * Holds the top radius of the cone.
+ */
+
+/*!
+ * \qmlproperty real ConeMesh::bottomRadius
+ *
+ * Holds the bottom radius of the cone.
+ */
+
+/*!
+ * \qmlproperty real ConeMesh::length
+ *
+ * Holds the length of the cone.
+ */
+
+/*!
+ * \class Qt3DExtras::QConeMesh
+ * \inmodule Qt3DExtras
+ *
+ * \inherits Qt3DRender::QGeometryRenderer
+ *
+ * \brief A conical mesh.
+ */
+
QConeMesh::QConeMesh(QNode *parent)
: QGeometryRenderer(parent)
{
@@ -108,36 +166,71 @@ void QConeMesh::setLength(float length)
static_cast<QConeGeometry *>(geometry())->setLength(length);
}
+/*!
+ * \property QConeMesh::hasTopEndcap
+ *
+ * Determines if the cone top is capped or open.
+ */
bool QConeMesh::hasTopEndcap() const
{
return static_cast<QConeGeometry *>(geometry())->hasTopEndcap();
}
+/*!
+ * \property QConeMesh::hasBottomEndcap
+ *
+ * Determines if the cone bottom is capped or open.
+ */
bool QConeMesh::hasBottomEndcap() const
{
return static_cast<QConeGeometry *>(geometry())->hasBottomEndcap();
}
+/*!
+ * \property QConeMesh::topRadius
+ *
+ * Holds the top radius of the cone.
+ */
float QConeMesh::topRadius() const
{
return static_cast<QConeGeometry *>(geometry())->topRadius();
}
+/*!
+ * \property QConeMesh::bottomRadius
+ *
+ * Holds the bottom radius of the cone.
+ */
float QConeMesh::bottomRadius() const
{
return static_cast<QConeGeometry *>(geometry())->bottomRadius();
}
+/*!
+ * \property QConeMesh::rings
+ *
+ * Holds the number of rings in the mesh.
+ */
int QConeMesh::rings() const
{
return static_cast<QConeGeometry *>(geometry())->rings();
}
+/*!
+ * \property QConeMesh::slices
+ *
+ * Holds the number of slices in the mesh.
+ */
int QConeMesh::slices() const
{
return static_cast<QConeGeometry *>(geometry())->slices();
}
+/*!
+ * \property QConeMesh::length
+ *
+ * Holds the length of the cone.
+ */
float QConeMesh::length() const
{
return static_cast<QConeGeometry *>(geometry())->length();
diff --git a/src/extras/geometries/qcuboidgeometry.cpp b/src/extras/geometries/qcuboidgeometry.cpp
index a632111f6..49f1cbff0 100644
--- a/src/extras/geometries/qcuboidgeometry.cpp
+++ b/src/extras/geometries/qcuboidgeometry.cpp
@@ -563,44 +563,54 @@ void QCuboidGeometryPrivate::init()
/*!
* \qmltype CuboidGeometry
- * \instantiates Qt3DRender::QCuboidGeometry
- * \inqmlmodule Qt3D.Render
+ * \instantiates Qt3DExtras::QCuboidGeometry
+ * \inqmlmodule Qt3D.Extras
+ * \brief CuboidGeometry allows creation of a cuboid in 3D space.
+ *
+ * The CuboidGeometry type is most commonly used internally by the CuboidMesh type
+ * but can also be used in custom GeometryRenderer types.
*/
/*!
- * \qmlproperty float CuboidGeometry::xExtent
+ * \qmlproperty real CuboidGeometry::xExtent
*
- * Holds the x extent.
+ * Holds the x extent of the geometry.
*/
/*!
- * \qmlproperty float CuboidGeometry::yExtent
+ * \qmlproperty real CuboidGeometry::yExtent
*
- * Holds the y extent.
+ * Holds the y extent of the geometry.
*/
/*!
- * \qmlproperty float CuboidGeometry::zExtent
+ * \qmlproperty real CuboidGeometry::zExtent
*
- * Holds the z extent.
+ * Holds the z extent of the geometry.
*/
/*!
* \qmlproperty size CuboidGeometry::yzMeshResolution
*
* Holds the y-z resolution.
+ * The width and height values of this property specify the number of vertices generated for
+ * the y-z faces of the mesh.
*/
/*!
* \qmlproperty size CuboidGeometry::xzMeshResolution
*
* Holds the x-z resolution.
+ * The width and height values of this property specify the number of vertices generated for
+ * the x-z faces of the mesh.
*/
/*!
* \qmlproperty size CuboidGeometry::xyMeshResolution
*
* Holds the x-y resolution.
+ * The width and height values of this property specify the number of vertices generated for
+ * the x-y faces of the mesh.
*/
/*!
@@ -634,11 +644,15 @@ void QCuboidGeometryPrivate::init()
*/
/*!
- * \class Qt3DRender::QCuboidGeometry
- * \inmodule Qt3DRender
- *
+ * \class Qt3DExtras::QCuboidGeometry
+ * \inmodule Qt3DExtras
+ * \brief The QCuboidGeometry class allows creation of a cuboid in 3D space.
+ * \since 5.7
+ * \ingroup geometries
* \inherits Qt3DRender::QGeometry
*
+ * The QCuboidGeometry class is most commonly used internally by the QCuboidMesh
+ * but can also be used in custom Qt3DRender::QGeometryRenderer subclasses.
*/
/*!
@@ -770,7 +784,7 @@ void QCuboidGeometry::setXYMeshResolution(const QSize &resolution)
/*!
* \property QCuboidGeometry::xExtent
*
- * Holds the x extent.
+ * Holds the x extent of the geometry.
*/
float QCuboidGeometry::xExtent() const
{
@@ -781,7 +795,7 @@ float QCuboidGeometry::xExtent() const
/*!
* \property QCuboidGeometry::yExtent
*
- * Holds the y extent.
+ * Holds the y extent of the geometry.
*/
float QCuboidGeometry::yExtent() const
{
@@ -792,7 +806,7 @@ float QCuboidGeometry::yExtent() const
/*!
* \property QCuboidGeometry::zExtent
*
- * Holds the z extent.
+ * Holds the z extent of the geometry.
*/
float QCuboidGeometry::zExtent() const
{
@@ -804,6 +818,8 @@ float QCuboidGeometry::zExtent() const
* \property QCuboidGeometry::yzMeshResolution
*
* Holds the y-z resolution.
+ * The width and height values of this property specify the number of vertices generated for
+ * the y-z faces of the mesh.
*/
QSize QCuboidGeometry::yzMeshResolution() const
{
@@ -815,6 +831,8 @@ QSize QCuboidGeometry::yzMeshResolution() const
* \property QCuboidGeometry::xzMeshResolution
*
* Holds the x-z resolution.
+ * The width and height values of this property specify the number of vertices generated for
+ * the x-z faces of the mesh.
*/
QSize QCuboidGeometry::xyMeshResolution() const
{
@@ -826,6 +844,8 @@ QSize QCuboidGeometry::xyMeshResolution() const
* \property QCuboidGeometry::xyMeshResolution
*
* Holds the x-y resolution.
+ * The width and height values of this property specify the number of vertices generated for
+ * the x-y faces of the mesh.
*/
QSize QCuboidGeometry::xzMeshResolution() const
{
diff --git a/src/extras/geometries/qcuboidmesh.cpp b/src/extras/geometries/qcuboidmesh.cpp
index 004fca472..7df77ec63 100644
--- a/src/extras/geometries/qcuboidmesh.cpp
+++ b/src/extras/geometries/qcuboidmesh.cpp
@@ -45,59 +45,65 @@ QT_BEGIN_NAMESPACE
namespace Qt3DExtras {
/*!
- * \qmltype QCuboidMesh
- * \instantiates Qt3DRender::QCuboidMesh
- * \inqmlmodule Qt3D.Render
- * \brief A cube mesh.
+ * \qmltype CuboidMesh
+ * \instantiates Qt3DExtras::QCuboidMesh
+ * \inqmlmodule Qt3D.Extras
+ * \brief A cuboid mesh.
*/
/*!
- * \qmlproperty float CuboidMesh::xExtent
+ * \qmlproperty real CuboidMesh::xExtent
*
- * Holds the x extent.
+ * Holds the x extent of the mesh.
*/
/*!
- * \qmlproperty float CuboidMesh::yExtent
+ * \qmlproperty real CuboidMesh::yExtent
*
- * Holds the y extent.
+ * Holds the y extent of the mesh.
*/
/*!
- * \qmlproperty float CuboidMesh::zExtent
+ * \qmlproperty real CuboidMesh::zExtent
*
- * Holds the z extent.
+ * Holds the z extent of the mesh.
*/
/*!
* \qmlproperty size CuboidMesh::yzMeshResolution
*
- * Holds the y-z resolution.
+ * Holds the y-z resolution of the mesh.
+ * The width and height values of this property specify the number of vertices generated for
+ * the y-z faces of the mesh.
*/
/*!
* \qmlproperty size CuboidMesh::xzMeshResolution
*
- * Holds the x-z resolution.
+ * Holds the x-z resolution of the mesh.
+ * The width and height values of this property specify the number of vertices generated for
+ * the x-z faces of the mesh.
*/
/*!
* \qmlproperty size CuboidMesh::xyMeshResolution
*
- * Holds the x-y resolution.
+ * Holds the x-y resolution of the mesh.
+ * The width and height values of this property specify the number of vertices generated for
+ * the x-y faces of the mesh.
*/
/*!
- * \class Qt3DRender::QCuboidMesh
- * \inmodule Qt3DRender
+ * \class Qt3DExtras::QCuboidMesh
+ * \inmodule Qt3DExtras
*
* \inherits Qt3DRender::QGeometryRenderer
*
- * \brief A cube mesh.
+ * \brief A cuboid mesh.
*/
/*!
- * Constructs a new QCuboidMedh with \a parent.
+ * Constructs a new QCuboidMesh with \a parent.
*/
QCuboidMesh::QCuboidMesh(QNode *parent)
: QGeometryRenderer(parent)
@@ -125,7 +131,7 @@ void QCuboidMesh::setXExtent(float xExtent)
/*!
* \property QCuboidMesh::xExtent
*
- * Holds the x extent.
+ * Holds the x extent of the mesh.
*/
float QCuboidMesh::xExtent() const
{
@@ -140,7 +146,7 @@ void QCuboidMesh::setYExtent(float yExtent)
/*!
* \property QCuboidMesh::yExtent
*
- * Holds the y extent.
+ * Holds the y extent of the mesh.
*/
float QCuboidMesh::yExtent() const
{
@@ -155,7 +161,7 @@ void QCuboidMesh::setZExtent(float zExtent)
/*!
* \property QCuboidMesh::zExtent
*
- * Holds the z extent.
+ * Holds the z extent of the mesh.
*/
float QCuboidMesh::zExtent() const
{
@@ -170,7 +176,9 @@ void QCuboidMesh::setYZMeshResolution(const QSize &resolution)
/*!
* \property QCuboidMesh::yzMeshResolution
*
- * Holds the y-z resolution.
+ * Holds the y-z resolution of the mesh.
+ * The width and height values of this property specify the number of vertices generated for
+ * the y-z faces of the mesh.
*/
QSize QCuboidMesh::yzMeshResolution() const
{
@@ -185,7 +193,9 @@ void QCuboidMesh::setXZMeshResolution(const QSize &resolution)
/*!
* \property QCuboidMesh::xzMeshResolution
*
- * Holds the x-z resolution.
+ * Holds the x-z resolution of the mesh.
+ * The width and height values of this property specify the number of vertices generated for
+ * the x-z faces of the mesh.
*/
QSize QCuboidMesh::xzMeshResolution() const
{
@@ -200,7 +210,9 @@ void QCuboidMesh::setXYMeshResolution(const QSize &resolution)
/*!
* \property QCuboidMesh::xyMeshResolution
*
- * Holds the x-y resolution.
+ * Holds the x-y resolution of the mesh.
+ * The width and height values of this property specify the number of vertices generated for
+ * the x-y faces of the mesh.
*/
QSize QCuboidMesh::xyMeshResolution() const
{
diff --git a/src/extras/geometries/qcylindergeometry.cpp b/src/extras/geometries/qcylindergeometry.cpp
index 659d38359..136258162 100644
--- a/src/extras/geometries/qcylindergeometry.cpp
+++ b/src/extras/geometries/qcylindergeometry.cpp
@@ -338,8 +338,12 @@ void QCylinderGeometryPrivate::init()
/*!
* \qmltype CylinderGeometry
- * \instantiates Qt3DRender::QCylinderGeometry
- * \inqmlmodule Qt3D.Render
+ * \instantiates Qt3DExtras::QCylinderGeometry
+ * \inqmlmodule Qt3D.Extras
+ * \brief CylinderGeometry allows creation of a cylinder in 3D space.
+ *
+ * The CylinderGeometry type is most commonly used internally by the CylinderMesh type
+ * but can also be used in custom GeometryRenderer types.
*/
/*!
@@ -355,13 +359,13 @@ void QCylinderGeometryPrivate::init()
*/
/*!
- * \qmlproperty float CylinderGeometry::radius
+ * \qmlproperty real CylinderGeometry::radius
*
* Holds the radius of the cylinder.
*/
/*!
- * \qmlproperty float CylinderGeometry::length
+ * \qmlproperty real CylinderGeometry::length
*
* Holds the length of the cylinder.
*/
@@ -391,10 +395,15 @@ void QCylinderGeometryPrivate::init()
*/
/*!
- * \class Qt3DRender::QCylinderGeometry
- * \inmodule Qt3DRender
- *
+ * \class Qt3DExtras::QCylinderGeometry
+ * \inmodule Qt3DExtras
+ * \brief The QCylinderGeometry class allows creation of a cylinder in 3D space.
+ * \since 5.7
+ * \ingroup geometries
* \inherits Qt3DRender::QGeometry
+ *
+ * The QCylinderGeometry class is most commonly used internally by the QCylinderMesh
+ * but can also be used in custom Qt3DRender::QGeometryRenderer subclasses.
*/
/*!
@@ -425,7 +434,7 @@ QCylinderGeometry::~QCylinderGeometry()
}
/*!
- * Updates the vertices based on rings and slices.
+ * Updates the vertices based on rings, slices, and length properties.
*/
void QCylinderGeometry::updateVertices()
{
@@ -439,7 +448,7 @@ void QCylinderGeometry::updateVertices()
}
/*!
- * Updates the indices based on rings and slices.
+ * Updates the indices based on rings, slices, and length properties.
*/
void QCylinderGeometry::updateIndices()
{
diff --git a/src/extras/geometries/qcylindermesh.cpp b/src/extras/geometries/qcylindermesh.cpp
index ef405cb6e..875d8ed9a 100644
--- a/src/extras/geometries/qcylindermesh.cpp
+++ b/src/extras/geometries/qcylindermesh.cpp
@@ -58,8 +58,8 @@ namespace Qt3DExtras {
/*!
* \qmltype CylinderMesh
- * \instantiates Qt3DRender::QCylinderMesh
- * \inqmlmodule Qt3D.Render
+ * \instantiates Qt3DExtras::QCylinderMesh
+ * \inqmlmodule Qt3D.Extras
* \brief A cylindrical mesh.
*/
@@ -76,20 +76,20 @@ namespace Qt3DExtras {
*/
/*!
- * \qmlproperty float CylinderMesh::radius
+ * \qmlproperty real CylinderMesh::radius
*
* Holds the radius of the cylinder.
*/
/*!
- * \qmlproperty float CylinderMesh::length
+ * \qmlproperty real CylinderMesh::length
*
* Holds the length of the cylinder.
*/
/*!
- * \class Qt3DRender::QCylinderMesh
- * \inmodule Qt3DRender
+ * \class Qt3DExtras::QCylinderMesh
+ * \inmodule Qt3DExtras
*
* \inherits Qt3DRender::QGeometryRenderer
*
diff --git a/src/extras/geometries/qplanegeometry.cpp b/src/extras/geometries/qplanegeometry.cpp
index dad3147ff..74c90cf1b 100644
--- a/src/extras/geometries/qplanegeometry.cpp
+++ b/src/extras/geometries/qplanegeometry.cpp
@@ -208,18 +208,22 @@ public:
/*!
* \qmltype PlaneGeometry
- * \instantiates Qt3DRender::QPlaneGeometry
- * \inqmlmodule Qt3D.Render
+ * \instantiates Qt3DExtras::QPlaneGeometry
+ * \inqmlmodule Qt3D.Extras
+ * \brief PlaneGeometry allows creation of a plane in 3D space.
+ *
+ * The PlaneGeometry type is most commonly used internally by the PlaneMesh type
+ * but can also be used in custom GeometryRenderer types.
*/
/*!
- * \qmlproperty float PlaneGeometry::width
+ * \qmlproperty real PlaneGeometry::width
*
* Holds the plane width.
*/
/*!
- * \qmlproperty float PlaneGeometry::height
+ * \qmlproperty real PlaneGeometry::height
*
* Holds the plane height.
*/
@@ -261,10 +265,15 @@ public:
*/
/*!
- * \class Qt3DRender::QPlaneGeometry
- * \inmodule Qt3DRender
- *
+ * \class Qt3DExtras::QPlaneGeometry
+ * \inmodule Qt3DExtras
+ * \brief The QPlaneGeometry class allows creation of a plane in 3D space.
+ * \since 5.7
+ * \ingroup geometries
* \inherits Qt3DRender::QGeometry
+ *
+ * The QPlaneGeometry class is most commonly used internally by the QPlaneMesh
+ * but can also be used in custom Qt3DRender::QGeometryRenderer subclasses.
*/
/*!
@@ -295,7 +304,7 @@ QPlaneGeometry::~QPlaneGeometry()
}
/*!
- * Updates vertices based on resolution.
+ * Updates vertices based on mesh resolution, width, and height properties.
*/
void QPlaneGeometry::updateVertices()
{
@@ -310,7 +319,7 @@ void QPlaneGeometry::updateVertices()
}
/*!
- * Updates indices based on resolution.
+ * Updates indices based on mesh resolution.
*/
void QPlaneGeometry::updateIndices()
{
diff --git a/src/extras/geometries/qplanemesh.cpp b/src/extras/geometries/qplanemesh.cpp
index f9d1a105b..f14d7cb97 100644
--- a/src/extras/geometries/qplanemesh.cpp
+++ b/src/extras/geometries/qplanemesh.cpp
@@ -46,19 +46,19 @@ namespace Qt3DExtras {
/*!
* \qmltype PlaneMesh
- * \instantiates Qt3DRender::QPlaneMesh
- * \inqmlmodule Qt3D.Render
+ * \instantiates Qt3DExtras::QPlaneMesh
+ * \inqmlmodule Qt3D.Extras
* \brief A square planar mesh.
*/
/*!
- * \qmlproperty float PlaneMesh::width
+ * \qmlproperty real PlaneMesh::width
*
* Holds the plane width.
*/
/*!
- * \qmlproperty float PlaneMesh::height
+ * \qmlproperty real PlaneMesh::height
*
* Holds the plane height.
*/
@@ -67,11 +67,13 @@ namespace Qt3DExtras {
* \qmlproperty size PlaneMesh::meshResolution
*
* Holds the plane resolution.
+ * The width and height values of this property specify the number of vertices generated for
+ * the mesh in the respective dimensions.
*/
/*!
- * \class Qt3DRender::QPlaneMesh
- * \inmodule Qt3DRender
+ * \class Qt3DExtras::QPlaneMesh
+ * \inmodule Qt3DExtras
*
* \inherits Qt3DRender::QGeometryRenderer
*
@@ -135,6 +137,8 @@ void QPlaneMesh::setMeshResolution(const QSize &resolution)
* \property QPlaneMesh::meshResolution
*
* Holds the plane resolution.
+ * The width and height values of this property specify the number of vertices generated for
+ * the mesh in the respective dimensions.
*/
QSize QPlaneMesh::meshResolution() const
{
diff --git a/src/extras/geometries/qspheregeometry.cpp b/src/extras/geometries/qspheregeometry.cpp
index 77844b2af..277d4fcb9 100644
--- a/src/extras/geometries/qspheregeometry.cpp
+++ b/src/extras/geometries/qspheregeometry.cpp
@@ -315,8 +315,12 @@ void QSphereGeometryPrivate::init()
/*!
* \qmltype SphereGeometry
- * \instantiates QSphereGeometry
- * \inqmlmodule Qt3D.Render
+ * \instantiates Qt3DExtras::QSphereGeometry
+ * \inqmlmodule Qt3D.Extras
+ * \brief SphereGeometry allows creation of a sphere in 3D space.
+ *
+ * The SphereGeometry type is most commonly used internally by the SphereMesh type
+ * but can also be used in custom GeometryRenderer types.
*/
/*!
@@ -332,7 +336,7 @@ void QSphereGeometryPrivate::init()
*/
/*!
- * \qmlproperty float SphereGeometry::radius
+ * \qmlproperty real SphereGeometry::radius
*
* Holds the radius of the sphere.
*/
@@ -340,7 +344,8 @@ void QSphereGeometryPrivate::init()
/*!
* \qmlproperty bool SphereGeometry::generateTangents
*
- * Holds the value of the automatic tangent generation flag.
+ * Holds the value of the automatic tangent vectors generation flag.
+ * Tangent vectors are orthogonal to normal vectors.
*/
/*!
@@ -374,10 +379,15 @@ void QSphereGeometryPrivate::init()
*/
/*!
- * \class QSphereGeometry
- * \inmodule Qt3DRender
+ * \class Qt3DExtras::QSphereGeometry
+ * \inmodule Qt3DExtras
+ * \brief The QSphereGeometry class allows creation of a sphere in 3D space.
+ * \since 5.7
+ * \ingroup geometries
+ * \inherits Qt3DRender::QGeometry
*
- * \inherits QGeometry
+ * The QSphereGeometry class is most commonly used internally by the QSphereMesh
+ * but can also be used in custom Qt3DRender::QGeometryRenderer subclasses.
*/
/*!
@@ -408,7 +418,7 @@ QSphereGeometry::~QSphereGeometry()
}
/*!
- * Updates vertices based on rings and slices.
+ * Updates vertices based on rings, slices, and radius properties
*/
void QSphereGeometry::updateVertices()
{
@@ -422,7 +432,7 @@ void QSphereGeometry::updateVertices()
}
/*!
- * Updates indices based on rings and slices.
+ * Updates indices based on rings and slices properties.
*/
void QSphereGeometry::updateIndices()
{
@@ -481,7 +491,8 @@ void QSphereGeometry::setGenerateTangents(bool gen)
/*!
* \property QSphereGeometry::generateTangents
*
- * Holds the value of the automatic tangent generation flag.
+ * Holds the value of the automatic tangent vectors generation flag.
+ * Tangent vectors are orthogonal to normal vectors.
*/
bool QSphereGeometry::generateTangents() const
{
diff --git a/src/extras/geometries/qspheremesh.cpp b/src/extras/geometries/qspheremesh.cpp
index 205f6437f..90cf5a872 100644
--- a/src/extras/geometries/qspheremesh.cpp
+++ b/src/extras/geometries/qspheremesh.cpp
@@ -47,8 +47,8 @@ namespace Qt3DExtras {
/*!
* \qmltype SphereMesh
- * \instantiates Qt3DRender::QSphereMesh
- * \inqmlmodule Qt3D.Render
+ * \instantiates Qt3DExtras::QSphereMesh
+ * \inqmlmodule Qt3D.Extras
* \brief A spherical mesh.
*/
@@ -65,7 +65,7 @@ namespace Qt3DExtras {
*/
/*!
- * \qmlproperty float SphereMesh::radius
+ * \qmlproperty real SphereMesh::radius
*
* Holds the radius of the sphere.
*/
@@ -73,12 +73,13 @@ namespace Qt3DExtras {
/*!
* \qmlproperty bool SphereMesh::generateTangents
*
- * Holds the value of the automatic tangent generation flag.
+ * Holds the value of the automatic tangent vectors generation flag.
+ * Tangent vectors are orthogonal to normal vectors.
*/
/*!
- * \class Qt3DRender::QSphereMesh
- * \inmodule Qt3DRender
+ * \class Qt3DExtras::QSphereMesh
+ * \inmodule Qt3DExtras
*
* \inherits Qt3DRender::QGeometryRenderer
*
@@ -127,7 +128,8 @@ void QSphereMesh::setGenerateTangents(bool gen)
/*!
* \property QSphereMesh::generateTangents
*
- * Holds the value of the automatic tangent generation flag.
+ * Holds the value of the automatic tangent vectors generation flag.
+ * Tangent vectors are orthogonal to normal vectors.
*/
bool QSphereMesh::generateTangents() const
{
diff --git a/src/extras/geometries/qtorusgeometry.cpp b/src/extras/geometries/qtorusgeometry.cpp
index 1d292dec3..801281110 100644
--- a/src/extras/geometries/qtorusgeometry.cpp
+++ b/src/extras/geometries/qtorusgeometry.cpp
@@ -264,8 +264,12 @@ void QTorusGeometryPrivate::init()
/*!
* \qmltype TorusGeometry
- * \instantiates Qt3DRender::QTorusGeometry
- * \inqmlmodule Qt3D.Render
+ * \instantiates Qt3DExtras::QTorusGeometry
+ * \inqmlmodule Qt3D.Extras
+ * \brief TorusGeometry allows creation of a torus in 3D space.
+ *
+ * The TorusGeometry type is most commonly used internally by the TorusMesh type
+ * but can also be used in custom GeometryRenderer types.
*/
/*!
@@ -281,13 +285,13 @@ void QTorusGeometryPrivate::init()
*/
/*!
- * \qmlproperty float TorusGeometry::radius
+ * \qmlproperty real TorusGeometry::radius
*
* Holds the outer radius of the torus.
*/
/*!
- * \qmlproperty float TorusGeometry::minorRadius
+ * \qmlproperty real TorusGeometry::minorRadius
*
* Holds the inner radius of the torus.
*/
@@ -317,10 +321,15 @@ void QTorusGeometryPrivate::init()
*/
/*!
- * \class Qt3DRender::QTorusGeometry
- * \inmodule Qt3DRender
- *
+ * \class Qt3DExtras::QTorusGeometry
+ * \inmodule Qt3DExtras
+ * \brief The QTorusGeometry class allows creation of a torus in 3D space.
+ * \since 5.7
+ * \ingroup geometries
* \inherits Qt3DRender::QGeometry
+ *
+ * The QTorusGeometry class is most commonly used internally by the QTorusMesh
+ * but can also be used in custom Qt3DRender::QGeometryRenderer subclasses.
*/
/*!
@@ -351,7 +360,7 @@ QTorusGeometry::~QTorusGeometry()
}
/*!
- * Updates vertices based on rings and slices.
+ * Updates vertices based on rings, slices, and radius properties.
*/
void QTorusGeometry::updateVertices()
{
@@ -364,7 +373,7 @@ void QTorusGeometry::updateVertices()
}
/*!
- * Updates indices based on rings and slices.
+ * Updates indices based on rings and slices properties.
*/
void QTorusGeometry::updateIndices()
{
diff --git a/src/extras/geometries/qtorusmesh.cpp b/src/extras/geometries/qtorusmesh.cpp
index e3b5b61d0..a77631b73 100644
--- a/src/extras/geometries/qtorusmesh.cpp
+++ b/src/extras/geometries/qtorusmesh.cpp
@@ -51,9 +51,9 @@ namespace Qt3DExtras {
/*!
* \qmltype TorusMesh
- * \instantiates Qt3DRender::QTorusMesh
- * \inqmlmodule Qt3D.Render
- * \brief A custom mesh.
+ * \instantiates Qt3DExtras::QTorusMesh
+ * \inqmlmodule Qt3D.Extras
+ * \brief A toroidal mesh.
*/
/*!
@@ -69,24 +69,24 @@ namespace Qt3DExtras {
*/
/*!
- * \qmlproperty float TorusMesh::radius
+ * \qmlproperty real TorusMesh::radius
*
* Holds the outer radius of the torus.
*/
/*!
- * \qmlproperty float TorusMesh::minorRadius
+ * \qmlproperty real TorusMesh::minorRadius
*
* Holds the inner radius of the torus.
*/
/*!
- * \class Qt3DRender::QTorusMesh
- * \inmodule Qt3DRender
+ * \class Qt3DExtras::QTorusMesh
+ * \inmodule Qt3DExtras
*
* \inherits Qt3DRender::QGeometryRenderer
*
- * \brief A custom mesh.
+ * \brief A toroidal mesh.
*/
/*!
diff --git a/src/plugins/sceneparsers/assimp/assimpio.cpp b/src/plugins/sceneparsers/assimp/assimpio.cpp
index 65fa7b538..cc40fd1f7 100644
--- a/src/plugins/sceneparsers/assimp/assimpio.cpp
+++ b/src/plugins/sceneparsers/assimp/assimpio.cpp
@@ -301,6 +301,7 @@ QStringList AssimpIO::assimpSupportedFormats()
formats.append(QStringLiteral("vta"));
formats.append(QStringLiteral("x"));
formats.append(QStringLiteral("xml"));
+ formats.append(QStringLiteral("fbx"));
return formats;
}
diff --git a/src/quick3d/quick3d/items/quick3dentity.cpp b/src/quick3d/quick3d/items/quick3dentity.cpp
index 4eac4400e..ebc92e843 100644
--- a/src/quick3d/quick3d/items/quick3dentity.cpp
+++ b/src/quick3d/quick3d/items/quick3dentity.cpp
@@ -47,20 +47,37 @@ namespace Quick {
/*!
\qmltype Entity
+ \instantiates Qt3DCore::QEntity
\inherits Node
\inqmlmodule Qt3D.Core
\since 5.5
-*/
+
+ \brief Entity is a \l Node subclass that can aggregate several
+ \l Component3D instances that will specify its behavior.
+
+ By itself a Entity is an empty shell. The behavior of a Entity
+ object is defined by the \l Component3D objects it references. Each Qt3D
+ backend aspect will be able to interpret and process an Entity by
+ recognizing which components it is made up of. One aspect may decide to only
+ process entities composed of a single \l Transform component whilst
+ another may focus on \l MouseHandler.
+
+ \sa Qt3D.Core::Component3D, Qt3D.Core::Transform
+ */
+
+/*!
+ \qmlproperty list<Component3D> Entity::components
+ Holds the list of \l Component3D instances, which define the behavior
+ of the entity.
+ \readonly
+ */
Quick3DEntity::Quick3DEntity(QObject *parent)
: QObject(parent)
{
}
-/*!
- \qmlproperty list<Component3D> Qt3DCore::Entity::components
- \readonly
-*/
+
QQmlListProperty<QComponent> Quick3DEntity::componentList()
{
return QQmlListProperty<Qt3DCore::QComponent>(this, 0,
diff --git a/src/render/backend/renderer.cpp b/src/render/backend/renderer.cpp
index ca60b8e33..7f53d3c99 100644
--- a/src/render/backend/renderer.cpp
+++ b/src/render/backend/renderer.cpp
@@ -919,6 +919,12 @@ Renderer::ViewSubmissionResultData Renderer::submitRenderViews(const QVector<Ren
frameElapsed = timer.elapsed();
}
+ // Bind lastBoundFBOId back. Needed also in threaded mode.
+ // lastBoundFBOId != m_graphicsContext->activeFBO() when the last FrameGraph leaf node/renderView
+ // contains RenderTargetSelector/RenderTarget
+ if (lastBoundFBOId != m_graphicsContext->activeFBO())
+ m_graphicsContext->bindFramebuffer(lastBoundFBOId);
+
// Reset state and call doneCurrent if the surface
// is valid and was actually activated
if (surface && m_graphicsContext->hasValidGLHelper()) {
diff --git a/src/render/frontend/qabstractfunctor.cpp b/src/render/frontend/qabstractfunctor.cpp
index f3367a2b5..817d06a27 100644
--- a/src/render/frontend/qabstractfunctor.cpp
+++ b/src/render/frontend/qabstractfunctor.cpp
@@ -43,8 +43,44 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
+/*!
+ \class Qt3DRender::QAbstractFunctor
+ \inmodule Qt3DRender
+ \since 5.7
+ \brief QAbstractFunctor is an abstract base class for all functors.
+
+ The QAbstractFunctor is used as a base class for all functors and data
+ generators in Qt3DRender module.
+
+ When user defines a new functor or generator, they need to implement the
+ \l QAbstractFunctor::id() method, which should be done using the \c {QT3D_FUNCTOR}
+ macro in the class definition.
+ */
+/*!
+ \fn qintptr QAbstractFunctor::id() const
+ */
+/*!
+ \macro QT3D_FUNCTOR(Class)
+ \relates Qt3DRender::QAbstractFunctor
+
+ This macro assigns functor id to the \a Class, which is used by QAbstractFunctor::functor_cast
+ to determine if the cast can be done.
+ */
+
+/*!
+ \fn const T *QAbstractFunctor::functor_cast(const QAbstractFunctor *other) const
+
+ This method is used to cast functor \a other to type T if the other is of
+ type T (or of subclass); otherwise returns 0. This method works similarly
+ to \l QObject::qobject_cast, except with functors derived from QAbstractFunctor.
+
+ \warning If T was not declared with \l QT3D_FUNCTOR macro, then the results are undefined.
+ */
+
+/*! Desctructor */
QAbstractFunctor::~QAbstractFunctor()
{
+
}
} // Qt3D
diff --git a/src/render/frontend/qcamera.cpp b/src/render/frontend/qcamera.cpp
index b28d3bbbb..7a1f133a8 100644
--- a/src/render/frontend/qcamera.cpp
+++ b/src/render/frontend/qcamera.cpp
@@ -78,6 +78,298 @@ QCameraPrivate::QCameraPrivate()
*/
/*!
+ * \enum Qt3DRender::QCamera::CameraTranslationOption
+ *
+ * This enum specifies how camera view center is translated
+ * \value TranslateViewCenter Translate the view center causing the view direction to remain the same
+ * \value DontTranslateViewCenter Don't translate the view center causing the view direction to change
+ */
+
+/*!
+ * \qmlmethod quaternion Qt3D.Render::Camera::tiltRotation(real angle)
+ *
+ * Returns the calculated tilt rotation in relation to the \a angle in degrees taken in
+ * to adjust the camera's tilt or up/down rotation on the X axis.
+ */
+
+/*!
+ * \qmlmethod quaternion Qt3D.Render::Camera::panRotation(real angle)
+ *
+ * Returns the calculated pan rotation in relation to the \a angle in degrees taken in
+ * to adjust the camera's pan or left/right rotation on the Y axis.
+ */
+
+/*!
+ * \qmlmethod quaternion Qt3D.Render::Camera::rollRotation(real angle)
+ *
+ * Returns the calculated roll rotation in relation to the \a angle in degrees taken in
+ * to adjust the camera's roll or lean left/right rotation on the Z axis.
+ */
+
+/*!
+ * \qmlmethod quaternion Qt3D.Render::Camera::rotation(real angle, vector3d axis)
+ *
+ * Returns the calculated rotation in relation to the \a angle in degrees and
+ * chosen \a axis taken in.
+ */
+
+/*!
+ * \qmlmethod void Qt3D.Render::Camera::translate(vector3d vLocal, enumeration option)
+ *
+ * Translates the camera's position and its view vector by \a vLocal in local coordinates.
+ * The \a option allows for toggling whether the view center should be translated.
+ * \list
+ * \li Camera.TranslateViewCenter
+ * \li Camera.DontTranslateViewCenter
+ * \endlist
+ * \sa Qt3DRender::QCamera::CameraTranslationOption
+ */
+
+/*!
+ * \qmlmethod void Qt3D.Render::Camera::translateWorld(vector3d vWorld, enumeration option)
+ *
+ * Translates the camera's position and its view vector by \a vWorld in world coordinates.
+ * The \a option allows for toggling whether the view center should be translated.
+ * \list
+ * \li Camera.TranslateViewCenter
+ * \li Camera.DontTranslateViewCenter
+ * \endlist
+ * \sa Qt3DRender::QCamera::CameraTranslationOption
+ */
+
+/*!
+ * \qmlmethod void Qt3D.Render::Camera::tilt(real angle)
+ *
+ * Adjusts the tilt angle of the camera by \a angle in degrees.
+ */
+
+/*!
+ * \qmlmethod void Qt3D.Render::Camera::pan(real angle)
+ *
+ * Adjusts the pan angle of the camera by \a angle in degrees.
+ */
+
+/*!
+ * \qmlmethod void Qt3D.Render::Camera::pan(real angle, vector3d axis)
+ *
+ * Adjusts the camera pan about view center by \a angle in degrees on \a axis.
+ */
+
+/*!
+ * \qmlmethod void Qt3D.Render::Camera::roll(real angle)
+ *
+ * Adjusts the camera roll by \a angle in degrees.
+ */
+
+/*!
+ * \qmlmethod void Qt3D.Render::Camera::tiltAboutViewCenter(real angle)
+ *
+ * Adjusts the camera tilt about view center by \a angle in degrees.
+ */
+
+/*!
+ * \qmlmethod void Qt3D.Render::Camera::panAboutViewCenter(real angle)
+ *
+ * Adjusts the camera pan about view center by \a angle in degrees.
+ */
+
+/*!
+ * \qmlmethod void Qt3D.Render::Camera::panAboutViewCenter(real angle, vector3d axis)
+ *
+ * Adjusts the camera pan about view center by \a angle in degrees on \a axis.
+ */
+
+/*!
+ * \qmlmethod void Qt3D.Render::Camera::rollAboutViewCenter(real angle)
+ *
+ * Adjusts the camera roll about view center by \a angle in degrees.
+ */
+
+/*!
+ * \qmlmethod void Qt3D.Render::Camera::rotate(quaternion q)
+ *
+ * Rotates the camera with the use of a Quaternion in \a q.
+ */
+
+/*!
+ * \qmlmethod void Qt3D.Render::Camera::rotateAboutViewCenter(quaternion q)
+ *
+ * Rotates the camera about the view center with the use of a Quaternion in \a q.
+ */
+
+/*!
+ * \qmlproperty enumeration Qt3D.Render::Camera::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 Qt3D.Render::Camera::nearPlane
+ * Holds the current camera near plane of the camera.
+ */
+
+/*!
+ * \qmlproperty real Qt3D.Render::Camera::farPlane
+ * Holds the current camera far plane of the camera.
+ */
+
+/*!
+ * \qmlproperty real Qt3D.Render::Camera::fieldOfView
+ * Holds the current field of view of the camera in degrees.
+ */
+
+/*!
+ * \qmlproperty real Qt3D.Render::Camera::aspectRatio
+ * Holds the current aspect ratio of the camera.
+ */
+
+/*!
+ *\qmlproperty real Qt3D.Render::Camera::left
+ * Holds the current left of the camera.
+ */
+
+/*!
+ * \qmlproperty real Qt3D.Render::Camera::right
+ * Holds the current right of the camera.
+ */
+
+/*!
+ * \qmlproperty real Qt3D.Render::Camera::bottom
+ * Holds the current bottom of the camera.
+ */
+
+/*!
+ * \qmlproperty real Qt3D.Render::Camera::top
+ * Holds the current top of the camera.
+ */
+
+/*!
+ * \qmlproperty matrix4x4 Qt3D.Render::Camera::projectionMatrix
+ * Holds the current projection matrix of the camera.
+ */
+
+
+/*!
+ * \qmlproperty vector3d Qt3D.Render::Camera::position
+ * Holds the current position of the camera.
+ */
+
+/*!
+ * \qmlproperty vector3d Qt3D.Render::Camera::upVector
+ * Holds the current up vector of the camera.
+ */
+
+/*!
+ * \qmlproperty vector3d Qt3D.Render::Camera::viewCenter
+ * Holds the current view center of the camera.
+ * \readonly
+ */
+
+/*!
+ * \qmlproperty vector3d Qt3D.Render::Camera::viewVector
+ * Holds the camera's view vector.
+ * \readonly
+ */
+
+/*!
+ * \qmlproperty matrix4x4 Qt3D.Render::Camera::viewMatrix
+ * Holds the camera's view matrix.
+ * \readonly
+ */
+
+/*!
+ * \property QCamera::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
+ */
+
+/*!
+ * \property QCamera::nearPlane
+ * Holds the current camera near plane.
+ */
+
+/*!
+ * \property QCamera::farPlane
+ * Holds the current camera far plane.
+ */
+
+/*!
+ * \property QCamera::fieldOfView
+ * Holds the current field of view in degrees.
+ */
+
+/*!
+ * \property QCamera::aspectRatio
+ * Holds the current aspect ratio.
+ */
+
+/*!
+ *\property QCamera::left
+ * Holds the current left of the camera.
+ */
+
+/*!
+ * \property QCamera::right
+ * Holds the current right of the camera.
+ */
+
+/*!
+ * \property QCamera::bottom
+ * Holds the current bottom of the camera.
+ */
+
+/*!
+ * \property QCamera::top
+ * Holds the current top of the camera.
+ */
+
+/*!
+ * \property QCamera::projectionMatrix
+ * Holds the current projection matrix of the camera.
+ */
+
+/*!
+ * \property QCamera::position
+ * Holds the camera's position.
+ */
+
+/*!
+ * \property QCamera::upVector
+ * Holds the camera's up vector.
+ */
+
+/*!
+ * \property QCamera::viewCenter
+ * Holds the camera's view center.
+ */
+
+/*!
+ * \property QCamera::viewVector
+ * Holds the camera's view vector.
+ */
+
+/*!
+ * \property QCamera::viewMatrix
+ * Holds the camera's view matrix.
+ */
+
+/*!
* Creates a new QCamera instance with the
* specified \a parent.
*/
@@ -202,8 +494,8 @@ void QCamera::translateWorld(const QVector3D &vWorld, CameraTranslationOption op
}
/*!
- * Returns the calculated tilt rotation in relation to the \a angle taken in to adjust the camera's
- * tilt or up/down rotation on the X axis.
+ * Returns the calculated tilt rotation in relation to the \a angle in degrees taken in
+ * to adjust the camera's tilt or up/down rotation on the X axis.
*/
QQuaternion QCamera::tiltRotation(float angle) const
{
@@ -213,8 +505,8 @@ QQuaternion QCamera::tiltRotation(float angle) const
}
/*!
- * Returns the calculated pan rotation in relation to the \a angle taken in to adjust the camera's
- * pan or left/right rotation on the Y axis.
+ * Returns the calculated pan rotation in relation to the \a angle in degrees taken in
+ * to adjust the camera's pan or left/right rotation on the Y axis.
*/
QQuaternion QCamera::panRotation(float angle) const
{
@@ -222,8 +514,8 @@ QQuaternion QCamera::panRotation(float angle) const
}
/*!
- * Returns the calculated roll rotation in relation to the \a angle taken in to adjust the camera's
- * roll or lean left/right rotation on the Z axis.
+ * Returns the calculated roll rotation in relation to the \a angle in degrees taken in
+ * to adjust the camera's roll or lean left/right rotation on the Z axis.
*/
QQuaternion QCamera::rollRotation(float angle) const
{
@@ -232,7 +524,8 @@ QQuaternion QCamera::rollRotation(float angle) const
}
/*!
- * Returns the calculated rotation in relation to the \a angle and chosen \a axis taken in.
+ * Returns the calculated rotation in relation to the \a angle in degrees and
+ * chosen \a axis taken in.
*/
QQuaternion QCamera::rotation(float angle, const QVector3D &axis) const
{
@@ -240,7 +533,7 @@ QQuaternion QCamera::rotation(float angle, const QVector3D &axis) const
}
/*!
- * Adjusts the tilt angle of the camera by \a angle.
+ * Adjusts the tilt angle of the camera by \a angle in degrees.
*/
void QCamera::tilt(float angle)
{
@@ -249,7 +542,7 @@ void QCamera::tilt(float angle)
}
/*!
- * Adjusts the pan angle of the camera by \a angle.
+ * Adjusts the pan angle of the camera by \a angle in degrees.
*/
void QCamera::pan(float angle)
{
@@ -258,7 +551,7 @@ void QCamera::pan(float angle)
}
/*!
- * Adjusts the pan angle of the camera by \a angle on a chosen \a axis.
+ * Adjusts the pan angle of the camera by \a angle in degrees on a chosen \a axis.
*/
void QCamera::pan(float angle, const QVector3D &axis)
{
@@ -267,7 +560,7 @@ void QCamera::pan(float angle, const QVector3D &axis)
}
/*!
- * Adjusts the camera roll by \a angle.
+ * Adjusts the camera roll by \a angle in degrees.
*/
void QCamera::roll(float angle)
{
@@ -276,7 +569,7 @@ void QCamera::roll(float angle)
}
/*!
- * Adjusts the camera tilt about view center by \a angle.
+ * Adjusts the camera tilt about view center by \a angle in degrees.
*/
void QCamera::tiltAboutViewCenter(float angle)
{
@@ -285,7 +578,7 @@ void QCamera::tiltAboutViewCenter(float angle)
}
/*!
- * Adjusts the camera pan about view center by \a angle.
+ * Adjusts the camera pan about view center by \a angle in degrees.
*/
void QCamera::panAboutViewCenter(float angle)
{
@@ -294,7 +587,7 @@ void QCamera::panAboutViewCenter(float angle)
}
/*!
- * Adjusts the camera pan about view center by \a angle on \a axis.
+ * Adjusts the camera pan about view center by \a angle in degrees on \a axis.
*/
void QCamera::panAboutViewCenter(float angle, const QVector3D &axis)
{
@@ -303,7 +596,7 @@ void QCamera::panAboutViewCenter(float angle, const QVector3D &axis)
}
/*!
- * Adjusts the camera roll about view center by \a angle.
+ * Adjusts the camera roll about view center by \a angle in degrees.
*/
void QCamera::rollAboutViewCenter(float angle)
{
@@ -344,14 +637,6 @@ void QCamera::setProjectionType(QCameraLens::ProjectionType type)
d->m_lens->setProjectionType(type);
}
-/*!
- * \qmlproperty enumeration Qt3DCore::Camera::projectionType
- *
- * Holds the type of the camera projection (orthogonal or perspective).
- *
- * \value CameraLens.OrthographicProjection Orthographic projection
- * \value CameraLens.PerspectiveProjection Perspective projection
- */
QCameraLens::ProjectionType QCamera::projectionType() const
{
Q_D(const QCamera);
@@ -367,10 +652,6 @@ void QCamera::setNearPlane(float nearPlane)
d->m_lens->setNearPlane(nearPlane);
}
-/*!
- * \qmlproperty float Qt3DCore::Camera::nearPlane
- * The current camera near plane.
- */
float QCamera::nearPlane() const
{
Q_D(const QCamera);
@@ -386,10 +667,6 @@ void QCamera::setFarPlane(float farPlane)
d->m_lens->setFarPlane(farPlane);
}
-/*!
- * \qmlproperty float Qt3DCore::Camera::farPlane
- * The current camera far plane.
- */
float QCamera::farPlane() const
{
Q_D(const QCamera);
@@ -397,7 +674,7 @@ float QCamera::farPlane() const
}
/*!
- * Sets the camera's field of view to \a fiedOfView.
+ * Sets the camera's field of view to \a fieldOfView in degrees.
*/
void QCamera::setFieldOfView(float fieldOfView)
{
@@ -405,10 +682,6 @@ void QCamera::setFieldOfView(float fieldOfView)
d->m_lens->setFieldOfView(fieldOfView);
}
-/*!
- * \qmlproperty float Qt3DCore::Camera::fieldOfView
- * The current field of view.
- */
float QCamera::fieldOfView() const
{
Q_D(const QCamera);
@@ -424,10 +697,6 @@ void QCamera::setAspectRatio(float aspectRatio)
d->m_lens->setAspectRatio(aspectRatio);
}
-/*!
- * \qmlproperty float Qt3DCore::Camera::aspectRatio
- * The current aspect ratio.
- */
float QCamera::aspectRatio() const
{
Q_D(const QCamera);
@@ -443,10 +712,6 @@ void QCamera::setLeft(float left)
d->m_lens->setLeft(left);
}
-/*!
- *\qmlproperty float Qt3DCore::Camera::left
- * The current left of the camera.
- */
float QCamera::left() const
{
Q_D(const QCamera);
@@ -462,10 +727,6 @@ void QCamera::setRight(float right)
d->m_lens->setRight(right);
}
-/*!
- * \qmlproperty float Qt3DCore::Camera::right
- * The current right of the camera.
- */
float QCamera::right() const
{
Q_D(const QCamera);
@@ -481,10 +742,6 @@ void QCamera::setBottom(float bottom)
d->m_lens->setBottom(bottom);
}
-/*!
- * \qmlproperty float Qt3DCore::Camera::bottom
- * The current bottom of the camera.
- */
float QCamera::bottom() const
{
Q_D(const QCamera);
@@ -500,10 +757,6 @@ void QCamera::setTop(float top)
d->m_lens->setTop(top);
}
-/*!
- * \qmlproperty float Qt3DCore::Camera::top
- * The current top of the camera.
- */
float QCamera::top() const
{
Q_D(const QCamera);
@@ -511,7 +764,7 @@ float QCamera::top() const
}
/*!
- * Sets the camera's projection matrix.
+ * Sets the camera's projection matrix to \a projectionMatrix.
*/
void QCamera::setProjectionMatrix(const QMatrix4x4 &projectionMatrix)
{
@@ -519,10 +772,6 @@ void QCamera::setProjectionMatrix(const QMatrix4x4 &projectionMatrix)
d->m_lens->setProjectionMatrix(projectionMatrix);
}
-/*!
- * \qmlproperty QMatri4x4 Qt3DCore::Camera:projectionMatrix
- * The current projection matrix of the camera.
- */
QMatrix4x4 QCamera::projectionMatrix() const
{
Q_D(const QCamera);
@@ -545,10 +794,6 @@ void QCamera::setPosition(const QVector3D &position)
}
}
-/*!
- * \qmlproperty vector3d Qt3DCore::Camera::position
- * The camera's position.
- */
QVector3D QCamera::position() const
{
Q_D(const QCamera);
@@ -569,10 +814,6 @@ void QCamera::setUpVector(const QVector3D &upVector)
}
}
-/*!
- * \qmlproperty vector3d Qt3DCore::Camera::upVector
- * The camera's up vector.
- */
QVector3D QCamera::upVector() const
{
Q_D(const QCamera);
@@ -595,30 +836,18 @@ void QCamera::setViewCenter(const QVector3D &viewCenter)
}
}
-/*!
- * \qmlproperty vector3d Qt3DCore::Camera::viewCenter
- * The camera's view center.
- */
QVector3D QCamera::viewCenter() const
{
Q_D(const QCamera);
return d->m_viewCenter;
}
-/*!
- * \qmlproperty vector3d Qt3DCore::Camera::viewVector
- * The camera's view vector.
- */
QVector3D QCamera::viewVector() const
{
Q_D(const QCamera);
return d->m_cameraToCenter;
}
-/*!
- * \qmlproperty matrix4x4 Qt3DCore::Camera::viewMatrix
- * The camera's view matrix.
- */
QMatrix4x4 QCamera::viewMatrix() const
{
Q_D(const QCamera);
diff --git a/src/render/graphicshelpers/graphicscontext.cpp b/src/render/graphicshelpers/graphicscontext.cpp
index acec8edf6..1512980d6 100644
--- a/src/render/graphicshelpers/graphicscontext.cpp
+++ b/src/render/graphicshelpers/graphicscontext.cpp
@@ -852,6 +852,11 @@ void GraphicsContext::alphaTest(GLenum mode1, GLenum mode2)
m_glHelper->alphaTest(mode1, mode2);
}
+void GraphicsContext::bindFramebuffer(GLuint fbo)
+{
+ m_glHelper->bindFrameBufferObject(fbo);
+}
+
void GraphicsContext::depthTest(GLenum mode)
{
m_glHelper->depthTest(mode);
diff --git a/src/render/graphicshelpers/graphicscontext_p.h b/src/render/graphicshelpers/graphicscontext_p.h
index d1b21a1d6..92fbac3ec 100644
--- a/src/render/graphicshelpers/graphicscontext_p.h
+++ b/src/render/graphicshelpers/graphicscontext_p.h
@@ -183,6 +183,7 @@ public:
// Wrapper methods
void alphaTest(GLenum mode1, GLenum mode2);
+ void bindFramebuffer(GLuint fbo);
void bindBufferBase(GLenum target, GLuint bindingIndex, GLuint buffer);
void bindFragOutputs(GLuint shader, const QHash<QString, int> &outputs);
void bindUniformBlock(GLuint programId, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
diff --git a/src/render/jobs/loadscenejob.cpp b/src/render/jobs/loadscenejob.cpp
index 3111e1ba3..79ac91d9a 100644
--- a/src/render/jobs/loadscenejob.cpp
+++ b/src/render/jobs/loadscenejob.cpp
@@ -60,6 +60,26 @@ LoadSceneJob::LoadSceneJob(const QUrl &source, Qt3DCore::QNodeId m_sceneComponen
SET_JOB_RUN_STAT_TYPE(this, JobTypes::LoadScene, 0);
}
+NodeManagers *LoadSceneJob::nodeManagers() const
+{
+ return m_managers;
+}
+
+QList<QSceneIOHandler *> LoadSceneJob::sceneIOHandlers() const
+{
+ return m_sceneIOHandlers;
+}
+
+QUrl LoadSceneJob::source() const
+{
+ return m_source;
+}
+
+Qt3DCore::QNodeId LoadSceneJob::sceneComponentId() const
+{
+ return m_sceneComponent;
+}
+
void LoadSceneJob::run()
{
// Iterate scene IO handlers until we find one that can handle this file type
diff --git a/src/render/jobs/loadscenejob_p.h b/src/render/jobs/loadscenejob_p.h
index bc122d705..0ed0d2c83 100644
--- a/src/render/jobs/loadscenejob_p.h
+++ b/src/render/jobs/loadscenejob_p.h
@@ -66,14 +66,18 @@ namespace Render {
class NodeManagers;
-class LoadSceneJob : public Qt3DCore::QAspectJob
+class Q_AUTOTEST_EXPORT LoadSceneJob : public Qt3DCore::QAspectJob
{
public:
explicit LoadSceneJob(const QUrl &source, Qt3DCore::QNodeId sceneComponent);
void setNodeManagers(NodeManagers *managers) { m_managers = managers; }
void setSceneIOHandlers(const QList<QSceneIOHandler *> sceneIOHandlers) { m_sceneIOHandlers = sceneIOHandlers; }
-protected:
+ NodeManagers *nodeManagers() const;
+ QList<QSceneIOHandler *> sceneIOHandlers() const;
+ QUrl source() const;
+ Qt3DCore::QNodeId sceneComponentId() const;
+
void run() Q_DECL_OVERRIDE;
private:
diff --git a/src/render/renderstates/qblendequation.cpp b/src/render/renderstates/qblendequation.cpp
index de999a19f..e48e83883 100644
--- a/src/render/renderstates/qblendequation.cpp
+++ b/src/render/renderstates/qblendequation.cpp
@@ -39,9 +39,10 @@
****************************************************************************/
/*!
- * \class QBlendEquation
+ * \class Qt3DRender::QBlendEquation
* \brief The QBlendEquation class specifies the equation used for both the RGB
* blend equation and the Alpha blend equation
+ * \inmodule Qt3DRender
* \since 5.7
* \ingroup renderstates
*
@@ -49,6 +50,19 @@
* already in the framebuffer.
*/
+/*!
+ \qmltype BlendEquation
+ \instantiates Qt3DRender::QBlendEquation
+ \inherits RenderState
+ \inqmlmodule Qt3D.Render
+ \since 5.5
+ \brief The BlendEquation class specifies the equation used for both the RGB
+ blend equation and the Alpha blend equation
+
+ The blend equation is used to determine how a new pixel is combined with a pixel
+ already in the framebuffer.
+*/
+
#include "qblendequation.h"
#include "qblendequation_p.h"
#include <Qt3DRender/private/qrenderstatecreatedchange_p.h>
@@ -70,17 +84,34 @@ QBlendEquation::~QBlendEquation()
{
}
+/*!
+ \enum Qt3DRender::QBlendEquation::BlendFunction
+
+ \value Add GL_FUNC_ADD
+ \value Subtract GL_FUNC_SUBTRACT
+ \value ReverseSubtract GL_FUNC_REVERSE_SUBTRACT
+ \value Min GL_MIN
+ \value Max GL_MAX
+*/
+
+/*!
+ \qmlproperty enumeration BlendEquation::blendFunction
+
+ Holds the blend function, which determines how source and destination colors are combined.
+ */
+
+/*!
+ \property QBlendEquation::blendFunction
+
+ Holds the blend function, which determines how source and destination colors are combined.
+ */
+
QBlendEquation::BlendFunction QBlendEquation::blendFunction() const
{
Q_D(const QBlendEquation);
return d->m_blendFunction;
}
-/*!
- * Sets the function used to decide how the source and destination colors are combined,
- * to \a blendFunction.
- * \param blendFunction
- */
void QBlendEquation::setBlendFunction(QBlendEquation::BlendFunction blendFunction)
{
Q_D(QBlendEquation);
diff --git a/src/render/renderstates/qblendequationarguments.cpp b/src/render/renderstates/qblendequationarguments.cpp
index cbb3ff886..58c048138 100644
--- a/src/render/renderstates/qblendequationarguments.cpp
+++ b/src/render/renderstates/qblendequationarguments.cpp
@@ -125,12 +125,12 @@ QBlendEquationArguments::QBlendEquationArguments(QBlendEquationArgumentsPrivate
*/
/*!
- \qmlproperty enumeration Qt3D.Render::BlendEquationArguments::sourceRgb
+ \qmlproperty enumeration BlendEquationArguments::sourceRgb
*/
/*!
- \property Qt3DRender::QBlendEquationArguments::sourceRgb
+ \property QBlendEquationArguments::sourceRgb
*/
QBlendEquationArguments::Blending QBlendEquationArguments::sourceRgb() const
@@ -152,12 +152,12 @@ void QBlendEquationArguments::setSourceRgb(QBlendEquationArguments::Blending sou
}
/*!
- \qmlproperty enumeration Qt3D.Render::BlendEquationArguments::destinationRgb
+ \qmlproperty enumeration BlendEquationArguments::destinationRgb
*/
/*!
- \property Qt3DRender::QBlendEquationArguments::destinationRgb
+ \property QBlendEquationArguments::destinationRgb
*/
QBlendEquationArguments::Blending QBlendEquationArguments::destinationRgb() const
@@ -179,12 +179,12 @@ void QBlendEquationArguments::setDestinationRgb(QBlendEquationArguments::Blendin
}
/*!
- \qmlproperty enumeration Qt3D.Render::BlendEquationArguments::sourceAlpha
+ \qmlproperty enumeration BlendEquationArguments::sourceAlpha
*/
/*!
- \property Qt3DRender::QBlendEquationArguments::sourceAlpha
+ \property QBlendEquationArguments::sourceAlpha
*/
QBlendEquationArguments::Blending QBlendEquationArguments::sourceAlpha() const
@@ -206,12 +206,12 @@ void QBlendEquationArguments::setSourceAlpha(QBlendEquationArguments::Blending s
}
/*!
- \qmlproperty enumeration Qt3D.Render::BlendEquationArguments::DestinationAlpha
+ \qmlproperty enumeration BlendEquationArguments::DestinationAlpha
*/
/*!
- \property Qt3DRender::QBlendEquationArguments::destinationAlpha
+ \property QBlendEquationArguments::destinationAlpha
*/
QBlendEquationArguments::Blending QBlendEquationArguments::destinationAlpha() const
@@ -232,12 +232,30 @@ void QBlendEquationArguments::setDestinationAlpha(QBlendEquationArguments::Blend
}
}
+/*!
+ \fn QBlendEquationArguments::sourceRgbaChanged(Blending sourceRgba)
+
+ Notify that both sourceRgb and sourceAlpha properties have changed to \a sourceRgba.
+*/
+/*!
+ \fn QBlendEquationArguments::destinationRgbaChanged(Blending destinationRgba)
+
+ Notify that both destinationRgb and destinationAlpha properties have changed to
+ \a destinationRgba.
+*/
+
+/*!
+ Change both sourceRgb and sourceAlpha properties to \a sourceRgba.
+*/
void QBlendEquationArguments::setSourceRgba(Blending sourceRgba)
{
setSourceRgb(sourceRgba);
setSourceAlpha(sourceRgba);
}
+/*!
+ Change both destinationRgb and destinationAlpha properties to \a destinationRgba.
+*/
void QBlendEquationArguments::setDestinationRgba(Blending destinationRgba)
{
setDestinationRgb(destinationRgba);
@@ -245,14 +263,14 @@ void QBlendEquationArguments::setDestinationRgba(Blending destinationRgba)
}
/*!
- \qmlproperty int Qt3D.Render::BlendEquationArguments::bufferIndex
+ \qmlproperty int BlendEquationArguments::bufferIndex
Specifies the index of the Draw Buffer that this BlendEquationArguments applies to.
If negative, this will apply to all Draw Buffers.
*/
/*!
- \property Qt3DRender::QBlendEquationArguments::bufferIndex
+ \property QBlendEquationArguments::bufferIndex
Specifies the index of the Draw Buffer that this BlendEquationArguments applies to.
If negative, this will apply to all Draw Buffers.
diff --git a/src/render/renderstates/qblendequationarguments.h b/src/render/renderstates/qblendequationarguments.h
index 8e2f86f6c..2f844b8cf 100644
--- a/src/render/renderstates/qblendequationarguments.h
+++ b/src/render/renderstates/qblendequationarguments.h
@@ -92,7 +92,6 @@ public:
Blending sourceAlpha() const;
Blending destinationAlpha() const;
int bufferIndex() const;
- bool specifiesAllDrawBuffers() const;
public Q_SLOTS:
void setSourceRgb(Blending sourceRgb);
diff --git a/src/render/renderstates/qpointsize.cpp b/src/render/renderstates/qpointsize.cpp
index 8aa2d7e0c..03c37bc4b 100644
--- a/src/render/renderstates/qpointsize.cpp
+++ b/src/render/renderstates/qpointsize.cpp
@@ -51,11 +51,36 @@ namespace Qt3DRender {
\brief Specifies the size of rasterized points. May either be set statically
or by shader programs.
- When using StaticValue, the value is set using glPointSize(), if available.
- When using Programmable, gl_PointSize must be set within shader programs,
- the value provided to this RenderState is ignored in that case.
+ When the sizeMode property is set to SizeMode::Fixed, the value is set
+ using glPointSize(), if available. When using SizeMode::Programmable,
+ gl_PointSize must be set within shader programs, the value provided to this
+ RenderState is ignored in that case.
*/
+/*!
+ \qmltype PointSize
+ \instantiates Qt3DRender::QPointSize
+ \inqmlmodule Qt3D.Render
+
+ \brief Specifies the size of rasterized points. May either be set statically
+ or by shader programs.
+
+ When the sizeMode property is set to SizeMode::Fixed, the value is set
+ using glPointSize(), if available. When using SizeMode::Programmable,
+ gl_PointSize must be set within shader programs, the value provided to this
+ RenderState is ignored in that case.
+ */
+
+/*!
+ \qmlproperty float Qt3D.Render::QPointSize::value
+ Specifies the point size value to be used.
+*/
+
+/*!
+ \qmlproperty QPointSize::SizeMode Qt3D.Render::QPointSize::sizeMode
+ Specifies the sizeMode to be used.
+*/
+
QPointSize::QPointSize(Qt3DCore::QNode *parent)
: QRenderState(*new QPointSizePrivate(SizeMode::Programmable, 0.f), parent)
{
diff --git a/src/render/texture/qabstracttextureimage.cpp b/src/render/texture/qabstracttextureimage.cpp
index d3694efc9..42e78ced6 100644
--- a/src/render/texture/qabstracttextureimage.cpp
+++ b/src/render/texture/qabstracttextureimage.cpp
@@ -48,6 +48,40 @@ using namespace Qt3DCore;
namespace Qt3DRender {
+/*!
+ \class Qt3DRender::QTextureImageDataGenerator
+ \inmodule Qt3DRender
+ \since 5.7
+ \brief Provides texture image data for QAbstractTextureImage
+
+ QTextureImageDataGenerator is a data provider for QAbstractTexture.
+ QTextureImageDataGenerator can be used to expand Qt3D with more ways to load
+ texture image data as well as support user-defined formats and formats Qt3D
+ does not natively support. The data is returned by the QTextureImageDataPtr
+ which contains the data that will be loaded to the texture.
+ QTextureImageDataGenerator is executed by Aspect jobs in the backend.
+ */
+/*!
+ \typedef Qt3DRender::QTextureImageDataPtr
+ \relates Qt3DRender::QTextureImageDataGenerator
+
+ Shared pointer to \l QTextureImageData.
+*/
+
+/*!
+ \fn QTextureImageDataPtr QTextureImageDataGenerator::operator()()
+
+ Implement the method to return the texture image data.
+*/
+
+/*!
+ \fn bool QTextureImageDataGenerator::operator ==(const QTextureImageDataGenerator &other) const
+
+ Implement the method to compare this texture data generator to \a other.
+ The operator is used to check if the \l QAbstractTextureImage needs to reload
+ the \l QTextureImageData.
+*/
+
QAbstractTextureImagePrivate::QAbstractTextureImagePrivate()
: QNodePrivate(),
m_mipLevel(0),
@@ -90,6 +124,13 @@ QAbstractTextureImagePrivate::~QAbstractTextureImagePrivate()
*/
/*!
+ \fn QTextureImageDataGeneratorPtr QAbstractTextureImage::dataGenerator() const
+
+ Implement this method to return the \l QTextureImageDataGeneratorPtr, which will
+ provide the data for the texture image.
+*/
+
+/*!
Constructs a new QAbstractTextureImage instance with \a parent as parent.
*/
QAbstractTextureImage::QAbstractTextureImage(QNode *parent)
diff --git a/src/render/texture/qtextureimage.cpp b/src/render/texture/qtextureimage.cpp
index dab92082a..dbe0ff05c 100644
--- a/src/render/texture/qtextureimage.cpp
+++ b/src/render/texture/qtextureimage.cpp
@@ -71,6 +71,59 @@ namespace Qt3DRender {
*/
/*!
+ \enum QTextureImage::Status
+
+ This enumeration specifies the status values for texture image loading.
+
+ \value None The texture image loading has not been started yet.
+ \value Loading The texture image loading has started, but not finised.
+ \value Ready The texture image loading has finished.
+ \value Error The texture image loading confronted an error.
+*/
+
+/*!
+ \qmlproperty url TextureImage::source
+
+ This property holds the source url from which data for the texture
+ image will be loaded.
+*/
+
+/*!
+ \qmlproperty enumeration TextureImage::status
+
+ This property holds the status of the texture image loading.
+
+ \list
+ \li TextureImage.None
+ \li TextureImage.Loading
+ \li TextureImage.Ready
+ \li TextureImage.Error
+ \endlist
+ \readonly
+*/
+
+/*!
+ \property QTextureImage::source
+
+ This property holds the source url from which data for the texture
+ image will be loaded.
+*/
+
+/*!
+ \property QTextureImage::status
+
+ This property holds the status of the texture image loading.
+
+ \list
+ \li TextureImage.None
+ \li TextureImage.Loading
+ \li TextureImage.Ready
+ \li TextureImage.Error
+ \endlist
+ \readonly
+*/
+
+/*!
Constructs a new Qt3DRender::QTextureImage instance with \a parent as parent.
*/
QTextureImage::QTextureImage(QNode *parent)
@@ -93,7 +146,7 @@ QUrl QTextureImage::source() const
}
/*!
- * \return the current status.
+ \return the current status.
*/
QTextureImage::Status QTextureImage::status() const
{
@@ -102,20 +155,6 @@ QTextureImage::Status QTextureImage::status() const
}
/*!
- \property Qt3DRender::QTextureImage::source
-
- This property holds the source url from which data for the texture
- image will be loaded.
-*/
-
-/*!
- \qmlproperty url Qt3D.Render::TextureImage::source
-
- This property holds the source url from which data for the texture
- image will be loaded.
-*/
-
-/*!
Sets the source url of the texture image to \a source.
\note This triggers a call to update()
*/
@@ -130,8 +169,8 @@ void QTextureImage::setSource(const QUrl &source)
}
/*!
- * Sets the status to \a status.
- * \param status
+ Sets the status to \a status.
+ \param status
*/
void QTextureImage::setStatus(Status status)
{
@@ -152,8 +191,8 @@ QTextureImageDataGeneratorPtr QTextureImage::dataGenerator() const
}
/*!
- * Sets the scene change event to \a change.
- * \param change
+ Sets the scene change event to \a change.
+ \param change
*/
void QTextureImage::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change)
{
@@ -164,8 +203,8 @@ void QTextureImage::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change)
}
/*!
- * The constructor creats a new QImageTextureDataFunctor::QImageTextureDataFunctor
- * instance with the specified \a url.
+ The constructor creates a new QImageTextureDataFunctor::QImageTextureDataFunctor
+ instance with the specified \a url.
*/
QImageTextureDataFunctor::QImageTextureDataFunctor(const QUrl &url)
: QTextureImageDataGenerator()
diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro
index 6aa706023..5b17f18a2 100644
--- a/tests/manual/manual.pro
+++ b/tests/manual/manual.pro
@@ -9,6 +9,8 @@ SUBDIRS += \
component-changes \
custom-mesh-cpp \
custom-mesh-qml \
+ custom-mesh-update-data-cpp \
+ custom-mesh-update-data-qml \
cylinder-cpp \
cylinder-qml \
deferred-renderer-cpp \
@@ -20,6 +22,7 @@ SUBDIRS += \
keyboardinput-qml \
loader-qml \
mouseinput-qml \
+ multiplewindows-qml \
picking-qml \
plasma \
scene3d-loader \
@@ -28,9 +31,7 @@ SUBDIRS += \
tessellation-modes \
transforms-qml \
transparency-qml \
- transparency-qml-scene3d \
- custom-mesh-update-data-cpp \
- custom-mesh-update-data-qml
+ transparency-qml-scene3d
qtHaveModule(widgets): {
SUBDIRS += \
diff --git a/tests/manual/multiplewindows-qml/Scene.qml b/tests/manual/multiplewindows-qml/Scene.qml
new file mode 100644
index 000000000..06107667d
--- /dev/null
+++ b/tests/manual/multiplewindows-qml/Scene.qml
@@ -0,0 +1,152 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** 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.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.2 as QQ2
+import Qt3D.Core 2.0
+import Qt3D.Render 2.0
+import Qt3D.Input 2.0
+import Qt3D.Extras 2.0
+
+Entity {
+ id: sceneRoot
+
+ property alias view1: renderer.window
+ property alias view2: renderer2.window
+
+ Camera {
+ id: camera
+ projectionType: CameraLens.PerspectiveProjection
+ fieldOfView: 45
+ aspectRatio: 16/9
+ nearPlane : 0.1
+ farPlane : 1000.0
+ position: Qt.vector3d( 0.0, 0.0, -40.0 )
+ upVector: Qt.vector3d( 0.0, 1.0, 0.0 )
+ viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 )
+ }
+
+ OrbitCameraController {
+ camera: camera
+ }
+
+ components: [
+ RenderSettings {
+ activeFrameGraph: TechniqueFilter {
+ ForwardRenderer {
+ id: renderer
+ clearColor: Qt.rgba(0, 0.5, 1, 1)
+ camera: camera
+ }
+ ForwardRenderer {
+ id: renderer2
+ clearColor: Qt.rgba(0, 0.5, 1, 1)
+ camera: camera
+ }
+ }
+ },
+ // Event Source will be set by the Qt3DQuickWindow
+ InputSettings { }
+ ]
+
+ PhongMaterial {
+ id: material
+ }
+
+ TorusMesh {
+ id: torusMesh
+ radius: 5
+ minorRadius: 1
+ rings: 100
+ slices: 20
+ }
+
+ Transform {
+ id: torusTransform
+ scale3D: Qt.vector3d(1.5, 1, 0.5)
+ rotation: fromAxisAndAngle(Qt.vector3d(1, 0, 0), 45)
+ }
+
+ Entity {
+ id: torusEntity
+ components: [ torusMesh, material, torusTransform ]
+ }
+
+ SphereMesh {
+ id: sphereMesh
+ radius: 3
+ }
+
+ Transform {
+ id: sphereTransform
+ property real userAngle: 0.0
+ matrix: {
+ var m = Qt.matrix4x4();
+ m.rotate(userAngle, Qt.vector3d(0, 1, 0));
+ m.translate(Qt.vector3d(20, 0, 0));
+ return m;
+ }
+ }
+
+ QQ2.NumberAnimation {
+ target: sphereTransform
+ property: "userAngle"
+ duration: 10000
+ from: 0
+ to: 360
+
+ loops: QQ2.Animation.Infinite
+ running: true
+ }
+
+ Entity {
+ id: sphereEntity
+ components: [ sphereMesh, material, sphereTransform ]
+ }
+}
diff --git a/tests/manual/multiplewindows-qml/main.cpp b/tests/manual/multiplewindows-qml/main.cpp
new file mode 100644
index 000000000..3b9480828
--- /dev/null
+++ b/tests/manual/multiplewindows-qml/main.cpp
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** 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:BSD$
+** 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.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <Qt3DQuickExtras/qt3dquickwindow.h>
+#include <Qt3DQuick/QQmlAspectEngine>
+#include <QQmlEngine>
+#include <QQmlContext>
+#include <QGuiApplication>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+ Qt3DExtras::Quick::Qt3DQuickWindow view;
+ view.setWidth(600);
+ view.setHeight(600);
+ view.engine()->qmlEngine()->rootContext()->setContextProperty("_view", &view);
+ view.setSource(QUrl(QStringLiteral("qrc:/main.qml")));
+ view.show();
+
+ return app.exec();
+}
diff --git a/tests/manual/multiplewindows-qml/main.qml b/tests/manual/multiplewindows-qml/main.qml
new file mode 100644
index 000000000..4c6c4b740
--- /dev/null
+++ b/tests/manual/multiplewindows-qml/main.qml
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** 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:BSD$
+** 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.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.7
+import QtQuick.Window 2.2 as QQW
+
+import Qt3D.Core 2.0
+import Qt3D.Render 2.0
+import Qt3D.Input 2.0
+import Qt3D.Extras 2.0
+import QtQuick.Scene3D 2.0
+
+Entity {
+ id: rootItem
+
+ QQW.Window {
+ id: window2
+ title: "window2"
+ visible: true
+ width: 600
+ height: 600
+ }
+
+ Scene {
+ id: scene
+ view1: _view
+ view2: window2
+ Component.onCompleted: scene.view1 = _view
+ }
+}
diff --git a/tests/manual/multiplewindows-qml/multiplewindows-qml.pro b/tests/manual/multiplewindows-qml/multiplewindows-qml.pro
new file mode 100644
index 000000000..1b899fc8f
--- /dev/null
+++ b/tests/manual/multiplewindows-qml/multiplewindows-qml.pro
@@ -0,0 +1,16 @@
+!include( ../manual.pri ) {
+ error( "Couldn't find the manual.pri file!" )
+}
+
+TEMPLATE = app
+
+QT += 3dcore 3drender 3dinput 3dquick qml quick 3dquickextras
+
+CONFIG += c++11
+
+SOURCES += main.cpp
+
+RESOURCES += qml.qrc
+
+DISTFILES += \
+ Scene.qml
diff --git a/tests/manual/multiplewindows-qml/qml.qrc b/tests/manual/multiplewindows-qml/qml.qrc
new file mode 100644
index 000000000..72868031a
--- /dev/null
+++ b/tests/manual/multiplewindows-qml/qml.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/">
+ <file>main.qml</file>
+ <file>Scene.qml</file>
+ </qresource>
+</RCC>