summaryrefslogtreecommitdiffstats
path: root/src/imports/shapes
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/shapes')
-rw-r--r--src/imports/shapes/Capsule.qml55
-rw-r--r--src/imports/shapes/Cube.qml48
-rw-r--r--src/imports/shapes/Cylinder.qml55
-rw-r--r--src/imports/shapes/Quad.qml48
-rw-r--r--src/imports/shapes/README.library_xml15
-rwxr-xr-xsrc/imports/shapes/README.plugins_types34
-rw-r--r--src/imports/shapes/Sphere.qml55
-rw-r--r--src/imports/shapes/Teapot.qml48
-rw-r--r--src/imports/shapes/capsulemesh.cpp352
-rw-r--r--src/imports/shapes/capsulemesh.h94
-rw-r--r--src/imports/shapes/capsulemesh_p.h83
-rw-r--r--src/imports/shapes/cube.h67
-rw-r--r--src/imports/shapes/cube.obj25
-rw-r--r--src/imports/shapes/cube.qdoc87
-rw-r--r--src/imports/shapes/cylindermesh.cpp348
-rw-r--r--src/imports/shapes/cylindermesh.h94
-rw-r--r--src/imports/shapes/cylindermesh_p.h85
-rw-r--r--src/imports/shapes/library.xml54
-rw-r--r--src/imports/shapes/line.cpp167
-rw-r--r--src/imports/shapes/line.h89
-rwxr-xr-xsrc/imports/shapes/plugins.qmltypes159
-rw-r--r--src/imports/shapes/point.cpp167
-rw-r--r--src/imports/shapes/point.h89
-rw-r--r--src/imports/shapes/qmldir7
-rw-r--r--src/imports/shapes/quad.obj12
-rw-r--r--src/imports/shapes/quad.qdoc87
-rw-r--r--src/imports/shapes/shapes.cpp72
-rw-r--r--src/imports/shapes/shapes.pro84
-rw-r--r--src/imports/shapes/sphere.cpp231
-rw-r--r--src/imports/shapes/spheremesh.cpp393
-rw-r--r--src/imports/shapes/spheremesh.h97
-rw-r--r--src/imports/shapes/spheremesh_p.h87
-rw-r--r--src/imports/shapes/teapot.bez340
-rw-r--r--src/imports/shapes/teapot.h67
-rw-r--r--src/imports/shapes/teapot.qdoc92
35 files changed, 0 insertions, 3887 deletions
diff --git a/src/imports/shapes/Capsule.qml b/src/imports/shapes/Capsule.qml
deleted file mode 100644
index 6997e76d..00000000
--- a/src/imports/shapes/Capsule.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import Qt3D 1.0
-import Qt3D.Shapes 1.0
-
-Item3D {
- id: capsule
- property alias name: capsuleMesh.objectName
- property alias radius: capsuleMesh.radius
- property alias length: capsuleMesh.length
- property alias levelOfDetail: capsuleMesh.levelOfDetail
- mesh: CapsuleMesh {
- id: capsuleMesh
- }
-}
diff --git a/src/imports/shapes/Cube.qml b/src/imports/shapes/Cube.qml
deleted file mode 100644
index e60395a3..00000000
--- a/src/imports/shapes/Cube.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import Qt3D 1.0
-
-Item3D {
- id: cube
- mesh: Mesh { source: "cube.obj" }
-}
diff --git a/src/imports/shapes/Cylinder.qml b/src/imports/shapes/Cylinder.qml
deleted file mode 100644
index 0323f425..00000000
--- a/src/imports/shapes/Cylinder.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import Qt3D 1.0
-import Qt3D.Shapes 1.0
-
-Item3D {
- id: cylinder
- property alias name: cylinderMesh.objectName
- property alias radius: cylinderMesh.radius
- property alias length: cylinderMesh.length
- property alias levelOfDetail: cylinderMesh.levelOfDetail
- mesh: CylinderMesh {
- id: cylinderMesh
- }
-}
diff --git a/src/imports/shapes/Quad.qml b/src/imports/shapes/Quad.qml
deleted file mode 100644
index 5c636704..00000000
--- a/src/imports/shapes/Quad.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import Qt3D 1.0
-
-Item3D {
- id: quad
- mesh: Mesh { source: "quad.obj" }
-}
diff --git a/src/imports/shapes/README.library_xml b/src/imports/shapes/README.library_xml
deleted file mode 100644
index 2f46d66d..00000000
--- a/src/imports/shapes/README.library_xml
+++ /dev/null
@@ -1,15 +0,0 @@
-The library.xml file is required to get syntax highlighting of Qt3D.Shapes
-plugin items in Qt Creator < version 2.2.
-
-The library.xml file is installed into the imports/Qt3D.Shapes tree along with
-the plugin and the qmldir file.
-
-When any of the elements - property names, class names or other exports
-- in the Qt3D.Shapes plugin are changed this file will need to be regenerated.
-
-To generate the library.xml file see the scripts/README file for a
-description of how to use the filter-qmldump.pl script.
-
-This is a less-than-optimal solution but as syntax discovery improves
-in Qt Creator better solutions should become available at which time
-this temporary script and syntax file may be deprecated.
diff --git a/src/imports/shapes/README.plugins_types b/src/imports/shapes/README.plugins_types
deleted file mode 100755
index ff41ea12..00000000
--- a/src/imports/shapes/README.plugins_types
+++ /dev/null
@@ -1,34 +0,0 @@
-The plugins.qmltypes file is required to get syntax highlighting of Qt3D.Shapes
-plugin items inside Qt Creator 2.2 and later.
-
-To support earlier versions of Qt Creator the library.xml file is used.
-
-The plugins.qmltypes file is installed into the imports/Qt3D.Shapes tree along
-with the plugin and the qmldir file.
-
-When any of the elements - property names, class names or other exports
-- in the Qt3D.Shapes plugin are changed this file will need to be regenerated.
-
-To generate the plugins.qmltypes, you first need a qmldump binary generated from
-sources shipped with Qt Creator 2.2 or greater. On Mac these are inside the app
-bundle, other platforms vary. If all else fails get the sources from the Qt
-Creator repo.
-
-To build qmldump you need access to private headers, so therefore it must be
-built against a source build of Qt. On Mac it is helpful to build qmldump with
-"qmake CONFIG-=app_bundle" so that you get a regular command-line binary.
-
-Once you finally have a viable qmldump binary:
-
-./qmldump Qt3D.Shapes 1.0 $QTDIR/imports > plugins.qmltypes
-
-...where $QTDIR points to the root of the Qt where Qt3D is installed.
-
-If you get a usage error like:
-
-Usage: qmldump [plugin/import/path plugin.uri]
-
-...then the version of qmldump source you used was not for Qt Creator > 2.2 -
-you somehow have the earlier version qmldump sources.
-
-You do not need to use the filter-qmldump.pl script.
diff --git a/src/imports/shapes/Sphere.qml b/src/imports/shapes/Sphere.qml
deleted file mode 100644
index 15a9f020..00000000
--- a/src/imports/shapes/Sphere.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import Qt3D 1.0
-import Qt3D.Shapes 1.0
-
-Item3D {
- id: sphere
- property alias name: sphereMesh.objectName
- property alias radius: sphereMesh.radius
- property alias levelOfDetail: sphereMesh.levelOfDetail
- property alias axis: sphereMesh.axis
- mesh: SphereMesh {
- id: sphereMesh
- }
-}
diff --git a/src/imports/shapes/Teapot.qml b/src/imports/shapes/Teapot.qml
deleted file mode 100644
index 3c4df17a..00000000
--- a/src/imports/shapes/Teapot.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import Qt3D 1.0
-
-Item3D {
- id: teapot
- mesh: Mesh { source: "teapot.bez" }
-}
diff --git a/src/imports/shapes/capsulemesh.cpp b/src/imports/shapes/capsulemesh.cpp
deleted file mode 100644
index 5b0c068d..00000000
--- a/src/imports/shapes/capsulemesh.cpp
+++ /dev/null
@@ -1,352 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "capsulemesh.h"
-#include "qglbuilder.h"
-#include "qglcylinder.h"
-#include "qgldome.h"
-#include "qglabstractscene.h"
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmlclass CapsuleMesh CapsuleMesh
- \brief The CapsuleMesh item represents a simple capsule in 3D space.
- \since 4.8
- \ingroup qt3d::qml3d::shapes
- \inherits Item3D
-
- The CapsuleMesh element in QML provides a simple way to create a capsule
- object, usually for testing material effects. For example,
- the following QML code displays a green capsule of with a uniform
- diameter of 0.5, and a length of 3.0, centered vertically on the
- origin:
-
- \code
- Item3D {
- mesh: CapsuleMesh {
- radius: 0.5
- length: 3.0
- }
- effect: Effect {
- color: "#aaca00"
- }
- }
- \endcode
-
- The CapsuleMesh element is part of the \c{Qt3D.Shapes} namespace,
- so the following must appear at the top of any QML file that
- references it:
-
- \code
- import Qt3D.Shapes 1.0
- \endcode
-
- The capsule shape can have differing levels of detail, allowing
- for additional slices and layers to be drawn if more detailed meshes
- are required.
-
- Note that the length of the capsule should always exceed its
- diameter to be considered valid.
-
- To display the capsule mesh you can create your own Item3D as shown
- above, or use the convenience Capsule QML Component.
-
- \code
- Capsule {
- radius: 0.5
- length: 3.0
- effect: Effect {
- color: "#aaca00"
- }
- }
- \endcode
-
- \section1 Performance Hints for Larger Scenes
-
- The convenience Capsule QML component will create a new mesh each
- time is instantiated.
-
- If you have a scene with a number of similar capsules use your own
- Item3D elements to all refer to the same mesh. See the Performance
- Hints section of the SphereMesh documentation for more details on
- this important technique.
-
- \section1 Performance Hints for Animation
-
- Because of the need to maintain the relative proportions of the
- cylinders components, the length and radius are implemented directly
- in the construction of the mesh. This differs from the approach
- used in the SphereMesh where a scale is used.
-
- For this reason avoid animating the length and radius properties
- of a CapsuleMesh, as it will give poor results due to the mesh
- being recreated every frame.
-
- Since the capules components are created with named sections in
- the mesh, one approach would be to individually apply scales to
- these sections using the meshNode property. This is an
- advanced topic, and future tutorials may cover it in more depth.
-
- \sa Item3D, SphereMesh
-*/
-
-CapsuleMeshPrivate::CapsuleMeshPrivate()
- : topNode(new QGLSceneNode)
- , currentCapsule(0)
- , radius(1.0f)
- , length(1.0f)
- , lod(5)
- , sceneSet(false)
-{
- topNode->setObjectName("CapsuleMesh");
-}
-
-CapsuleMeshPrivate::~CapsuleMeshPrivate()
-{
- topNode->removeNode(currentCapsule);
- delete topNode;
- QList<QGLSceneNode*> lods = lodGeometry.values();
- qDeleteAll(lods);
-}
-
-class CapsuleScene : public QGLAbstractScene
-{
-public:
- explicit CapsuleScene(QGLSceneNode *s) : m_s(s) {}
- ~CapsuleScene() {}
- QList<QObject *> objects() const
- {
- QList<QObject *> s;
- s.append(m_s);
- return s;
- }
- QGLSceneNode *mainNode() const
- {
- return m_s;
- }
-private:
- QGLSceneNode *m_s;
-};
-
-/*!
- \internal
-*/
-CapsuleMesh::CapsuleMesh(QObject *parent)
- : QDeclarativeMesh(parent)
- , d_ptr(new CapsuleMeshPrivate)
-{
-}
-
-/*!
- \qmlproperty real CapsuleMesh::radius
-
- This property defines the radius of the capsule.
- The default value is 1.
-*/
-qreal CapsuleMesh::radius() const
-{
- Q_D(const CapsuleMesh);
- return d->radius;
-}
-
-void CapsuleMesh::setRadius(qreal radius)
-{
- Q_D(CapsuleMesh);
- if (qFuzzyCompare(radius, 1))
- radius = 1.0f;
- if (d->radius != radius) {
- d->radius = radius;
- createGeometry();
- emit radiusChanged();
- emit dataChanged();
- }
-}
-
-/*!
- \qmlproperty real CapsuleMesh::length
-
- This property defines the length of the capsule.
- The default value is 1.
-*/
-qreal CapsuleMesh::length() const
-{
- Q_D(const CapsuleMesh);
- return d->length;
-}
-
-void CapsuleMesh::setLength(qreal length)
-{
- Q_D(CapsuleMesh);
- if (qFuzzyCompare(length, 1))
- length = 1.0f;
- if (d->length != length) {
- d->length = length;
- createGeometry();
- emit lengthChanged();
- emit dataChanged();
- }
-}
-
-/*!
- \qmlproperty int CapsuleMesh::levelOfDetail
-
- This property defines the level of detail, between 1 and 10,
- which controls the number of slices and layers that are used
- to generate the capsule's mesh.
-
- Values outside the range 1 to 10 will be clamped to the range
- when the capsule is generated.
-
- The exact number of facets generated is consistent with the
- level of detail as specified in the Cylinder and Sphere
- objects.
-
- \sa Sphere, Cylinder
-*/
-int CapsuleMesh::levelOfDetail() const
-{
- Q_D(const CapsuleMesh);
- return d->lod;
-}
-
-void CapsuleMesh::setLevelOfDetail(int lod)
-{
- Q_D(CapsuleMesh);
- lod = qBound(1, lod, 10);
- if (d->lod != lod) {
- d->lod = lod;
- createGeometry();
- emit levelOfDetailChanged();
- emit dataChanged();
- }
-}
-
-/*!
- \internal
-*/
-void CapsuleMesh::draw(QGLPainter *painter, int branchId)
-{
- Q_D(CapsuleMesh);
- if (!d->currentCapsule)
- createGeometry();
- QDeclarativeMesh::draw(painter, branchId);
-}
-
-/*!
- \internal
-*/
-void CapsuleMesh::createGeometry()
-{
- Q_D(CapsuleMesh);
-
- // Create a new geometry node for this level of detail if necessary.
- QGLSceneNode *geometry = d->lodGeometry.value(d->lod, 0);
- if (!geometry) {
- QGLBuilder builder;
-
- // For the cylinder
- int facets = 4 * 1 << d->lod;
- int layers = 1 << d->lod;
-
- // For the spheres
- int divisions = d->lod;
-
- // Sanity check - the height of the capsule must not be less than its
- // diameter. A minimal capsule is a sphere - where diameter == height.
- if (d->length < 2.0 * d->radius)
- {
- qWarning() << "Length of capsule must exceed its diameter"
- << " - correcting height.";
- d->length = 2 * d->radius;
- }
-
- qreal diameter = d->radius+d->radius;
- qreal cylinderHeight = d->length - diameter;
- qreal offset = cylinderHeight/2.0;
-
- builder << QGL::Faceted;
- QGLSceneNode *s = 0;
- s = builder.newNode();
- s->setObjectName("Cylinder");
- builder << QGLCylinder(diameter, diameter, cylinderHeight,
- facets, layers, false, false);
- QMatrix4x4 translateMatrix;
- translateMatrix.translate(0, 0, -offset);
- builder.currentNode()->setLocalTransform(translateMatrix);
-
- s = builder.newNode();
- s->setObjectName("LeftEndCap");
- builder << QGLDome(diameter, divisions, false);
- translateMatrix.setToIdentity();
- translateMatrix.rotate(180, 0, 1,0);
- translateMatrix.translate(0, 0, offset);
- builder.currentNode()->setLocalTransform(translateMatrix);
-
- s = builder.newNode();
- s->setObjectName("RightEndCap");
- builder << QGLDome(diameter, divisions, false);
- translateMatrix.setToIdentity();
- translateMatrix.translate(0, 0, offset);
- builder.currentNode()->setLocalTransform(translateMatrix);
-
- geometry = builder.finalizedSceneNode();
-
- d->lodGeometry.insert(d->lod, geometry);
- }
- Q_ASSERT_X(geometry != 0, Q_FUNC_INFO, "Could not create/find geometry!");
- if (d->currentCapsule != geometry)
- {
- if (d->currentCapsule)
- d->topNode->removeNode(d->currentCapsule);
- d->topNode->addNode(geometry);
- d->currentCapsule = geometry;
- }
-
- if (!d->sceneSet)
- {
- setScene(new CapsuleScene(d->topNode));
- d->sceneSet = true;
- }
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/imports/shapes/capsulemesh.h b/src/imports/shapes/capsulemesh.h
deleted file mode 100644
index 3076f6ab..00000000
--- a/src/imports/shapes/capsulemesh.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef CAPSULE_H
-#define CAPSULE_H
-
-#include "qdeclarativemesh.h"
-#include "capsulemesh_p.h"
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class CapsuleMesh : public QDeclarativeMesh
-{
- Q_OBJECT
- Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
- Q_PROPERTY(qreal length READ length WRITE setLength NOTIFY lengthChanged)
- Q_PROPERTY(int levelOfDetail READ levelOfDetail WRITE setLevelOfDetail NOTIFY levelOfDetailChanged)
-
-public:
- explicit CapsuleMesh(QObject *parent = 0);
- ~CapsuleMesh() {}
-
- qreal radius() const;
- void setRadius(qreal radius);
-
- qreal length() const;
- void setLength(qreal length);
-
- int levelOfDetail() const;
- void setLevelOfDetail(int lod);
-
- void draw(QGLPainter *painter, int branchId);
-
-Q_SIGNALS:
- void radiusChanged();
- void lengthChanged();
- void levelOfDetailChanged();
-
-private:
- void createGeometry();
-
- Q_DISABLE_COPY(CapsuleMesh)
- Q_DECLARE_PRIVATE(CapsuleMesh)
-
- QScopedPointer<CapsuleMeshPrivate> d_ptr;
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(CapsuleMesh)
-
-QT_END_HEADER
-
-#endif // CAPSULE_H
diff --git a/src/imports/shapes/capsulemesh_p.h b/src/imports/shapes/capsulemesh_p.h
deleted file mode 100644
index 2cff15fd..00000000
--- a/src/imports/shapes/capsulemesh_p.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef CAPSULEMESH_P_H
-#define CAPSULEMESH_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtCore/QMap>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QGLSceneNode;
-
-class CapsuleMeshPrivate
-{
-public:
- CapsuleMeshPrivate();
- ~CapsuleMeshPrivate();
-
- QMap<int, QGLSceneNode *> lodGeometry;
- QGLSceneNode *topNode;
- QGLSceneNode *currentCapsule;
- qreal radius;
- qreal length;
- int lod;
- bool sceneSet;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // CAPSULEMESH_P_H
diff --git a/src/imports/shapes/cube.h b/src/imports/shapes/cube.h
deleted file mode 100644
index 73d72127..00000000
--- a/src/imports/shapes/cube.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef CUBE_H
-#define CUBE_H
-
-// This is a dummy header for defining the interface of "Cube.qml" to qdoc.
-
-#include "item3d.h"
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class Cube : public Item3D
-{
- Q_OBJECT
-public:
- Cube(QObject *parent = 0) : Item3D(parent) {}
- ~Cube() {}
-};
-
-QML_DECLARE_TYPE(Cube)
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/imports/shapes/cube.obj b/src/imports/shapes/cube.obj
deleted file mode 100644
index 03bded06..00000000
--- a/src/imports/shapes/cube.obj
+++ /dev/null
@@ -1,25 +0,0 @@
-s 0
-v -0.5 -0.5 -0.5
-v -0.5 -0.5 0.5
-v -0.5 0.5 0.5
-v -0.5 0.5 -0.5
-v 0.5 -0.5 -0.5
-v 0.5 -0.5 0.5
-v 0.5 0.5 0.5
-v 0.5 0.5 -0.5
-vn -1.0 0.0 0.0
-vn 0.0 1.0 0.0
-vn 1.0 0.0 0.0
-vn 0.0 -1.0 0.0
-vn 0.0 0.0 1.0
-vn 0.0 0.0 -1.0
-vt 1.0 0.0
-vt 1.0 1.0
-vt 0.0 1.0
-vt 0.0 0.0
-f 1/1/1 2/2/1 3/3/1 4/4/1
-f 4/1/2 3/2/2 7/3/2 8/4/2
-f 8/1/3 7/2/3 6/3/3 5/4/3
-f 5/1/4 6/2/4 2/3/4 1/4/4
-f 6/1/5 7/2/5 3/3/5 2/4/5
-f 8/1/6 5/2/6 1/3/6 4/4/6
diff --git a/src/imports/shapes/cube.qdoc b/src/imports/shapes/cube.qdoc
deleted file mode 100644
index 912f4f40..00000000
--- a/src/imports/shapes/cube.qdoc
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \qmlclass Cube Cube
- \brief The Cube item represents a simple cube in 3D space.
- \since 4.8
- \ingroup qt3d::qml3d::shapes
- \inherits Item3D
-
- The Cube element in QML provides a simple way to create a cube
- object, usually for testing material effects. For example,
- the following QML code displays a cube of size 1.5, centered
- on the origin and covered in the Qt logo texture:
-
- \code
- Cube {
- scale: 1.5
- effect: Effect {
- color: "#aaca00"
- texture: "qtlogo.png"
- }
- }
- \endcode
-
- The Cube element is part of the \c{Qt3D.Shapes} namespace,
- so the following must appear at the top of any QML file that
- references it:
-
- \code
- import Qt3D.Shapes 1.0
- \endcode
-
- The cube can be moved from the origin by specifying the
- Item3D::position property:
-
- \code
- Cube {
- scale: 1.5
- position: Qt.vector3d(1, 0, 5)
- effect: Effect {
- color: "#aaca00"
- texture: "qtlogo.png"
- }
- }
- \endcode
-
- \sa Item3D
-*/
diff --git a/src/imports/shapes/cylindermesh.cpp b/src/imports/shapes/cylindermesh.cpp
deleted file mode 100644
index ee814009..00000000
--- a/src/imports/shapes/cylindermesh.cpp
+++ /dev/null
@@ -1,348 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "cylindermesh.h"
-#include "qglbuilder.h"
-#include "qglcylinder.h"
-#include "qgraphicsscale3d.h"
-#include "qglabstractscene.h"
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmlclass CylinderMesh CylinderMesh
- \brief The CylinderMesh item represents a simple cylinder in 3D space.
- \since 4.8
- \ingroup qt3d::qml3d::shapes
- \inherits Item3D
-
- The CylinderMesh element in QML provides a way to create a simple cylinder
- object, usually for testing material effects. For example, the
- following QML code displays a green cylinder of with a uniform
- diameter of 0.5, and a length of 3.0, centered with its base on the
- origin:
-
- \code
- Item3D {
- mesh: CylinderMesh {
- radius: 0.5
- length: 3.0
- }
- effect: Effect {
- color: "#aaca00"
- }
- }
- \endcode
-
- The CylinderMesh element is part of the \c{Qt3D.Shapes} namespace,
- so the following must appear at the top of any QML file that
- references it:
-
- \code
- import Qt3D.Shapes 1.0
- \endcode
-
- The cylinder shape can have differing levels of detail, allowing
- for additional slices and layers to be drawn if more detailed meshes
- are required.
-
- To display the cylinder mesh you can create your own Item3D as shown
- above, or use the convenience Cylinder QML Component.
-
- \code
- Cylinder {
- radius: 0.5
- length: 3.0
- effect: Effect {
- color: "#aaca00"
- }
- }
- \endcode
-
- \section1 Performance Hints for Larger Scenes
-
- The convenience Cylinder QML component will create a new mesh each
- time is instantiated.
-
- If you have a scene with a number of similar capsules use your own
- Item3D elements to all refer to the same mesh. See the Performance
- Hints section of the SphereMesh documentation for more details on
- this important technique.
-
- \section1 Performance Hints for Animation
-
- Some support for animation of the CylinderMesh properties is provided
- by utilizing a QGraphicsScale3D to implement the length & radius
- properties, and by caching levels of detail.
-
- So within limits animation of these items should provide reasonable
- results. Be aware that on constrained devices animation of the
- level of detail for many cylinders could cause problems with memory
- usage due to the caching.
-
- \sa Item3D, SphereMesh
-*/
-
-CylinderMeshPrivate::CylinderMeshPrivate()
- : topNode(new QGLSceneNode)
- , currentCylinder(0)
- , scale(0)
- , radius(1.0f)
- , length(1.0f)
- , lod(5)
- , sceneSet(false)
-{
- topNode->setObjectName("CylinderMesh");
-}
-
-CylinderMeshPrivate::~CylinderMeshPrivate()
-{
- topNode->removeNode(currentCylinder);
- delete topNode;
- QList<QGLSceneNode*> lods = lodGeometry.values();
- qDeleteAll(lods);
-}
-
-class CylinderScene : public QGLAbstractScene
-{
-public:
- explicit CylinderScene(QGLSceneNode *s) : m_s(s) {}
- ~CylinderScene() {}
- QList<QObject *> objects() const
- {
- QList<QObject *> s;
- s.append(m_s);
- return s;
- }
- QGLSceneNode *mainNode() const
- {
- return m_s;
- }
-private:
- QGLSceneNode *m_s;
-};
-
-/*!
- \internal
-*/
-CylinderMesh::CylinderMesh(QObject *parent)
- : QDeclarativeMesh(parent)
- , d_ptr(new CylinderMeshPrivate)
-{
-}
-
-/*!
- \qmlproperty real CylinderMesh::radius
-
- This property defines the radius of the cylinder.
- The default value is 1.
-*/
-qreal CylinderMesh::radius() const
-{
- Q_D(const CylinderMesh);
- return d->radius;
-}
-
-void CylinderMesh::setRadius(qreal radius)
-{
- Q_D(CylinderMesh);
- if (qFuzzyCompare(radius, 1))
- radius = 1.0f;
- if (d->radius != radius) {
- d->radius = radius;
- createGeometry();
- emit radiusChanged();
- emit dataChanged();
- }
-}
-
-/*!
- \qmlproperty real CylinderMesh::length
-
- This property defines the length of the cylinder.
- The default value is 1.
-*/
-qreal CylinderMesh::length() const
-{
- Q_D(const CylinderMesh);
- return d->length;
-}
-
-void CylinderMesh::setLength(qreal length)
-{
- Q_D(CylinderMesh);
- if (qFuzzyCompare(length, 1))
- length = 1.0f;
- if (d->length != length) {
- d->length = length;
- createGeometry();
- emit lengthChanged();
- emit dataChanged();
- }
-}
-
-/*!
- \qmlproperty int CylinderMesh::levelOfDetail
-
- This property defines the level of detail, between 1 and 10,
- which controls the number of slices and layers that are used
- to generate the cylinder's mesh.
-
- Values outside the range 1 to 10 will be clamped to the range
- when the cylinder is generated.
-
- The default value is 1, which produces a cylinder with 8
- slices/facets and 2 layers. Each successive increase in this
- level of detail doubles the number of facets and layers. The
- following table provides information for these level of detail
- values
-
- \table
- \header \o Level of Detail \o Facets \o Layers
- \row \o 1 \o 8 \o 2
- \row \o 2 \o 16 \o 4
- \row \o 3 \o 32 \o 8
- \row \o 4 \o 64 \o 16
- \row \o 5 \o 128 \o 32
- \row \o 6 \o 256 \o 64
- \row \o 7 \o 512 \o 128
- \row \o 8 \o 1024 \o 256
- \row \o 9 \o 2048 \o 512
- \row \o 10 \o 4096 \o 1024
- \endtable
-*/
-int CylinderMesh::levelOfDetail() const
-{
- Q_D(const CylinderMesh);
- return d->lod;
-}
-
-void CylinderMesh::setLevelOfDetail(int lod)
-{
- Q_D(CylinderMesh);
- lod = qBound(1, lod, 10);
- if (d->lod != lod) {
- d->lod = lod;
- createGeometry();
- emit levelOfDetailChanged();
- emit dataChanged();
- }
-}
-
-/*!
- \internal
-*/
-void CylinderMesh::draw(QGLPainter *painter, int branchId)
-{
- Q_D(CylinderMesh);
- if (!d->currentCylinder)
- createGeometry();
- QDeclarativeMesh::draw(painter, branchId);
-}
-
-/*!
- \internal
-*/
-void CylinderMesh::createGeometry()
-{
- Q_D(CylinderMesh);
-
- int facets = 4 * 1 << d->lod;
- int layers = 1 << d->lod;
-
- // Create a new geometry node for this level of detail if necessary.
- QGLSceneNode *geometry = d->lodGeometry.value(d->lod, 0);
- if (!geometry) {
- QGLBuilder builder;
- builder << QGL::Faceted << QGLCylinder(2.0, 2.0, 1.0, facets,
- layers, true, true);
- geometry = builder.finalizedSceneNode();
- geometry->setParent(this);
- d->lodGeometry.insert(d->lod, geometry);
- }
- Q_ASSERT_X(geometry != 0, Q_FUNC_INFO, "Could not create/find geometry!");
- if (d->currentCylinder != geometry)
- {
- if (d->currentCylinder)
- d->topNode->removeNode(d->currentCylinder);
- d->topNode->addNode(geometry);
- d->currentCylinder = geometry;
- }
-
- // Set the length as a scale on the modelview transformation.
- // This way, we don't have to regenerate the geometry every
- // frame if the height is being animated.
- //
- // We could do the scales separately if either height or radius
- // were != 1.0f, but the same amount of maths is required, so
- // we can just scale appropriately on the axes.
- if (d->radius != 1.0f || d->length != 1.0)
- {
- if (!d->scale)
- {
- d->scale = new QGraphicsScale3D(d->topNode);
- d->topNode->addTransform(d->scale);
- }
- if (d->scale->scale().x() != d->radius ||
- d->scale->scale().z() != d->length)
- {
- d->scale->setScale(QVector3D(d->radius, d->radius, d->length));
- }
- }
- else
- {
- // If there is already a scale set it to be the identity scale.
- // This case is optimised for in QGraphicsScale. Removing it from
- // the transform list is too expensive, especially if the size is
- // being animated, and the next frame will recreate it.
- if (d->scale)
- d->scale->setScale(QVector3D(1, 1, 1));
- }
-
- if (!d->sceneSet)
- {
- setScene(new CylinderScene(d->topNode));
- d->sceneSet = true;
- }
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/imports/shapes/cylindermesh.h b/src/imports/shapes/cylindermesh.h
deleted file mode 100644
index bfdc46f3..00000000
--- a/src/imports/shapes/cylindermesh.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef CYLINDER_H
-#define CYLINDER_H
-
-#include "qdeclarativemesh.h"
-#include "cylindermesh_p.h"
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class CylinderMesh : public QDeclarativeMesh
-{
- Q_OBJECT
- Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
- Q_PROPERTY(qreal length READ length WRITE setLength NOTIFY lengthChanged)
- Q_PROPERTY(int levelOfDetail READ levelOfDetail WRITE setLevelOfDetail NOTIFY levelOfDetailChanged)
-
-public:
- explicit CylinderMesh(QObject *parent = 0);
- ~CylinderMesh() {}
-
- qreal radius() const;
- void setRadius(qreal radius);
-
- qreal length() const;
- void setLength(qreal length);
-
- int levelOfDetail() const;
- void setLevelOfDetail(int lod);
-
- void draw(QGLPainter *painter, int branchId);
-
-Q_SIGNALS:
- void radiusChanged();
- void lengthChanged();
- void levelOfDetailChanged();
-
-private:
- void createGeometry();
-
- Q_DISABLE_COPY(CylinderMesh)
- Q_DECLARE_PRIVATE(CylinderMesh)
-
- QScopedPointer<CylinderMeshPrivate> d_ptr;
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(CylinderMesh)
-
-QT_END_HEADER
-
-#endif // CYLINDER_H
diff --git a/src/imports/shapes/cylindermesh_p.h b/src/imports/shapes/cylindermesh_p.h
deleted file mode 100644
index a5ad562f..00000000
--- a/src/imports/shapes/cylindermesh_p.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef CYLINDERMESH_P_H
-#define CYLINDERMESH_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtCore/QMap>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QGraphicsScale3D;
-class QGLSceneNode;
-
-class CylinderMeshPrivate
-{
-public:
- CylinderMeshPrivate();
- ~CylinderMeshPrivate();
-
- QMap<int, QGLSceneNode *> lodGeometry;
- QGLSceneNode *topNode;
- QGLSceneNode *currentCylinder;
- QGraphicsScale3D *scale;
- qreal radius;
- qreal length;
- int lod;
- bool sceneSet;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // CYLINDERMESH_P_H
diff --git a/src/imports/shapes/library.xml b/src/imports/shapes/library.xml
deleted file mode 100644
index d03e3f64..00000000
--- a/src/imports/shapes/library.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module>
- <type name="Capsule" defaultProperty="data" extends="QDeclarativeItem3D">
- <exports>
- <export module="Qt3D.Shapes" version="1.0" type="Capsule" />
- </exports>
- <property name="radius" type="qreal" />
- <property name="length" type="qreal" />
- <property name="levelOfDetail" type="int" />
- <signal name="radiusChanged" />
- <signal name="lengthChanged" />
- <signal name="levelOfDetailChanged" />
- </type>
- <type name="Cylinder" defaultProperty="data" extends="QDeclarativeItem3D">
- <exports>
- <export module="Qt3D.Shapes" version="1.0" type="Cylinder" />
- </exports>
- <property name="radius" type="qreal" />
- <property name="length" type="qreal" />
- <property name="levelOfDetail" type="int" />
- <signal name="radiusChanged" />
- <signal name="lengthChanged" />
- <signal name="levelOfDetailChanged" />
- </type>
- <type name="Line" defaultProperty="data" extends="QDeclarativeItem3D">
- <exports>
- <export module="Qt3D.Shapes" version="1.0" type="Line" />
- </exports>
- <property name="width" type="qreal" />
- <property name="vertices" type="QVariant" />
- <signal name="verticesChanged" />
- <signal name="widthChanged" />
- </type>
- <type name="Point" defaultProperty="data" extends="QDeclarativeItem3D">
- <exports>
- <export module="Qt3D.Shapes" version="1.0" type="Point" />
- </exports>
- <property name="pointSize" type="qreal" />
- <property name="vertices" type="QVariant" />
- <signal name="verticesChanged" />
- <signal name="pointSizeChanged" />
- </type>
- <type name="Sphere" defaultProperty="data" extends="QDeclarativeItem3D">
- <exports>
- <export module="Qt3D.Shapes" version="1.0" type="Sphere" />
- </exports>
- <property name="radius" type="qreal" />
- <property name="levelOfDetail" type="int" />
- <property name="axis" type="Qt.Axis" />
- <signal name="radiusChanged" />
- <signal name="levelOfDetailChanged" />
- <signal name="axisChanged" />
- </type>
-</module>
diff --git a/src/imports/shapes/line.cpp b/src/imports/shapes/line.cpp
deleted file mode 100644
index 0091aaff..00000000
--- a/src/imports/shapes/line.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "line.h"
-#include "qglbuilder.h"
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmlclass Line Line
- \brief The Line item represents a geometric line drawn in 3D space.
- \since 4.8
- \ingroup qt3d::qml3d::shapes
- \inherits Item3D
-
- The Line element in QML provides a means of drawing lines in a 3D
- environment. For example, the following QML code draws a line between
- point (0,0,0), (1,1,1), then to (-1,-1,-1).
-
- \code
-
- Line {
- vertices: [
- 0, 0, 0,
- 0, 0, 1,
- 0, 1, 1
-
- ]
- effect: Effect {
- color: "#aaca00"
- }
- }
- \endcode
-
- The Line element is part of the \c{Qt3D.Shapes} namespace,
- so the following must appear at the top of any QML file that
- references it:
-
- \code
- import Qt3D.Shapes 1.0
- \endcode
-
- \sa Item3D
-*/
-/*!
- \internal
-*/
-Line::Line(QObject *parent) :
- QDeclarativeItem3D(parent)
- ,m_width(3.0)
- ,m_changeFlag(false)
-{
- //meh
-}
-
-/*!
- \qmlproperty list<real> Line::vertices
-
- This property defines the positions for all of the vertices in the
- line strip. Each vertex is given by three real values, defining
- the x, y, and z co-ordinates of the vertex.
-*/
-
-QVariant Line::vertices() const
-{
- return m_vertices;
-}
-
-void Line::setVertices(const QVariant &value)
-{
- m_vertices = value;
-
- //Update the actual QVector3DArray containing the line points.
- m_vertexArray.clear();
- QVariantList vertlist = m_vertices.toList();
- for (int index = 0; (index + 2) < vertlist.size(); index += 3) {
- m_vertexArray.append(qreal(vertlist.at(index).toDouble()), qreal(vertlist.at(index + 1).toDouble()), qreal(vertlist.at(index + 2).toDouble()));
- }
- m_changeFlag=true;
- emit verticesChanged();
- update();
-}
-
-
-/*!
- \qmlproperty real Line::width
-
- This property defines the width of the line. The
- default is 1.0
-*/
-void Line::setWidth(qreal width)
-{
- if (m_width != width) {
- m_width = width;
- m_changeFlag=true;
- emit widthChanged();
- update();
- }
-}
-
-/*!
- \internal
-*/
-void Line::drawItem(QGLPainter *painter)
-{
- if (m_changeFlag || !m_geometry) {
- if (m_geometry) delete m_geometry;
-
- QGLBuilder builder;
-
- QGeometryData lineCollection;
- builder.newSection();
-
- lineCollection.appendVertexArray(m_vertexArray);
-
- builder.addTriangles(lineCollection);
- builder.currentNode()->setDrawingMode(QGL::LineStrip);
- builder.currentNode()->setDrawingWidth(m_width);
- m_geometry = builder.finalizedSceneNode();
-
- m_changeFlag = false;
- }
-
- // Draw the geometry.
- m_geometry->draw(painter);
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/imports/shapes/line.h b/src/imports/shapes/line.h
deleted file mode 100644
index 4f788dd9..00000000
--- a/src/imports/shapes/line.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef LINE_H
-#define LINE_H
-
-#include "qdeclarativeitem3d.h"
-#include "qglscenenode.h"
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class Line : public QDeclarativeItem3D
-{
- Q_OBJECT
- Q_PROPERTY(qreal width READ width WRITE setWidth NOTIFY widthChanged)
- Q_PROPERTY(QVariant vertices READ vertices WRITE setVertices NOTIFY verticesChanged)
-
-public:
- explicit Line(QObject *parent = 0);
- ~Line() {}
-
- QVariant vertices() const;
- void setVertices(const QVariant &value);
-
- qreal width() const {return m_width;}
- void setWidth(qreal width);
-
-Q_SIGNALS:
- void verticesChanged();
- void widthChanged();
-
-protected:
- void drawItem(QGLPainter *painter);
-
-private:
- qreal m_width;
- QVariant m_vertices;
- QVector3DArray m_vertexArray;
- QGLSceneNode * m_geometry;
- bool m_changeFlag;
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(Line)
-
-QT_END_HEADER
-
-#endif // LINE_H
diff --git a/src/imports/shapes/plugins.qmltypes b/src/imports/shapes/plugins.qmltypes
deleted file mode 100755
index 435d7d3f..00000000
--- a/src/imports/shapes/plugins.qmltypes
+++ /dev/null
@@ -1,159 +0,0 @@
-import QtQuick.tooling 1.0
-
-// This file describes the plugin-supplied types contained in the library.
-// It is used for QML tooling purposes only.
-
-Module {
- Component {
- name: "Capsule"
- defaultProperty: "data"
- prototype: "QDeclarativeItem3D"
- exports: [
- "Capsule 1.0"
- ]
- Property { name: "radius"; type: "qreal" }
- Property { name: "length"; type: "qreal" }
- Property { name: "levelOfDetail"; type: "int" }
- Signal { name: "radiusChanged" }
- Signal { name: "lengthChanged" }
- Signal { name: "levelOfDetailChanged" }
- }
- Component {
- name: "Cylinder"
- defaultProperty: "data"
- prototype: "QDeclarativeItem3D"
- exports: [
- "Cylinder 1.0"
- ]
- Property { name: "radius"; type: "qreal" }
- Property { name: "length"; type: "qreal" }
- Property { name: "levelOfDetail"; type: "int" }
- Signal { name: "radiusChanged" }
- Signal { name: "lengthChanged" }
- Signal { name: "levelOfDetailChanged" }
- }
- Component {
- name: "Line"
- defaultProperty: "data"
- prototype: "QDeclarativeItem3D"
- exports: [
- "Line 1.0"
- ]
- Property { name: "width"; type: "qreal" }
- Property { name: "vertices"; type: "QVariant" }
- Signal { name: "verticesChanged" }
- Signal { name: "widthChanged" }
- }
- Component {
- name: "Point"
- defaultProperty: "data"
- prototype: "QDeclarativeItem3D"
- exports: [
- "Point 1.0"
- ]
- Property { name: "pointSize"; type: "qreal" }
- Property { name: "vertices"; type: "QVariant" }
- Signal { name: "verticesChanged" }
- Signal { name: "pointSizeChanged" }
- }
- Component {
- name: "QDeclarativeItem3D"
- defaultProperty: "data"
- prototype: "QDeclarativeItem"
- Enum {
- name: "CullFace"
- values: {
- "CullDisabled": 0,
- "CullFrontFaces": 1028,
- "CullBackFaces": 1029,
- "CullAllFaces": 1032,
- "CullClockwise": 65536
- }
- }
- Enum {
- name: "CullFaces"
- values: {
- "CullDisabled": 0,
- "CullFrontFaces": 1028,
- "CullBackFaces": 1029,
- "CullAllFaces": 1032,
- "CullClockwise": 65536
- }
- }
- Enum {
- name: "SortMode"
- values: {
- "DefaultSorting": 0,
- "BackToFront": 1
- }
- }
- Property { name: "position"; type: "QVector3D" }
- Property { name: "x"; type: "qreal" }
- Property { name: "y"; type: "qreal" }
- Property { name: "z"; type: "qreal" }
- Property { name: "scale"; type: "qreal" }
- Property { name: "transform"; type: "QGraphicsTransform3D"; isList: true; isReadonly: true }
- Property { name: "pretransform"; type: "QGraphicsTransform3D"; isList: true; isReadonly: true }
- Property { name: "mesh"; type: "QDeclarativeMesh"; isPointer: true }
- Property { name: "effect"; type: "QDeclarativeEffect"; isPointer: true }
- Property { name: "light"; type: "QGLLightParameters"; isPointer: true }
- Property { name: "resources"; type: "QObject"; isList: true; isReadonly: true }
- Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
- Property { name: "children"; type: "QDeclarativeItem3D"; isList: true; isReadonly: true }
- Property { name: "cullFaces"; type: "CullFaces" }
- Property { name: "sortChildren"; type: "SortMode" }
- Property { name: "meshNode"; type: "string" }
- Property { name: "inheritEvents"; type: "bool" }
- Property { name: "enabled"; type: "bool" }
- Property { name: "parent"; type: "QDeclarativeItem3D"; isPointer: true }
- Signal { name: "positionChanged" }
- Signal { name: "scaleChanged" }
- Signal { name: "rotationChanged" }
- Signal { name: "meshChanged" }
- Signal { name: "meshNodeChanged" }
- Signal { name: "effectChanged" }
- Signal { name: "lightChanged" }
- Signal {
- name: "stateChanged"
- Parameter { type: "string" }
- }
- Signal { name: "clicked" }
- Signal { name: "doubleClicked" }
- Signal { name: "pressed" }
- Signal { name: "released" }
- Signal { name: "hoverEnter" }
- Signal { name: "hoverLeave" }
- Signal { name: "inheritEventsChanged" }
- Signal { name: "enabledChanged" }
- Signal { name: "childrenChanged" }
- Signal { name: "parentChanged" }
- Signal { name: "sortChildrenChanged" }
- Method { name: "update" }
- Method {
- name: "localToWorld"
- type: "QVector3D"
- Parameter { name: "point"; type: "QVector3D" }
- }
- Method { name: "localToWorld"; type: "QVector3D" }
- Method {
- name: "worldToLocal"
- type: "QVector3D"
- Parameter { name: "point"; type: "QVector3D" }
- }
- Method { name: "worldToLocal"; type: "QVector3D" }
- }
- Component {
- name: "Sphere"
- defaultProperty: "data"
- prototype: "QDeclarativeItem3D"
- exports: [
- "Sphere 1.0"
- ]
- Property { name: "radius"; type: "qreal" }
- Property { name: "levelOfDetail"; type: "int" }
- Property { name: "axis"; type: "Qt::Axis" }
- Signal { name: "radiusChanged" }
- Signal { name: "levelOfDetailChanged" }
- Signal { name: "axisChanged" }
- }
-}
diff --git a/src/imports/shapes/point.cpp b/src/imports/shapes/point.cpp
deleted file mode 100644
index 0bd23f16..00000000
--- a/src/imports/shapes/point.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "point.h"
-#include "qglbuilder.h"
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmlclass Point Point
- \brief The Point item represents a geometric point drawn in 3D space.
- \since 4.8
- \ingroup qt3d::qml3d::shapes
- \inherits Item3D
-
- The Point element in QML provides a means of drawing points in a 3D
- environment. For example, the following QML code draws points (0,0,0),
- (1,1,1), and (-1,-1,-1).
-
- \code
- Point {
- vertices: [
- 0, 0, 0,
- 1, 1, 1,
- -1, -1, -1
- ]
- effect: Effect {
- color: "#aaca00"
- }
- }
- \endcode
-
- The Point element is part of the \c{Qt3D.Shapes} namespace,
- so the following must appear at the top of any QML file that
- references it:
-
- \code
- import Qt3D.Shapes 1.0
- \endcode
-
- \sa Item3D
-*/
-/*!
- \internal
-*/
-Point::Point(QObject *parent) :
- QDeclarativeItem3D(parent)
- , m_pointSize(1.0f)
- , m_changeFlag(false)
-{
- //meh
-}
-
-
-/*!
- \qmlproperty list<real> Point::vertices
-
- This property defines the positions for all of the points to be drawn
- Each vertex is given by three real values, defining
- the x, y, and z co-ordinates of the vertex.
-*/
-
-QVariant Point::vertices() const
-{
- return m_vertices;
-}
-
-void Point::setVertices(const QVariant &value)
-{
- m_vertices = value;
-
- //Update the actual QVector3DArray containing the points.
- m_vertexArray.clear();
- QVariantList vertlist = m_vertices.toList();
- for (int index = 0; (index + 2) < vertlist.size(); index += 3) {
- m_vertexArray.append(qreal(vertlist.at(index).toDouble()), qreal(vertlist.at(index + 1).toDouble()), qreal(vertlist.at(index + 2).toDouble()));
- }
- m_changeFlag=true;
- emit verticesChanged();
- update();
-}
-
-
-/*!
- \qmlproperty qreal Point::pointSize
-
- This property defines the size of the point. The
- default is 1.0
-*/
-void Point::setPointSize(qreal pointSize)
-{
- if (m_pointSize != pointSize) {
- m_pointSize = pointSize;
- m_changeFlag=true;
- emit pointSizeChanged();
- update();
- }
-}
-
-/*!
- \internal
-*/
-void Point::drawItem(QGLPainter *painter)
-{
- if (m_changeFlag || !m_geometry) {
- if (m_geometry) delete m_geometry;
-
- QGLBuilder builder;
-
- QGeometryData pointCollection;
- builder.newSection();
-
- pointCollection.appendVertexArray(m_vertexArray);
-
- builder.addTriangles(pointCollection);
- builder.currentNode()->setDrawingMode(QGL::Points);
- builder.currentNode()->setDrawingWidth(m_pointSize);
- m_geometry = builder.finalizedSceneNode();
-
- m_changeFlag = false;
- }
-
- // Draw the geometry.
- m_geometry->draw(painter);
-}
-
-QT_END_NAMESPACE
-
-
diff --git a/src/imports/shapes/point.h b/src/imports/shapes/point.h
deleted file mode 100644
index 591f4d8a..00000000
--- a/src/imports/shapes/point.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef POINT_H
-#define POINT_H
-
-#include "qdeclarativeitem3d.h"
-#include "qglscenenode.h"
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class Point : public QDeclarativeItem3D
-{
- Q_OBJECT
- Q_PROPERTY(qreal pointSize READ pointSize WRITE setPointSize NOTIFY pointSizeChanged)
- Q_PROPERTY(QVariant vertices READ vertices WRITE setVertices NOTIFY verticesChanged)
-
-public:
- explicit Point(QObject *parent = 0);
- ~Point() {}
-
- QVariant vertices() const;
- void setVertices(const QVariant &value);
-
- qreal pointSize() const {return m_pointSize;}
- void setPointSize(qreal pointSize);
-
-Q_SIGNALS:
- void verticesChanged();
- void pointSizeChanged();
-
-protected:
- void drawItem(QGLPainter *painter);
-
-private:
- qreal m_pointSize;
- QVariant m_vertices;
- QVector3DArray m_vertexArray;
- QGLSceneNode * m_geometry;
- bool m_changeFlag;
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(Point)
-
-QT_END_HEADER
-
-#endif // POINT_H
diff --git a/src/imports/shapes/qmldir b/src/imports/shapes/qmldir
deleted file mode 100644
index dd4f575d..00000000
--- a/src/imports/shapes/qmldir
+++ /dev/null
@@ -1,7 +0,0 @@
-plugin qshapesqmlplugin
-Cube 1.0 Cube.qml
-Teapot 1.0 Teapot.qml
-Quad 1.0 Quad.qml
-Sphere 1.0 Sphere.qml
-Capsule 1.0 Capsule.qml
-Cylinder 1.0 Cylinder.qml
diff --git a/src/imports/shapes/quad.obj b/src/imports/shapes/quad.obj
deleted file mode 100644
index 7ee54359..00000000
--- a/src/imports/shapes/quad.obj
+++ /dev/null
@@ -1,12 +0,0 @@
-o Plane
-v 1.000000 -0.000000 -1.000000
-v 1.000000 0.000000 1.000000
-v -1.000000 0.000000 1.000000
-v -1.000000 -0.000000 -1.000000
-vt 1.000000 0.000000
-vt 1.000000 1.000000
-vt 0.000000 1.000000
-vt 0.000000 0.000000
-usemtl (null)
-s off
-f 1/1 4/4 3/3 2/2
diff --git a/src/imports/shapes/quad.qdoc b/src/imports/shapes/quad.qdoc
deleted file mode 100644
index be1fd9e9..00000000
--- a/src/imports/shapes/quad.qdoc
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \qmlclass Quad Quad
- \brief The Quad item represents a simple quad in 3D space.
- \since 4.8
- \ingroup qt3d::qml3d::shapes
- \inherits Item3D
-
- The Quad element in QML provides a simple way to create a regular
- quad object, usually for testing material effects. For example,
- the following QML code displays a quad of size 1.5, centered
- on the origin and covered in the Qt logo texture:
-
- \code
- Quad {
- scale: 1.5
- effect: Effect {
- color: "#aaca00"
- texture: "qtlogo.png"
- }
- }
- \endcode
-
- The Quad element is part of the \c{Qt3D.Shapes} namespace,
- so the following must appear at the top of any QML file that
- references it:
-
- \code
- import Qt3D.Shapes 1.0
- \endcode
-
- The quad can be moved from the origin by specifying the
- Item3D::position property:
-
- \code
- Quad {
- scale: 1.5
- position: Qt.vector3d(1, 0, 5)
- effect: Effect {
- color: "#aaca00"
- texture: "qtlogo.png"
- }
- }
- \endcode
-
- \sa Item3D
-*/
diff --git a/src/imports/shapes/shapes.cpp b/src/imports/shapes/shapes.cpp
deleted file mode 100644
index 7c1958c6..00000000
--- a/src/imports/shapes/shapes.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtDeclarative/qdeclarativeextensionplugin.h>
-
-#include "spheremesh.h"
-#include "cylindermesh.h"
-#include "capsulemesh.h"
-#include "line.h"
-#include "point.h"
-
-QT_BEGIN_NAMESPACE
-
-class QShapesQmlModule : public QDeclarativeExtensionPlugin
-{
- Q_OBJECT
-public:
- virtual void registerTypes(const char *uri)
- {
- Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt3D.Shapes"));
- qmlRegisterType<SphereMesh>(uri,1,0,"SphereMesh");
- qmlRegisterType<CylinderMesh>(uri,1,0,"CylinderMesh");
- qmlRegisterType<CapsuleMesh>(uri,1,0,"CapsuleMesh");
- qmlRegisterType<Line>(uri,1,0,"Line");
- qmlRegisterType<Point>(uri,1,0,"Point");
-
- }
-};
-
-QT_END_NAMESPACE
-
-#include "shapes.moc"
-
-Q_EXPORT_PLUGIN2(qshapesqmlplugin, QT_PREPEND_NAMESPACE(QShapesQmlModule));
diff --git a/src/imports/shapes/shapes.pro b/src/imports/shapes/shapes.pro
deleted file mode 100644
index b568bbfe..00000000
--- a/src/imports/shapes/shapes.pro
+++ /dev/null
@@ -1,84 +0,0 @@
-TEMPLATE = lib
-TARGET = qshapesqmlplugin
-CONFIG += qt plugin
-
-QT += declarative qt3d quick3d
-
-DESTDIR = $$QT.quick3d.imports/Qt3D/Shapes
-target.path = $$[QT_INSTALL_IMPORTS]/Qt3D/Shapes
-INSTALLS += target
-
-SOURCES += \
- shapes.cpp \
- line.cpp \
- point.cpp \
- spheremesh.cpp \
- capsulemesh.cpp \
- cylindermesh.cpp
-HEADERS += \
- line.h \
- point.h \
- spheremesh.h \
- spheremesh_p.h \
- capsulemesh.h \
- cylindermesh.h \
- capsulemesh_p.h \
- cylindermesh_p.h
-
-QML_FILES = \
- Cube.qml \
- Sphere.qml \
- Quad.qml \
- Teapot.qml \
- Capsule.qml \
- Cylinder.qml
-
-QML_INFRA_FILES += \
- $$QML_FILES \
- qmldir \
- library.xml \
- plugins.qmltypes \
- cube.obj \
- quad.obj \
- teapot.bez
-# see the file README.library_xml for more on library.xml
-
-package {
- copyqmlinfra_install.files = $$QML_INFRA_FILES
- copyqmlinfra_install.path = $$[QT_INSTALL_IMPORTS]/Qt3D/Shapes
- INSTALLS += copyqmlinfra_install
-} else {
- copyqmlinfra.input = QML_INFRA_FILES
- copyqmlinfra.output = $$target.path/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT}
- copyqmlinfra.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
- copyqmlinfra.CONFIG += no_link_no_clean
- copyqmlinfra.variable_out = PRE_TARGETDEPS
- QMAKE_EXTRA_COMPILERS += copyqmlinfra
-}
-else {
- copyqmlinfra_install.files = $$QML_INFRA_FILES
- copyqmlinfra_install.path = $$[QT_INSTALL_IMPORTS]/Qt3D/Shapes
- INSTALLS += copyqmlinfra_install
-}
-
-OTHER_FILES += \
- README.plugins_types \
- README.library_xml
-
-OTHER_FILES += $$QML_FILES
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/imports/shapes/sphere.cpp b/src/imports/shapes/sphere.cpp
deleted file mode 100644
index 18aea598..00000000
--- a/src/imports/shapes/sphere.cpp
+++ /dev/null
@@ -1,231 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "sphere.h"
-#include "qglbuilder.h"
-#include "qglsphere.h"
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmlclass Sphere Sphere
- \brief The Sphere item represents a simple UV-sphere in 3D space.
- \since 4.8
- \ingroup qt3d::qml3d::shapes
- \inherits Item3D
-
- The Sphere element in QML provides a simple way to create a sphere
- object, usually for testing material effects. For example,
- the following QML code displays a green sphere of radius 1.5,
- centered on the origin:
-
- \code
- Sphere {
- radius: 1.5
- effect: Effect {
- color: "#aaca00"
- }
- }
- \endcode
-
- The Sphere element is part of the \c{Qt3D.Shapes} namespace,
- so the following must appear at the top of any QML file that
- references it:
-
- \code
- import Qt3D.Shapes 1.0
- \endcode
-
- By default, the sphere is aligned to lie along the Z axis.
- The \l axis property can change this to either the X or the Y
- axis, as shown in the following example:
-
- \code
- Sphere {
- scale: 1.5
- levelOfDetail: 6
- axis: Qt.YAxis
- effect: Effect { texture: "moon-texture.jpg" }
- }
- \endcode
-
- \image moon-screenshot.png
-
- \sa Item3D
-*/
-/*!
- \internal
-*/
-Sphere::Sphere(QObject *parent)
- : QDeclarativeItem3D(parent)
- , m_radius(1.0f)
- , m_lod(-1)
- , m_axis(Qt::ZAxis)
-{
- setLevelOfDetail(5);
-}
-
-/*!
- \qmlproperty real Sphere::radius
-
- This property defines the radius of the sphere. The default
- value is 1.
-*/
-void Sphere::setRadius(qreal radius)
-{
- if (m_radius != radius) {
- m_radius = radius;
- emit radiusChanged();
- update();
- }
-}
-
-/*!
- \qmlproperty int Sphere::levelOfDetail
-
- This property defines the level of detail, between 1 and 10,
- which controls the number of triangles that are generated to
- render the surface of the sphere. Values outside the range
- 1 to 10 will be clamped.
-
- The default value is 5. An increase in 1 in level of detail
- doubles the number of triangles. The following picture shows
- the effect of level of detail values between 1 and 10:
-
- \image sphere-detail.png
-
- \table
- \header \o Level of Detail \o Number of Triangles
- \row \o 1 \o 64
- \row \o 2 \o 128
- \row \o 3 \o 256
- \row \o 4 \o 512
- \row \o 5 \o 1024
- \row \o 6 \o 2048
- \row \o 7 \o 4096
- \row \o 8 \o 8192
- \row \o 9 \o 16384
- \row \o 10 \o 32768
- \endtable
-*/
-void Sphere::setLevelOfDetail(int lod)
-{
- if (lod < 1)
- {
- lod = 1;
- }
- else
- {
- if (lod > 10)
- lod = 10;
- }
-
- if (m_lod != lod) {
- m_lod = lod;
- updateGeometry();
- emit levelOfDetailChanged();
- update();
- }
-}
-
-/*!
- \qmlproperty enumeration Sphere::axis
-
- This property defines the axis that the sphere lies along.
- The default is Qt.ZAxis. The other supported values are
- Qt.XAxis and Qt.YAxis. This provides a simple method to
- orient the sphere in the desired direction.
-*/
-void Sphere::setAxis(Qt::Axis axis)
-{
- if (m_axis != axis) {
- m_axis = axis;
- emit axisChanged();
- update();
- }
-}
-
-/*!
- \internal
-*/
-void Sphere::updateGeometry()
-{
- // Convert the level of detail into a depth value for QGLSphere.
- // We cache a maximum of 10 levels of detail for lod animations.
-
- // Create a new geometry node for this level of detail if necessary.
- QGLSceneNode *geometry = m_lodGeometry.value(m_lod, 0);
- if (!geometry) {
- QGLBuilder builder;
- builder.newSection(QGL::Faceted);
- builder << QGLSphere(2.0f, m_lod);
- geometry = builder.finalizedSceneNode();
- geometry->setParent(this);
- m_lodGeometry.insert(m_lod, geometry);
- }
-}
-
-void Sphere::drawItem(QGLPainter *painter)
-{
- // Set the radius as a scale on the modelview transformation.
- // This way, we don't have to regenerate the geometry every
- // frame if the radius is being animated. Also rotate the
- // geometry into the correct axis orientation.
- if (m_radius != 1.0f || m_axis != Qt::ZAxis) {
- painter->modelViewMatrix().push();
- if (m_radius != 1.0f)
- painter->modelViewMatrix().scale(m_radius);
- if (m_axis == Qt::XAxis)
- painter->modelViewMatrix().rotate(90.0f, 0.0f, 1.0f, 0.0);
- else if (m_axis == Qt::YAxis)
- painter->modelViewMatrix().rotate(-90.0f, 1.0f, 0.0f, 0.0);
- }
-
- // Draw the geometry.
- QGLSceneNode *geometry = m_lodGeometry.value(m_lod, 0);
- geometry->draw(painter);
-
- // Restore the original modelview.
- if (m_radius != 1.0f || m_axis != Qt::ZAxis)
- painter->modelViewMatrix().pop();
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/shapes/spheremesh.cpp b/src/imports/shapes/spheremesh.cpp
deleted file mode 100644
index 72bf1dee..00000000
--- a/src/imports/shapes/spheremesh.cpp
+++ /dev/null
@@ -1,393 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "spheremesh.h"
-#include "qglbuilder.h"
-#include "qglsphere.h"
-#include "qgraphicsrotation3d.h"
-#include "qgraphicsscale3d.h"
-#include "qglabstractscene.h"
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmlclass SphereMesh SphereMesh
- \brief The SphereMesh item represents a simple UV-sphere in 3D space.
- \since 4.8
- \ingroup qt3d::qml3d::shapes
- \inherits Item3D
-
- The SphereMesh element in QML provides a simple way to create a sphere
- object, usually for testing material effects. For example,
- the following QML code displays a green sphere mesh of radius 1.5,
- centered on the origin:
-
- \code
- Item3D {
- mesh: SphereMesh { radius: 1.5 }
- effect: Effect { color: "#aaca00" }
- }
- \endcode
-
- As shown, the mesh is only displayed when it is set as the target of
- a mesh property on an Item3D.
-
- The SphereMesh element is part of the \c{Qt3D.Shapes} namespace,
- so the following must appear at the top of any QML file that
- references it:
-
- \code
- import Qt3D.Shapes 1.0
- \endcode
-
- By default, the sphere is aligned to lie along the Z axis.
- The \l axis property can change this to either the X or the Y
- axis, as shown in the following example:
-
- \code
- SphereMesh {
- radius: 1.5
- axis: Qt.YAxis
- }
- \endcode
-
- To display the sphere mesh you can create your own Item3D as shown
- above, or use the convenience Sphere QML component:
-
- \code
- Sphere {
- radius: 1.5
- levelOfDetail: 6
- axis: Qt.YAxis
- effect: Effect { texture: "moon-texture.jpg" }
- }
- \endcode
-
- \image moon-screenshot.png
-
- \section1 Performance Hints for Larger Scenes
-
- The convenience Sphere QML component will create a new mesh each
- time it is instantiated.
-
- If you have a scene with a number of similar spheres use your own
- Item3D elements to all refer to the same mesh - this will save on
- graphics memory and improve the performance of your application since
- there is no need to recreate many copies of the same geometry. This
- is true even if you want to apply different materials, effects or
- transformations to each sphere.
-
- To do this, first declare the SphereMesh object, outside of any Item3D
- so that it won't get drawn, and give it an id so you can refer to it.
-
- \snippet quick3d/solarsystem_qml/qml/solarsystem_qml.qml 0
-
- Then set the various effects and so on you need for each instance of
- the sphere. If you need different sized spheres you can use a scale,
- and of course you can specify materials and effects.
-
- \snippet quick3d/solarsystem_qml/qml/solarsystem_qml.qml 1
-
- In this case since only one copy of the triangle data for the mesh is
- sent to the GPU performance will generally be better.
-
- \section1 Performance Hints for Animation
-
- Some support for animation of the SphereMesh properties is provided
- by utilizing a QGraphicsScale3D to implement the radius property,
- and by caching levels of detail.
-
- So within limits animation of these items should provide reasonable
- results. Be aware that on constrained devices animation of the
- level of detail for many spheres could cause problems with memory
- usage due to the caching.
-
- The other shapes primitives are implemented differently with respect
- to radius, length and so on, so read the performance notes there, as
- they will differ from the sphere case.
-
- \sa Item3D
-*/
-
-SphereMeshPrivate::SphereMeshPrivate()
- : topNode(new QGLSceneNode)
- , currentSphere(0)
- , rot(0)
- , scale(0)
- , radius(1.0f)
- , lod(5)
- , axis(Qt::ZAxis)
- , sceneSet(false)
-{
- topNode->setObjectName("SphereMesh");
-}
-
-SphereMeshPrivate::~SphereMeshPrivate()
-{
- topNode->removeNode(currentSphere);
- delete topNode;
- QList<QGLSceneNode*> lods = lodGeometry.values();
- qDeleteAll(lods);
-}
-
-class SphereScene : public QGLAbstractScene
-{
-public:
- explicit SphereScene(QGLSceneNode *s) : m_s(s) {}
- ~SphereScene() {}
- QList<QObject *> objects() const
- {
- QList<QObject *> s;
- s.append(m_s);
- return s;
- }
- QGLSceneNode *mainNode() const
- {
- return m_s;
- }
-private:
- QGLSceneNode *m_s;
-};
-
-/*!
- \internal
-*/
-SphereMesh::SphereMesh(QObject *parent)
- : QDeclarativeMesh(parent)
- , d_ptr(new SphereMeshPrivate)
-{
-}
-
-/*!
- \qmlproperty real SphereMesh::radius
-
- This property defines the radius of the sphere. The default
- value is 1.
-*/
-qreal SphereMesh::radius() const
-{
- Q_D(const SphereMesh);
- return d->radius;
-}
-
-void SphereMesh::setRadius(qreal radius)
-{
- Q_D(SphereMesh);
- if (qFuzzyCompare(radius, 1))
- radius = 1.0f;
- if (d->radius != radius)
- {
- d->radius = radius;
- createGeometry();
- emit radiusChanged();
- emit dataChanged();
- }
-}
-
-/*!
- \qmlproperty int SphereMesh::levelOfDetail
-
- This property defines the level of detail, between 1 and 10,
- which controls the number of triangles that are generated to
- render the surface of the sphere. Values outside the range
- 1 to 10 will be clamped to the range when the sphere is drawn.
-
- The default value is 5. An increase in 1 in level of detail
- doubles the number of triangles. The following picture shows
- the effect of level of detail values between 1 and 10:
-
- \image sphere-detail.png
-
- \table
- \header \o Level of Detail \o Number of Triangles
- \row \o 1 \o 64
- \row \o 2 \o 128
- \row \o 3 \o 256
- \row \o 4 \o 512
- \row \o 5 \o 1024
- \row \o 6 \o 2048
- \row \o 7 \o 4096
- \row \o 8 \o 8192
- \row \o 9 \o 16384
- \row \o 10 \o 32768
- \endtable
-*/
-int SphereMesh::levelOfDetail() const
-{
- Q_D(const SphereMesh);
- return d->lod;
-}
-
-void SphereMesh::setLevelOfDetail(int lod)
-{
- Q_D(SphereMesh);
- lod = qBound(1, lod, 10);
- if (d->lod != lod)
- {
- d->lod = lod;
- createGeometry();
- emit levelOfDetailChanged();
- emit dataChanged();
- }
-}
-
-/*!
- \qmlproperty enumeration SphereMesh::axis
-
- This property defines the axis that the sphere lies along.
- The default is Qt.ZAxis. The other supported values are
- Qt.XAxis and Qt.YAxis. This provides a simple method to
- orient the sphere in the desired direction.
-*/
-Qt::Axis SphereMesh::axis() const
-{
- Q_D(const SphereMesh);
- return d->axis;
-}
-
-void SphereMesh::setAxis(Qt::Axis axis)
-{
- Q_D(SphereMesh);
- if (d->axis != axis)
- {
- d->axis = axis;
- createGeometry();
- emit axisChanged();
- emit dataChanged();
- }
-}
-
-/*!
- \internal
-*/
-void SphereMesh::draw(QGLPainter *painter, int branchId)
-{
- Q_D(SphereMesh);
- if (!d->currentSphere)
- createGeometry();
- QDeclarativeMesh::draw(painter, branchId);
-}
-
-/*!
- \internal
-*/
-void SphereMesh::createGeometry()
-{
- Q_D(SphereMesh);
-
- // We cache a maximum of 10 levels of detail for lod animations.
- // Create a new geometry node for this level of detail if necessary.
- QGLSceneNode *geometry = d->lodGeometry.value(d->lod, 0);
- if (!geometry) {
- QGLBuilder builder;
- builder.newSection(QGL::Faceted);
- builder << QGLSphere(2.0f, d->lod);
- geometry = builder.finalizedSceneNode();
- geometry->setParent(this);
- d->lodGeometry.insert(d->lod, geometry);
- }
- Q_ASSERT_X(geometry != 0, Q_FUNC_INFO, "Could not create/find geometry!");
- if (d->currentSphere != geometry)
- {
- if (d->currentSphere)
- d->topNode->removeNode(d->currentSphere);
- d->topNode->addNode(geometry);
- d->currentSphere = geometry;
- }
-
- // Set the radius as a scale on the modelview transformation.
- // This way, we don't have to regenerate the geometry every
- // frame if the radius is being animated.
- if (d->radius != 1.0f)
- {
- if (!d->scale)
- {
- d->scale = new QGraphicsScale3D(d->topNode);
- d->topNode->addTransform(d->scale);
- }
- if (d->scale->scale().x() != d->radius)
- {
- d->scale->setScale(QVector3D(d->radius, d->radius, d->radius));
- }
- }
- else
- {
- // If there is already a scale set it to be the identity scale.
- // This case is optimised for in QGraphicsScale. Removing it from
- // the transform list is too expensive, especially if the size is
- // being animated, and the next frame will recreate it.
- if (d->scale)
- d->scale->setScale(QVector3D(1, 1, 1));
- }
-
- // Also rotate the geometry into the correct axis orientation.
- const QVector3D Y_AXIS = QVector3D(0, 1, 0); // for Qt::XAxis we rotate around Y
- const QVector3D X_AXIS = QVector3D(1, 0, 0); // for Qt::YAxis we rotate around X
- if (d->axis != Qt::ZAxis && !d->rot)
- {
- d->rot = new QGraphicsRotation3D(d->topNode);
- d->topNode->addTransform(d->rot);
- }
- if (d->axis == Qt::XAxis && d->rot->axis().y() != Y_AXIS.y())
- {
- d->rot->setAxis(Y_AXIS);
- d->rot->setAngle(90.0f);
- }
- else if (d->axis == Qt::YAxis && d->rot->axis().x() != X_AXIS.x())
- {
- d->rot->setAxis(X_AXIS);
- d->rot->setAngle(-90.0f);
- }
- else if (d->axis == Qt::ZAxis && d->rot && d->rot->angle() != 0.0f)
- {
- d->rot->setAngle(0.0f);
- d->rot->setAxis(QVector3D(0, 0, 0));
- }
-
- if (!d->sceneSet)
- {
- setScene(new SphereScene(d->topNode));
- d->sceneSet = true;
- }
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/imports/shapes/spheremesh.h b/src/imports/shapes/spheremesh.h
deleted file mode 100644
index 35f36e2f..00000000
--- a/src/imports/shapes/spheremesh.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef SPHEREMESH_H
-#define SPHEREMESH_H
-
-#include "qglscenenode.h"
-#include "qdeclarativemesh.h"
-#include "spheremesh_p.h"
-
-#include <QtCore/qmap.h>
-#include <QtCore/qscopedpointer.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class SphereMesh : public QDeclarativeMesh
-{
- Q_OBJECT
- Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
- Q_PROPERTY(int levelOfDetail READ levelOfDetail WRITE setLevelOfDetail NOTIFY levelOfDetailChanged)
- Q_PROPERTY(Qt::Axis axis READ axis WRITE setAxis NOTIFY axisChanged)
-public:
- SphereMesh(QObject *parent = 0);
- ~SphereMesh() {}
-
- qreal radius() const;
- void setRadius(qreal radius);
-
- int levelOfDetail() const;
- void setLevelOfDetail(int lod);
-
- Qt::Axis axis() const;
- void setAxis(Qt::Axis axis);
-
- void draw(QGLPainter *painter, int branchId);
-
-Q_SIGNALS:
- void radiusChanged();
- void levelOfDetailChanged();
- void axisChanged();
-
-private:
- void createGeometry();
-
- Q_DISABLE_COPY(SphereMesh)
- Q_DECLARE_PRIVATE(SphereMesh)
-
- QScopedPointer<SphereMeshPrivate> d_ptr;
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(SphereMesh)
-
-QT_END_HEADER
-
-#endif // SPHEREMESH_H
diff --git a/src/imports/shapes/spheremesh_p.h b/src/imports/shapes/spheremesh_p.h
deleted file mode 100644
index 3d407421..00000000
--- a/src/imports/shapes/spheremesh_p.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef SPHEREMESH_P_H
-#define SPHEREMESH_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtCore/QMap>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QGraphicsRotation3D;
-class QGraphicsScale3D;
-class QGLSceneNode;
-
-class SphereMeshPrivate
-{
-public:
- SphereMeshPrivate();
- ~SphereMeshPrivate();
-
- QMap<int, QGLSceneNode *> lodGeometry;
- QGLSceneNode *topNode;
- QGLSceneNode *currentSphere;
- QGraphicsRotation3D *rot;
- QGraphicsScale3D *scale;
- qreal radius;
- int lod;
- Qt::Axis axis;
- bool sceneSet;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // SPHEREMESH_P_H
diff --git a/src/imports/shapes/teapot.bez b/src/imports/shapes/teapot.bez
deleted file mode 100644
index 02b2ac44..00000000
--- a/src/imports/shapes/teapot.bez
+++ /dev/null
@@ -1,340 +0,0 @@
-32
-1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
-4,17,18,19,8,20,21,22,12,23,24,25,16,26,27,28
-19,29,30,31,22,32,33,34,25,35,36,37,28,38,39,40
-31,41,42,1,34,43,44,5,37,45,46,9,40,47,48,13
-13,14,15,16,49,50,51,52,53,54,55,56,57,58,59,60
-16,26,27,28,52,61,62,63,56,64,65,66,60,67,68,69
-28,38,39,40,63,70,71,72,66,73,74,75,69,76,77,78
-40,47,48,13,72,79,80,49,75,81,82,53,78,83,84,57
-57,58,59,60,85,86,87,88,89,90,91,92,93,94,95,96
-60,67,68,69,88,97,98,99,92,100,101,102,96,103,104,105
-69,76,77,78,99,106,107,108,102,109,110,111,105,112,113,114
-78,83,84,57,108,115,116,85,111,117,118,89,114,119,120,93
-121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136
-124,137,138,121,128,139,140,125,132,141,142,129,136,143,144,133
-133,134,135,136,145,146,147,148,149,150,151,152,69,153,154,155
-136,143,144,133,148,156,157,145,152,158,159,149,155,160,161,69
-162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177
-165,178,179,162,169,180,181,166,173,182,183,170,177,184,185,174
-174,175,176,177,186,187,188,189,190,191,192,193,194,195,196,197
-177,184,185,174,189,198,199,186,193,200,201,190,197,202,203,194
-204,204,204,204,207,208,209,210,211,211,211,211,212,213,214,215,4
-204,204,204,204,210,217,218,219,211,211,211,211,215,220,221,222,4
-204,204,204,204,219,224,225,226,211,211,211,211,222,227,228,229,4
-204,204,204,204,226,230,231,207,211,211,211,211,229,232,233,212,4
-212,213,214,215,234,235,236,237,238,239,240,241,242,243,244,245
-215,220,221,222,237,246,247,248,241,249,250,251,245,252,253,254
-222,227,228,229,248,255,256,257,251,258,259,260,254,261,262,263
-229,232,233,212,257,264,265,234,260,266,267,238,263,268,269,242
-270,270,270,270,279,280,281,282,275,276,277,278,271,272,273,274,4
-270,270,270,270,282,289,290,291,278,286,287,288,274,283,284,285,4
-270,270,270,270,291,298,299,300,288,295,296,297,285,292,293,294,4
-270,270,270,270,300,305,306,279,297,303,304,275,294,301,302,271,4
-306
-0.700000,0.450000,-0.000000
-0.700000,0.450000,0.392000
-0.392000,0.450000,0.700000
-0.000000,0.450000,0.700000
-0.668750,0.515625,-0.000000
-0.668750,0.515625,0.374500
-0.374500,0.515625,0.668750
-0.000000,0.515625,0.668750
-0.718750,0.515625,-0.000000
-0.718750,0.515625,0.402500
-0.402500,0.515625,0.718750
-0.000000,0.515625,0.718750
-0.750000,0.450000,-0.000000
-0.750000,0.450000,0.420000
-0.420000,0.450000,0.750000
-0.000000,0.450000,0.750000
--0.392000,0.450000,0.700000
--0.700000,0.450000,0.392000
--0.700000,0.450000,-0.000000
--0.374500,0.515625,0.668750
--0.668750,0.515625,0.374500
--0.668750,0.515625,-0.000000
--0.402500,0.515625,0.718750
--0.718750,0.515625,0.402500
--0.718750,0.515625,-0.000000
--0.420000,0.450000,0.750000
--0.750000,0.450000,0.420000
--0.750000,0.450000,-0.000000
--0.700000,0.450000,-0.392000
--0.392000,0.450000,-0.700000
-0.000000,0.450000,-0.700000
--0.668750,0.515625,-0.374500
--0.374500,0.515625,-0.668750
-0.000000,0.515625,-0.668750
--0.718750,0.515625,-0.402500
--0.402500,0.515625,-0.718750
-0.000000,0.515625,-0.718750
--0.750000,0.450000,-0.420000
--0.420000,0.450000,-0.750000
-0.000000,0.450000,-0.750000
-0.392000,0.450000,-0.700000
-0.700000,0.450000,-0.392000
-0.374500,0.515625,-0.668750
-0.668750,0.515625,-0.374500
-0.402500,0.515625,-0.718750
-0.718750,0.515625,-0.402500
-0.420000,0.450000,-0.750000
-0.750000,0.450000,-0.420000
-0.875000,0.187500,-0.000000
-0.875000,0.187500,0.490000
-0.490000,0.187500,0.875000
-0.000000,0.187500,0.875000
-1.000000,-0.075000,-0.000000
-1.000000,-0.075000,0.560000
-0.560000,-0.075000,1.000000
-0.000000,-0.075000,1.000000
-1.000000,-0.300000,-0.000000
-1.000000,-0.300000,0.560000
-0.560000,-0.300000,1.000000
-0.000000,-0.300000,1.000000
--0.490000,0.187500,0.875000
--0.875000,0.187500,0.490000
--0.875000,0.187500,-0.000000
--0.560000,-0.075000,1.000000
--1.000000,-0.075000,0.560000
--1.000000,-0.075000,-0.000000
--0.560000,-0.300000,1.000000
--1.000000,-0.300000,0.560000
--1.000000,-0.300000,-0.000000
--0.875000,0.187500,-0.490000
--0.490000,0.187500,-0.875000
-0.000000,0.187500,-0.875000
--1.000000,-0.075000,-0.560000
--0.560000,-0.075000,-1.000000
-0.000000,-0.075000,-1.000000
--1.000000,-0.300000,-0.560000
--0.560000,-0.300000,-1.000000
-0.000000,-0.300000,-1.000000
-0.490000,0.187500,-0.875000
-0.875000,0.187500,-0.490000
-0.560000,-0.075000,-1.000000
-1.000000,-0.075000,-0.560000
-0.560000,-0.300000,-1.000000
-1.000000,-0.300000,-0.560000
-1.000000,-0.525000,-0.000000
-1.000000,-0.525000,0.560000
-0.560000,-0.525000,1.000000
-0.000000,-0.525000,1.000000
-0.750000,-0.637500,-0.000000
-0.750000,-0.637500,0.420000
-0.420000,-0.637500,0.750000
-0.000000,-0.637500,0.750000
-0.750000,-0.675000,-0.000000
-0.750000,-0.675000,0.420000
-0.420000,-0.675000,0.750000
-0.000000,-0.675000,0.750000
--0.560000,-0.525000,1.000000
--1.000000,-0.525000,0.560000
--1.000000,-0.525000,-0.000000
--0.420000,-0.637500,0.750000
--0.750000,-0.637500,0.420000
--0.750000,-0.637500,-0.000000
--0.420000,-0.675000,0.750000
--0.750000,-0.675000,0.420000
--0.750000,-0.675000,-0.000000
--1.000000,-0.525000,-0.560000
--0.560000,-0.525000,-1.000000
-0.000000,-0.525000,-1.000000
--0.750000,-0.637500,-0.420000
--0.420000,-0.637500,-0.750000
-0.000000,-0.637500,-0.750000
--0.750000,-0.675000,-0.420000
--0.420000,-0.675000,-0.750000
-0.000000,-0.675000,-0.750000
-0.560000,-0.525000,-1.000000
-1.000000,-0.525000,-0.560000
-0.420000,-0.637500,-0.750000
-0.750000,-0.637500,-0.420000
-0.420000,-0.675000,-0.750000
-0.750000,-0.675000,-0.420000
--0.800000,0.262500,-0.000000
--0.800000,0.262500,0.150000
--0.750000,0.375000,0.150000
--0.750000,0.375000,-0.000000
--1.150000,0.262500,-0.000000
--1.150000,0.262500,0.150000
--1.250000,0.375000,0.150000
--1.250000,0.375000,-0.000000
--1.350000,0.262500,-0.000000
--1.350000,0.262500,0.150000
--1.500000,0.375000,0.150000
--1.500000,0.375000,-0.000000
--1.350000,0.150000,-0.000000
--1.350000,0.150000,0.150000
--1.500000,0.150000,0.150000
--1.500000,0.150000,-0.000000
--0.750000,0.375000,-0.150000
--0.800000,0.262500,-0.150000
--1.250000,0.375000,-0.150000
--1.150000,0.262500,-0.150000
--1.500000,0.375000,-0.150000
--1.350000,0.262500,-0.150000
--1.500000,0.150000,-0.150000
--1.350000,0.150000,-0.150000
--1.350000,0.037500,-0.000000
--1.350000,0.037500,0.150000
--1.500000,-0.075000,0.150000
--1.500000,-0.075000,-0.000000
--1.250000,-0.187500,-0.000000
--1.250000,-0.187500,0.150000
--1.325000,-0.281250,0.150000
--1.325000,-0.281250,-0.000000
--1.000000,-0.300000,0.150000
--0.950000,-0.450000,0.150000
--0.950000,-0.450000,-0.000000
--1.500000,-0.075000,-0.150000
--1.350000,0.037500,-0.150000
--1.325000,-0.281250,-0.150000
--1.250000,-0.187500,-0.150000
--0.950000,-0.450000,-0.150000
--1.000000,-0.300000,-0.150000
-0.850000,-0.037500,-0.000000
-0.850000,-0.037500,0.330000
-0.850000,-0.450000,0.330000
-0.850000,-0.450000,-0.000000
-1.300000,-0.037500,-0.000000
-1.300000,-0.037500,0.330000
-1.550000,-0.337500,0.330000
-1.550000,-0.337500,-0.000000
-1.150000,0.300000,-0.000000
-1.150000,0.300000,0.125000
-1.200000,0.262500,0.125000
-1.200000,0.262500,-0.000000
-1.350000,0.450000,-0.000000
-1.350000,0.450000,0.125000
-1.650000,0.450000,0.125000
-1.650000,0.450000,-0.000000
-0.850000,-0.450000,-0.330000
-0.850000,-0.037500,-0.330000
-1.550000,-0.337500,-0.330000
-1.300000,-0.037500,-0.330000
-1.200000,0.262500,-0.125000
-1.150000,0.300000,-0.125000
-1.650000,0.450000,-0.125000
-1.350000,0.450000,-0.125000
-1.400000,0.487500,-0.000000
-1.400000,0.487500,0.125000
-1.762500,0.496875,0.125000
-1.762500,0.496875,-0.000000
-1.450000,0.487500,-0.000000
-1.450000,0.487500,0.075000
-1.725000,0.506250,0.075000
-1.725000,0.506250,-0.000000
-1.400000,0.450000,-0.000000
-1.400000,0.450000,0.075000
-1.600000,0.450000,0.075000
-1.600000,0.450000,-0.000000
-1.762500,0.496875,-0.125000
-1.400000,0.487500,-0.125000
-1.725000,0.506250,-0.075000
-1.450000,0.487500,-0.075000
-1.600000,0.450000,-0.075000
-1.400000,0.450000,-0.075000
-0.000000,0.825000,-0.000000
-0.000000,0.825000,0.001000
-0.001000,0.825000,-0.000000
-0.400000,0.825000,-0.000000
-0.400000,0.825000,0.225000
-0.225000,0.825000,0.400000
-0.000000,0.825000,0.400000
-0.000000,0.675000,-0.000000
-0.100000,0.600000,-0.000000
-0.100000,0.600000,0.056000
-0.056000,0.600000,0.100000
-0.000000,0.600000,0.100000
--0.001000,0.825000,-0.000000
--0.225000,0.825000,0.400000
--0.400000,0.825000,0.225000
--0.400000,0.825000,-0.000000
--0.056000,0.600000,0.100000
--0.100000,0.600000,0.056000
--0.100000,0.600000,-0.000000
-0.000000,0.825000,-0.001000
--0.400000,0.825000,-0.225000
--0.225000,0.825000,-0.400000
-0.000000,0.825000,-0.400000
--0.100000,0.600000,-0.056000
--0.056000,0.600000,-0.100000
-0.000000,0.600000,-0.100000
-0.225000,0.825000,-0.400000
-0.400000,0.825000,-0.225000
-0.056000,0.600000,-0.100000
-0.100000,0.600000,-0.056000
-0.200000,0.525000,-0.000000
-0.200000,0.525000,0.112000
-0.112000,0.525000,0.200000
-0.000000,0.525000,0.200000
-0.650000,0.525000,-0.000000
-0.650000,0.525000,0.364000
-0.364000,0.525000,0.650000
-0.000000,0.525000,0.650000
-0.650000,0.450000,-0.000000
-0.650000,0.450000,0.364000
-0.364000,0.450000,0.650000
-0.000000,0.450000,0.650000
--0.112000,0.525000,0.200000
--0.200000,0.525000,0.112000
--0.200000,0.525000,-0.000000
--0.364000,0.525000,0.650000
--0.650000,0.525000,0.364000
--0.650000,0.525000,-0.000000
--0.364000,0.450000,0.650000
--0.650000,0.450000,0.364000
--0.650000,0.450000,-0.000000
--0.200000,0.525000,-0.112000
--0.112000,0.525000,-0.200000
-0.000000,0.525000,-0.200000
--0.650000,0.525000,-0.364000
--0.364000,0.525000,-0.650000
-0.000000,0.525000,-0.650000
--0.650000,0.450000,-0.364000
--0.364000,0.450000,-0.650000
-0.000000,0.450000,-0.650000
-0.112000,0.525000,-0.200000
-0.200000,0.525000,-0.112000
-0.364000,0.525000,-0.650000
-0.650000,0.525000,-0.364000
-0.364000,0.450000,-0.650000
-0.650000,0.450000,-0.364000
-0.000000,-0.750000,-0.000000
-0.750000,-0.675000,-0.000000
-0.750000,-0.675000,-0.420000
-0.420000,-0.675000,-0.750000
-0.000000,-0.675000,-0.750000
-0.750000,-0.712500,-0.000000
-0.750000,-0.712500,-0.420000
-0.420000,-0.712500,-0.750000
-0.000000,-0.712500,-0.750000
-0.712500,-0.750000,-0.000000
-0.712500,-0.750000,-0.399000
-0.399000,-0.750000,-0.712500
-0.000000,-0.750000,-0.712500
--0.420000,-0.675000,-0.750000
--0.750000,-0.675000,-0.420000
--0.750000,-0.675000,-0.000000
--0.420000,-0.712500,-0.750000
--0.750000,-0.712500,-0.420000
--0.750000,-0.712500,-0.000000
--0.399000,-0.750000,-0.712500
--0.712500,-0.750000,-0.399000
--0.712500,-0.750000,-0.000000
--0.750000,-0.675000,0.420000
--0.420000,-0.675000,0.750000
-0.000000,-0.675000,0.750000
--0.750000,-0.712500,0.420000
--0.420000,-0.712500,0.750000
-0.000000,-0.712500,0.750000
--0.712500,-0.750000,0.399000
--0.399000,-0.750000,0.712500
-0.000000,-0.750000,0.712500
-0.420000,-0.675000,0.750000
-0.750000,-0.675000,0.420000
-0.420000,-0.712500,0.750000
-0.750000,-0.712500,0.420000
-0.399000,-0.750000,0.712500
-0.712500,-0.750000,0.399000
diff --git a/src/imports/shapes/teapot.h b/src/imports/shapes/teapot.h
deleted file mode 100644
index 90f7a95b..00000000
--- a/src/imports/shapes/teapot.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef CUBE_H
-#define CUBE_H
-
-// This is a dummy header for defining the interface of "Teapot.qml" to qdoc.
-
-#include "qdeclarativeitem3d.h"
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class Teapot : public QDeclarativeItem3D
-{
- Q_OBJECT
-public:
- Teapot(QObject *parent = 0) : QDeclarativeItem3D(parent) {}
- ~Teapot() {}
-};
-
-QML_DECLARE_TYPE(Cube)
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/imports/shapes/teapot.qdoc b/src/imports/shapes/teapot.qdoc
deleted file mode 100644
index 0762e27a..00000000
--- a/src/imports/shapes/teapot.qdoc
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \qmlclass Teapot Teapot
- \brief The Teapot item represents a stock teapot object.
- \since 4.8
- \ingroup qt3d::qml3d::shapes
- \inherits Item3D
-
- The Teapot element in QML provides a simple way to create a teapot
- object, usually for testing material effects and complex
- geometry. For example, the following QML code displays a teapot
- of size 1.5, centered on the origin and covered in the Qt logo
- texture:
-
- \code
- Teapot {
- scale: 1.5
- effect: Effect {
- color: "#aaca00"
- texture: "qtlogo.png"
- decal: true
- }
- }
- \endcode
-
- \image teapot-qt-screenshot.png
-
- The Teapot element is part of the \c{Qt3D.Shapes} namespace,
- so the following must appear at the top of any QML file that
- references it:
-
- \code
- import Qt3D.Shapes 1.0
- \endcode
-
- The teapot can be moved from the origin by specifying the
- Item3D::position property:
-
- \code
- Teapot {
- scale: 1.5
- position: Qt.vector3d(1, 0, 5)
- effect: Effect {
- color: "#aaca00"
- texture: "qtlogo.png"
- decal: true
- }
- }
- \endcode
-
- \sa Item3D
-*/