summaryrefslogtreecommitdiffstats
path: root/src/core/doc
diff options
context:
space:
mode:
authorVenugopal Shivashankar <venugopal.shivashankar@digia.com>2015-10-27 12:17:53 +0100
committerTopi Reiniƶ <topi.reinio@digia.com>2015-10-28 13:19:51 +0000
commit09ba2f8b9c360ad4d3cf8ebb04fbfc9c1c57cbe7 (patch)
tree07817ea591e07878b82b1708ea4bf5ae1707ed71 /src/core/doc
parentf108a1a68adad19ab99bb9a523c2d7cf6c697b52 (diff)
Doc: Move the doc artifacts outside of the submodule directory
The qdocconf now lives in 'src/doc' because the documentation project defined by it covers the whole Qt 3D module. This change enables qmake to use 'qt3d' as the output directory for doc make targets. The new 'doc' directory also includes the relevant images, snippets, and the qdoc files. Change-Id: Ibc6d0912f8b1e665767e97630b3e5509e10c5710 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'src/core/doc')
-rw-r--r--src/core/doc/images/Space-invaders.jpgbin40836 -> 0 bytes
-rw-r--r--src/core/doc/images/circularbuffer-1.pngbin1915 -> 0 bytes
-rw-r--r--src/core/doc/images/circularbuffer-2.pngbin2106 -> 0 bytes
-rw-r--r--src/core/doc/images/circularbuffer-3.pngbin2204 -> 0 bytes
-rw-r--r--src/core/doc/images/ecs-1.pngbin11162 -> 0 bytes
-rw-r--r--src/core/doc/images/ecs-2.pngbin16250 -> 0 bytes
-rw-r--r--src/core/doc/qt3d.qdocconf83
-rw-r--r--src/core/doc/src/qt3d-index.qdoc111
-rw-r--r--src/core/doc/src/qt3d-module.qdoc130
-rw-r--r--src/core/doc/src/qt3d-overview.qdoc381
-rw-r--r--src/core/doc/src/qt3dinput-module.qdoc75
-rw-r--r--src/core/doc/src/snippets/code/src_core_qcircularbuffer.cpp230
12 files changed, 0 insertions, 1010 deletions
diff --git a/src/core/doc/images/Space-invaders.jpg b/src/core/doc/images/Space-invaders.jpg
deleted file mode 100644
index feea250bb..000000000
--- a/src/core/doc/images/Space-invaders.jpg
+++ /dev/null
Binary files differ
diff --git a/src/core/doc/images/circularbuffer-1.png b/src/core/doc/images/circularbuffer-1.png
deleted file mode 100644
index f391dfef7..000000000
--- a/src/core/doc/images/circularbuffer-1.png
+++ /dev/null
Binary files differ
diff --git a/src/core/doc/images/circularbuffer-2.png b/src/core/doc/images/circularbuffer-2.png
deleted file mode 100644
index 865cc1efb..000000000
--- a/src/core/doc/images/circularbuffer-2.png
+++ /dev/null
Binary files differ
diff --git a/src/core/doc/images/circularbuffer-3.png b/src/core/doc/images/circularbuffer-3.png
deleted file mode 100644
index a0e56727a..000000000
--- a/src/core/doc/images/circularbuffer-3.png
+++ /dev/null
Binary files differ
diff --git a/src/core/doc/images/ecs-1.png b/src/core/doc/images/ecs-1.png
deleted file mode 100644
index 6ea006f00..000000000
--- a/src/core/doc/images/ecs-1.png
+++ /dev/null
Binary files differ
diff --git a/src/core/doc/images/ecs-2.png b/src/core/doc/images/ecs-2.png
deleted file mode 100644
index 749195eaa..000000000
--- a/src/core/doc/images/ecs-2.png
+++ /dev/null
Binary files differ
diff --git a/src/core/doc/qt3d.qdocconf b/src/core/doc/qt3d.qdocconf
deleted file mode 100644
index d58373c27..000000000
--- a/src/core/doc/qt3d.qdocconf
+++ /dev/null
@@ -1,83 +0,0 @@
-include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
-
-project = Qt3D
-description = Qt 3D Reference Documentation
-version = $QT_VERSION
-
-examplesinstallpath = qt3d/qt3d
-
-qhp.projects = Qt3D
-
-qhp.Qt3D.file = qt3d.qhp
-qhp.Qt3D.namespace = org.qt-project.qt3d.$QT_VERSION_TAG
-qhp.Qt3D.virtualFolder = qt3d
-qhp.Qt3D.indexTitle = Qt 3D
-qhp.Qt3D.indexRoot =
-
-qhp.Qt3D.filterAttributes = qt3d $QT_VERSION qtrefdoc
-qhp.Qt3D.customFilters.Qt.name = Qt3D $QT_VERSION
-qhp.Qt3D.customFilters.Qt.filterAttributes = qt3d $QT_VERSION
-
-qhp.Qt3D.subprojects = classes qmltypes
-
-qhp.Qt3D.subprojects.classes.title = C++ Classes
-qhp.Qt3D.subprojects.classes.indexTitle = Qt 3D C++ Classes
-qhp.Qt3D.subprojects.classes.selectors = class fake:headerfile
-qhp.Qt3D.subprojects.classes.sortPages = true
-
-qhp.Qt3D.subprojects.qmltypes.title = QML Types
-qhp.Qt3D.subprojects.qmltypes.indexTitle = Qt 3D QML Types
-qhp.Qt3D.subprojects.qmltypes.selectors = qmlclass
-qhp.Qt3D.subprojects.qmltypes.sortPages = true
-
-tagfile = qt3d.tags
-
-depends += qtcore qtqml qtquick qtdoc
-
-headerdirs += .. \
- ../../render \
- ../../collision \
- ../../logic \
- ../../plugins \
- ../../quick3d/quick3d \
- ../../input
-
-
-sourcedirs += .. \
- ../../render \
- ../../collision \
- ../../logic \
- ../../plugins \
- ../../quick3d/quick3d \
- ../../input
-
-exampledirs += ../../../examples/qt3d \
- src/snippets
-
-examplesinstallpath = qt3d
-
-examples.fileextensions += "*.fraq *.geom *.vert"
-examples.imageextensions += "*.png"
-
-#excludedirs +=
-
-imagedirs += images \
- ../../render/doc/images \
- ../../../examples/qt3d/shadow-map-qml/doc/images \
- ../../../examples/qt3d/basicshapes-cpp/doc/images \
- ../../../examples/qt3d/planets-qml/doc/images \
- ../../../examples/qt3d/wireframe/doc/images
-
-Cpp.ignoretokens += QT3DCORE_PRIVATE_EXPORT \
- QT3DINPUTSHARED_EXPORT \
- QT3DCORESHARED_EXPORT \
- QT3DLOGIC_PRIVATE_EXPORT \
- QT3DLOGICSHARED_EXPORT \
- QT3DRENDERERSHARED_EXPORT \
- QT3DRENDERERSHARED_PRIVATE_EXPORT
-
-Cpp.ignoredirectives += Q_DECLARE_LOGGING_CATEGORY
-
-navigation.landingpage = "Qt 3D"
-navigation.cppclassespage = "Qt 3D C++ Classes"
-navigation.qmltypespage = "Qt 3D QML Types"
diff --git a/src/core/doc/src/qt3d-index.qdoc b/src/core/doc/src/qt3d-index.qdoc
deleted file mode 100644
index db8785436..000000000
--- a/src/core/doc/src/qt3d-index.qdoc
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://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.LGPLv3 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.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 later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page qt3d-index.html
- \title Qt 3D
-
- \e Qt3D provides functionality for near-realtime simulation systems
- with support for 2D and 3D rendering in both Qt C++ and Qt Quick
- applications.
-
- The functionality in Qt3D is divided into the following C++ modules:
-
- \annotatedlist qt3d-modules
-
- Classes, types and functions are declared under the \l [CPP] {Qt3D} namespace.
-
- For Qt Quick applications, Qt3D provides the following QML modules:
-
- \annotatedlist qt3d-qmlmodules
-
- \section1 Getting Started
-
- For a C++ application that performs 2D or 3D rendering, collision
- detection, and also handle user input, add the following line to its
- \l qmake \c .pro file:
-
- \badcode
- QT += 3dcore 3drender 3dinput 3dcollision 3dlogic
- \endcode
-
- To include the definitions of the modules' classes, use the following
- directives:
-
- \badcode
- #include <Qt3DCore>
- #include <Qt3DRender>
- #include <Qt3DInput>
- #include <Qt3DCollision>
- #include <Qt3DLogic>
- \endcode
-
- A Qt Quick application requires also additional dependencies:
-
- \badcode
- QT += 3dcore 3drenderer 3dinput 3dcollision qml quick 3dquick
- \endcode
-
- \section1 Overview
-
- The high level design and motivation for Qt3D is described in the \l {Qt3D
- Overview}. The Qt3D Renderer aspect offers support for data-driven
- configuration as described in \l {Qt3D Renderer Framegraph}.
-
- \section1 Reference
- \list
- \li \l {Qt3D Overview}
- \li \l {Qt 3D C++ Classes}
- \li \l {Qt 3D QML Types}
- \li \l {Qt3D Examples}
- \endlist
-
- \section1 Qt3D Platform Support
-
- In this Technology Preview Qt3D has the following support for platforms:
-
- \list
- \li Microsoft Windows (win32) - Supported
- \li Linux X11 - Supported
- \li OS X - Supported although there may be some retina scaling issues
- \li Android - Supported
- \li Embedded Linux - Supported
- \li iOS - Not supported yet (coming in Qt 5.6)
- \li WinRT - Not supported yet
- \li Windows CE - Compiles but not tested
- \endlist
-*/
diff --git a/src/core/doc/src/qt3d-module.qdoc b/src/core/doc/src/qt3d-module.qdoc
deleted file mode 100644
index bc9042b46..000000000
--- a/src/core/doc/src/qt3d-module.qdoc
+++ /dev/null
@@ -1,130 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://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.LGPLv3 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.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 later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \module Qt3DCore
- \title Qt 3D Core C++ Classes
- \brief The Qt 3D module contains functionality to support near-realtime simulation systems.
-
- \ingroup modules
- \ingroup qt3d-modules
- \qtvariable 3dcore
-
- The Qt 3D module provides the foundations and core types used for near-realtime
- simulations built on the Qt 3D framework.
-*/
-
-/*!
- \page qt3d-cpp.html
- \title Qt 3D C++ Classes
- \brief The Qt 3D module contains functionality to support near-realtime simulation systems.
-
- The Qt 3D module provides the foundations and core types used for near-realtime
- simulations built on the Qt 3D framework.
-
- \section1 Namespaces
- \annotatedlist qt3d-namespaces
-
- \section1 Classes
-
- \section2 Qt 3D Core Module
- \generatelist {classesbymodule Qt3DCore}
-
- \section2 Qt 3D Collision Module
- \generatelist {classesbymodule Qt3DCollision}
-
- \section2 Qt 3D Input Module
- \generatelist {classesbymodule Qt3DInput}
-
- \section2 Qt 3D Logic Module
- \generatelist {classesbymodule Qt3DLogic}
-
- \section2 Qt 3D Render Module
- \generatelist {classesbymodule Qt3DRender}
-*/
-
-/*!
- \namespace Qt3DCore
- \inmodule Qt3DCore
- \ingroup qt3d-namespaces
-
- \brief Contains classes that are the foundation for Qt 3D simulation
- framework, as well as classes that provide the ability to render using the
- Qt 3D framework.
-*/
-
-/*!
- \qmlmodule Qt3D.Core 2.0
- \title Qt 3D QML Types
- \ingroup qmlmodules
- \ingroup qt3d-qmlmodules
-
- \brief Provides core Qt 3D QML types.
-
- To import and use the module's QML types, use the following statement:
-
- \badcode
- import Qt3D.Core 2.0
- \endcode
-
- For collision detection, renderer, and input-related QML types, use the
- following import statements:
-
- \badcode
- import Qt3D.Collision 2.0
- import Qt3D.Render 2.0
- import Qt3D.Input 2.0
- import Qt3D.Logic 2.0
- \endcode
-
- \section1 QML Types
-
- \section2 Qt 3D Core Module
- \generatelist {qmltypesbymodule Qt3D}
-
- \section2 Qt 3D Collision Module
- \generatelist {qmltypesbymodule Qt3D.Collision}
-
- \section2 Qt 3D Input Module
- \generatelist {qmltypesbymodule Qt3D.Input}
-
- \section2 Qt 3D Logic Module
- \generatelist {qmltypesbymodule Qt3D.Logic}
-
- \section2 Qt 3D Render Module
- \generatelist {qmltypesbymodule Qt3D.Render}
- \noautolist
-*/
diff --git a/src/core/doc/src/qt3d-overview.qdoc b/src/core/doc/src/qt3d-overview.qdoc
deleted file mode 100644
index 133f6fd14..000000000
--- a/src/core/doc/src/qt3d-overview.qdoc
+++ /dev/null
@@ -1,381 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://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.LGPLv3 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.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 later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page qt3d-overview.html
- \title Qt3D Overview
-
- \brief Qt3D provides C++ and QML APIs to incorporate 3D content into Qt
- applications.
-
- Qt3D provides a fully configurable renderer that enables developers to
- quickly implement any rendering pipeline that they need. Further, Qt3D
- provides a generic framework for near-realtime simulations beyond rendering.
-
- Qt3D is cleanly separated into a core and any number of \e aspects that can
- implement any functionality they wish. The aspects interact with
- \e components and \e entities to provide some slice of functionality.
- Examples of aspects include physics, audio, collision, artificial
- intelligence (AI), and path finding.
-
- \section1 Basic 3D Features
-
- Qt3D is a 3D framework that enables the drawing of 3D shapes and moving
- them around, as well as moving the camera. It supports the following basic
- features:
-
- \list
- \li 2D and 3D rendering for C++ and Qt Quick applications
- \li Meshes
- \li \l {Materials}
- \li \l {Shaders}
- \li \l {Shadow Mapping}{Shadow mapping}
- \li Ambient occlusion
- \li High dynamic range
- \li Deferred rendering
- \li Multitexturing
- \li \l {Instanced Rendering}{Instanced rendering}
- \li \l {Uniform Buffer Objects}
- \endlist
-
- \section2 Materials
-
- Qt3D has a robust and very flexible material system that allows multiple
- levels of customization. It caters for different rendering approaches on
- different platforms or OpenGL versions, enables multiple rendering passes
- with different state sets, provides mechanisms for overriding of parameters
- at different levels, and allows easy switching of shaders. All this from C++
- or using QML property bindings.
-
- The properties of a \l Material type can easily be mapped through to uniform
- variables in a GLSL shader program that is itself specified in the
- referenced effect property.
-
- For examples of using materials, see the \l {Qt3D: Materials C++ Example}
- and \l {Qt3D: Materials QML Example}.
-
- \section2 Shaders
-
- Qt3D supports all of the OpenGL programmable rendering pipeline stages:
- vertex, tessellation control, tessellation evaluation, geometry, and
- fragment shaders. Compute shaders are planned for a future release.
-
- For examples of using shaders, see the Simple Shaders QML Example,
- \l {Qt3D: Tessellation Modes QML Example},
- \l {Qt3D: Shadow Map QML Example}, \l{Qt3D: Wireframe QML Example}, and
- \l {Qt3D: Wave QML Example}.
-
- \section2 Shadow Mapping
-
- Shadows are not directly supported by OpenGL, but there are countless
- techniques that can be employed to generate them. Shadow mapping is simple
- to use for generating good-looking shadows, while having a very small
- performance cost.
-
- Shadow mapping is typically implemented using a two pass rendering. In the
- first pass, the shadow information is generated. In the second pass, the
- scene is generated using a particular rendering technique, while at the
- same time using the information gathered in the first pass to draw the
- shadows.
-
- The idea behind shadow mapping is that only the closest fragments to the
- light are lit. Fragments \e behind other fragments are occluded, and
- therefore in shadow.
-
- Therefore, in the first pass, the scene is drawn from the point of view of
- the light. The information that is stored is simply the distance of the
- closest fragment in this \e {light space}. In OpenGL terms, this corresponds
- to having a Framebuffer Object, or FBO, with a depth texture attached to it.
- In fact, the \e {distance from the eye} is the definition of the depth,
- and the default depth testing done by OpenGL will actually store only the
- depth for the closest fragment.
-
- A color texture attachment is not even needed, because there is no need to
- shade fragments, only to calculate their depth.
-
- The following image displays a scene with a self-shadowed plane and trefoil
- knot:
-
- \image shadowmapping-qt3d.png
-
- The following image shows an exaggerated shadow map texture of the scene:
-
- \image shadowmapping-depth.png
-
- The image indicates the depth stored when rendering the scene from the light
- point of view. Darker colors represent a shallow depth (that is, closer to
- the camera). In this scene, the light is placed somewhere above the objects
- in the scene, on the right side with respect to the main camera (compare
- this with the first screenshot). This matches with the fact that the toy
- plane is closer to the camera than the other objects.
-
- Once the shadow map has been generated, the second rendering pass is done.
- In this second pass, rendering is done using the normal scene's camera. Any
- effect can be used here, such as Phong shading. It is important that the
- shadow map algorithm is applied in the fragment shader. That is, the
- fragment that is closest to the light is drawn lit, whereas the other
- fragments are drawn in shadow.
-
- The shadow map generated in the first pass provides the necessary
- information about the distance of fragments to light. It then suffices to
- remap the fragment in light space, thereby calculating its depth from the
- light point of view, as well as where its coordinates are on the shadow map
- texture. The shadow map texture can then be sampled at the given coordinates
- and the fragment's depth can be compared with the result of the sampling. If
- the fragment is further away, then it is in shadow; otherwise it is lit.
-
- For example code, see the \l {Qt3D: Shadow Map QML Example}.
-
- \section2 Instanced Rendering
-
- \e Instancing is a way of getting the GPU to draw many copies (instances) of
- a base object that varies in some way for each copy. Often, in position,
- orientation, color, material properties, scale, and so on. Qt3D provides an
- API similar to the Qt Quick \l Repeater element. In this case, the delegate
- is the base object and the model provides the per-instance data. So whereas
- an entity with a \l Mesh component attached eventually gets transformed into
- a call to glDrawElements, an entity with a instanced component will be
- translated into a call to glDrawElementsInstanced.
-
- Instanced rendering is planned for a future release.
-
- \section2 Uniform Buffer Objects
-
- A Uniform Buffer Object (UBO) can be bound to OpenGL shader programs to make
- large amounts of data readily available. Typical use cases for UBOs are for
- sets of material or lighting parameters.
-
- \section1 Configurable Renderer
-
- To combine support for both C++ and QML APIs with having a fully
- configurable renderer, the concept of a \e framegraph was introduced. While
- a \e scenegraph is a data-driven description of \e what to render, a \l
- {Qt3D Renderer Framegraph}{framegraph} is a data-driven description of \e
- how to render it.
-
- A framegraph enables developers to choose between a simple forward renderer,
- including a z-fill pass, or using a deferred renderer for example. It also
- gives them control over when to render any transparent objects, and so on.
- Since this is all configured purely from data, it is very easy to modify even
- dynamically at runtime without touching any C++ code. It is possible to
- extend Qt3D by creating your own framegraphs that implement custom
- rendering algorithms.
-
- \section1 3D Extensions
-
- Beyond the essentials of displaying 3D content on the screen, Qt3D is
- extensible and flexible enough to act as a host for following types of
- extensions related to the 3D objects:
-
- \list
- \li Physics simulation
- \li Collision detection
- \li 3D positional audio
- \li Rigid body, skeletal, and morph target animation
- \li Path finding and other AI
- \li Picking
- \li Particles
- \li Object spawning
- \endlist
-
- \section1 Performance
-
- Qt3D is designed to perform well and scale up with the number of available
- CPU cores, because modern hardware improves performance by increasing the
- numbers of cores rather than base clock speed. Using multiple cores works
- well, because many tasks are independent of each other. For example, the
- operations performed by a path finding module do not overlap strongly with
- the tasks performed by a renderer, except maybe when rendering debug
- information or statistics.
-
- \section1 Qt3D Architecture
-
- The main use cases of Qt3D are simulating objects in near-realtime and
- rendering the state of those objects onto the screen. The Space Invaders
- example contains the following objects:
-
- \image Space-invaders.jpg
-
- \list
- \li The player's ground cannon
- \li The ground
- \li The defensive blocks
- \li The enemy space invader ships
- \li The enemy boss flying saucer
- \li The bullets shot by the enemies and the player
- \endlist
-
- In a traditional C++ design, these types of object would typically be
- implemented as classes arranged in some kind of inheritance tree. Various
- branches in the inheritance tree might add additional functionality to the
- root class for features such as:
-
- \list
- \li Accepts user input
- \li Plays a sound
- \li Is animated
- \li Collides with other objects
- \li Is drawn on screen
- \endlist
-
- The types in the Space Invaders example can be classified against these
- features. However, designing an elegant inheritance tree for even such a
- simple example is not easy.
-
- This approach and other variations on inheritance present a number of
- problems:
-
- \list
- \li Deep and wide inheritance hierarchies are difficult to understand,
- maintain and extend.
- \li The inheritance taxonomy is set in stone at compile time.
- \li Each level in the class inheritance tree can only classify upon a
- single criteria or axis.
- \li Shared functionality tends to \e {bubble up} the class hierarchy
- over time.
- \li It is impossible to predict what the developers will want to do.
- \endlist
-
- Extending deep and wide inheritance trees usually requires understanding,
- and agreeing with, the taxonomy used by the original author. Therefore,
- Qt3D places focus on aggregation instead of inheritance as the means of
- imparting functionality onto an instance of an object. Specifically, Qt3D
- implements an Entity Component System (ECS).
-
- \section2 Using an ECS
-
- In an ECS, an entity represents a simulated object but by itself is devoid
- of any specific behavior or characteristics. Additional behavior can be
- grafted onto an entity by having the entity aggregate one or more
- components. Each component is a vertical slice of behavior of an object
- type.
-
- In the Space Invaders example, the ground is an entity with an attached
- component that tells the system that the entity needs rendering and what
- kind of rendering it needs. An enemy space invader ship is another entity
- with attached components that cause the ship to be rendered, but also enable
- it to emit sounds, be collided with, be animated, and be controlled by a
- simple AI.
-
- The player's ground cannon entity has mostly similar components to the enemy
- space invader ship, except that it does not have the AI component. In its
- place, the cannon has an input component to enable the player to move it
- around and to fire bullets.
-
- \section2 ECS Backend
-
- \image ecs-2.png
-
- The backend of Qt3D implements the \e system part of the ECS paradigm in
- the form of \e aspects. An aspect implements the particular vertical slice
- of the functionality provided to entities by a combination of one or more
- of their aggregated components.
-
- For example, the renderer aspect looks for entities that have mesh,
- material, and optionally transformation components. If the renderer aspect
- finds such an entity, it knows how to take that data and draw something nice
- from it. If an entity does not have those components, the renderer aspect
- ignores it.
-
- Qt3D builds custom entities by aggregating components that provide
- additional capabilities. The Qt3D engine uses aspects to process and
- update entities with specific components.
-
- For example, a physics aspect looks for entities that have some kind of
- collision volume component and another component that specifies other
- properties needed by such simulations like mass, coefficient of friction,
- and so on. An entity that emits sound has a component that specifies it is
- a sound emitter, as well as specifying when and which sounds to play.
-
- Because ECS uses aggregation rather than inheritance, it is possible to
- dynamically change how an object behaves at runtime simply by adding or
- removing components.
-
- For example, to enable a player to suddenly run through walls after a
- power-up, that entity's collision volume component can be removed
- temporarily, until the power-up times out. There is no need to create a
- special one-off subclass for \c PlayerWhoRunsThroughWalls.
-
- \section2 Qt3D ECS Implementation
-
- Qt3D implements ECS as a simple class hierarchy. The Qt3D base class is
- Qt3D::QNode, which is a subclass of QObject. Qt3D::QNode adds to QObject the ability to
- automatically communicate property changes to aspects and an ID that is
- unique throughout an application. The aspects exist in additional threads
- and Qt3D::QNode simplifies the data transfer between the user-facing objects and
- the aspects.
-
- Typically, subclasses of Qt3D::QNode provide additional supporting data that is
- referenced by components. For example, the QShaderProgram class specifies
- the GLSL code to be used when rendering a set of entities.
-
- \image ecs-1.png
-
- Components in Qt3D are implemented by subclassing Qt3D::QComponent and adding the
- data necessary for the corresponding aspect to do its work. For example, the
- mesh component is used by the renderer aspect to retrieve the per-vertex
- data that should be sent down the OpenGL pipeline.
-
- Finally, Qt3D::QEntity is simply an object that can aggregate zero or more
- Qt3D::QComponent instances.
-
- \section1 Extending Qt3D
-
- Adding functionality to Qt3D, either as part of Qt or specific to your
- own applications to benefit from the multi-threaded back-end consists of the
- following tasks:
-
- \list
- \li Identify and implement any necessary components and supporting data.
- \li Register the components with the QML engine (only if you use the QML
- API).
- \li Subclass QAbstractAspect and implement the subsystem functionality.
- \endlist
-
- \section1 Qt3D Task-Based Engine
-
- In Qt3D, aspects are asked in each frame for a set of \e tasks to execute
- along with the \e dependencies between them. The tasks are distributed
- across all the configured cores by a scheduler to improve performance.
-
- \section1 Qt3D's Aspects
-
- By default Qt3D provides the Qt3DRenderer and Qt3DInput aspects. The
- components and other supporting classes provided by these aspects are
- discussed in the documentation for those modules.
-
- Additional aspects providing more capabilities will be added in future
- versions of Qt3D.
diff --git a/src/core/doc/src/qt3dinput-module.qdoc b/src/core/doc/src/qt3dinput-module.qdoc
deleted file mode 100644
index c46d577dd..000000000
--- a/src/core/doc/src/qt3dinput-module.qdoc
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \module Qt3DInput
- \title Qt3D Input C++ Classes
- \brief The Qt3D Input module provides classes for handling user input in
- applications using Qt3D.
-
- \ingroup modules
- \ingroup qt3d-modules
- \qtvariable 3dinput
-
- To use classes from this module, add this directive into the C++ files:
-
- \code
- #include <Qt3DInput>
- \endcode
-
- To link against the corresponding C++ libraries, add the following to your qmake project file:
-
- \badcode
- QT += 3dinput
- \endcode
-*/
-
-/*!
- \namespace Qt3DInput
- \inmodule Qt3DInput
- \ingroup qt3d-namespaces
-
- \brief Contains classes that enable user input.
-*/
-
-/*!
- \qmlmodule Qt3D.Input 2.0
- \title Qt3D Input QML Types
- \ingroup qmlmodules
- \ingroup qt3d-qmlmodules
-
- \brief Provides QML types for Qt3D user input.
-
- To import and use the module's QML types, use the following statement:
-
- \badcode
- import Qt3D.Input 2.0
- \endcode
-
- \section1 QML Types
-*/
-
diff --git a/src/core/doc/src/snippets/code/src_core_qcircularbuffer.cpp b/src/core/doc/src/snippets/code/src_core_qcircularbuffer.cpp
deleted file mode 100644
index 574ca75c8..000000000
--- a/src/core/doc/src/snippets/code/src_core_qcircularbuffer.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://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.LGPLv3 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.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 later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-QCircularBuffer<int> integerBuffer;
-QCircularBuffer<QString> stringBuffer;
-//! [0]
-
-
-//! [1]
-QCircularBuffer<QString> circ(200);
-//! [1]
-
-
-//! [2]
-QCircularBuffer<QString> circ(200, "Pass");
-//! [2]
-
-
-//! [3]
-QCircularBuffer<QString> circ(200, 50, "Qt");
-//! [3]
-
-
-//! [4]
-if (circ[0] == "Izzie")
- circ[0] = "Elizabeth";
-//! [4]
-
-
-//! [5]
-for (int i = 0; i < circ.size(); ++i) {
- if (circ.at(i) == "Jack")
- cout << "Found Jack at position " << i << endl;
- }
-//! [5]
-
-
-//! [6]
-// Create a circular buffer with capacity for 3 integers
-QCircularBuffer<int> circ(3);
-
-// Insert some items into the buffer
-circ.append( 1 );
-circ.append( 2 );
-circ.append( 3 );
-
-for (int i = 0; i < circ.size(); ++i) {
- cout << circ.at(i) << endl;
- } // Prints out 1 2 3
-
-// The circular buffer is now full. Appending subsequent items
-// will overwrite the oldest items:
-circ.append(4); // Overwrite 1 with 4
-circ.append(5); // Overwrite 2 with 5
-
-// The buffer now contains 3, 4 and 5
-
-for (int i = 0; i < circ.size(); ++i) {
- cout << circ.at(i) << endl;
- } // Prints out 3 4 5
-//! [6]
-
-
-//! [7]
-int i = circ.indexOf("Tom");
-if (i != -1)
- cout << "First occurrence of Tom is at position " << i << endl;
-//! [7]
-
-
-//! [8]
-QCircularBuffer<QString> circ(3);
-circ.append("one");
-circ.append("two");
-circ.append("three");
-// circ: ["one", "two", "three"]
-
-circ.append("four");
-// circ: ["two", "three", "four"]
-
-circ.append("five");
-// circ: ["three", "four", "five"]
-
-circ.append("six");
-// circ: ["four", "five", "six"]
-//! [8]
-
-
-//! [9]
-QCircularBuffer<int> circ(10, 0);
-QCircularBuffer<int>::array_range data = circ.data();
-for (int i = 0; i < data.second; ++i)
- data.first[i] = 2 * i;
-//! [9]
-
-
-//! [10]
-QCircularBuffer<QString> circ(3);
-circ.prepend("one");
-circ.prepend("two");
-circ.prepend("three");
-// circ: ["three", "two", "one"]
-
-circ.prepend("four");
-// circ: ["four", "three", "two"]
-//! [10]
-
-
-//! [11]
-QCircularBuffer<QString> circ(5);
-circ << "alpha" << "beta" << "delta";
-circ.insert(2, "gamma");
-// circ: ["alpha", "beta", "gamma", "delta"]
-//! [11]
-
-//! [12]
-QCircularBuffer<int> circ(6);
-circ << 1 << 2 << 3 << 4; // circ: [1, 2, 3, 4]
-circ.insert(2, 5, 0);
-// circ: [0, 0, 0, 0, 3, 4]
-//! [12]
-
-
-//! [13]
-QVector<double> vector;
-vector << 2.718 << 1.442 << 0.4342;
-vector.insert(1, 3, 9.9);
-// vector: [2.718, 9.9, 9.9, 9.9, 1.442, 0.4342]
-//! [13]
-
-
-//! [14]
-QCircularBuffer<QString> circ(3, 3, "No");
-circ.fill("Yes");
-// circ: ["Yes", "Yes", "Yes"]
-
-circ.fill("oh", 5);
-// circ: ["oh", "oh", "oh", "oh", "oh"]
-//! [14]
-
-
-//! [15]
-QCircularBuffer<QString> circ(5);
-circ << "A" << "B" << "C" << "B" << "A";
-circ.indexOf("B"); // returns 1
-circ.indexOf("B", 1); // returns 1
-circ.indexOf("B", 2); // returns 3
-circ.indexOf("X"); // returns -1
-//! [15]
-
-
-//! [16]
-QCircularBuffer<QString> circ;
-circ << "A" << "B" << "C" << "B" << "A";
-circ.lastIndexOf("B"); // returns 3
-circ.lastIndexOf("B", 3); // returns 3
-circ.lastIndexOf("B", 2); // returns 1
-circ.lastIndexOf("X"); // returns -1
-//! [16]
-
-
-//! [17]
-QCircularBuffer<QString> circ;
-circ << "red" << "green" << "blue" << "black";
-
-QList<QString> list = circ.toList();
-// list: ["red", "green", "blue", "black"]
-//! [17]
-
-
-//! [18]
-QStringList list;
-list << "Sven" << "Kim" << "Ola";
-
-QCircularBuffer<QString> circ = QCircularBuffer<QString>::fromList(list);
-// circ: ["Sven", "Kim", "Ola"]
-//! [18]
-
-
-//! [19]
-QCircularBuffer<int> circ(6);
-circ << 1 << 2 << 3 << 4 << 5;
-// circ: [1, 2, 3, 4, 5]
-//! [19]
-
-
-//! [20]
-circ.append(6);
-// circ: [1, 2, 3, 4, 5, 6]
-//! [20]
-
-
-//! [21]
-circ.append(7);
-// circ: [2, 3, 4, 5, 6, 7]
-//! [21]