summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pro2
-rw-r--r--tests/auto/qml3d/QtQuickTest/TestCase.qml254
-rw-r--r--tests/auto/qml3d/QtQuickTest/qmldir1
-rw-r--r--tests/auto/qml3d/QtQuickTest/testlogger.js164
-rw-r--r--tests/auto/qml3d/effect/test.pngbin159 -> 0 bytes
-rw-r--r--tests/auto/qml3d/effect/tst_effect.qml118
-rw-r--r--tests/auto/qml3d/item3d/square.3dsbin120 -> 0 bytes
-rw-r--r--tests/auto/qml3d/item3d/test_data/test-image.pngbin4445 -> 0 bytes
-rw-r--r--tests/auto/qml3d/item3d/tst_item3d.qml400
-rw-r--r--tests/auto/qml3d/item3d/tst_item3d_local_v_world.qml213
-rw-r--r--tests/auto/qml3d/item3d/tst_missing_texture_coordinates.qml74
-rw-r--r--tests/auto/qml3d/lookat/tst_lookat.qml194
-rw-r--r--tests/auto/qml3d/mesh/test_data/teapot.bez340
-rw-r--r--tests/auto/qml3d/mesh/tst_mesh.qml127
-rw-r--r--tests/auto/qml3d/modelview/textures/amethyst.jpgbin3103 -> 0 bytes
-rw-r--r--tests/auto/qml3d/modelview/textures/bigblue.jpgbin1052 -> 0 bytes
-rw-r--r--tests/auto/qml3d/modelview/textures/blueweb.jpgbin4506 -> 0 bytes
-rw-r--r--tests/auto/qml3d/modelview/textures/pastelstuff.jpgbin4408 -> 0 bytes
-rw-r--r--tests/auto/qml3d/modelview/textures/qtlogo.pngbin13923 -> 0 bytes
-rw-r--r--tests/auto/qml3d/modelview/textures/threedgreen.jpgbin3581 -> 0 bytes
-rw-r--r--tests/auto/qml3d/modelview/tst_modelview.qml270
-rw-r--r--tests/auto/qml3d/picking/tst_picking.qml193
-rw-r--r--tests/auto/qml3d/qml3d.pro23
-rw-r--r--tests/auto/qml3d/scale3d/tst_scale3d.qml109
-rw-r--r--tests/auto/qml3d/shaders/test.pngbin159 -> 0 bytes
-rw-r--r--tests/auto/qml3d/shaders/tst_shaders.qml136
-rw-r--r--tests/auto/qml3d/sphere/tst_sphere.qml126
-rw-r--r--tests/auto/qml3d/tst_qml3d.cpp414
-rw-r--r--tests/auto/qml3d/viewport/tst_viewport.qml138
-rw-r--r--tests/auto/threed/load_model/load_model.pro9
-rw-r--r--tests/auto/threed/load_model/load_model.qrc13
-rw-r--r--tests/auto/threed/load_model/models/basic-cube.3dsbin435 -> 0 bytes
-rw-r--r--tests/auto/threed/load_model/models/basic-cube.blendbin128232 -> 0 bytes
-rw-r--r--tests/auto/threed/load_model/models/basic-cube.dae192
-rw-r--r--tests/auto/threed/load_model/models/basic-cube.m3gbin1188 -> 0 bytes
-rw-r--r--tests/auto/threed/load_model/models/basic-cube.mtl22
-rw-r--r--tests/auto/threed/load_model/models/basic-cube.obj27
-rw-r--r--tests/auto/threed/load_model/models/basic-cube.ply43
-rw-r--r--tests/auto/threed/load_model/models/basic-cube.x3d30
-rw-r--r--tests/auto/threed/load_model/models/cube.dae146
-rw-r--r--tests/auto/threed/load_model/models/teacup.bez280
-rw-r--r--tests/auto/threed/load_model/models/wave.obj476
-rw-r--r--tests/auto/threed/load_model/tst_load_model.cpp232
-rw-r--r--tests/auto/threed/qareaallocator/qareaallocator.pro6
-rw-r--r--tests/auto/threed/qareaallocator/tst_qareaallocator.cpp280
-rw-r--r--tests/auto/threed/qarray/qarray.pro6
-rw-r--r--tests/auto/threed/qarray/tst_qarray.cpp1862
-rw-r--r--tests/auto/threed/qbox3d/qbox3d.pro6
-rw-r--r--tests/auto/threed/qbox3d/tst_qbox3d.cpp1302
-rw-r--r--tests/auto/threed/qcolor4ub/qcolor4ub.pro6
-rw-r--r--tests/auto/threed/qcolor4ub/tst_qcolor4ub.cpp341
-rw-r--r--tests/auto/threed/qcustomdataarray/qcustomdataarray.pro6
-rw-r--r--tests/auto/threed/qcustomdataarray/tst_qcustomdataarray.cpp139
-rw-r--r--tests/auto/threed/qgeometrydata/qgeometrydata.pro9
-rw-r--r--tests/auto/threed/qgeometrydata/tst_qgeometrydata.cpp629
-rw-r--r--tests/auto/threed/qglabstractsurface/qglabstractsurface.pro6
-rw-r--r--tests/auto/threed/qglabstractsurface/tst_qglabstractsurface.cpp333
-rw-r--r--tests/auto/threed/qglattributedescription/qglattributedescription.pro9
-rw-r--r--tests/auto/threed/qglattributedescription/tst_qglattributedescription.cpp137
-rw-r--r--tests/auto/threed/qglattributeset/qglattributeset.pro6
-rw-r--r--tests/auto/threed/qglattributeset/tst_qglattributeset.cpp211
-rw-r--r--tests/auto/threed/qglattributevalue/qglattributevalue.pro9
-rw-r--r--tests/auto/threed/qglattributevalue/tst_qglattributevalue.cpp262
-rw-r--r--tests/auto/threed/qglbezierpatches/qglbezierpatches.pro6
-rw-r--r--tests/auto/threed/qglbezierpatches/tst_qglbezierpatches.cpp214
-rw-r--r--tests/auto/threed/qglbuilder/qglbuilder.pro8
-rw-r--r--tests/auto/threed/qglbuilder/tst_qglbuilder.cpp888
-rw-r--r--tests/auto/threed/qglcamera/qglcamera.pro10
-rw-r--r--tests/auto/threed/qglcamera/tst_qglcamera.cpp327
-rw-r--r--tests/auto/threed/qglcameraanimation/qglcameraanimation.pro9
-rw-r--r--tests/auto/threed/qglcameraanimation/tst_qglcameraanimation.cpp162
-rw-r--r--tests/auto/threed/qglcolladafxeffectfactory/collada_cube.xml127
-rw-r--r--tests/auto/threed/qglcolladafxeffectfactory/qglcolladafxeffectfactory.pro13
-rw-r--r--tests/auto/threed/qglcolladafxeffectfactory/rose01.jpgbin1835 -> 0 bytes
-rw-r--r--tests/auto/threed/qglcolladafxeffectfactory/tst_qglcolladafxeffectfactory.cpp312
-rw-r--r--tests/auto/threed/qglcolladafxeffectfactory/tst_qglcolladafxeffectfactory.qrc8
-rw-r--r--tests/auto/threed/qglcube/qglcube.pro7
-rw-r--r--tests/auto/threed/qglcube/tst_qglcube.cpp185
-rw-r--r--tests/auto/threed/qglcylinder/qglcylinder.pro7
-rw-r--r--tests/auto/threed/qglcylinder/tst_qglcylinder.cpp283
-rw-r--r--tests/auto/threed/qglindexbuffer/qglindexbuffer.pro6
-rw-r--r--tests/auto/threed/qglindexbuffer/tst_qglindexbuffer.cpp478
-rw-r--r--tests/auto/threed/qgllightmodel/qgllightmodel.pro6
-rw-r--r--tests/auto/threed/qgllightmodel/tst_qgllightmodel.cpp122
-rw-r--r--tests/auto/threed/qgllightparameters/qgllightparameters.pro6
-rw-r--r--tests/auto/threed/qgllightparameters/tst_qgllightparameters.cpp275
-rw-r--r--tests/auto/threed/qglmaterial/qglmaterial.pro6
-rw-r--r--tests/auto/threed/qglmaterial/tst_qglmaterial.cpp714
-rw-r--r--tests/auto/threed/qglmaterialcollection/qglmaterialcollection.pro6
-rw-r--r--tests/auto/threed/qglmaterialcollection/tst_qglmaterialcollection.cpp236
-rw-r--r--tests/auto/threed/qglpainter/qglpainter.pro15
-rw-r--r--tests/auto/threed/qglpainter/qglsimulator.cpp129
-rw-r--r--tests/auto/threed/qglpainter/qglsimulator.h91
-rw-r--r--tests/auto/threed/qglpainter/qgltestwidget.cpp121
-rw-r--r--tests/auto/threed/qglpainter/qgltestwidget.h75
-rw-r--r--tests/auto/threed/qglpainter/tst_qglpainter.cpp874
-rw-r--r--tests/auto/threed/qglpickcolors/qglpickcolors.pro14
-rw-r--r--tests/auto/threed/qglpickcolors/tst_qglpickcolors.cpp299
-rw-r--r--tests/auto/threed/qglrender/qglrender.pro6
-rw-r--r--tests/auto/threed/qglrender/tst_qglrender.cpp259
-rw-r--r--tests/auto/threed/qglscenenode/qglscenenode.pro7
-rw-r--r--tests/auto/threed/qglscenenode/tst_qglscenenode.cpp751
-rw-r--r--tests/auto/threed/qglsection/qglsection.pro8
-rw-r--r--tests/auto/threed/qglsection/tst_qglsection.cpp674
-rw-r--r--tests/auto/threed/qglsharedresource/qglsharedresource.pro10
-rw-r--r--tests/auto/threed/qglsharedresource/tst_qglsharedresource.cpp158
-rw-r--r--tests/auto/threed/qglsphere/qglsphere.pro7
-rw-r--r--tests/auto/threed/qglsphere/tst_qglsphere.cpp125
-rw-r--r--tests/auto/threed/qglvertexbundle/qglvertexbundle.pro6
-rw-r--r--tests/auto/threed/qglvertexbundle/tst_qglvertexbundle.cpp282
-rw-r--r--tests/auto/threed/qgraphicstransform3d/qgraphicstransform3d.pro6
-rw-r--r--tests/auto/threed/qgraphicstransform3d/tst_qgraphicstransform3d.cpp280
-rw-r--r--tests/auto/threed/qopenglfunctions/qopenglfunctions.pro6
-rw-r--r--tests/auto/threed/qopenglfunctions/tst_qopenglfunctions.cpp245
-rw-r--r--tests/auto/threed/qplane3d/qplane3d.pro6
-rw-r--r--tests/auto/threed/qplane3d/tst_qplane3d.cpp450
-rw-r--r--tests/auto/threed/qray3d/qray3d.pro5
-rw-r--r--tests/auto/threed/qray3d/tst_qray3d.cpp540
-rw-r--r--tests/auto/threed/qsphere3d/qsphere3d.pro5
-rw-r--r--tests/auto/threed/qsphere3d/tst_qsphere3d.cpp238
-rw-r--r--tests/auto/threed/qstereoimage/qstereoimage.pro10
-rw-r--r--tests/auto/threed/qstereoimage/tst_qstereoimage.cpp428
-rw-r--r--tests/auto/threed/qtriangle3d/qtriangle3d.pro6
-rw-r--r--tests/auto/threed/qtriangle3d/tst_qtriangle3d.cpp714
-rw-r--r--tests/auto/threed/qvectorarray/qvectorarray.pro7
-rw-r--r--tests/auto/threed/qvectorarray/tst_qvectorarray.cpp664
-rw-r--r--tests/auto/threed/threed.pro40
-rw-r--r--tests/benchmarks/benchmarks.pro4
-rw-r--r--tests/benchmarks/matrix_properties/data/CustomObject.qml46
-rw-r--r--tests/benchmarks/matrix_properties/data/matrix_component.qml171
-rw-r--r--tests/benchmarks/matrix_properties/matrix_properties.pro18
-rw-r--r--tests/benchmarks/matrix_properties/tst_matrix_properties.cpp183
-rw-r--r--tests/benchmarks/qarray/qarray.pro5
-rw-r--r--tests/benchmarks/qarray/tst_qarray.cpp503
-rw-r--r--tests/benchmarks/qglbuilder_perf/qglbuilder_perf.pro6
-rw-r--r--tests/benchmarks/qglbuilder_perf/tst_qglbuilder_perf.cpp245
-rw-r--r--tests/manual/animations/animations.pro10
-rw-r--r--tests/manual/animations/main.cpp63
-rw-r--r--tests/manual/animations/qml/TestCase.qml89
-rw-r--r--tests/manual/animations/qml/tst_animations.qml117
-rw-r--r--tests/manual/animations/qtquick3d.pngbin6565 -> 0 bytes
-rw-r--r--tests/manual/animations/tst_animations_qml.desktop7
-rw-r--r--tests/manual/displaymodel/README16
-rw-r--r--tests/manual/displaymodel/displaymodel.pro10
-rw-r--r--tests/manual/displaymodel/main.cpp63
-rw-r--r--tests/manual/displaymodel/qml/meshes/lunar-lander.3dsbin23456 -> 0 bytes
-rw-r--r--tests/manual/displaymodel/qml/meshes/monkey.mtl2
-rw-r--r--tests/manual/displaymodel/qml/meshes/monkey.obj1013
-rw-r--r--tests/manual/displaymodel/qml/meshes/teapot.bez340
-rw-r--r--tests/manual/displaymodel/qml/tst_displaymodel.qml371
-rw-r--r--tests/manual/displaymodel/qtquick3d.pngbin4050 -> 0 bytes
-rw-r--r--tests/manual/lighting/lighting.pro10
-rw-r--r--tests/manual/lighting/main.cpp63
-rw-r--r--tests/manual/lighting/qml/LightingTestCase.qml132
-rw-r--r--tests/manual/lighting/qml/tst_lighting.qml76
-rw-r--r--tests/manual/lighting/qtquick3d.pngbin4050 -> 0 bytes
-rw-r--r--tests/manual/lighting/tst_lighting_qml.desktop7
-rw-r--r--tests/manual/manual.pro13
-rw-r--r--tests/manual/model3ds/README12
-rw-r--r--tests/manual/model3ds/main.cpp63
-rw-r--r--tests/manual/model3ds/model3ds.pro10
-rw-r--r--tests/manual/model3ds/model3ds.qrc10
-rw-r--r--tests/manual/model3ds/qml/meshes/hazard.pngbin64685 -> 0 bytes
-rw-r--r--tests/manual/model3ds/qml/meshes/lunar-lander.3dsbin23456 -> 0 bytes
-rw-r--r--tests/manual/model3ds/qml/meshes/monkey.3dsbin13886 -> 0 bytes
-rw-r--r--tests/manual/model3ds/qml/meshes/penguin.3dsbin36301 -> 0 bytes
-rw-r--r--tests/manual/model3ds/qml/meshes/robot.3dsbin76250 -> 0 bytes
-rw-r--r--tests/manual/model3ds/qml/tst_model3ds.qml199
-rw-r--r--tests/manual/model3ds/qtquick3d.pngbin4050 -> 0 bytes
-rw-r--r--tests/manual/model3ds/tst_submesh_qml.desktop7
-rw-r--r--tests/manual/navigation1/README8
-rw-r--r--tests/manual/navigation1/main.cpp63
-rw-r--r--tests/manual/navigation1/navigation1.pro10
-rw-r--r--tests/manual/navigation1/qml/meshes/monkey.3dsbin13886 -> 0 bytes
-rw-r--r--tests/manual/navigation1/qml/tst_navigation1.qml133
-rw-r--r--tests/manual/navigation1/qtquick3d.pngbin4050 -> 0 bytes
-rw-r--r--tests/manual/qrc/README4
-rw-r--r--tests/manual/qrc/main.cpp67
-rw-r--r--tests/manual/qrc/qml/cube.qml63
-rw-r--r--tests/manual/qrc/qml/qtlogo.pngbin13923 -> 0 bytes
-rw-r--r--tests/manual/qrc/qrc.pro17
-rw-r--r--tests/manual/qrc/qrc.qrc6
-rw-r--r--tests/manual/qrc/qtquick3d.pngbin4050 -> 0 bytes
-rw-r--r--tests/manual/qrc/tst_qrc_qml.desktop7
-rw-r--r--tests/manual/qt3d.svg32
-rw-r--r--tests/manual/qtquick3d.svg23
-rw-r--r--tests/manual/rotation/main.cpp63
-rw-r--r--tests/manual/rotation/qml/TestCase.qml97
-rw-r--r--tests/manual/rotation/qml/tst_rotation.qml102
-rw-r--r--tests/manual/rotation/qtquick3d.pngbin4050 -> 0 bytes
-rw-r--r--tests/manual/rotation/rotation.pro10
-rw-r--r--tests/manual/rotation/tst_rotation_qml.desktop7
-rw-r--r--tests/manual/scaling/main.cpp63
-rw-r--r--tests/manual/scaling/qml/ScalingTestCase.qml122
-rw-r--r--tests/manual/scaling/qml/tst_scaling.qml150
-rw-r--r--tests/manual/scaling/qtquick3d.pngbin4050 -> 0 bytes
-rw-r--r--tests/manual/scaling/scaling.pro10
-rw-r--r--tests/manual/scaling/tst_scaling_qml.desktop7
-rw-r--r--tests/manual/shapes/README6
-rw-r--r--tests/manual/shapes/main.cpp63
-rw-r--r--tests/manual/shapes/qml/tst_shapes.qml98
-rw-r--r--tests/manual/shapes/qtquick3d.pngbin4050 -> 0 bytes
-rw-r--r--tests/manual/shapes/shapes.pro10
-rw-r--r--tests/manual/shapes/tst_shapes_qml.desktop7
-rw-r--r--tests/manual/submesh/README9
-rw-r--r--tests/manual/submesh/main.cpp63
-rw-r--r--tests/manual/submesh/qml/meshes/lunar-lander.3dsbin23456 -> 0 bytes
-rw-r--r--tests/manual/submesh/qml/tst_submesh.qml207
-rw-r--r--tests/manual/submesh/qtquick3d.pngbin4050 -> 0 bytes
-rw-r--r--tests/manual/submesh/submesh.pro10
-rw-r--r--tests/manual/submesh/tst_submesh_qml.desktop7
-rw-r--r--tests/manual/transformations/main.cpp63
-rw-r--r--tests/manual/transformations/qml/ComposedItemTransformationsTestCase.qml149
-rw-r--r--tests/manual/transformations/qml/TransformationListTestCase.qml144
-rw-r--r--tests/manual/transformations/qml/tst_transformations.qml64
-rw-r--r--tests/manual/transformations/qtquick3d.pngbin4050 -> 0 bytes
-rw-r--r--tests/manual/transformations/transformations.pro10
-rw-r--r--tests/manual/transformations/tst_transformations_qml.desktop7
-rw-r--r--tests/manual/translation/README1
-rw-r--r--tests/manual/translation/main.cpp63
-rw-r--r--tests/manual/translation/qml/AxesVsVectorTestCase.qml155
-rw-r--r--tests/manual/translation/qml/TranslationTestCase.qml110
-rw-r--r--tests/manual/translation/qml/TranslationVectorTestCase.qml114
-rw-r--r--tests/manual/translation/qml/tst_translation.qml158
-rw-r--r--tests/manual/translation/qtquick3d.pngbin4050 -> 0 bytes
-rw-r--r--tests/manual/translation/translation.pro10
-rw-r--r--tests/manual/translation/tst_translation_qml.desktop7
-rw-r--r--tests/shared/compareimage.cpp165
-rw-r--r--tests/shared/compareimage.h54
-rw-r--r--tests/shared/qmlres.h129
-rw-r--r--tests/shared/qtest_helpers.h160
-rw-r--r--tests/systemtests/sys_quick3d.pro11
-rw-r--r--tests/systemtests/sys_quick3d.qtt1094
-rw-r--r--tests/tests.pro8
234 files changed, 0 insertions, 30417 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
deleted file mode 100644
index 876fd153..00000000
--- a/tests/auto/auto.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS = threed qml3d
diff --git a/tests/auto/qml3d/QtQuickTest/TestCase.qml b/tests/auto/qml3d/QtQuickTest/TestCase.qml
deleted file mode 100644
index 49cb73c4..00000000
--- a/tests/auto/qml3d/QtQuickTest/TestCase.qml
+++ /dev/null
@@ -1,254 +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 Qt 4.7
-import "testlogger.js" as TestLogger
-
-Item {
- id: testCase
- visible: false
-
- // Name of the test case to prefix the function name in messages.
- property string name
-
- // Set to true to start the test running.
- property bool when: true
-
- // Set to true once the test has completed.
- property bool completed: false
-
- // Set to true when the test is running but not yet complete.
- property bool running: false
-
- // Set to true if the test doesn't have to run (because some
- // other test failed which this one depends on).
- property bool optional: false
-
- // Internal private state
- property string currentTestCase
- property bool expectingFail
- property string expectFailMsg
- property bool prevWhen: true
- property int testId: -1
-
- TestReport { id: reporter }
-
- function fail(msg) {
- if (!msg)
- msg = "";
- if (expectingFail) {
- TestLogger.log_expect_fail(currentTestCase, expectFailMsg, msg)
- throw new Error("QtTest::expect_fail")
- } else {
- TestLogger.log_fail(currentTestCase, msg)
- throw new Error("QtTest::fail")
- }
- }
-
- function fail2(msg, msg2) {
- if (msg)
- fail(msg + ": " + msg2)
- else
- fail(msg2)
- }
-
- function verify(cond, msg) {
- if (!cond)
- fail(msg)
- }
-
- function compare(actual, expected, msg) {
- if (typeof actual == "number" && typeof expected == "number") {
- // Use a fuzzy compare if the two values are floats
- if (Math.abs(actual - expected) <= 0.00001)
- return
- } else if (typeof actual == "object" && typeof expected == "object") {
- // Does the expected value look like a vector3d?
- if ("x" in expected && "y" in expected && "z" in expected) {
- if (Math.abs(actual.x - expected.x) <= 0.00001 &&
- Math.abs(actual.y - expected.y) <= 0.00001 &&
- Math.abs(actual.z - expected.z) <= 0.00001)
- return
- fail2(msg, "actual: Qt.vector3d(" +
- actual.x + ", " + actual.y + ", " + actual.z +
- "), expected: Qt.vector3d(" +
- expected.x + ", " + expected.y + ", " + expected.z +
- ")")
- return
- }
- if (actual == expected)
- return
- } else if (actual == expected) {
- return
- }
- fail2(msg, "actual: " + actual + ", expected: " + expected)
- }
-
- function skip(msg) {
- TestLogger.log_skip(currentTestCase, msg)
- throw new Error("QtTest::skip")
- }
-
- function expectFail(msg) {
- expectingFail = true
- expectFailMsg = msg
- }
-
- property variant testCaseResult
-
- function runInternal(prop, dataDriven, arg, tag) {
- currentTestCase = TestLogger.log_prefixed_name(name, prop)
- if (dataDriven && tag)
- currentTestCase += " [" + tag + "]"
- expectingFail = false
- var success = true
- try {
- testCaseResult = testCase[prop](arg)
- if (expectingFail) {
- success = false
- TestLogger.log_expect_fail_pass(currentTestCase)
- } else if (!dataDriven) {
- TestLogger.log_pass(currentTestCase)
- }
- } catch (e) {
- testCaseResult = []
- if (e.message == "QtTest::fail") {
- success = false
- } else if (e.message.indexOf("QtTest::") != 0) {
- // Test threw an unrecognized exception - fail.
- TestLogger.log_fail(currentTestCase, e.message)
- success = false
- }
- }
- return success
- }
-
- function run() {
- TestLogger.log_start_test(reporter)
- var success = true
- running = true
- var testList = []
- for (var prop in testCase) {
- if (prop.indexOf("test_") != 0)
- continue
- if (filterTestCases.length > 0) {
- // if there is a list, only run the tests in the list
- var excludeTest = true
- for (var i = 0; i < filterTestCases.length && excludeTest; i++)
- {
- if (filterTestCases[i] == prop)
- excludeTest = false
- }
- if (excludeTest)
- continue
- }
- var tail = prop.lastIndexOf("_data");
- if (tail != -1 && tail == (prop.length - 5))
- continue
- testList.push(prop)
- }
- testList.sort()
- for (var index in testList) {
- var prop = testList[index]
- var datafunc = prop + "_data"
- if (datafunc in testCase) {
- if (runInternal(datafunc, true)) {
- var table = testCaseResult
- var successThis = true
- var haveData = false
- for (var index in table) {
- haveData = true
- var row = table[index]
- if (!runInternal(prop, true, row, row.tag))
- successThis = false
- }
- if (!haveData)
- TestLogger.log_message("WARNING: no data supplied for " + prop + "() by " + datafunc + "()")
- if (successThis) {
- var prefix;
- if (name)
- prefix = name + "::"
- currentTestCase = prefix + prop + "()"
- TestLogger.log_pass(currentTestCase)
- } else {
- success = false
- }
- } else {
- success = false
- }
- } else {
- if (!runInternal(prop, false))
- success = false
- }
- }
- currentTestCase = ""
- running = false
- completed = true
- TestLogger.log_complete_test(testId, reporter)
- return success
- }
-
- onWhenChanged: {
- if (when != prevWhen) {
- prevWhen = when
- if (when && !completed && !running)
- run()
- }
- }
-
- onOptionalChanged: {
- if (!completed) {
- if (optional)
- TestLogger.log_optional_test(testId)
- else
- TestLogger.log_mandatory_test(testId)
- }
- }
-
- Component.onCompleted: {
- testId = TestLogger.log_register_test(name)
- if (optional)
- TestLogger.log_optional_test(testId)
- prevWhen = when
- if (when && !completed && !running)
- run()
- }
-}
diff --git a/tests/auto/qml3d/QtQuickTest/qmldir b/tests/auto/qml3d/QtQuickTest/qmldir
deleted file mode 100644
index 56f9177a..00000000
--- a/tests/auto/qml3d/QtQuickTest/qmldir
+++ /dev/null
@@ -1 +0,0 @@
-TestCase 1.0 TestCase.qml
diff --git a/tests/auto/qml3d/QtQuickTest/testlogger.js b/tests/auto/qml3d/QtQuickTest/testlogger.js
deleted file mode 100644
index 54d537cc..00000000
--- a/tests/auto/qml3d/QtQuickTest/testlogger.js
+++ /dev/null
@@ -1,164 +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$
-**
-****************************************************************************/
-
-.pragma library
-
-// We need a global place to store the results that can be
-// shared between multiple TestCase instances. Because QML
-// creates a separate scope for every inclusion of this file,
-// we hijack the global "Qt" object to store our data.
-function log_init_results()
-{
- if (!Qt.testResults) {
- Qt.testResults = {
- suiteName: "",
- reportedStart: false,
- numPassed: 0,
- numFailed: 0,
- numSkipped: 0,
- nextId: 0,
- testCases: [],
- reporter: null
- }
- }
-}
-
-function log_fail(testcase, msg)
-{
- if (!msg)
- msg = ""
- Qt.testResults.reporter.log_fail(testcase, msg);
- ++Qt.testResults.numFailed
-}
-
-function log_expect_fail(testcase, expectmsg, msg)
-{
- if (!msg)
- msg = ""
- if (expectmsg)
- Qt.testResults.reporter.log_expect_fail(testcase, expectmsg + " " + msg);
- else
- Qt.testResults.reporter.log_expect_fail(testcase, msg);
- ++Qt.testResults.numPassed
-}
-
-function log_expect_fail_pass(testcase)
-{
- Qt.testResults.reporter.log_expect_fail_pass(testcase);
- ++Qt.testResults.numFailed
-}
-
-function log_skip(testcase, msg)
-{
- if (!msg)
- msg = ""
- Qt.testResults.reporter.log_skip(testcase, msg);
- ++Qt.testResults.numSkipped
-}
-
-function log_pass(testcase)
-{
- Qt.testResults.reporter.log_pass(testcase);
- ++Qt.testResults.numPassed
-}
-
-function log_message(msg)
-{
- Qt.testResults.reporter.log_message(msg);
-}
-
-function log_register_test(name)
-{
- log_init_results()
- if (name && !Qt.testResults.suiteName)
- Qt.testResults.suiteName = name
- var testId = Qt.testResults.nextId++
- Qt.testResults.testCases.push(testId)
- return testId
-}
-
-function log_optional_test(testId)
-{
- log_init_results()
- var index = Qt.testResults.testCases.indexOf(testId)
- if (index >= 0)
- Qt.testResults.testCases.splice(index, 1)
-}
-
-function log_mandatory_test(testId)
-{
- log_init_results()
- var index = Qt.testResults.testCases.indexOf(testId)
- if (index == -1)
- Qt.testResults.testCases.push(testId)
-}
-
-function log_start_test(reporter)
-{
- log_init_results()
- Qt.testResults.reporter = reporter
- if (Qt.testResults.reportedStart)
- return
- Qt.testResults.reportedStart = true
-}
-
-function log_complete_test(testId, reporter)
-{
- var index = Qt.testResults.testCases.indexOf(testId)
- if (index >= 0)
- Qt.testResults.testCases.splice(index, 1)
- if (!Qt.testResults.testCases.length) {
- reporter.report(Qt.testResults.numPassed,
- Qt.testResults.numFailed,
- Qt.testResults.numSkipped)
- Qt.quit()
- }
-}
-
-function log_prefixed_name(name, funcname)
-{
- if (!name)
- name = Qt.testResults.suiteName
- if (name)
- return name + "::" + funcname + "()"
- else
- return funcname + "()"
-}
diff --git a/tests/auto/qml3d/effect/test.png b/tests/auto/qml3d/effect/test.png
deleted file mode 100644
index 80a4868f..00000000
--- a/tests/auto/qml3d/effect/test.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qml3d/effect/tst_effect.qml b/tests/auto/qml3d/effect/tst_effect.qml
deleted file mode 100644
index bdfa7f1b..00000000
--- a/tests/auto/qml3d/effect/tst_effect.qml
+++ /dev/null
@@ -1,118 +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 Qt 4.7
-import Qt3D 1.0
-import QtQuickTest 1.0
-
-Viewport {
- id: viewport
-
- Item3D {
- Effect {
- id: "effect"
- }
- }
-
- Material {
- id: "china"
- ambientColor: "#c09680"
- specularColor: "#3c3c3c"
- shininess: 128
- }
-
- TestCase {
- name: "Effect"
-
- // Note that test_material must be called before tests that create
- // a material e.g. setColor() (tests are run in alphabetical order)
- function test_material() {
- verify(!effect.material, "default material is null")
- effect.material = china;
- compare(effect.material, china, "setMaterial()");
- }
-
- function test_setColor() {
- verify(effect.color == "#ffffff", "Default color is white");
- effect.color = "#ff4488";
- verify(effect.color == "#ff4488", "setColor()")
- }
-
- function test_lighting() {
- verify(effect.useLighting == true, "Default useLighting value is true");
- effect.useLighting = false;
- verify(effect.useLighting == false, "setUseLighting()")
- }
-
- function test_decal() {
- verify(effect.decal == false, "Default decal");
- effect.decal = true;
- verify(effect.decal == true, "setDecal()");
- }
-
- function test_blending() {
- verify(effect.blending == false, "Default blending");
- effect.blending = true;
- verify(effect.blending == true, "setBlending()");
- }
-
- function test_texture() {
- verify(effect.texture == "", "Default texture");
- effect.texture = "test.png";
- verify(effect.texture != "");
- var textureString = ("" + effect.texture);
- var protocolString = textureString.substring(0,5);
- var stringLength = textureString.length;
- var fileNameFragment = textureString.substring(stringLength-8,stringLength);
- compare(protocolString, "file:", "recognize local file");
- compare(fileNameFragment, "test.png", "correct file name");
- }
-
- function test_textureImage() {
- // No support for interrogating QImages from QML
- // so can't write meaningful test case for textureImage
- }
-
- function test_progress() {
- verify(effect.progress == 0.0);
- }
- }
-}
diff --git a/tests/auto/qml3d/item3d/square.3ds b/tests/auto/qml3d/item3d/square.3ds
deleted file mode 100644
index 60c3be93..00000000
--- a/tests/auto/qml3d/item3d/square.3ds
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qml3d/item3d/test_data/test-image.png b/tests/auto/qml3d/item3d/test_data/test-image.png
deleted file mode 100644
index 9a25b489..00000000
--- a/tests/auto/qml3d/item3d/test_data/test-image.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qml3d/item3d/tst_item3d.qml b/tests/auto/qml3d/item3d/tst_item3d.qml
deleted file mode 100644
index 8689fd6a..00000000
--- a/tests/auto/qml3d/item3d/tst_item3d.qml
+++ /dev/null
@@ -1,400 +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 Qt 4.7
-import Qt3D 1.0
-import QtQuickTest 1.0
-
-Viewport {
- id: viewport
-
- Item3DClicker {
- id: mouseClicker
- }
-
- Item3D {
- id: "other"
- scale: 12
- position: Qt.vector3d(1.0, 3.0, 5.0);
- mesh: Mesh {
-
- }
- pretransform: [
- Rotation3D { id: other_item_pretransform1 ; angle: 30 ; axis: Qt.vector3d(0, 1, 0)},
- Rotation3D { id: other_item_pretransform2; angle: 90 ; axis: Qt.vector3d(1, 0, 0)}
- ]
-
- transform: [
- Rotation3D { id: other_teapot_rotate1 ; angle: 0 ; axis: Qt.vector3d(0, 1, 0)},
- Rotation3D { id: other_teapot_rotate2; angle: 0 ; axis: Qt.vector3d(0, 0, 1)}
- ]
- }
-
- Effect {
- id: "testEffect"
- }
-
- Light {
- id: "testLight"
- }
-
- Item3D {
- id: item
- property int positionHasBeenChanged: 0
- onPositionChanged : positionHasBeenChanged = positionHasBeenChanged + 1;
-
- property bool onScaleChangedSignalTriggered: false
- onScaleChanged: onScaleChangedSignalTriggered = true
-
- property bool onMeshChangedSignalTriggered: false
- onMeshChanged: onMeshChangedSignalTriggered = true
-
- property bool onEnabledChangedSignalTriggered:false
- onEnabledChanged: onEnabledChangedSignalTriggered = true
-
- property bool onEffectChangedSignalTriggered: false
- onEffectChanged: onEffectChangedSignalTriggered = true
-
- property int childrenHasBeenChanged: 0
- onChildrenChanged: childrenHasBeenChanged = childrenHasBeenChanged + 1
-
- property bool onLightChangedSignalTriggered: false
- onLightChanged: onLightChangedSignalTriggered = true
-
- property int stateChangeTestVariable: 0
-
- property bool onStateChangedSignalTriggered: false
- onStateChanged: onStateChangedSignalTriggered = true
-
- property bool onSortChildrenSignalTriggered: false
- onSortChildrenChanged: onSortChildrenSignalTriggered = true
-
- property bool onClickedSignalTriggered: false
- onClicked: onClickedSignalTriggered = true
-
- Item3D {
- id: child1
- }
-
- Item3D {
- id: child2
- }
-
- Item3D {
- id: inheritEventTestChild
- }
-
- states: [
- State {
- name: "testState1"
- PropertyChanges { target: item; stateChangeTestVariable: 1}
- },
- State {
- name: "testState2"
- PropertyChanges { target: item; stateChangeTestVariable: 2}
- }
- ]
-
- TestCase {
- name: "Item3D"
-
- // Helper function that finds the index of an object in a list
- function indexOf(list, object)
- {
- for (var i = 0; i < list.length; i++)
- if (list[i] == object)
- return i;
- return -1;
- }
-
- function test_position()
- {
- verify(item.position.x == 0, "Default position x");
- verify(item.position.y == 0, "Default position y");
- verify(item.position.z == 0, "Default position z");
-
- verify(item.x == 0, "Default x");
- verify(item.y == 0, "Default y");
- verify(item.z == 0, "Default z");
-
- verify(!item.positionHasBeenChanged, "pre signal test");
- item.position = Qt.vector3d(1,-6,1234567);
- compare(item.positionHasBeenChanged, 1, "onPositionChanged signal");
- verify(item.position.x == 1, "Set position x");
- verify(item.position.y == -6, "Set position y negative");
- verify(item.position.z == 1234567, "seven significant digits");
-
- verify(item.x == 1, "position changes x");
- verify(item.y == -6, "position changes y");
- verify(item.z == 1234567, "position changex z");
-
- item.position.x = -1;
- compare(item.positionHasBeenChanged, 2, "onPositionChanged signal from position.x property");
- item.position.y = 12;
- compare(item.positionHasBeenChanged, 3, "onPositionChanged signal from position.y property");
- item.position.z = 83461;
- compare(item.positionHasBeenChanged, 4, "onPositionChanged signal from position.z property");
- verify(item.x == -1, "position.x changes x");
- verify(item.y == 12, "position.y changes y");
- verify(item.z == 83461, "position.z changes z");
- }
-
- function test_x()
- {
- item.positionHasBeenChanged = 0;
- verify(!item.positionHasBeenChanged, "pre signal test");
-
- item.x = 324;
- verify(item.x == 324, "Set x");
- verify(item.position.x == 324, "position modified by setting x");
- compare(item.positionHasBeenChanged, 1, "onPositionChanged signal after setting x");
-
- item.x = -7;
- verify(item.x == -7, "Set x negative");
- verify(item.position.x == -7, "position modified by setting x negative");
- compare(item.positionHasBeenChanged, 2, "onPositionChanged signal after setting x negative");
-
- item.position = Qt.vector3d(2,-7,2345671);
- verify(item.x == 2, "x changed by setting postion");
- }
-
- function test_y()
- {
- item.positionHasBeenChanged = 0;
- verify(!item.positionHasBeenChanged, "pre signal test");
-
- item.y = 346;
- verify(item.y == 346, "Set y");
- verify(item.position.y == 346, "position modified by setting y");
- compare(item.positionHasBeenChanged, 1, "onPositionChanged signal after setting y");
-
- item.y = -12;
- verify(item.y == -12, "Set y negative");
- verify(item.position.y == -12, "position modified by setting y negative");
- compare(item.positionHasBeenChanged, 2, "onPositionChanged signal after setting y negative");
-
- item.position = Qt.vector3d(2, 13,2345671);
- verify(item.y == 13, "y changed by setting postion");
- }
-
- function test_z()
- {
- item.positionHasBeenChanged = 0;
- verify(!item.positionHasBeenChanged, "pre signal test");
-
- item.z = 19375;
- verify(item.z == 19375, "Set z");
- verify(item.position.z == 19375, "position modified by setting z");
- compare(item.positionHasBeenChanged, 1, "onPositionChanged signal after setting z");
-
- item.z = -74635;
- verify(item.z == -74635, "Set z negative");
- verify(item.position.z == -74635, "position modified by setting z negative");
- compare(item.positionHasBeenChanged, 2, "onPositionChanged signal after setting z negative");
-
- item.z = 0.435;
- compare(item.z, 0.435, "setting z to a real number")
- compare(item.position.z, 0.435, "position modified by setting z to a real");
- compare(item.positionHasBeenChanged, 3, "onPositionChanged signal after setting z to a real");
-
- item.position = Qt.vector3d(2, 67,2345671);
- verify(item.z == 2345671, "z changed by setting postion");
- }
-
- function test_scale()
- {
- verify(!item.onScaleChangedSignalTriggered);
- compare(item.scale, 1, "default value");
- item.scale = 2.5;
- compare(item.scale, 2.5, "setScale");
- verify(item.onScaleChangedSignalTriggered, "scaleChanged signal");
- item.scale = other.scale;
- compare(item.scale, 12, "setScale from other item");
- }
-
- function test_transform()
- {
- compare(item.transform.length, 0, "Default transformations are empty");
- compare(other.transform.length, 2, "non-empty transform");
- // no public set function
- }
-
- function test_pretransform()
- {
- compare(item.pretransform.length, 0, "Default pretransformations are empty");
- compare(other.pretransform.length, 2, "non-empty pretransform");
- // no public set function
- }
-
- function test_inheritEvents()
- {
- verify(!item.inheritEvents, "default inheritEvents is false");
- compare(item.onClickedSignalTriggered, false, "pretest onClickedSignalTriggered check");
- compare(inheritEventTestChild.parent, item, "pretest parent check");
-
- mouseClicker.click(inheritEventTestChild);
- compare(item.onClickedSignalTriggered, false,
- "no parent event when inheritEvents is false");
-
- item.inheritEvents = true;
- verify(item.inheritEvents, "setInheritEvents()");
- mouseClicker.click(inheritEventTestChild);
- compare(item.onClickedSignalTriggered, true, "parent event when inheritEvents is true");
- }
-
- function test_mesh()
- {
- verify(!item.mesh, "default mesh value");
- verify(other.mesh != null, "non-null mesh");
- item.mesh = other.mesh;
- verify(item.onMeshChangedSignalTriggered, "MeshChanged signal");
- verify(item.mesh == other.mesh, "setMesh()");
- }
-
- function test_effect()
- {
- verify(!item.effect, "default effect is null");
- item.effect = testEffect;
- verify(item.onEffectChangedSignalTriggered, "onEffectChanged signal");
- verify(item.effect == testEffect, "setEffect()");
- }
-
- function test_light()
- {
- verify(!item.light, "default lightparamters is null");
- item.light = testLight;
- verify(item.onLightChangedSignalTriggered, "onLightChangedSignal");
- verify(item.light == testLight, "setLight()");
- }
-
- function test_resources()
- {
- verify(item.resources != undefined, "item has resources");
- verify(other.resources != undefined, "other item has resources");
- // No public write method
- }
-
- function test_data()
- {
- verify(item.data != undefined, "item has data");
- verify(other.data != undefined, "other item has data");
- // No public write method
- }
-
- function test_children()
- {
- verify(item.children.length >= 0, "item.children can be called");
- verify(indexOf(item.children, child1) != -1, "item.children contains child1")
- verify(indexOf(item.children, child2) != -1, "item.children contains child2")
- verify(indexOf(item.children, inheritEventTestChild) != -1, "item.children contains inheritEventTestChild")
- }
-
- function test_states()
- {
-
- }
-
- function test_state()
- {
- verify(!item.state, "Default state is null");
- verify(item.stateChangeTestVariable == 0, "property check before state change");
- item.state = "testState1";
- verify(item.onStateChangedSignalTriggered, "onStateChanged signal");
- verify(item.state == "testState1", "setState()");
- verify(item.stateChangeTestVariable == 1, "property changed with new state");
- }
-
- function test_enabled()
- {
- verify(item.enabled, "default value")
- item.enabled = false;
- verify(!item.enabled, "setEnabled false")
- verify(item.onEnabledChangedSignalTriggered, "enabledChanged signal")
- }
-
- function test_parent()
- {
- compare(item.childrenHasBeenChanged,0, "pretest marker verification");
-
- // Test the initial Item3D parent/child relationships.
- verify(item.parent == viewport, "root item")
- verify(child1.parent == item, "child1 item")
- verify(child2.parent == item, "child2 item")
- compare(child1.children.length, 0, "child1 children")
- verify(indexOf(item.children, child1) != -1, "children contains child1")
- verify(indexOf(item.children, child2) != -1, "children contains child2")
-
- // Reparent the second child and re-test.
- child2.parent = child1
- compare(item.childrenHasBeenChanged,1, "childrenChanged triggered by removing child");
-
- verify(item.parent == viewport, "root item (B)")
- verify(child1.parent == item, "child1's parent (B)")
- verify(child2.parent == child1, "child2's parent (B)")
- compare(child1.children.length, 1, "child1 children (B)")
- verify(indexOf(item.children, child1) != -1, "item.children contains child1 (B)")
- verify(indexOf(item.children, child2) == -1, "reparented child not removed from old parent (B)");
- verify(indexOf(child1.children, child2) != -1, "child1.children contains child2");
-
- // Change the parent back and test again
- child2.parent = item
- compare(item.childrenHasBeenChanged,2, "childrenChanged triggered by re-adding child");
-
- verify(item.parent == viewport, "root item after revert")
- verify(child1.parent == item, "child1 item after revert")
- verify(child2.parent == item, "child2 item after revert")
- compare(child1.children.length, 0, "child1 has no children after revert")
-
- verify(indexOf(item.children, child1) != -1, "item.children contains child1 after revert");
- verify(indexOf(item.children, child2) != -1, "item.children contains child2 after revert");
- verify(indexOf(child1.children, child2) == -1, "child1.children does not contain child2 after revert");
- }
-
- function test_sortChildren()
- {
- verify(item.sortChildren == Item3D.DefaultSorting, "default value")
- item.sortChildren = Item3D.BackToFront;
- verify(item.sortChildren == Item3D.BackToFront, "back-to-front")
- verify(item.onSortChildrenSignalTriggered, "sortChildren signal")
- }
- }
- }
-}
diff --git a/tests/auto/qml3d/item3d/tst_item3d_local_v_world.qml b/tests/auto/qml3d/item3d/tst_item3d_local_v_world.qml
deleted file mode 100644
index 66982035..00000000
--- a/tests/auto/qml3d/item3d/tst_item3d_local_v_world.qml
+++ /dev/null
@@ -1,213 +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 Qt 4.7
-import Qt3D 1.0
-import QtQuickTest 1.0
-
-Viewport {
- id: viewport
-
-
- Item3D {
- id: rotateTestItem
- Item3D {
- id: rotateTestItemChild
- transform: Rotation3D {angle: 90 ; axis: Qt.vector3d(0,1,0)}
- }
- transform: Rotation3D {angle: 90 ; axis: Qt.vector3d(0,1,0)}
- }
-
- Item3D {
- id: rotateZTestItem
- Item3D {
- id: rotateZChild
- }
- transform: Rotation3D {angle: 90 ; axis: Qt.vector3d(0,0,1)}
- }
-
- Item3D {
- id: scaleTestItem
- Item3D {
- id: scaleTestItemChild
- transform: Scale3D { scale: 0.5 }
- }
- transform: Scale3D { scale: 2.0 }
- }
-
- Item3D {
- id: translateTestItem
- position: Qt.vector3d(1,1,1)
-
- Item3D {
- id: child
- position: Qt.vector3d(1,1,1)
- }
-
- TestCase {
- name: "Item3DRelativeTransformTests"
-
- function test_localToWorld_translate()
- {
- var testVectorNull = Qt.vector3d(0,0,0);
- var resultVector = translateTestItem.localToWorld(testVectorNull);
-
- compare(resultVector.x, translateTestItem.position.x, "testVectorNull x translation");
- compare(resultVector.y, translateTestItem.position.y, "testVectorNull y translation");
- compare(resultVector.z, translateTestItem.position.z, "testVectorNull z translation");
-
- var childResult = child.localToWorld(testVectorNull);
- compare(childResult.x, translateTestItem.x + child.x, "child testVectorNull x translation");
- compare(childResult.y, translateTestItem.y + child.y, "child testVectorNull y translation");
- compare(childResult.z, translateTestItem.z + child.z, "child testVectorNull z translation");
-
- var testVector2 = Qt.vector3d(-1,0,123456);
- var childResult2 = child.localToWorld(testVector2);
- compare(childResult2.x, translateTestItem.x + child.x + testVector2.x, "non-zero point, x translation");
- compare(childResult2.y, translateTestItem.y + child.y, "non-zero point, y translation");
- compare(childResult2.z, translateTestItem.z + child.z + testVector2.z, "non-zero point, z translation");
- }
-
- function test_localToWorld_rotate()
- {
- var testVectorX = Qt.vector3d(1,0,0);
- var resultVector = rotateTestItem.localToWorld(testVectorX);
- compare(resultVector.x, 0, "x value of testVectorX rotated 90 degrees around y unit vector");
- compare(resultVector.y, 0, "y value of testVectorX rotated 90 degrees around y unit vector");
- compare(resultVector.z, -1, "z value of testVectorX rotated 90 degrees around y unit vector");
-
- var testVectorY = Qt.vector3d(0,1,0);
- var resultVectorY = rotateTestItem.localToWorld(testVectorY);
- compare(resultVectorY.x, 0, "x value of testVectorY rotated 90 degrees around y unit vector");
- compare(resultVectorY.y, 1, "y value of testVectorY rotated 90 degrees around y unit vector");
- compare(resultVectorY.z, 0, "z value of testVectorY rotated 90 degrees around y unit vector");
-
- var testVectorXY = Qt.vector3d(1,2,0);
- var resultVectorXY = rotateZChild.localToWorld(testVectorXY);
- compare(resultVectorXY.x, -testVectorXY.y, "x value of testVectorY rotated 90 degrees around y unit vector");
- compare(resultVectorXY.y, testVectorXY.x, "y value of testVectorY rotated 90 degrees around y unit vector");
- compare(resultVectorXY.z, testVectorXY.z, "z value of testVectorY rotated 90 degrees around y unit vector");
- }
-
- function test_localToWorld_scale()
- {
- var testVectorNull = Qt.vector3d(0,0,0);
- var testVectorX = Qt.vector3d(1,0,0);
-
- var resultVector = scaleTestItem.localToWorld(testVectorNull);
- compare(resultVector.x, 0, "x value of testVectorNull scale: 2.0");
- compare(resultVector.y, 0, "y value of testVectorNull scale: 2.0");
- compare(resultVector.z, 0, "z value of testVectorNull scale: 2.0");
-
- resultVector = scaleTestItem.localToWorld(testVectorX);
- compare(resultVector.x, 2, "testVectorX.x scale: 2.0");
- compare(resultVector.y, 0, "testVectorX.y scale: 2.0");
- compare(resultVector.z, 0, "testVectorX.z scale: 2.0");
-
- resultVector = scaleTestItemChild.localToWorld(testVectorNull);
- compare(resultVector.x, testVectorNull.x, "testVectorNull.x scaled up and back down");
- compare(resultVector.y, testVectorNull.y, "testVectorNull.y scaled up and back down");
- compare(resultVector.z, testVectorNull.z, "testVectorNull.z scaled up and back down");
-
- resultVector = scaleTestItemChild.localToWorld(testVectorX);
- compare(resultVector.x, testVectorX.x, "testVectorX.x scaled up and back down");
- compare(resultVector.y, testVectorX.y, "testVectorX.y scaled up and back down");
- compare(resultVector.z, testVectorX.z, "testVectorX.z scaled up and back down");
- }
-
- function test_worldToLocal_rotate()
- {
- var testVector = Qt.vector3d(0,0,-1);
- var resultVector = rotateTestItem.worldToLocal(testVector);
- compare(resultVector.x, 1, "x value of x unitVector rotated 90 degrees around y unit vector");
- compare(resultVector.y, 0, "y value of x unitVector rotated 90 degrees around y unit vector");
- compare(resultVector.z, 0, "z value of x unitVector rotated 90 degrees around y unit vector");
- }
-
- function test_worldToLocal_scale()
- {
- var testVectorNull = Qt.vector3d(0,0,0);
- var testVectorX = Qt.vector3d(1,0,0);
-
- var resultVector = scaleTestItem.worldToLocal(testVectorNull);
- compare(resultVector.x, 0, "x value of testVectorNull scale: 2.0");
- compare(resultVector.y, 0, "y value of testVectorNull scale: 2.0");
- compare(resultVector.z, 0, "z value of testVectorNull scale: 2.0");
-
- resultVector = scaleTestItem.worldToLocal(testVectorX);
- compare(resultVector.x, 0.5, "testVectorX.x scale: 2.0");
- compare(resultVector.y, 0, "testVectorX.y scale: 2.0");
- compare(resultVector.z, 0, "testVectorX.z scale: 2.0");
-
- resultVector = scaleTestItemChild.worldToLocal(testVectorNull);
- compare(resultVector.x, testVectorNull.x, "testVectorNull.x scaled up and back down");
- compare(resultVector.y, testVectorNull.y, "testVectorNull.y scaled up and back down");
- compare(resultVector.z, testVectorNull.z, "testVectorNull.z scaled up and back down");
-
- resultVector = scaleTestItemChild.worldToLocal(testVectorX);
- compare(resultVector.x, testVectorX.x, "testVectorX.x scaled up and back down");
- compare(resultVector.y, testVectorX.y, "testVectorX.y scaled up and back down");
- compare(resultVector.z, testVectorX.z, "testVectorX.z scaled up and back down");
- }
-
- function test_worldToLocal_translate()
- {
- var testVectorNull = Qt.vector3d(0,0,0);
- var resultVectorNull = translateTestItem.worldToLocal(testVectorNull);
-
- compare(resultVectorNull.x, -translateTestItem.position.x, "testVectorNull x translation");
- compare(resultVectorNull.y, -translateTestItem.position.y, "testVectorNull y translation");
- compare(resultVectorNull.z, -translateTestItem.position.z, "testVectorNull z translation");
-
- var childResult = child.worldToLocal(testVectorNull);
- compare(childResult.x, -translateTestItem.x - child.x, "child x translation");
- compare(childResult.y, -translateTestItem.y - child.y, "child y translation");
- compare(childResult.z, -translateTestItem.z - child.z, "child z translation");
-
- var testVector2 = Qt.vector3d(-1,0,123456);
- var childResult2 = child.worldToLocal(testVector2);
- compare(childResult2.x, testVector2.x -translateTestItem.x - child.x, "non-zero point, x translation");
- compare(childResult2.y, testVector2.y -translateTestItem.y - child.y, "non-zero point, y translation");
- compare(childResult2.z, testVector2.z -translateTestItem.z - child.z, "non-zero point, z translation");
- }
- }
- }
-}
diff --git a/tests/auto/qml3d/item3d/tst_missing_texture_coordinates.qml b/tests/auto/qml3d/item3d/tst_missing_texture_coordinates.qml
deleted file mode 100644
index 55fc2e45..00000000
--- a/tests/auto/qml3d/item3d/tst_missing_texture_coordinates.qml
+++ /dev/null
@@ -1,74 +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 Qt 4.7
-import Qt3D 1.0
-
-Viewport {
- width: 1000
- height: 800
- camera: Camera {
- eye.z: 10
- }
-
- Item3D {
- id: testItem
- mesh: Mesh { source: "square.3ds" }
- effect: Effect { texture: "test_data/test-image.png" }
- }
-
- // HACK.
- // The test requires that actual drawing happen,
- // and it would be better to verify that directly.
- Timer {
- running: true
- interval: 5
- onTriggered: Qt.quit()
- }
-
- // This test is simply testing to see if the item crashes on startup,
- // so this dummy test is probably not even required
- function test_exists()
- {
- verify(testItem.visible);
- Qt.quit();
- }
-}
diff --git a/tests/auto/qml3d/lookat/tst_lookat.qml b/tests/auto/qml3d/lookat/tst_lookat.qml
deleted file mode 100644
index 574a1def..00000000
--- a/tests/auto/qml3d/lookat/tst_lookat.qml
+++ /dev/null
@@ -1,194 +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 Qt 4.7
-import Qt3D 1.0
-import QtQuickTest 1.0
-
-Viewport {
- id: viewport
-
- Item3D {
- id: target1
- x: 5.0
- }
-
- Item3D {
- id: targetNegativeXAxis
- x: -5.0
- }
-
- Item3D {
- id: targetUpVector
- y: 5.0
- }
-
- Item3D {
- id: targetExpectedUpVectorTrue
- z: 5.0
- }
-
- Item3D {
- id: item1
- transform: LookAt {
- id: lookAt1
- subject: target1
- }
- Item3D {
- id: child1
- z: 5.0
- }
- }
-
- Item3D {
- id: itemNegativeXAxis
- transform: LookAt {
- id: lookAtNegativeXAxis
- subject: targetNegativeXAxis
- }
- Item3D {
- id: childNegativeXAxis
- z: 5.0
- }
- }
-
- Item3D {
- id: itemUpVector
- transform: LookAt {
- id: lookAtUpVector
- subject: targetUpVector
- }
- Item3D {
- id: childUpVector
- z: 5.0
- }
- }
-
- Item3D {
- id: itemUpVectorTrue
- transform: LookAt {
- id: lookAtUpVectorTrue
- subject: targetUpVector
- preserveUpVector: true
- }
- Item3D {
- id: childUpVectorTrue
- z: 5.0
- }
- }
-
- TestCase {
- name: "LookAt"
-
- // helper functions
- function vectorToString(vector) {
- return "Vector3D(" + vector.x + ", " + vector.y + ", " + vector.z + ")";
- }
-
- function compareVectors(vector1, vector2, string )
- {
- compare(vector1.x, vector2.x, string + " x");
- compare(vector1.y, vector2.y, string + " y");
- compare(vector1.z, vector2.z, string + " z");
- }
-
- function test_lookAt() {
- var testPosition = child1.localToWorld();
- var targetPosition = target1.localToWorld();
- compare(testPosition.x, targetPosition.x, "test lookAt along X axis: x");
- compare(testPosition.y, targetPosition.y, "test lookAt along X axis: y");
- compare(testPosition.z, targetPosition.z, "test lookAt along X axis: z");
-
- testPosition = childNegativeXAxis.localToWorld();
- targetPosition = targetNegativeXAxis.localToWorld();
- compare(testPosition.x, targetPosition.x, "test negativeXAxis: x");
- compare(testPosition.y, targetPosition.y, "test negativeXAxis: y");
- compare(testPosition.z, targetPosition.z, "test negativeXAxis: z");
-
- target1.x = -5.0;
- target1.y = -5.0;
- target1.z = -5.0;
- // Adjust the child's Z offset to match the new target position
- child1.z = Math.sqrt(target1.x*target1.x + target1.y*target1.y +
- target1.z*target1.z);
-
- testPosition = child1.localToWorld();
- targetPosition = target1.localToWorld();
-
- // compare is fuzzy by default
- compare(testPosition.x, targetPosition.x, "test subject position change: x");
- compare(testPosition.y, targetPosition.y, "test subject position change: y");
- compare(testPosition.z, targetPosition.z, "test subject position change: z");
- }
-
- function test_preserveUpVector() {
- compare(lookAtUpVector.preserveUpVector, false, "default preserveUpVector is false");
-
- // Verify that the lookAt works:
- var childUpVectorPosition = childUpVector.localToWorld();
- var targetUpVectorPosition = targetUpVector.localToWorld();
- compareVectors(childUpVectorPosition, targetUpVectorPosition, "preserveUpVector false");
-
- var targetUpVectorPosition = targetUpVector.localToWorld();
- var childUpVectorTruePosition = childUpVectorTrue.localToWorld();
- var expectedUpVectorTruePosition =
- targetExpectedUpVectorTrue.localToWorld();
-
- compareVectors(childUpVectorTruePosition,
- expectedUpVectorTruePosition,
- "preserveUpVector true" );
-
- // test that changing preserveUpVector works
- lookAtUpVector.preserveUpVector = true;
- compare(lookAtUpVector.preserveUpVector, true, "setPreserveUpVector(true)");
- childUpVectorPosition = childUpVector.localToWorld();
- compareVectors(childUpVectorPosition, expectedUpVectorTruePosition, "preserveUpVector set to true ");
-
- lookAtUpVector.preserveUpVector = false;
- compare(lookAtUpVector.preserveUpVector, false, "setPreserveUpVector(false)");
- var childUpVectorSetFalsePosition = childUpVector.localToWorld();
- compareVectors(childUpVectorSetFalsePosition,
- targetUpVectorPosition,
- "preserveUpVector set to false ");
- return;
- }
- }
-}
diff --git a/tests/auto/qml3d/mesh/test_data/teapot.bez b/tests/auto/qml3d/mesh/test_data/teapot.bez
deleted file mode 100644
index 02b2ac44..00000000
--- a/tests/auto/qml3d/mesh/test_data/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/tests/auto/qml3d/mesh/tst_mesh.qml b/tests/auto/qml3d/mesh/tst_mesh.qml
deleted file mode 100644
index bab75140..00000000
--- a/tests/auto/qml3d/mesh/tst_mesh.qml
+++ /dev/null
@@ -1,127 +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 Qt 4.7
-import Qt3D 1.0
-import QtQuickTest 1.0
-
-Viewport {
- id: viewport
-
- Mesh {
- id: url_test_mesh
- source: ""
- onDataChanged: { dataChangedCounter += 1 }
- property int dataChangedCounter: 0
- }
-
- Mesh {
- id: meshName_test_mesh
- onDataChanged: { dataChangedCounter += 1 }
- property int dataChangedCounter: 0
- }
-
- Mesh {
- id: meshName_test_mesh2
- meshName: "testName"
- onDataChanged: { dataChangedCounter += 1 }
- property int dataChangedCounter: 0
- }
-
- Mesh {
- id: options_test_mesh
- onOptionsChanged: { optionsChangedCounter += 1}
- property int optionsChangedCounter: 0
- }
-
- TestCase {
- name: "Mesh"
- id: meshTest
-
- function test_url() {
- compare(url_test_mesh.dataChangedCounter, 0, "pre-test counter validation")
- compare(url_test_mesh.source, "", "null default source")
-
-
- var testString = "test_data/teapot.bez";
- url_test_mesh.source = testString;
-
- // QUrl contains the absolute file path, so just compare the end
- var substring = url_test_mesh.source.toString().substr(-testString.length,testString.length);
- compare(substring, testString, "setSource() (relative file path)");
- compare(url_test_mesh.dataChangedCounter, 1, "dataChanged signal")
- }
-
- function test_meshName() {
- meshName_test_mesh.dataChangedCounter = 0;
- compare(meshName_test_mesh.dataChangedCounter, 0, "pre-test counter validation")
-
- compare(meshName_test_mesh.meshName, "", "null default meshName");
- compare(meshName_test_mesh2.meshName, "testName", "qml assignment test");
-
- meshName_test_mesh.meshName = "setMeshNameTestName";
- compare(meshName_test_mesh.meshName, "setMeshNameTestName", "setMeshNameTestName");
- compare(meshName_test_mesh.dataChangedCounter, 1, "dataChanged signal")
- }
-
- function test_options() {
- compare(options_test_mesh.optionsChangedCounter, 0,
- "pretest validation")
- compare(options_test_mesh.options, "", "null default options");
-
- options_test_mesh.options="test options string";
- compare(options_test_mesh.options, "test options string",
- "setOptionsString");
-
- options_test_mesh.options="test options string";
- compare(options_test_mesh.options, "test options string",
- "setOptions()");
- compare(options_test_mesh.optionsChangedCounter, 1,
- "optionsChanged signal 1");
-
- options_test_mesh.options=" \\ \ \$";
- compare(options_test_mesh.options, " \\ \ \$",
- "potentially troublesome characters")
- compare(options_test_mesh.optionsChangedCounter, 2,
- "optionsChanged signal 2");
- }
- }
-}
diff --git a/tests/auto/qml3d/modelview/textures/amethyst.jpg b/tests/auto/qml3d/modelview/textures/amethyst.jpg
deleted file mode 100644
index 43a2c440..00000000
--- a/tests/auto/qml3d/modelview/textures/amethyst.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qml3d/modelview/textures/bigblue.jpg b/tests/auto/qml3d/modelview/textures/bigblue.jpg
deleted file mode 100644
index 8a0bb653..00000000
--- a/tests/auto/qml3d/modelview/textures/bigblue.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qml3d/modelview/textures/blueweb.jpg b/tests/auto/qml3d/modelview/textures/blueweb.jpg
deleted file mode 100644
index 68f3d350..00000000
--- a/tests/auto/qml3d/modelview/textures/blueweb.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qml3d/modelview/textures/pastelstuff.jpg b/tests/auto/qml3d/modelview/textures/pastelstuff.jpg
deleted file mode 100644
index 82da86e0..00000000
--- a/tests/auto/qml3d/modelview/textures/pastelstuff.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qml3d/modelview/textures/qtlogo.png b/tests/auto/qml3d/modelview/textures/qtlogo.png
deleted file mode 100644
index 7d3e97eb..00000000
--- a/tests/auto/qml3d/modelview/textures/qtlogo.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qml3d/modelview/textures/threedgreen.jpg b/tests/auto/qml3d/modelview/textures/threedgreen.jpg
deleted file mode 100644
index 7624527f..00000000
--- a/tests/auto/qml3d/modelview/textures/threedgreen.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qml3d/modelview/tst_modelview.qml b/tests/auto/qml3d/modelview/tst_modelview.qml
deleted file mode 100644
index 2b7fa0e1..00000000
--- a/tests/auto/qml3d/modelview/tst_modelview.qml
+++ /dev/null
@@ -1,270 +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 Qt 4.7
-import Qt3D 1.0
-import Qt3D.Shapes 1.0
-import QtQuickTest 1.0
-
-Rectangle
-{
- id: topLevel
- width: 480; height: 480
-
- Viewport {
- id: viewport
- picking: true
- anchors.fill: parent
-
- camera: Camera {
- id: main_camera
- eye: Qt.vector3d(0, 4, 12)
- center: Qt.vector3d(0, 0, -2.5)
- }
-
- property variant emptyStringListModel:[]
-
- property variant stringListModelForViewport:[
- "textures/threedgreen.jpg",
- "textures/amethyst.jpg",
- "textures/bigblue.jpg",
- "textures/pastelstuff.jpg",
- "textures/blueweb.jpg",
- "textures/qtlogo.png"
- ]
-
- property variant stringListModelEmptyForItem: []
-
- property variant stringListModelForItem:[
- "textures/amethyst.jpg",
- "textures/pastelstuff.jpg",
- "textures/bigblue.jpg",
- "textures/qtlogo.png",
- "textures/blueweb.jpg",
- "textures/threedgreen.jpg"
- ]
-
- ListModel {
- id: listModelForViewport
- ListElement { image:"textures/threedgreen.jpg"}
- ListElement { image:"textures/amethyst.jpg"}
- ListElement { image:"textures/bigblue.jpg"}
- ListElement { image:"textures/pastelstuff.jpg"}
- ListElement { image:"textures/blueweb.jpg"}
- ListElement { image:"textures/qtlogo.png"}
- }
-
- ListModel {
- id: listModelForItem
- ListElement { image:"textures/amethyst.jpg"}
- ListElement { image:"textures/pastelstuff.jpg"}
- ListElement { image:"textures/bigblue.jpg"}
- ListElement { image:"textures/qtlogo.png"}
- ListElement { image:"textures/blueweb.jpg"}
- ListElement { image:"textures/threedgreen.jpg"}
- }
-
- Component {
- id: paneComponentstringList
- Quad {
- property real layer: index
- property variant image : modelData
- position: Qt.vector3d(0, 0, -layer)
- effect: Effect { decal: true; texture: image }
- transform: Rotation3D { axis: Qt.vector3d(1,0,0); angle: 90 }
- }
- }
-
- Component {
- id: paneComponentListModel
- Quad {
- position: Qt.vector3d(index * 0.1, 0, -index)
- enabled: index != -1
- effect: Effect { decal: true;
- texture: model.image;
- }
- transform: Rotation3D { axis: Qt.vector3d(1,0,0); angle: 90 }
- }
- }
-
- Repeater {
- id: stringListModelRepeaterInViewport
- delegate: paneComponentstringList
- model: parent.stringListModelEmpty
- }
-
- Repeater {
- id: listModelRepeaterInViewport
- delegate: paneComponentListModel
- model: listModelForViewport
- }
-
- Item3D {
- id: stringListModelParentItem
- x: -2.1
- Repeater {
- id: stringListModelRepeaterInItem
- delegate: paneComponentstringList
- model: viewport.stringListModelEmpty
- }
- }
-
- Item3D {
- id: listModelParentItem
- x: 2.1
- y: 0.5
-
- Repeater {
- id: listModelRepeaterInItem
- delegate: paneComponentListModel
- model: listModelForItem
- }
- }
-
- TestCase {
- id: modelViewTestAddingCase
-// when: false
- name: "Quick3d ModelView Adding Data Test"
-
- function test_changing_stringList_model() {
- var viewportEmptyModelChildCount = viewport.children.length;
- var itemEmptyModelChildCount =
- stringListModelParentItem.children.length;
- var modelLength = viewport.stringListModelForViewport.length;
-
- stringListModelRepeaterInViewport.model =
- viewport.stringListModelForViewport;
-
- verify(viewport.children.length >
- viewportEmptyModelChildCount,
- "Children not added to viewport with changed stringList model");
- compare(viewport.children.length,
- viewportEmptyModelChildCount +
- viewport.stringListModelForViewport.length,
- "Viewport has unexpected number of new children");
-
- stringListModelRepeaterInItem.model =
- viewport.stringListModelForItem;
-
- verify(stringListModelParentItem.children.length >
- itemEmptyModelChildCount,
- "Children not added to Item3D with changed stringList model");
- compare(stringListModelParentItem.children.length,
- itemEmptyModelChildCount +
- viewport.stringListModelForItem.length,
- "Item3D has unexpected number of new children");
- }
-
- function test_adding_to_listModel() {
- var viewportChildCount = viewport.children.length;
- var itemChildCount = listModelParentItem.children.length;
-
- listModelForViewport.append({"image":"textures/pastelstuff.jpg"});
- listModelForItem.append({"image":"textures/pastelstuff.jpg"});
- viewport.update3d();
- compare(viewport.children.length, viewportChildCount + 1,
- "Viewport missing child after listModel.append()");
- compare(listModelParentItem.children.length,
- itemChildCount + 1,
- "Item3D missing child after listModel.append()");
- }
- }
-
- // This timer is to avoid an issue where removing children is
- // delayed during initialization.
- Timer {
- running: true
- interval: 1
- onTriggered: modelViewRemovingItemsTestCase.when = true;
- }
-
- TestCase {
- id: modelViewRemovingItemsTestCase
- // Wait for event loop before performing removal tests
- when: false
- name: "Quick3d ModelView Removing Data Test"
-
- function test_removing_from_listModel() {
- var viewportChildCount = viewport.children.length;
- var itemChildCount = listModelParentItem.children.length;
-
- listModelForViewport.remove(listModelForViewport.count - 1);
- compare(viewport.children.length, viewportChildCount -1,
- "Viewport has extra children after listModel.remove()")
-
- listModelForItem.remove(listModelForItem.count -1);
- compare(listModelParentItem.children.length,
- itemChildCount - 1,
- "Item3D has extra children after listModel.remove()");
- }
-
- function test_clearing_stringList() {
- stringListModelRepeaterInViewport.model =
- viewport.stringListModelForViewport;
- stringListModelRepeaterInItem.model =
- viewport.stringListModelForItem;
-
- var viewportChildCount = viewport.children.length;
- var itemChildCount = stringListModelParentItem.children.length;
-
- stringListModelRepeaterInViewport.model =
- viewport.emptyStringListModel;
- stringListModelRepeaterInItem.model =
- viewport.emptyStringListModel;
-
- verify(viewport.children.length < viewportChildCount,
- "Children not removed from viewport when clearing stringList model");
- compare(viewport.children.length,
- viewportChildCount -
- viewport.stringListModelForViewport.length,
- "Unexpected number of children after setting empty model");
-
- verify(stringListModelParentItem.children.length <
- itemChildCount,
- "Children not removed from Item3D when clearing stringList model");
- compare(stringListModelParentItem.children.length,
- itemChildCount -
- viewport.stringListModelForItem.length,
- "Unexpected number of children after setting empty model");
- }
- }
- }
-}
diff --git a/tests/auto/qml3d/picking/tst_picking.qml b/tests/auto/qml3d/picking/tst_picking.qml
deleted file mode 100644
index 94ee6553..00000000
--- a/tests/auto/qml3d/picking/tst_picking.qml
+++ /dev/null
@@ -1,193 +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 Qt 4.7
-import Qt3D 1.0
-import Qt3D.Shapes 1.0
-import QtQuickTest 1.0
-
-Rectangle
-{
- id: topLevel
- width: 480; height: 480
-
- Viewport {
- id: viewport
- width: 480; height: 480
- picking: true
-
- // Result of manual click
- property color clickedColor: "#000000"
-
- Quad {
- id: fullScreenQuad
-
- transform: [
- Rotation3D {
- axis: Qt.vector3d(1,0,0);
- angle: 90
- },
- Scale3D {
- // a scale 4 quad will fill a square viewport
- scale: 4
- }
- ]
- position: Qt.vector3d(0, 0, 0)
- property color color: "#ff0000"
-
- effect: Effect {
- color: fullScreenQuad.color
- }
-
- onClicked: {
- viewport.clickedColor = fullScreenQuad.color
- }
- }
-
- Quad {
- id: smallerQuad
-
- transform: [
- Rotation3D {
- axis: Qt.vector3d(1,0,0);
- angle: 90
- },
- // Bring quad forwards a little bit to ensure it's drawn
- Translation3D { translate: Qt.vector3d(0,0,0.1)}
- ]
-
- position: Qt.vector3d(0, 0, 0)
- property color color: "#0000ff"
-
- effect: Effect {
- color: smallerQuad.color
- }
-
- onClicked: {
- viewport.clickedColor = smallerQuad.color
- }
- }
-
- Component {
- id: pickTestDelegate
- Quad {
- objectName: "foo"
- transform: [
- Rotation3D {
- axis: Qt.vector3d(1,0,0);
- angle: 90
- },
- // Bring quad forwards a little bit to ensure it's drawn
- Translation3D { translate: Qt.vector3d(0,0,0.1)}
- ]
-
- // Ensure items are above smallerQuad
- position: Qt.vector3d(0, 0, (index + 1) * 0.1)
- property color color: model.color
- }
- }
-
- ListModel{
- id: pickTestModel
- }
-
- Repeater {
- delegate: pickTestDelegate
- model: pickTestModel
- }
-
- // picking fails until the first paint occurs. There's no
- // straight-forward way to wait for the first paint, so we'll use a
- // timer to allow the paint to happen.
-
- Timer {
- id: paintedTest
- running: true
- interval: 1
- repeat: true
- onTriggered: {
- var x = viewport.width / 2;
- var y = viewport.height / 2;
- // Usually succeeds on the first run
-// console.log("objectForPoint(" + x + "," + y + "): " + viewport.objectForPoint(x,y) );
- if (viewport.objectForPoint(x,y) != null)
- pickingTestCase.when = true;
- }
- }
-
- // Time out and fail
- Timer {
- running: true
- interval: 2000
- onTriggered: {
- pickingTestCase.timedOut = true;
- pickingTestCase.when = true;
- }
- }
-
- TestCase {
- id: pickingTestCase
- name: "Picking Test"
-
- // Delay test until after first paint
- when: false
- property bool timedOut : false
-
- property int midX : viewport.width / 2;
- property int midY : viewport.height / 2;
- function test_picking() {
- verify(!timedOut, "timed out");
- verify(viewport.objectForPoint(0,0) == fullScreenQuad,
- "Didn't find full screen quad in top left corner");
- verify(viewport.objectForPoint(midX,midY) == smallerQuad,
- "Didn't find smaller quad at midpoint");
- verify(viewport.objectForPoint(-midX,-midY) == null,
- "Incorrectly found object off viewport");
- pickTestModel.append({"color":"#00ff00"});
- verify(viewport.objectForPoint(midX,midY).color == "#00ff00",
- "Didn't find modelview quad at midpoint");
- pickTestModel.append({"color":"#ff00ff"});
- verify(viewport.objectForPoint(midX,midY).color == "#ff00ff",
- "Didn't find second modelview quad at midpoint");
- }
- }
- }
-}
diff --git a/tests/auto/qml3d/qml3d.pro b/tests/auto/qml3d/qml3d.pro
deleted file mode 100644
index 4da6138c..00000000
--- a/tests/auto/qml3d/qml3d.pro
+++ /dev/null
@@ -1,23 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-CONFIG += unittest warn_on
-QT += declarative opengl
-SOURCES += tst_qml3d.cpp
-DEFINES += QML3D_TEST_SOURCE_DIR=\"\\\"$$PWD\\\"\"
-win32:DEFINES+=_CRT_SECURE_NO_WARNINGS
-
-OTHER_FILES += \
- lookat/tst_lookat.qml \
- QtQuickTest/TestCase.qml \
- scale3d/tst_scale3d.qml \
- modelview/tst_modelview.qml \
- sphere/tst_sphere.qml \
- effect/tst_effect.qml \
- viewport/tst_viewport.qml \
- mesh/tst_mesh.qml \
- picking/tst_picking.qml \
- item3d/tst_item3d.qml \
- item3d/tst_missing_texture_coordinates.qml \
- item3d/tst_item3d_local_v_world.qml
-
-
diff --git a/tests/auto/qml3d/scale3d/tst_scale3d.qml b/tests/auto/qml3d/scale3d/tst_scale3d.qml
deleted file mode 100644
index 2759e578..00000000
--- a/tests/auto/qml3d/scale3d/tst_scale3d.qml
+++ /dev/null
@@ -1,109 +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 Qt 4.7
-import Qt3D 1.0
-import QtQuickTest 1.0
-
-Viewport {
- id: viewport
-
- Scale3D {
- id: scale1
- scale: 2.5
- }
-
- Scale3D {
- id: scale2
- scale: Qt.vector3d(1.0, 0.5, -2.0)
- }
-
- Scale3D {
- id: scale3
- property int changed: 0
- onScaleChanged: ++changed
- }
-
- Scale3D {
- id: scale4
- property int changed: 0
- onOriginChanged: ++changed
- }
-
- TestCase {
- name: "Scale3D"
-
- function test_uniformScale() {
- compare(scale1.scale, Qt.vector3d(2.5, 2.5, 2.5), "uniform1")
- scale1.scale = 4.5
- compare(scale1.scale, Qt.vector3d(4.5, 4.5, 4.5), "uniform2")
- scale1.scale = Qt.vector3d(3.0, -2.5, 1.5)
- compare(scale1.scale, Qt.vector3d(3.0, -2.5, 1.5), "uniform3")
- }
-
- function test_nonUniformScale() {
- compare(scale2.scale, Qt.vector3d(1.0, 0.5, -2.0), "nonuniform1")
- scale2.scale = Qt.vector3d(3.0, -2.5, 1.5)
- compare(scale2.scale, Qt.vector3d(3.0, -2.5, 1.5), "nonuniform2")
- scale2.scale = 4.5
- compare(scale2.scale, Qt.vector3d(4.5, 4.5, 4.5), "nonuniform3")
- }
-
- function test_scaleChanged() {
- compare(scale3.scale, Qt.vector3d(1.0, 1.0, 1.0), "changed1")
- compare(scale3.changed, 0, "changed2")
- scale3.scale = Qt.vector3d(3.0, -2.5, 1.5)
- compare(scale3.scale, Qt.vector3d(3.0, -2.5, 1.5), "changed3")
- compare(scale3.changed, 1, "changed3")
- scale3.scale = 4.5
- compare(scale3.scale, Qt.vector3d(4.5, 4.5, 4.5), "changed4")
- compare(scale3.changed, 2, "changed4")
- }
-
- function test_originChanged() {
- compare(scale4.origin, Qt.vector3d(0.0, 0.0, 0.0), "changed1")
- compare(scale4.changed, 0, "changed2")
- scale4.origin = Qt.vector3d(3.0, -2.5, 1.5)
- compare(scale4.origin, Qt.vector3d(3.0, -2.5, 1.5), "changed3")
- compare(scale4.changed, 1, "changed3")
- }
- }
-}
diff --git a/tests/auto/qml3d/shaders/test.png b/tests/auto/qml3d/shaders/test.png
deleted file mode 100644
index 80a4868f..00000000
--- a/tests/auto/qml3d/shaders/test.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qml3d/shaders/tst_shaders.qml b/tests/auto/qml3d/shaders/tst_shaders.qml
deleted file mode 100644
index 2a4258af..00000000
--- a/tests/auto/qml3d/shaders/tst_shaders.qml
+++ /dev/null
@@ -1,136 +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 Qt 4.7
-import Qt3D 1.0
-import Qt3D.Shapes 1.0
-import QtQuickTest 1.0
-
-Viewport {
- id: viewport
-
- width: 480
- height: 320
-
- property string fragmentShader: "\
-\
- void main(void)\
- {\
- gl_FragColor = vec4(1,0,1,1);\
- }\
- "
-
- property string vertexShader: "\
- attribute highp vec4 qt_Vertex;\
- uniform mediump mat4 qt_ModelViewProjectionMatrix;\
-\
- void main(void)\
- {\
- gl_Position = qt_ModelViewProjectionMatrix * qt_Vertex;\
- }\
- "
-
- Effect {
- id: testEffect
- material: china
- }
-
- Cube {
- id: testItemWithNullFragmentShader
- effect: testShaderProgramWithNullFragmentShader
- x: -1.5;
- }
-
- Cube {
- id: testItem
- effect: testShaderProgram
- }
-
- Cube {
- id: testItemWithNullVertexShader
- effect: testShaderProgramWithNullVertexShader
- x: 1.5
- }
-
-
- // Simple
- Timer {
- running: true
- interval: 1
- onTriggered: {
- shadersTest.when = true;
- viewport.update3d();
- }
- }
-
- TestCase {
- id: shadersTest
-
- // Delay test until after first paint
- when: false
- //
- function test_null_fragment_shader() {
- // a test failure is an assert during shader program linking
- // so if execution reaches this point, the test has passed
- verify(true, "shader program didn't crash with null shaders");
- }
- }
-
- ShaderProgram {
- id: testShaderProgram
- fragmentShader: viewport.fragmentShader
- vertexShader: viewport.vertexShader
- }
-
- ShaderProgram {
- id: testShaderProgramWithNullFragmentShader
-
- fragmentShader: ""
- vertexShader: viewport.vertexShader
- }
-
- ShaderProgram {
- id: testShaderProgramWithNullVertexShader
- fragmentShader: viewport.fragmentShader
- vertexShader: ""
- }
-
-}
diff --git a/tests/auto/qml3d/sphere/tst_sphere.qml b/tests/auto/qml3d/sphere/tst_sphere.qml
deleted file mode 100644
index 1d211a49..00000000
--- a/tests/auto/qml3d/sphere/tst_sphere.qml
+++ /dev/null
@@ -1,126 +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 Qt 4.7
-import Qt3D 1.0
-import Qt3D.Shapes 1.0
-import QtQuickTest 1.0
-
-Viewport {
- id: viewport
-
- Sphere {
- id: sphere1
- }
-
- Sphere {
- id: sphere2
- radius: 3.5
- levelOfDetail: 2
- axis: Qt.YAxis
- }
-
- Sphere {
- id: sphere3
- radius: -3.5
- levelOfDetail: 23 // Valid, but clamped during drawing
- axis: Qt.XAxis
- }
-
- Sphere {
- id: sphere4
- property int radChanged: 0
- property int lodChanged: 0
- property int axChanged: 0
- onRadiusChanged: ++radChanged
- onLevelOfDetailChanged: ++lodChanged
- onAxisChanged: ++axChanged
- }
-
- TestCase {
- name: "Sphere"
-
- function test_defaults() {
- compare(sphere1.radius, 1, "radius");
- compare(sphere1.levelOfDetail, 5, "levelOfDetail");
- compare(sphere1.axis, Qt.ZAxis, "axis");
- }
-
- function test_properties() {
- compare(sphere2.radius, 3.5, "radius");
- compare(sphere2.levelOfDetail, 2, "levelOfDetail");
- compare(sphere2.axis, Qt.YAxis, "axis");
- compare(sphere3.radius, -3.5, "radius (B)");
- compare(sphere3.levelOfDetail, 10, "levelOfDetail (B)");
- compare(sphere3.axis, Qt.XAxis, "axis (B)");
- }
-
- function test_radiusChanged() {
- compare(sphere4.radius, 1, "radius");
- compare(sphere4.radChanged, 0, "changed 1");
- sphere4.radius = 3.5
- compare(sphere4.radChanged, 1, "changed 2");
- compare(sphere4.radius, 3.5, "radius modified");
- sphere4.radius = 3.5
- compare(sphere4.radChanged, 1, "changed 3");
- }
-
- function test_levelOfDetailChanged() {
- compare(sphere4.levelOfDetail, 5, "levelOfDetail");
- compare(sphere4.lodChanged, 0, "changed 1");
- sphere4.levelOfDetail = 2
- compare(sphere4.lodChanged, 1, "changed 2");
- compare(sphere4.levelOfDetail, 2, "levelOfDetail modified");
- sphere4.levelOfDetail = 2
- compare(sphere4.lodChanged, 1, "changed 3");
- }
-
- function test_axisChanged() {
- compare(sphere4.axis, Qt.ZAxis, "axis");
- compare(sphere4.axChanged, 0, "changed 1");
- sphere4.axis = Qt.YAxis
- compare(sphere4.axChanged, 1, "changed 2");
- compare(sphere4.axis, Qt.YAxis, "axis modified");
- sphere4.axis = Qt.YAxis
- compare(sphere4.axChanged, 1, "changed 3");
- }
- }
-}
diff --git a/tests/auto/qml3d/tst_qml3d.cpp b/tests/auto/qml3d/tst_qml3d.cpp
deleted file mode 100644
index d8757a39..00000000
--- a/tests/auto/qml3d/tst_qml3d.cpp
+++ /dev/null
@@ -1,414 +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 <QApplication>
-#include <QtDeclarative/qdeclarative.h>
-#include <QtDeclarative/qdeclarativeview.h>
-#include <QtDeclarative/qdeclarativeengine.h>
-#include <QtDeclarative/qdeclarativecontext.h>
-#include <QtOpenGL/qgl.h>
-#include <QtCore/qurl.h>
-#include <QtCore/qfileinfo.h>
-#include <QtCore/qdir.h>
-#include <QtCore/qdebug.h>
-#include <QtCore/qeventloop.h>
-#include <QtGui/qtextdocument.h>
-#include <QtTest/qtestcase.h>
-#include <stdio.h>
-
-class QuitObject : public QObject
-{
- Q_OBJECT
-public:
- QuitObject(QObject *parent = 0) : QObject(parent), hasQuit(false) {}
-
- bool hasQuit;
-
-private Q_SLOTS:
- void quit() { hasQuit = true; }
-};
-
-static bool xmlOutput = false;
-static int passed = 0;
-static int failed = 0;
-static int skipped = 0;
-static FILE *stream = 0;
-
-// A utility object to trigger the "clicked()" signal on a DeclarativeItem3d.
-class Item3DClicker : public QObject
-{
- Q_OBJECT
-public:
- Item3DClicker(QObject *parent = 0) : QObject(parent) {}
-
-public Q_SLOTS:
- Q_INVOKABLE bool click(QObject *target);
-};
-
-QML_DECLARE_TYPE(Item3DClicker)
-
-bool Item3DClicker::click(QObject *target)
-{
- if (target == 0)
- return false;
- const QMetaObject* metaTarget = target->metaObject();
- int clickedIndex = metaTarget->indexOfSignal("clicked()");
- if (clickedIndex == -1)
- return false;
-
- metaTarget->activate(target, clickedIndex, 0);
- return true;
-}
-
-class TestReport : public QObject
-{
- Q_OBJECT
-public:
- TestReport(QObject *parent = 0) : QObject(parent) {}
-
-public Q_SLOTS:
- void report(int pass, int fail, int skip);
- void log_fail(const QString &testCase, const QString &message);
- void log_expect_fail
- (const QString &testCase, const QString &message);
- void log_expect_fail_pass(const QString &testCase);
- void log_skip(const QString &testCase, const QString &message);
- void log_pass(const QString &testCase);
- void log_message(const QString &message);
-
-private:
- void log_incident(const char *type, const QString &testCase,
- const QString &message);
-};
-
-QML_DECLARE_TYPE(TestReport)
-
-void TestReport::report(int pass, int fail, int skip)
-{
- passed += pass;
- failed += fail;
- skipped += skip;
-}
-
-void TestReport::log_fail(const QString &testCase, const QString &message)
-{
- if (xmlOutput) {
- log_incident("fail", testCase, message);
- } else if (!message.isEmpty()) {
- fprintf(stream, "FAIL! : %s %s\n",
- testCase.toLatin1().constData(),
- message.toLatin1().constData());
- } else {
- fprintf(stream, "FAIL! : %s\n", testCase.toLatin1().constData());
- }
-}
-
-void TestReport::log_expect_fail
- (const QString &testCase, const QString &message)
-{
- if (xmlOutput) {
- log_incident("xfail", testCase, message);
- } else if (!message.isEmpty()) {
- fprintf(stream, "XFAIL : %s %s\n",
- testCase.toLatin1().constData(),
- message.toLatin1().constData());
- } else {
- fprintf(stream, "XFAIL : %s\n", testCase.toLatin1().constData());
- }
-}
-
-void TestReport::log_expect_fail_pass(const QString &testCase)
-{
- if (xmlOutput)
- log_incident("xpass", testCase, QString());
- else
- fprintf(stream, "XPASS : %s\n", testCase.toLatin1().constData());
-}
-
-void TestReport::log_skip(const QString &testCase, const QString &message)
-{
- if (xmlOutput) {
- log_incident("skip", testCase, message);
- } else if (!message.isEmpty()) {
- fprintf(stream, "SKIP : %s %s\n",
- testCase.toLatin1().constData(),
- message.toLatin1().constData());
- } else {
- fprintf(stream, "SKIP : %s\n", testCase.toLatin1().constData());
- }
-}
-
-void TestReport::log_pass(const QString &testCase)
-{
- if (xmlOutput)
- log_incident("pass", testCase, QString());
- else
- fprintf(stream, "PASS : %s\n", testCase.toLatin1().constData());
-}
-
-void TestReport::log_message(const QString &message)
-{
- if (!xmlOutput)
- fprintf(stream, "%s\n", message.toLatin1().constData());
-}
-
-void TestReport::log_incident
- (const char *type, const QString &testCase, const QString &message)
-{
- QString name(testCase);
- QString tag;
- name.replace(QLatin1String("()"), QLatin1String(""));
- name.replace(QLatin1String("::"), QLatin1String("__"));
- int tagIndex = name.indexOf(QLatin1String(" ["));
- if (tagIndex >= 0) {
- tag = name.mid(tagIndex + 2);
- if (tag.endsWith(QLatin1String("]")))
- tag = tag.left(tag.length() - 1);
- name = name.left(tagIndex);
- }
- fprintf(stream, "<TestFunction name=\"%s\">\n",
- Qt::escape(name).toLatin1().constData());
- if (message.isEmpty() && tag.isEmpty()) {
- fprintf(stream, "<Incident type=\"%s\" file=\"\" line=\"0\" />\n", type);
- } else {
- fprintf(stream, "<Incident type=\"%s\" file=\"\" line=\"0\">\n", type);
- if (!tag.isEmpty()) {
- fprintf(stream, " <DataTag>%s</DataTag>\n",
- Qt::escape(tag).toLatin1().constData());
- }
- if (!message.isEmpty()) {
- fprintf(stream, " <Description>%s</Description>\n",
- Qt::escape(message).toLatin1().constData());
- }
- fprintf(stream, "</Incident>\n");
- }
- fprintf(stream, "</TestFunction>\n");
-}
-
-class tst_qml3d : public QObject
-{
- Q_OBJECT
-public:
-private slots:
- void initTestCase()
- {
- QSKIP("Disabling qml tests due to invalid GL context!", SkipSingle);
- }
-};
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- {
- QGLWidget checkWidget;
- if (!checkWidget.isValid())
- {
- tst_qml3d xf;
- return QTest::qExec(&xf, argc, argv);
- }
- }
-
- // Just display the functions available and then exit
- bool displayFunctions = false;
-
- QStringList restrictFunctions;
-
- // Parse the command-line arguments.
- const char *filename = 0;
- for (int index = 1; index < argc; ++index) {
- QString arg = QString::fromLocal8Bit(argv[index]);
- if (arg == QLatin1String("-xml"))
- xmlOutput = true;
- else if (arg == QLatin1String("-o") && (index + 1) < argc)
- filename = argv[++index];
- else if (arg == QLatin1String("-functions"))
- displayFunctions = true;
- else
- {
- // assume it is the names of test functions - run only those
- restrictFunctions += arg;
- }
- }
-
- // Determine where to look for the test data. On a device it will
- // typically be necessary to set QML3D_TEST_SOURCE_DIR.
- QString testPath = QString::fromLocal8Bit(qgetenv("QML3D_TEST_SOURCE_DIR"));
-#ifdef QML3D_TEST_SOURCE_DIR
- if (testPath.isEmpty())
- testPath = QString::fromLocal8Bit(QML3D_TEST_SOURCE_DIR);
-#endif
- if (testPath.isEmpty())
- testPath = QLatin1String(".");
-
- // Find the subdirectories that look like they may contain test cases.
- // The "QtQuickTest" directory contains the common QML and JS test logic.
- QDir dir(testPath);
- QStringList entries = dir.entryList(QDir::Dirs);
- entries.removeAll(QLatin1String("."));
- entries.removeAll(QLatin1String(".."));
- entries.removeAll(QLatin1String("QtQuickTest"));
-
- if (filename) {
- stream = fopen(filename, "w");
- if (!stream) {
- perror(filename);
- return 1;
- }
- } else {
- stream = stdout;
- }
-
- if (xmlOutput) {
- fprintf(stream, "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"
- "<TestCase name=\"tst_qml3d\">\n");
- fprintf(stream, "<Environment>\n"
- " <QtVersion>%s</QtVersion>\n"
- " <QTestVersion>%s</QTestVersion>\n"
- "</Environment>\n", qVersion(), qVersion());
- } else {
- if (!displayFunctions)
- fprintf(stream, "********* Start testing of tst_qml3d *********\n");
- }
-
- qmlRegisterType<TestReport>("QtQuickTest", 1, 0, "TestReport");
- qmlRegisterType<Item3DClicker>("QtQuickTest", 1, 0, "Item3DClicker");
-
- // Scan through all of the "*.qml" files in the subdirectories
- // and run each of them in turn with a QDeclarativeView.
- QStringList filters;
- filters += QLatin1String("tst_*.qml");
- bool atLeastOne = false;
- if (displayFunctions)
- restrictFunctions.clear();
- foreach (QString name, entries) {
- QDir subdir(testPath + QDir::separator() + name);
- QStringList files = subdir.entryList(filters, QDir::Files);
- foreach (QString file, files) {
- QString source = subdir.path() + QDir::separator() + file;
- QFileInfo fi(source);
- if (fi.exists()) {
- bool hasFunc = true;
- if (restrictFunctions.size() > 0 || displayFunctions)
- {
- hasFunc = false;
- QFile qmlFile(fi.absoluteFilePath());
- if (!qmlFile.open(QIODevice::ReadOnly))
- continue;
- {
- QTextStream is(&qmlFile);
- while (!is.atEnd())
- {
- QString line = is.readLine();
- for (int i = 0; i < restrictFunctions.size() && !hasFunc; ++i)
- {
- QString funcName("function ");
- funcName += restrictFunctions.at(i);
- if (line.contains(funcName))
- hasFunc = true;
- }
- if (displayFunctions)
- {
- int pos = line.indexOf(QLatin1String("function test_"));
- if (pos >= 0)
- {
- QString fname = line.mid(pos + 9); // "function".length
- pos = fname.indexOf("()");
- fname.truncate(pos + 2);
- qWarning(" %s\n", qPrintable(fname));
- }
- }
- }
- }
- qmlFile.close();
- }
- if (!hasFunc)
- continue;
- atLeastOne = true;
- QDeclarativeView view;
- QuitObject quitobj;
- QEventLoop eventLoop;
- QObject::connect(view.engine(), SIGNAL(quit()),
- &quitobj, SLOT(quit()));
- QObject::connect(view.engine(), SIGNAL(quit()),
- &eventLoop, SLOT(quit()));
- view.setViewport(new QGLWidget());
- view.engine()->addImportPath(testPath);
- view.rootContext()->setContextProperty(QLatin1String("filterTestCases"), restrictFunctions);
- view.setSource(QUrl::fromLocalFile(fi.absoluteFilePath()));
- if (view.status() == QDeclarativeView::Error) {
- // Error compiling the test - flag failure and continue.
- ++failed;
- continue;
- }
- if (!quitobj.hasQuit) {
- // If the test already quit, then it was performed
- // synchronously during setSource(). Otherwise it is
- // an asynchronous test and we need to show the window
- // and wait for the quit indication.
- view.show();
- eventLoop.exec();
- }
- }
- }
- }
-
- if (!atLeastOne && !xmlOutput && restrictFunctions.size() > 1)
- fprintf(stream, "No test functions matched specified name: %s\n", qPrintable(restrictFunctions.at(0)));
-
- if (xmlOutput) {
- fprintf(stream, "</TestCase>\n");
- } else {
- if (!displayFunctions)
- {
- fprintf(stream, "Totals: %d passed, %d failed, %d skipped\n",
- passed, failed, skipped);
- fprintf(stream, "********* Finished testing of tst_qml3d *********\n");
- }
- }
-
- if (filename)
- fclose(stream);
-
- return failed != 0;
-}
-
-#include "tst_qml3d.moc"
diff --git a/tests/auto/qml3d/viewport/tst_viewport.qml b/tests/auto/qml3d/viewport/tst_viewport.qml
deleted file mode 100644
index 29a7914b..00000000
--- a/tests/auto/qml3d/viewport/tst_viewport.qml
+++ /dev/null
@@ -1,138 +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 Qt 4.7
-import Qt3D 1.0
-import QtQuickTest 1.0
-
-Viewport {
- id: viewport
-
- Camera {
- id: newCamera
- eye: Qt.vector3d(0, 1, 52)
- }
-
- Light {
- id: newLight
- ambientColor: "#ff00ee"
- }
-
- LightModel {
- id: newLightModel
- ambientSceneColor: "#ff00ee"
- }
-
- TestCase {
- name: "Viewport"
-
- function test_modes() {
- verify(!viewport.picking, "picking")
- verify(!viewport.showPicking, "showPicking")
- verify(viewport.navigation, "navigation")
- verify(!viewport.blending, "blending")
-
- viewport.picking = true
- viewport.showPicking = true
- viewport.navigation = false
- viewport.blending = true
-
- verify(viewport.picking, "picking-modified")
- verify(viewport.showPicking, "showPicking-modified")
- verify(!viewport.navigation, "navigation-modified")
- verify(viewport.blending, "blending-modified")
- }
-
- function test_camera() {
- verify(viewport.camera != null, "camera")
- verify(viewport.camera != newCamera, "camera-obj")
- compare(viewport.camera.projectionType, 0, "projectionType")
- compare(viewport.camera.eye, Qt.vector3d(0, 0, 10), "eye")
- compare(viewport.camera.center, Qt.vector3d(0, 0, 0), "center")
- compare(viewport.camera.upVector, Qt.vector3d(0, 1, 0), "upVector")
- compare(viewport.camera.fieldOfView, 0, "fieldOfView")
- compare(viewport.camera.nearPlane, 5, "nearPlane")
- compare(viewport.camera.farPlane, 1000, "farPlane")
- compare(viewport.camera.eyeSeparation, 0, "eyeSeparation")
- compare(viewport.camera.adjustForAspectRatio, true, "adjustForAspectRatio")
-
- var oldCamera = viewport.camera
-
- viewport.camera = newCamera
- verify(viewport.camera == newCamera, "newCamera")
- compare(viewport.camera.eye, Qt.vector3d(0, 1, 52), "eye-new")
-
- compare(oldCamera.eye, Qt.vector3d(0, 0, 10), "eye-old")
- }
-
- function test_light() {
- verify(viewport.light != null, "light")
- verify(viewport.light != newLight, "light-obj")
- compare(viewport.light.type, 0, "type-directional")
- compare(viewport.light.direction, Qt.vector3d(0, 0, 1), "direction")
- compare(viewport.light.ambientColor, "#000000", "ambientColor")
- compare(viewport.light.diffuseColor, "#ffffff", "diffuseColor")
- compare(viewport.light.specularColor, "#ffffff", "specularColor")
- compare(viewport.light.spotDirection, Qt.vector3d(0, 0, -1), "spotDirection")
- compare(viewport.light.spotExponent, 0, "spotExponent")
- compare(viewport.light.spotAngle, 180, "spotAngle")
- compare(viewport.light.constantAttenuation, 1, "constantAttenuation")
- compare(viewport.light.linearAttenuation, 0, "linearAttenuation")
- compare(viewport.light.quadraticAttenuation, 0, "quadraticAttenuation")
-
- var oldLight = viewport.light
-
- viewport.light = newLight
- verify(viewport.light == newLight, "newLight")
- compare(viewport.light.ambientColor, "#ff00ee", "ambientColor-new")
-
- compare(oldLight.ambientColor, "#000000", "ambientColor-old")
- }
-
- function test_lightModel() {
- verify(viewport.lightModel == null, "lightModel")
-
- viewport.lightModel = newLightModel
- verify(viewport.lightModel == newLightModel, "newLightModel")
- compare(viewport.lightModel.ambientSceneColor, "#ff00ee", "ambientSceneColor")
- }
- }
-}
diff --git a/tests/auto/threed/load_model/load_model.pro b/tests/auto/threed/load_model/load_model.pro
deleted file mode 100644
index 88a26c5f..00000000
--- a/tests/auto/threed/load_model/load_model.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_load_model.cpp
-
-RESOURCES += \
- load_model.qrc
diff --git a/tests/auto/threed/load_model/load_model.qrc b/tests/auto/threed/load_model/load_model.qrc
deleted file mode 100644
index 5bb2fec0..00000000
--- a/tests/auto/threed/load_model/load_model.qrc
+++ /dev/null
@@ -1,13 +0,0 @@
-<RCC>
- <qresource prefix="/data">
- <file>models/basic-cube.3ds</file>
- <file>models/basic-cube.blend</file>
- <file>models/basic-cube.mtl</file>
- <file>models/basic-cube.obj</file>
- <file>models/wave.obj</file>
- <file>models/basic-cube.m3g</file>
- <file>models/basic-cube.ply</file>
- <file>models/basic-cube.x3d</file>
- <file>models/basic-cube.dae</file>
- </qresource>
-</RCC>
diff --git a/tests/auto/threed/load_model/models/basic-cube.3ds b/tests/auto/threed/load_model/models/basic-cube.3ds
deleted file mode 100644
index fbd4c072..00000000
--- a/tests/auto/threed/load_model/models/basic-cube.3ds
+++ /dev/null
Binary files differ
diff --git a/tests/auto/threed/load_model/models/basic-cube.blend b/tests/auto/threed/load_model/models/basic-cube.blend
deleted file mode 100644
index 663e17de..00000000
--- a/tests/auto/threed/load_model/models/basic-cube.blend
+++ /dev/null
Binary files differ
diff --git a/tests/auto/threed/load_model/models/basic-cube.dae b/tests/auto/threed/load_model/models/basic-cube.dae
deleted file mode 100644
index 06167caf..00000000
--- a/tests/auto/threed/load_model/models/basic-cube.dae
+++ /dev/null
@@ -1,192 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<COLLADA version="1.4.0" xmlns="http://www.collada.org/2005/11/COLLADASchema">
- <asset>
- <contributor>
- <author>Illusoft Collada 1.4.0 plugin for Blender - http://colladablender.illusoft.com</author>
- <authoring_tool>Blender v:249 - Illusoft Collada Exporter v:0.3.162</authoring_tool>
- <comments></comments>
- <copyright></copyright>
- <source_data>file:///Users/sez/depot/research/qt3d_assimp/tests/auto/threed/load_model/models/basic-cube.blend</source_data>
- </contributor>
- <created>2010-12-15T02:14:49.600213</created>
- <modified>2010-12-15T02:14:49.600247</modified>
- <unit meter="0.01" name="centimeter"/>
- <up_axis>Z_UP</up_axis>
- </asset>
- <library_effects>
- <effect id="Red-fx" name="Red-fx">
- <profile_COMMON>
- <technique sid="blender">
- <phong>
- <emission>
- <color>0.00000 0.00000 0.00000 1</color>
- </emission>
- <ambient>
- <color>0.45937 0.07860 0.07860 1</color>
- </ambient>
- <diffuse>
- <color>0.91873 0.15720 0.15720 1</color>
- </diffuse>
- <specular>
- <color>0.50000 0.50000 0.50000 1</color>
- </specular>
- <shininess>
- <float>12.5</float>
- </shininess>
- <reflective>
- <color>1.00000 1.00000 1.00000 1</color>
- </reflective>
- <reflectivity>
- <float>0.0</float>
- </reflectivity>
- <transparent>
- <color>1 1 1 1</color>
- </transparent>
- <transparency>
- <float>0.0</float>
- </transparency>
- </phong>
- </technique>
- </profile_COMMON>
- </effect>
- <effect id="SlateGray-fx" name="SlateGray-fx">
- <profile_COMMON>
- <technique sid="blender">
- <phong>
- <emission>
- <color>0.00000 0.00000 0.00000 1</color>
- </emission>
- <ambient>
- <color>0.18500 0.28000 0.30500 1</color>
- </ambient>
- <diffuse>
- <color>0.37000 0.56000 0.61000 1</color>
- </diffuse>
- <specular>
- <color>0.50000 0.50000 0.50000 1</color>
- </specular>
- <shininess>
- <float>12.5</float>
- </shininess>
- <reflective>
- <color>1.00000 1.00000 1.00000 1</color>
- </reflective>
- <reflectivity>
- <float>0.0</float>
- </reflectivity>
- <transparent>
- <color>1 1 1 1</color>
- </transparent>
- <transparency>
- <float>0.0</float>
- </transparency>
- </phong>
- </technique>
- </profile_COMMON>
- </effect>
- </library_effects>
- <library_materials>
- <material id="Red" name="Red">
- <instance_effect url="#Red-fx"/>
- </material>
- <material id="SlateGray" name="SlateGray">
- <instance_effect url="#SlateGray-fx"/>
- </material>
- </library_materials>
- <library_geometries>
- <geometry id="CubeObject-Geometry" name="CubeObject-Geometry">
- <mesh>
- <source id="CubeObject-Geometry-Position">
- <float_array count="24" id="CubeObject-Geometry-Position-array">1.00000 1.00000 -1.00000 1.00000 -1.00000 -1.00000 -1.00000 -1.00000 -1.00000 -1.00000 1.00000 -1.00000 1.00000 1.00000 1.00000 1.00000 -1.00000 1.00000 -1.00000 -1.00000 1.00000 -1.00000 1.00000 1.00000</float_array>
- <technique_common>
- <accessor count="8" source="#CubeObject-Geometry-Position-array" stride="3">
- <param type="float" name="X"></param>
- <param type="float" name="Y"></param>
- <param type="float" name="Z"></param>
- </accessor>
- </technique_common>
- </source>
- <source id="CubeObject-Geometry-Normals">
- <float_array count="18" id="CubeObject-Geometry-Normals-array">0.00000 0.00000 -1.00000 0.00000 -0.00000 1.00000 1.00000 -0.00000 0.00000 -0.00000 -1.00000 -0.00000 -1.00000 0.00000 -0.00000 0.00000 1.00000 0.00000</float_array>
- <technique_common>
- <accessor count="6" source="#CubeObject-Geometry-Normals-array" stride="3">
- <param type="float" name="X"></param>
- <param type="float" name="Y"></param>
- <param type="float" name="Z"></param>
- </accessor>
- </technique_common>
- </source>
- <vertices id="CubeObject-Geometry-Vertex">
- <input semantic="POSITION" source="#CubeObject-Geometry-Position"/>
- </vertices>
- <triangles count="10" material="Red">
- <input offset="0" semantic="VERTEX" source="#CubeObject-Geometry-Vertex"/>
- <input offset="1" semantic="NORMAL" source="#CubeObject-Geometry-Normals"/>
- <p>0 0 1 0 2 0 2 0 3 0 0 0 0 2 4 2 5 2 5 2 1 2 0 2 1 3 5 3 6 3 6 3 2 3 1 3 2 4 6 4 7 4 7 4 3 4 2 4 4 5 0 5 3 5 3 5 7 5 4 5</p>
- </triangles>
- <triangles count="2" material="SlateGray">
- <input offset="0" semantic="VERTEX" source="#CubeObject-Geometry-Vertex"/>
- <input offset="1" semantic="NORMAL" source="#CubeObject-Geometry-Normals"/>
- <p>4 1 7 1 6 1 6 1 5 1 4 1</p>
- </triangles>
- </mesh>
- </geometry>
- </library_geometries>
- <library_visual_scenes>
- <visual_scene id="Scene" name="Scene">
- <node layer="L1" id="CubeObject" name="CubeObject">
- <translate sid="translate">0.00000 0.00000 0.00000</translate>
- <rotate sid="rotateZ">0 0 1 0.00000</rotate>
- <rotate sid="rotateY">0 1 0 -0.00000</rotate>
- <rotate sid="rotateX">1 0 0 0.00000</rotate>
- <scale sid="scale">1.00000 1.00000 1.00000</scale>
- <instance_geometry url="#CubeObject-Geometry">
- <bind_material>
- <technique_common>
- <instance_material symbol="Red" target="#Red">
- <bind_vertex_input input_semantic="TEXCOORD" input_set="1" semantic="CHANNEL1"/>
- </instance_material>
- <instance_material symbol="SlateGray" target="#SlateGray">
- <bind_vertex_input input_semantic="TEXCOORD" input_set="1" semantic="CHANNEL1"/>
- </instance_material>
- </technique_common>
- </bind_material>
- </instance_geometry>
- </node>
- </visual_scene>
- </library_visual_scenes>
- <library_physics_materials>
- <physics_material id="CubeObject-PhysicsMaterial" name="CubeObject-PhysicsMaterial">
- <technique_common>
- <dynamic_friction>0.5</dynamic_friction>
- <restitution>0.0</restitution>
- <static_friction>0.5</static_friction>
- </technique_common>
- </physics_material>
- </library_physics_materials>
- <library_physics_models>
- <physics_model id="Scene-PhysicsModel" name="Scene-PhysicsModel">
- <rigid_body name="CubeObject-RigidBody" sid="CubeObject-RigidBody">
- <technique_common>
- <dynamic>false</dynamic>
- <mass>0</mass>
- <instance_physics_material url="#CubeObject-PhysicsMaterial"/>
- <shape>
- <instance_geometry url="#CubeObject-Geometry"/>
- </shape>
- </technique_common>
- </rigid_body>
- </physics_model>
- </library_physics_models>
- <library_physics_scenes>
- <physics_scene id="Scene-Physics" name="Scene-Physics">
- <instance_physics_model url="#Scene-PhysicsModel">
- <instance_rigid_body body="CubeObject-RigidBody" target="#CubeObject"/>
- </instance_physics_model>
- </physics_scene>
- </library_physics_scenes>
- <scene>
- <instance_physics_scene url="#Scene-Physics"/>
- <instance_visual_scene url="#Scene"/>
- </scene>
-</COLLADA>
diff --git a/tests/auto/threed/load_model/models/basic-cube.m3g b/tests/auto/threed/load_model/models/basic-cube.m3g
deleted file mode 100644
index 28962d8a..00000000
--- a/tests/auto/threed/load_model/models/basic-cube.m3g
+++ /dev/null
Binary files differ
diff --git a/tests/auto/threed/load_model/models/basic-cube.mtl b/tests/auto/threed/load_model/models/basic-cube.mtl
deleted file mode 100644
index ce8c4b93..00000000
--- a/tests/auto/threed/load_model/models/basic-cube.mtl
+++ /dev/null
@@ -1,22 +0,0 @@
-# Blender3D MTL File: basic-cube.blend
-# Material Count: 2
-newmtl SlateGray
-Ns 96.078431
-Ka 0.000000 0.000000 0.000000
-Kd 0.296000 0.448000 0.488000
-Ks 0.500000 0.500000 0.500000
-Ni 1.000000
-d 1.000000
-illum 2
-
-
-newmtl Red
-Ns 96.078431
-Ka 0.000000 0.000000 0.000000
-Kd 0.734986 0.125756 0.125756
-Ks 0.500000 0.500000 0.500000
-Ni 1.000000
-d 1.000000
-illum 2
-
-
diff --git a/tests/auto/threed/load_model/models/basic-cube.obj b/tests/auto/threed/load_model/models/basic-cube.obj
deleted file mode 100644
index 039b220e..00000000
--- a/tests/auto/threed/load_model/models/basic-cube.obj
+++ /dev/null
@@ -1,27 +0,0 @@
-# Blender3D v249 OBJ File: basic-cube.blend
-# www.blender3d.org
-mtllib basic-cube.mtl
-o CubeObject_CubeMesh
-v 1.000000 -1.000000 -1.000000
-v 1.000000 -1.000000 1.000000
-v -1.000000 -1.000000 1.000000
-v -1.000000 -1.000000 -1.000000
-v 1.000000 1.000000 -1.000000
-v 0.999999 1.000000 1.000001
-v -1.000000 1.000000 1.000000
-v -1.000000 1.000000 -1.000000
-vn 0.000000 -1.000000 0.000000
-vn 1.000000 0.000000 0.000000
-vn 0.000000 0.000000 1.000000
-vn -1.000000 0.000000 0.000000
-vn 0.000000 0.000000 -1.000000
-vn 0.000000 1.000000 0.000000
-usemtl Red
-f 1//1 2//1 3//1 4//1
-f 1//2 5//2 6//2 2//2
-f 2//3 6//3 7//3 3//3
-f 3//4 7//4 8//4 4//4
-f 5//5 1//5 4//5 8//5
-usemtl SlateGray
-f 5//6 8//6 7//6 6//6
-
diff --git a/tests/auto/threed/load_model/models/basic-cube.ply b/tests/auto/threed/load_model/models/basic-cube.ply
deleted file mode 100644
index ddb5be70..00000000
--- a/tests/auto/threed/load_model/models/basic-cube.ply
+++ /dev/null
@@ -1,43 +0,0 @@
-ply
-format ascii 1.0
-comment Created by Blender3D 249 - www.blender.org, source file: basic-cube.blend
-element vertex 24
-property float x
-property float y
-property float z
-property float nx
-property float ny
-property float nz
-element face 6
-property list uchar uint vertex_indices
-end_header
-1.000000 1.000000 -1.000000 0.000000 0.000000 -1.000000
-1.000000 -1.000000 -1.000000 0.000000 0.000000 -1.000000
--1.000000 -1.000000 -1.000000 0.000000 0.000000 -1.000000
--1.000000 1.000000 -1.000000 0.000000 0.000000 -1.000000
-1.000000 0.999999 1.000000 0.000000 -0.000000 1.000000
--1.000000 1.000000 1.000000 0.000000 -0.000000 1.000000
--1.000000 -1.000000 1.000000 0.000000 -0.000000 1.000000
-0.999999 -1.000001 1.000000 0.000000 -0.000000 1.000000
-1.000000 1.000000 -1.000000 1.000000 -0.000000 0.000000
-1.000000 0.999999 1.000000 1.000000 -0.000000 0.000000
-0.999999 -1.000001 1.000000 1.000000 -0.000000 0.000000
-1.000000 -1.000000 -1.000000 1.000000 -0.000000 0.000000
-1.000000 -1.000000 -1.000000 -0.000000 -1.000000 -0.000000
-0.999999 -1.000001 1.000000 -0.000000 -1.000000 -0.000000
--1.000000 -1.000000 1.000000 -0.000000 -1.000000 -0.000000
--1.000000 -1.000000 -1.000000 -0.000000 -1.000000 -0.000000
--1.000000 -1.000000 -1.000000 -1.000000 0.000000 -0.000000
--1.000000 -1.000000 1.000000 -1.000000 0.000000 -0.000000
--1.000000 1.000000 1.000000 -1.000000 0.000000 -0.000000
--1.000000 1.000000 -1.000000 -1.000000 0.000000 -0.000000
-1.000000 0.999999 1.000000 0.000000 1.000000 0.000000
-1.000000 1.000000 -1.000000 0.000000 1.000000 0.000000
--1.000000 1.000000 -1.000000 0.000000 1.000000 0.000000
--1.000000 1.000000 1.000000 0.000000 1.000000 0.000000
-4 0 1 2 3
-4 4 5 6 7
-4 8 9 10 11
-4 12 13 14 15
-4 16 17 18 19
-4 20 21 22 23
diff --git a/tests/auto/threed/load_model/models/basic-cube.x3d b/tests/auto/threed/load_model/models/basic-cube.x3d
deleted file mode 100644
index 0c52894d..00000000
--- a/tests/auto/threed/load_model/models/basic-cube.x3d
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd">
-<X3D version="3.0" profile="Immersive" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation="http://www.web3d.org/specifications/x3d-3.0.xsd">
-<head>
- <meta name="filename" content="basic-cube.x3d" />
- <meta name="generator" content="Blender 249" />
- <meta name="translator" content="X3D exporter v1.55 (2006/01/17)" />
-</head>
-<Scene>
-<NavigationInfo headlight="FALSE" visibilityLimit="0.0" type='"EXAMINE","ANY"' avatarSize="0.25, 1.75, 0.75" />
-<Background groundColor="0.057 0.221 0.4" skyColor="0.057 0.221 0.4" />
-
-<Collision enabled="false">
- <Transform DEF="CubeObject" translation="0.000000 0.000000 0.000000" scale="1.000000 1.000000 1.000000" rotation="-1.000000 0.000000 0.000000 1.570796">
- <Shape>
- <Appearance>
- <Material DEF="MA_Red" diffuseColor="0.919 0.157 0.157" specularColor="0.401 0.401 0.401" emissiveColor="0.0 0.0 0.0"
- ambientIntensity="0.167" shininess="0.098" transparency="0.0" />
- </Appearance>
- <IndexedFaceSet solid="true" coordIndex="0 1 2 -1, 0 2 3 -1, 4 7 6 -1, 4 6 5 -1, 0 4 5 -1, 0 5 1 -1, 1 5 6 -1, 1 6 2 -1, 2 6 7 -1, 2 7 3 -1, 4 0 3 -1, 4 3 7 -1, ">
- <Coordinate DEF="coord_CubeObject"
- point="1.000000 1.000000 -1.000000, 1.000000 -1.000000 -1.000000, -1.000000 -1.000000 -1.000000, -1.000000 1.000000 -1.000000, 1.000000 0.999999 1.000000, 0.999999 -1.000001 1.000000, -1.000000 -1.000000 1.000000, -1.000000 1.000000 1.000000, " />
- </IndexedFaceSet>
- </Shape>
-</Transform>
-</Collision>
-
-
-</Scene>
-</X3D>
diff --git a/tests/auto/threed/load_model/models/cube.dae b/tests/auto/threed/load_model/models/cube.dae
deleted file mode 100644
index cda4d16c..00000000
--- a/tests/auto/threed/load_model/models/cube.dae
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<COLLADA version="1.4.0" xmlns="http://www.collada.org/2005/11/COLLADASchema">
- <asset>
- <contributor>
- <author>Illusoft Collada 1.4.0 plugin for Blender - http://colladablender.illusoft.com</author>
- <authoring_tool>Blender v:249 - Illusoft Collada Exporter v:0.3.162</authoring_tool>
- <comments></comments>
- <copyright></copyright>
- <source_data>file://</source_data>
- </contributor>
- <created>2010-12-15T02:07:15.785711</created>
- <modified>2010-12-15T02:07:15.787585</modified>
- <unit meter="0.01" name="centimeter"/>
- <up_axis>Z_UP</up_axis>
- </asset>
- <library_effects>
- <effect id="Material-fx" name="Material-fx">
- <profile_COMMON>
- <technique sid="blender">
- <phong>
- <emission>
- <color>0.00000 0.00000 0.00000 1</color>
- </emission>
- <ambient>
- <color>0.40000 0.40000 0.40000 1</color>
- </ambient>
- <diffuse>
- <color>0.80000 0.80000 0.80000 1</color>
- </diffuse>
- <specular>
- <color>0.50000 0.50000 0.50000 1</color>
- </specular>
- <shininess>
- <float>12.5</float>
- </shininess>
- <reflective>
- <color>1.00000 1.00000 1.00000 1</color>
- </reflective>
- <reflectivity>
- <float>0.0</float>
- </reflectivity>
- <transparent>
- <color>1 1 1 1</color>
- </transparent>
- <transparency>
- <float>0.0</float>
- </transparency>
- </phong>
- </technique>
- </profile_COMMON>
- </effect>
- </library_effects>
- <library_materials>
- <material id="Material" name="Material">
- <instance_effect url="#Material-fx"/>
- </material>
- </library_materials>
- <library_geometries>
- <geometry id="Cube_001" name="Cube_001">
- <mesh>
- <source id="Cube_001-Position">
- <float_array count="24" id="Cube_001-Position-array">1.00000 1.00000 -1.00000 1.00000 -1.00000 -1.00000 -1.00000 -1.00000 -1.00000 -1.00000 1.00000 -1.00000 1.00000 1.00000 1.00000 1.00000 -1.00000 1.00000 -1.00000 -1.00000 1.00000 -1.00000 1.00000 1.00000</float_array>
- <technique_common>
- <accessor count="8" source="#Cube_001-Position-array" stride="3">
- <param type="float" name="X"></param>
- <param type="float" name="Y"></param>
- <param type="float" name="Z"></param>
- </accessor>
- </technique_common>
- </source>
- <source id="Cube_001-Normals">
- <float_array count="18" id="Cube_001-Normals-array">0.00000 0.00000 -1.00000 0.00000 -0.00000 1.00000 1.00000 -0.00000 0.00000 -0.00000 -1.00000 -0.00000 -1.00000 0.00000 -0.00000 0.00000 1.00000 0.00000</float_array>
- <technique_common>
- <accessor count="6" source="#Cube_001-Normals-array" stride="3">
- <param type="float" name="X"></param>
- <param type="float" name="Y"></param>
- <param type="float" name="Z"></param>
- </accessor>
- </technique_common>
- </source>
- <vertices id="Cube_001-Vertex">
- <input semantic="POSITION" source="#Cube_001-Position"/>
- </vertices>
- <triangles count="12" material="Material">
- <input offset="0" semantic="VERTEX" source="#Cube_001-Vertex"/>
- <input offset="1" semantic="NORMAL" source="#Cube_001-Normals"/>
- <p>0 0 1 0 2 0 2 0 3 0 0 0 4 1 7 1 6 1 6 1 5 1 4 1 0 2 4 2 5 2 5 2 1 2 0 2 1 3 5 3 6 3 6 3 2 3 1 3 2 4 6 4 7 4 7 4 3 4 2 4 4 5 0 5 3 5 3 5 7 5 4 5</p>
- </triangles>
- </mesh>
- </geometry>
- </library_geometries>
- <library_visual_scenes>
- <visual_scene id="Scene" name="Scene">
- <node layer="L1" id="Cube" name="Cube">
- <translate sid="translate">0.00000 0.00000 0.00000</translate>
- <rotate sid="rotateZ">0 0 1 0.00000</rotate>
- <rotate sid="rotateY">0 1 0 -0.00000</rotate>
- <rotate sid="rotateX">1 0 0 0.00000</rotate>
- <scale sid="scale">1.00000 1.00000 1.00000</scale>
- <instance_geometry url="#Cube_001">
- <bind_material>
- <technique_common>
- <instance_material symbol="Material" target="#Material">
- <bind_vertex_input input_semantic="TEXCOORD" input_set="1" semantic="CHANNEL1"/>
- </instance_material>
- </technique_common>
- </bind_material>
- </instance_geometry>
- </node>
- </visual_scene>
- </library_visual_scenes>
- <library_physics_materials>
- <physics_material id="Cube-PhysicsMaterial" name="Cube-PhysicsMaterial">
- <technique_common>
- <dynamic_friction>0.5</dynamic_friction>
- <restitution>0.0</restitution>
- <static_friction>0.5</static_friction>
- </technique_common>
- </physics_material>
- </library_physics_materials>
- <library_physics_models>
- <physics_model id="Scene-PhysicsModel" name="Scene-PhysicsModel">
- <rigid_body name="Cube-RigidBody" sid="Cube-RigidBody">
- <technique_common>
- <dynamic>false</dynamic>
- <mass>0</mass>
- <instance_physics_material url="#Cube-PhysicsMaterial"/>
- <shape>
- <instance_geometry url="#Cube_001"/>
- </shape>
- </technique_common>
- </rigid_body>
- </physics_model>
- </library_physics_models>
- <library_physics_scenes>
- <physics_scene id="Scene-Physics" name="Scene-Physics">
- <instance_physics_model url="#Scene-PhysicsModel">
- <instance_rigid_body body="Cube-RigidBody" target="#Cube"/>
- </instance_physics_model>
- </physics_scene>
- </library_physics_scenes>
- <scene>
- <instance_physics_scene url="#Scene-Physics"/>
- <instance_visual_scene url="#Scene"/>
- </scene>
-</COLLADA>
diff --git a/tests/auto/threed/load_model/models/teacup.bez b/tests/auto/threed/load_model/models/teacup.bez
deleted file mode 100644
index f4dde3ef..00000000
--- a/tests/auto/threed/load_model/models/teacup.bez
+++ /dev/null
@@ -1,280 +0,0 @@
-26
-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
-193,194,195,196,197,198,199,200,201,202,203,204,1,2,3,4
-196,205,206,207,200,208,209,210,204,211,212,213,4,17,18,19
-207,214,215,216,210,217,218,219,213,220,221,222,19,29,30,31
-216,223,224,193,219,225,226,197,222,227,228,201,31,41,42,1
-229,230,231,28,232,233,234,235,236,237,238,239,240,241,242,243
-28,244,245,229,235,246,247,232,239,248,249,236,243,250,251,240
-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
-93,94,95,96,121,122,123,124,125,126,127,128,129,130,131,132
-96,103,104,105,124,133,134,135,128,136,137,138,132,139,140,141
-105,112,113,114,135,142,143,144,138,145,146,147,141,148,149,150
-114,119,120,93,144,151,152,121,147,153,154,125,150,155,156,129
-129,130,131,132,157,158,159,160,161,162,163,164,165,166,167,168
-132,139,140,141,160,169,170,171,164,172,173,174,168,175,176,177
-141,148,149,150,171,178,179,180,174,181,182,183,177,184,185,186
-150,155,156,129,180,187,188,157,183,189,190,161,186,191,192,165
-251
-0.409091,0.772727,0.0
-0.409091,0.772727,-0.229091
-0.229091,0.772727,-0.409091
-0.0,0.772727,-0.409091
-0.409091,0.886364,0.0
-0.409091,0.886364,-0.229091
-0.229091,0.886364,-0.409091
-0.0,0.886364,-0.409091
-0.454545,0.886364,0.0
-0.454545,0.886364,-0.254545
-0.254545,0.886364,-0.454545
-0.0,0.886364,-0.454545
-0.454545,0.772727,0.0
-0.454545,0.772727,-0.254545
-0.254545,0.772727,-0.454545
-0.0,0.772727,-0.454545
--0.229091,0.772727,-0.409091
--0.409091,0.772727,-0.229091
--0.409091,0.772727,0.0
--0.229091,0.886364,-0.409091
--0.409091,0.886364,-0.229091
--0.409091,0.886364,0.0
--0.254545,0.886364,-0.454545
--0.454545,0.886364,-0.254545
--0.454545,0.886364,0.0
--0.254545,0.772727,-0.454545
--0.454545,0.772727,-0.254545
--0.454545,0.772727,0.0
--0.409091,0.772727,0.229091
--0.229091,0.772727,0.409091
-0.0,0.772727,0.409091
--0.409091,0.886364,0.229091
--0.229091,0.886364,0.409091
-0.0,0.886364,0.409091
--0.454545,0.886364,0.254545
--0.254545,0.886364,0.454545
-0.0,0.886364,0.454545
--0.454545,0.772727,0.254545
--0.254545,0.772727,0.454545
-0.0,0.772727,0.454545
-0.229091,0.772727,0.409091
-0.409091,0.772727,0.229091
-0.229091,0.886364,0.409091
-0.409091,0.886364,0.229091
-0.254545,0.886364,0.454545
-0.454545,0.886364,0.254545
-0.254545,0.772727,0.454545
-0.454545,0.772727,0.254545
-0.454545,0.545455,0.0
-0.454545,0.545455,-0.254545
-0.254545,0.545455,-0.454545
-0.0,0.545455,-0.454545
-0.454545,0.272727,0.0
-0.454545,0.272727,-0.254545
-0.254545,0.272727,-0.454545
-0.0,0.272727,-0.454545
-0.318182,0.0454545,0.0
-0.318182,0.0454545,-0.178182
-0.178182,0.0454545,-0.318182
-0.0,0.0454545,-0.318182
--0.254545,0.545455,-0.454545
--0.454545,0.545455,-0.254545
--0.454545,0.545455,0.0
--0.254545,0.272727,-0.454545
--0.454545,0.272727,-0.254545
--0.454545,0.272727,0.0
--0.178182,0.0454545,-0.318182
--0.318182,0.0454545,-0.178182
--0.318182,0.0454545,0.0
--0.454545,0.545455,0.254545
--0.254545,0.545455,0.454545
-0.0,0.545455,0.454545
--0.454545,0.272727,0.254545
--0.254545,0.272727,0.454545
-0.0,0.272727,0.454545
--0.318182,0.0454545,0.178182
--0.178182,0.0454545,0.318182
-0.0,0.0454545,0.318182
-0.254545,0.545455,0.454545
-0.454545,0.545455,0.254545
-0.254545,0.272727,0.454545
-0.454545,0.272727,0.254545
-0.178182,0.0454545,0.318182
-0.318182,0.0454545,0.178182
-0.545455,0.0454545,0.0
-0.545455,0.0454545,-0.305455
-0.305455,0.0454545,-0.545455
-0.0,0.0454545,-0.545455
-0.727273,0.136364,0.0
-0.727273,0.136364,-0.407273
-0.407273,0.136364,-0.727273
-0.0,0.136364,-0.727273
-0.909091,0.136364,0.0
-0.909091,0.136364,-0.509091
-0.509091,0.136364,-0.909091
-0.0,0.136364,-0.909091
--0.305455,0.0454545,-0.545455
--0.545455,0.0454545,-0.305455
--0.545455,0.0454545,0.0
--0.407273,0.136364,-0.727273
--0.727273,0.136364,-0.407273
--0.727273,0.136364,0.0
--0.509091,0.136364,-0.909091
--0.909091,0.136364,-0.509091
--0.909091,0.136364,0.0
--0.545455,0.0454545,0.305455
--0.305455,0.0454545,0.545455
-0.0,0.0454545,0.545455
--0.727273,0.136364,0.407273
--0.407273,0.136364,0.727273
-0.0,0.136364,0.727273
--0.909091,0.136364,0.509091
--0.509091,0.136364,0.909091
-0.0,0.136364,0.909091
-0.305455,0.0454545,0.545455
-0.545455,0.0454545,0.305455
-0.407273,0.136364,0.727273
-0.727273,0.136364,0.407273
-0.509091,0.136364,0.909091
-0.909091,0.136364,0.509091
-1.0,0.136364,0.0
-1.0,0.136364,-0.56
-0.56,0.136364,-1.0
-0.0,0.136364,-1.0
-1.0,0.0909091,0.0
-1.0,0.0909091,-0.56
-0.56,0.0909091,-1.0
-0.0,0.0909091,-1.0
-0.909091,0.0909091,0.0
-0.909091,0.0909091,-0.509091
-0.509091,0.0909091,-0.909091
-0.0,0.0909091,-0.909091
--0.56,0.136364,-1.0
--1.0,0.136364,-0.56
--1.0,0.136364,0.0
--0.56,0.0909091,-1.0
--1.0,0.0909091,-0.56
--1.0,0.0909091,0.0
--0.509091,0.0909091,-0.909091
--0.909091,0.0909091,-0.509091
--0.909091,0.0909091,0.0
--1.0,0.136364,0.56
--0.56,0.136364,1.0
-0.0,0.136364,1.0
--1.0,0.0909091,0.56
--0.56,0.0909091,1.0
-0.0,0.0909091,1.0
--0.909091,0.0909091,0.509091
--0.509091,0.0909091,0.909091
-0.0,0.0909091,0.909091
-0.56,0.136364,1.0
-1.0,0.136364,0.56
-0.56,0.0909091,1.0
-1.0,0.0909091,0.56
-0.509091,0.0909091,0.909091
-0.909091,0.0909091,0.509091
-0.727273,0.0909091,0.0
-0.727273,0.0909091,-0.407273
-0.407273,0.0909091,-0.727273
-0.0,0.0909091,-0.727273
-0.545455,0.0,0.0
-0.545455,0.0,-0.305455
-0.305455,0.0,-0.545455
-0.0,0.0,-0.545455
-0.318182,0.0,0.0
-0.318182,0.0,-0.178182
-0.178182,0.0,-0.318182
-0.0,0.0,-0.318182
--0.407273,0.0909091,-0.727273
--0.727273,0.0909091,-0.407273
--0.727273,0.0909091,0.0
--0.305455,0.0,-0.545455
--0.545455,0.0,-0.305455
--0.545455,0.0,0.0
--0.178182,0.0,-0.318182
--0.318182,0.0,-0.178182
--0.318182,0.0,0.0
--0.727273,0.0909091,0.407273
--0.407273,0.0909091,0.727273
-0.0,0.0909091,0.727273
--0.545455,0.0,0.305455
--0.305455,0.0,0.545455
-0.0,0.0,0.545455
--0.318182,0.0,0.178182
--0.178182,0.0,0.318182
-0.0,0.0,0.318182
-0.407273,0.0909091,0.727273
-0.727273,0.0909091,0.407273
-0.305455,0.0,0.545455
-0.545455,0.0,0.305455
-0.178182,0.0,0.318182
-0.318182,0.0,0.178182
-0.272727,0.0454545,0.0
-0.272727,0.0454545,-0.152727
-0.152727,0.0454545,-0.272727
-0.0,0.0454545,-0.272727
-0.409091,0.272727,0.0
-0.409091,0.272727,-0.229091
-0.229091,0.272727,-0.409091
-0.0,0.272727,-0.409091
-0.409091,0.545455,0.0
-0.409091,0.545455,-0.229091
-0.229091,0.545455,-0.409091
-0.0,0.545455,-0.409091
--0.152727,0.0454545,-0.272727
--0.272727,0.0454545,-0.152727
--0.272727,0.0454545,0.0
--0.229091,0.272727,-0.409091
--0.409091,0.272727,-0.229091
--0.409091,0.272727,0.0
--0.229091,0.545455,-0.409091
--0.409091,0.545455,-0.229091
--0.409091,0.545455,0.0
--0.272727,0.0454545,0.152727
--0.152727,0.0454545,0.272727
-0.0,0.0454545,0.272727
--0.409091,0.272727,0.229091
--0.229091,0.272727,0.409091
-0.0,0.272727,0.409091
--0.409091,0.545455,0.229091
--0.229091,0.545455,0.409091
-0.0,0.545455,0.409091
-0.152727,0.0454545,0.272727
-0.272727,0.0454545,0.152727
-0.229091,0.272727,0.409091
-0.409091,0.272727,0.229091
-0.229091,0.545455,0.409091
-0.409091,0.545455,0.229091
--0.454545,0.704545,0.0
--0.454545,0.704545,-0.0454545
--0.454545,0.772727,-0.0454545
--0.772727,0.863636,0.0
--0.772727,0.863636,-0.0454545
--0.818182,0.954545,-0.0454545
--0.818182,0.954545,0.0
--0.772727,0.522727,0.0
--0.772727,0.522727,-0.0454545
--0.909091,0.477273,-0.0454545
--0.909091,0.477273,0.0
--0.409091,0.363636,0.0
--0.409091,0.363636,-0.0454545
--0.409091,0.295455,-0.0454545
--0.409091,0.295455,0.0
--0.454545,0.772727,0.0454545
--0.454545,0.704545,0.0454545
--0.818182,0.954545,0.0454545
--0.772727,0.863636,0.0454545
--0.909091,0.477273,0.0454545
--0.772727,0.522727,0.0454545
--0.409091,0.295455,0.0454545
--0.409091,0.363636,0.0454545
-# reverse-patches
diff --git a/tests/auto/threed/load_model/models/wave.obj b/tests/auto/threed/load_model/models/wave.obj
deleted file mode 100644
index d47fba48..00000000
--- a/tests/auto/threed/load_model/models/wave.obj
+++ /dev/null
@@ -1,476 +0,0 @@
-o Wave_Obj
-v -180 -180 20.21
-v -180 -120 39.571
-v -180 -60 103.881
-v -180 0 150.836
-v -180 60 104.229
-v -180 120 39.241
-v -180 180 20.21
-v -170 -180 41.143
-v -170 -120 71.763
-v -170 -60 155.217
-v -170 0 201.577
-v -170 60 142.873
-v -170 120 64.235
-v -170 180 41.143
-v -160 -180 69.49
-v -160 -120 113.906
-v -160 -60 212.144
-v -160 0 253.998
-v -160 60 183.949
-v -160 120 94.971
-v -160 180 69.49
-v -150 -180 103.5
-v -150 -120 161.47
-v -150 -60 269.407
-v -150 0 304.377
-v -150 60 223.999
-v -150 120 128.686
-v -150 180 103.5
-v -140 -180 138.975
-v -140 -120 208.317
-v -140 -60 322.442
-v -140 0 349.416
-v -140 60 260.097
-v -140 120 161.508
-v -140 180 138.975
-v -130 -180 171.412
-v -130 -120 249.8
-v -130 -60 367.819
-v -130 0 386.836
-v -130 60 290.235
-v -130 120 190.26
-v -130 180 171.412
-v -120 -180 198.071
-v -120 -120 283.402
-v -120 -60 403.825
-v -120 0 415.796
-v -120 60 313.627
-v -120 120 213.295
-v -120 180 198.071
-v -110 -180 218.155
-v -110 -120 308.549
-v -110 -60 430.441
-v -110 0 436.769
-v -110 60 330.597
-v -110 120 230.372
-v -110 180 218.155
-v -100 -180 232.096
-v -100 -120 325.951
-v -100 -60 448.727
-v -100 0 450.948
-v -100 60 342.085
-v -100 120 242.103
-v -100 180 232.096
-v -90 -180 240.799
-v -90 -120 336.8
-v -90 -60 460.077
-v -90 0 459.653
-v -90 60 349.144
-v -90 120 249.379
-v -90 180 240.799
-v -80 -180 245.162
-v -80 -120 342.236
-v -80 -60 465.751
-v -80 0 463.975
-v -80 60 352.652
-v -80 120 253.013
-v -80 180 245.162
-v -70 -180 245.876
-v -70 -120 343.125
-v -70 -60 466.678
-v -70 0 464.679
-v -70 60 353.224
-v -70 120 253.607
-v -70 180 245.876
-v -60 -180 243.379
-v -60 -120 340.015
-v -60 -60 463.434
-v -60 0 462.212
-v -60 60 351.221
-v -60 120 251.529
-v -60 180 243.379
-v -50 -180 237.873
-v -50 -120 333.154
-v -50 -60 456.266
-v -50 0 456.739
-v -50 60 346.781
-v -50 120 246.937
-v -50 180 237.873
-v -40 -180 229.336
-v -40 -120 322.509
-v -40 -60 445.118
-v -40 0 448.165
-v -40 60 339.829
-v -40 120 239.788
-v -40 180 229.336
-v -30 -180 217.539
-v -30 -120 307.779
-v -30 -60 429.63
-v -30 0 436.135
-v -30 60 330.084
-v -30 120 229.851
-v -30 180 217.539
-v -20 -180 202.042
-v -20 -120 288.383
-v -20 -60 409.118
-v -20 0 419.997
-v -20 60 317.024
-v -20 120 216.689
-v -20 180 202.042
-v -10 -180 182.22
-v -10 -120 263.461
-v -10 -60 382.526
-v -10 0 398.745
-v -10 60 299.848
-v -10 120 199.654
-v -10 180 182.22
-v 0 -180 157.356
-v 0 -120 231.929
-v 0 -60 348.414
-v 0 0 370.958
-v 0 60 277.434
-v 0 120 177.914
-v 0 180 157.356
-v 10 -180 127.018
-v 10 -120 192.755
-v 10 -60 305.077
-v 10 0 334.827
-v 10 60 248.38
-v 10 120 150.643
-v 10 180 127.018
-v 20 -180 92.098
-v 20 -120 145.878
-v 20 -60 251.138
-v 20 0 288.517
-v 20 60 211.347
-v 20 120 117.688
-v 20 180 92.098
-v 30 -180 56.374
-v 30 -120 94.668
-v 30 -60 187.198
-v 30 0 231.371
-v 30 60 166.122
-v 30 120 81.11
-v 30 180 56.374
-v 40 -180 25.98
-v 40 -120 48.522
-v 40 -60 119.078
-v 40 0 166.372
-v 40 60 115.898
-v 40 120 46.398
-v 40 180 25.98
-v 50 -180 5.981
-v 50 -120 16.643
-v 50 -60 60.852
-v 50 0 102.95
-v 50 60 69.36
-v 50 120 19.719
-v 50 180 5.981
-v 60 -180 0.255
-v 60 -120 1.383
-v 60 -60 23.928
-v 60 0 54.669
-v 60 60 35.477
-v 60 120 4.089
-v 60 180 0.255
-v 70 -180 18.321
-v 70 -120 3.316
-v 70 -60 5.835
-v 70 0 25.99
-v 70 60 15.427
-v 70 120 0.156
-v 70 180 18.321
-v 80 -180 59.32
-v 80 -120 28.502
-v 80 -60 0.178
-v 80 0 11.554
-v 80 60 5.561
-v 80 120 8.051
-v 80 180 59.32
-v 90 -180 57.91
-v 90 -120 68.006
-v 90 -60 0.905
-v 90 0 5.415
-v 90 60 1.77
-v 90 120 31.774
-v 90 180 57.91
-v 100 -180 57.335
-v 100 -120 67.375
-v 100 -60 2.408
-v 100 0 3.583
-v 100 60 0.819
-v 100 120 49.323
-v 100 180 57.335
-v 110 -180 57.545
-v 110 -120 67.606
-v 110 -60 1.766
-v 110 0 4.209
-v 110 60 1.126
-v 110 120 49.47
-v 110 180 57.545
-v 120 -180 58.399
-v 120 -120 68.542
-v 120 -60 0.211
-v 120 0 7.273
-v 120 60 2.852
-v 120 120 18.844
-v 120 180 58.399
-v 130 -180 59.722
-v 130 -120 19.94
-v 130 -60 0.647
-v 130 0 13.771
-v 130 60 7.03
-v 130 120 5.33
-v 130 180 59.722
-v 140 -180 20.309
-v 140 -120 3.839
-v 140 -60 5.366
-v 140 0 25.099
-v 140 60 14.806
-v 140 120 0.252
-v 140 180 20.309
-v 150 -180 2.643
-v 150 -120 0.03
-v 150 -60 16.035
-v 150 0 42.966
-v 150 60 27.3
-v 150 120 1.447
-v 150 180 2.643
-v 160 -180 0.334
-v 160 -120 4.859
-v 160 -60 34.47
-v 160 0 69.362
-v 160 60 45.731
-v 160 120 8.272
-v 160 180 0.334
-v 170 -180 6.626
-v 170 -120 17.756
-v 170 -60 63.11
-v 170 0 105.651
-v 170 60 71.284
-v 170 120 20.723
-v 170 180 6.626
-v 180 -180 20.21
-v 180 -120 39.571
-v 180 -60 103.881
-v 180 0 150.836
-v 180 60 104.229
-v 180 120 39.241
-v 180 180 20.21
-f 1/1 2/2 9/3 8/4
-f 2/1 3/2 10/3 9/4
-f 3/1 4/2 11/3 10/4
-f 4/1 5/2 12/3 11/4
-f 5/1 6/2 13/3 12/4
-f 6/1 7/2 14/3 13/4
-f 8/1 9/2 16/3 15/4
-f 9/1 10/2 17/3 16/4
-f 10/1 11/2 18/3 17/4
-f 11/1 12/2 19/3 18/4
-f 12/1 13/2 20/3 19/4
-f 13/1 14/2 21/3 20/4
-f 15/1 16/2 23/3 22/4
-f 16/1 17/2 24/3 23/4
-f 17/1 18/2 25/3 24/4
-f 18/1 19/2 26/3 25/4
-f 19/1 20/2 27/3 26/4
-f 20/1 21/2 28/3 27/4
-f 22/1 23/2 30/3 29/4
-f 23/1 24/2 31/3 30/4
-f 24/1 25/2 32/3 31/4
-f 25/1 26/2 33/3 32/4
-f 26/1 27/2 34/3 33/4
-f 27/1 28/2 35/3 34/4
-f 29/1 30/2 37/3 36/4
-f 30/1 31/2 38/3 37/4
-f 31/1 32/2 39/3 38/4
-f 32/1 33/2 40/3 39/4
-f 33/1 34/2 41/3 40/4
-f 34/1 35/2 42/3 41/4
-f 36/1 37/2 44/3 43/4
-f 37/1 38/2 45/3 44/4
-f 38/1 39/2 46/3 45/4
-f 39/1 40/2 47/3 46/4
-f 40/1 41/2 48/3 47/4
-f 41/1 42/2 49/3 48/4
-f 43/1 44/2 51/3 50/4
-f 44/1 45/2 52/3 51/4
-f 45/1 46/2 53/3 52/4
-f 46/1 47/2 54/3 53/4
-f 47/1 48/2 55/3 54/4
-f 48/1 49/2 56/3 55/4
-f 50/1 51/2 58/3 57/4
-f 51/1 52/2 59/3 58/4
-f 52/1 53/2 60/3 59/4
-f 53/1 54/2 61/3 60/4
-f 54/1 55/2 62/3 61/4
-f 55/1 56/2 63/3 62/4
-f 57/1 58/2 65/3 64/4
-f 58/1 59/2 66/3 65/4
-f 59/1 60/2 67/3 66/4
-f 60/1 61/2 68/3 67/4
-f 61/1 62/2 69/3 68/4
-f 62/1 63/2 70/3 69/4
-f 64/1 65/2 72/3 71/4
-f 65/1 66/2 73/3 72/4
-f 66/1 67/2 74/3 73/4
-f 67/1 68/2 75/3 74/4
-f 68/1 69/2 76/3 75/4
-f 69/1 70/2 77/3 76/4
-f 71/1 72/2 79/3 78/4
-f 72/1 73/2 80/3 79/4
-f 73/1 74/2 81/3 80/4
-f 74/1 75/2 82/3 81/4
-f 75/1 76/2 83/3 82/4
-f 76/1 77/2 84/3 83/4
-f 78/1 79/2 86/3 85/4
-f 79/1 80/2 87/3 86/4
-f 80/1 81/2 88/3 87/4
-f 81/1 82/2 89/3 88/4
-f 82/1 83/2 90/3 89/4
-f 83/1 84/2 91/3 90/4
-f 85/1 86/2 93/3 92/4
-f 86/1 87/2 94/3 93/4
-f 87/1 88/2 95/3 94/4
-f 88/1 89/2 96/3 95/4
-f 89/1 90/2 97/3 96/4
-f 90/1 91/2 98/3 97/4
-f 92/1 93/2 100/3 99/4
-f 93/1 94/2 101/3 100/4
-f 94/1 95/2 102/3 101/4
-f 95/1 96/2 103/3 102/4
-f 96/1 97/2 104/3 103/4
-f 97/1 98/2 105/3 104/4
-f 99/1 100/2 107/3 106/4
-f 100/1 101/2 108/3 107/4
-f 101/1 102/2 109/3 108/4
-f 102/1 103/2 110/3 109/4
-f 103/1 104/2 111/3 110/4
-f 104/1 105/2 112/3 111/4
-f 106/1 107/2 114/3 113/4
-f 107/1 108/2 115/3 114/4
-f 108/1 109/2 116/3 115/4
-f 109/1 110/2 117/3 116/4
-f 110/1 111/2 118/3 117/4
-f 111/1 112/2 119/3 118/4
-f 113/1 114/2 121/3 120/4
-f 114/1 115/2 122/3 121/4
-f 115/1 116/2 123/3 122/4
-f 116/1 117/2 124/3 123/4
-f 117/1 118/2 125/3 124/4
-f 118/1 119/2 126/3 125/4
-f 120/1 121/2 128/3 127/4
-f 121/1 122/2 129/3 128/4
-f 122/1 123/2 130/3 129/4
-f 123/1 124/2 131/3 130/4
-f 124/1 125/2 132/3 131/4
-f 125/1 126/2 133/3 132/4
-f 127/1 128/2 135/3 134/4
-f 128/1 129/2 136/3 135/4
-f 129/1 130/2 137/3 136/4
-f 130/1 131/2 138/3 137/4
-f 131/1 132/2 139/3 138/4
-f 132/1 133/2 140/3 139/4
-f 134/1 135/2 142/3 141/4
-f 135/1 136/2 143/3 142/4
-f 136/1 137/2 144/3 143/4
-f 137/1 138/2 145/3 144/4
-f 138/1 139/2 146/3 145/4
-f 139/1 140/2 147/3 146/4
-f 141/1 142/2 149/3 148/4
-f 142/1 143/2 150/3 149/4
-f 143/1 144/2 151/3 150/4
-f 144/1 145/2 152/3 151/4
-f 145/1 146/2 153/3 152/4
-f 146/1 147/2 154/3 153/4
-f 148/1 149/2 156/3 155/4
-f 149/1 150/2 157/3 156/4
-f 150/1 151/2 158/3 157/4
-f 151/1 152/2 159/3 158/4
-f 152/1 153/2 160/3 159/4
-f 153/1 154/2 161/3 160/4
-f 155/1 156/2 163/3 162/4
-f 156/1 157/2 164/3 163/4
-f 157/1 158/2 165/3 164/4
-f 158/1 159/2 166/3 165/4
-f 159/1 160/2 167/3 166/4
-f 160/1 161/2 168/3 167/4
-f 162/1 163/2 170/3 169/4
-f 163/1 164/2 171/3 170/4
-f 164/1 165/2 172/3 171/4
-f 165/1 166/2 173/3 172/4
-f 166/1 167/2 174/3 173/4
-f 167/1 168/2 175/3 174/4
-f 169/1 170/2 177/3 176/4
-f 170/1 171/2 178/3 177/4
-f 171/1 172/2 179/3 178/4
-f 172/1 173/2 180/3 179/4
-f 173/1 174/2 181/3 180/4
-f 174/1 175/2 182/3 181/4
-f 176/1 177/2 184/3 183/4
-f 177/1 178/2 185/3 184/4
-f 178/1 179/2 186/3 185/4
-f 179/1 180/2 187/3 186/4
-f 180/1 181/2 188/3 187/4
-f 181/1 182/2 189/3 188/4
-f 183/1 184/2 191/3 190/4
-f 184/1 185/2 192/3 191/4
-f 185/1 186/2 193/3 192/4
-f 186/1 187/2 194/3 193/4
-f 187/1 188/2 195/3 194/4
-f 188/1 189/2 196/3 195/4
-f 190/1 191/2 198/3 197/4
-f 191/1 192/2 199/3 198/4
-f 192/1 193/2 200/3 199/4
-f 193/1 194/2 201/3 200/4
-f 194/1 195/2 202/3 201/4
-f 195/1 196/2 203/3 202/4
-f 197/1 198/2 205/3 204/4
-f 198/1 199/2 206/3 205/4
-f 199/1 200/2 207/3 206/4
-f 200/1 201/2 208/3 207/4
-f 201/1 202/2 209/3 208/4
-f 202/1 203/2 210/3 209/4
-f 204/1 205/2 212/3 211/4
-f 205/1 206/2 213/3 212/4
-f 206/1 207/2 214/3 213/4
-f 207/1 208/2 215/3 214/4
-f 208/1 209/2 216/3 215/4
-f 209/1 210/2 217/3 216/4
-f 211/1 212/2 219/3 218/4
-f 212/1 213/2 220/3 219/4
-f 213/1 214/2 221/3 220/4
-f 214/1 215/2 222/3 221/4
-f 215/1 216/2 223/3 222/4
-f 216/1 217/2 224/3 223/4
-f 218/1 219/2 226/3 225/4
-f 219/1 220/2 227/3 226/4
-f 220/1 221/2 228/3 227/4
-f 221/1 222/2 229/3 228/4
-f 222/1 223/2 230/3 229/4
-f 223/1 224/2 231/3 230/4
-f 225/1 226/2 233/3 232/4
-f 226/1 227/2 234/3 233/4
-f 227/1 228/2 235/3 234/4
-f 228/1 229/2 236/3 235/4
-f 229/1 230/2 237/3 236/4
-f 230/1 231/2 238/3 237/4
-f 232/1 233/2 240/3 239/4
-f 233/1 234/2 241/3 240/4
-f 234/1 235/2 242/3 241/4
-f 235/1 236/2 243/3 242/4
-f 236/1 237/2 244/3 243/4
-f 237/1 238/2 245/3 244/4
-f 239/1 240/2 247/3 246/4
-f 240/1 241/2 248/3 247/4
-f 241/1 242/2 249/3 248/4
-f 242/1 243/2 250/3 249/4
-f 243/1 244/2 251/3 250/4
-f 244/1 245/2 252/3 251/4
-f 246/1 247/2 254/3 253/4
-f 247/1 248/2 255/3 254/4
-f 248/1 249/2 256/3 255/4
-f 249/1 250/2 257/3 256/4
-f 250/1 251/2 258/3 257/4
-f 251/1 252/2 259/3 258/4
diff --git a/tests/auto/threed/load_model/tst_load_model.cpp b/tests/auto/threed/load_model/tst_load_model.cpp
deleted file mode 100644
index 824ba5d5..00000000
--- a/tests/auto/threed/load_model/tst_load_model.cpp
+++ /dev/null
@@ -1,232 +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 <QtTest/QtTest>
-
-#include "qglabstractscene.h"
-
-class tst_LoadModel : public QObject
-{
- Q_OBJECT
-public:
- tst_LoadModel() {}
- ~tst_LoadModel() {}
-
-private slots:
- void load_data();
- void load();
- void create_data();
- void create();
-};
-
-// Just try to load all the models in the resources file - no checking
-void tst_LoadModel::load_data()
-{
- QString model_path(QLatin1String(":/data/models"));
- QDir data(model_path);
-
- // only load if its a supported format
- QStringList entries = data.entryList(QGLAbstractScene::supportedFormats());
-
- QTest::addColumn<QString>("model");
-
- for (int i = 0; i < entries.size(); ++i)
- QTest::newRow(qPrintable(entries.at(i))) << entries.at(i);
-}
-
-void tst_LoadModel::load()
-{
- QFETCH(QString, model);
-
- QGLAbstractScene *scene = 0;
- QString model_path(QLatin1String(":/data/models/%1"));
- model_path = model_path.arg(model);
-
- QFile f(model_path);
- QVERIFY(f.open(QIODevice::ReadOnly));
-
- QUrl u;
- u.setPath(model_path);
- u.setScheme("file");
-
- scene = QGLAbstractScene::loadScene(&f,u, QString(), QString());
- QVERIFY(scene != 0);
-}
-
-void tst_LoadModel::create_data()
-{
- QTest::addColumn<QString>("model");
- QTest::addColumn<QString>("options");
- QTest::addColumn<QString>("importName");
- QTest::addColumn<QString>("nodeName");
- QTest::addColumn<QString>("materialName");
- QTest::addColumn<QRgb>("materialDiffuse");
- QTest::addColumn<QString>("texture");
- QTest::addColumn<int>("expected_vertices");
- QTest::addColumn<int>("expected_indices");
-
- ////// --- OBJ ---
-
- // default is faceted for obj
- QTest::newRow("cube-obj-default")
- << "basic-cube.obj" << ""
- << "basic-cube.obj" << "CubeObject_CubeMesh" << "Red"
- << qRgb(188, 32, 32) << "tex"
- << 24 << 36;
-
- // force a faceted load
- QTest::newRow("cube-obj-faceted")
- << "basic-cube.obj" << "ForceFaceted"
- << "basic-cube.obj" << "CubeObject_CubeMesh" << "Red"
- << qRgb(188, 32, 32) << "tex"
- << 24 << 36;
-
- // force a smooth load
- QTest::newRow("cube-obj-smooth")
- << "basic-cube.obj" << "ForceSmooth"
- << "basic-cube.obj" << "CubeObject_CubeMesh" << "Red"
- << qRgb(188, 32, 32) << "tex"
- << 24 << 36;
-
-
- ////// --- 3DS ---
-
- // default is faceted
- QTest::newRow("cube-3ds-default")
- << "basic-cube.3ds" << ""
- << "basic-cube.3ds" << "CubeObject::SlateGray" << "SlateGray"
- << qRgb(94, 142, 155) << "tex"
- << 12 << 36;
-
- // force smooth
- QTest::newRow("cube-3ds-smooth")
- << "basic-cube.3ds" << "ForceSmooth"
- << "basic-cube.3ds" << "CubeObject::Red" << "Red"
- << qRgb(234, 40, 40) << "tex"
- << 12 << 36;
-
-
- ////// --- wave model ---
-
- // default is faceted
- QTest::newRow("wave-obj-default")
- << "wave.obj" << ""
- << "wave.obj" << "Wave_Obj" << ""
- << qRgb(0, 0, 0) << ""
- << 259 << 1296;
-
- // force smooth
- QTest::newRow("wave-obj-faceted")
- << "wave.obj" << "ForceFaceted"
- << "wave.obj" << "Wave_Obj" << ""
- << qRgb(0, 0, 0) << ""
- << 864 << 1296;
-}
-
-void tst_LoadModel::create()
-{
- QFETCH(QString, model);
- QFETCH(QString, options);
- QFETCH(QString, importName);
- QFETCH(QString, nodeName);
- QFETCH(QString, materialName);
- QFETCH(QRgb, materialDiffuse);
- QFETCH(QString, texture);
- QFETCH(int, expected_vertices);
- QFETCH(int, expected_indices);
-
- QGLAbstractScene *scene = 0;
- QString model_path(QLatin1String(":/data/models/%1"));
- model_path = model_path.arg(model);
-
- QFile f(model_path);
- QVERIFY(f.open(QIODevice::ReadOnly));
-
- QUrl u;
- u.setPath(model_path);
- u.setScheme("file");
-
- scene = QGLAbstractScene::loadScene(&f, u, QString(), options);
- QVERIFY(scene != 0);
-
- QGLSceneNode *node = scene->mainNode();
-
- //qDumpScene(node);
-
- QCOMPARE(node->objectName(), importName);
-
- QGLSceneNode *foundGeometry = 0;
- QGLSceneNode *foundNode = nodeName.isEmpty() ? (QGLSceneNode *)1 : 0;
- QGLSceneNode *foundMaterial = materialName.isEmpty() ? (QGLSceneNode *)1 : 0;
- QList<QGLSceneNode*> list = node->allChildren();
- for (int i = 0; i < list.size(); ++ i)
- {
- if (!foundGeometry && list.at(i)->geometry().count() > 0)
- foundGeometry = list.at(i);
- if (!foundNode && list.at(i)->objectName() == nodeName)
- foundNode = list.at(i);
- if (!foundMaterial && list.at(i)->material() &&
- (list.at(i)->material()->objectName() == materialName))
- foundMaterial = list.at(i);
- }
-
- QVERIFY2(foundGeometry != 0, "A non-null geometry node was not found");
- QVERIFY2(foundNode != 0, qPrintable(nodeName + QLatin1String(" named node not found")));
- QVERIFY2(foundMaterial != 0, qPrintable(materialName + QLatin1String(" named material not found")));
-
- int r, g, b;
- if (!materialName.isEmpty())
- {
- foundMaterial->material()->diffuseColor().getRgb(&r, &g, &b);
- QCOMPARE(materialDiffuse, qRgb(r, g, b));
- }
-
- QGeometryData data = foundGeometry->geometry();
- QVERIFY(data.count() > 0);
-
- QCOMPARE(data.vertices().count(), expected_vertices);
- QCOMPARE(data.normals().count(), expected_vertices);
- QCOMPARE(data.indices().count(), expected_indices);
-}
-
-QTEST_APPLESS_MAIN(tst_LoadModel)
-
-#include "tst_load_model.moc"
diff --git a/tests/auto/threed/qareaallocator/qareaallocator.pro b/tests/auto/threed/qareaallocator/qareaallocator.pro
deleted file mode 100644
index b41e5d7f..00000000
--- a/tests/auto/threed/qareaallocator/qareaallocator.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qareaallocator.cpp
diff --git a/tests/auto/threed/qareaallocator/tst_qareaallocator.cpp b/tests/auto/threed/qareaallocator/tst_qareaallocator.cpp
deleted file mode 100644
index 40b76faf..00000000
--- a/tests/auto/threed/qareaallocator/tst_qareaallocator.cpp
+++ /dev/null
@@ -1,280 +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 <QtTest/QtTest>
-#include "qareaallocator.h"
-
-class tst_QAreaAllocator : public QObject
-{
- Q_OBJECT
-public:
- tst_QAreaAllocator() {}
- ~tst_QAreaAllocator() {}
-
-private slots:
- void create();
- void allocateSimple();
- void allocateGeneral();
- void allocateUniform();
-};
-
-void tst_QAreaAllocator::create()
-{
- QSimpleAreaAllocator alloc1(QSize(400, 200));
- QCOMPARE(alloc1.size(), QSize(400, 200));
- QCOMPARE(alloc1.minimumAllocation(), QSize(1, 1));
- QCOMPARE(alloc1.margin(), QSize(0, 0));
-
- alloc1.setMinimumAllocation(QSize(5, 7));
- QCOMPARE(alloc1.minimumAllocation(), QSize(5, 7));
-
- alloc1.setMargin(QSize(8, 9));
- QCOMPARE(alloc1.margin(), QSize(8, 9));
-
- alloc1.expand(QSize(300, 21));
- QCOMPARE(alloc1.size(), QSize(400, 200));
-
- alloc1.expand(QSize(300, 210));
- QCOMPARE(alloc1.size(), QSize(400, 210));
-
- alloc1.expand(QSize(3000, 110));
- QCOMPARE(alloc1.size(), QSize(3000, 210));
-
- alloc1.expandBy(QSize(-1, -1000));
- QCOMPARE(alloc1.size(), QSize(3000, 210));
-
- alloc1.expandBy(QSize(1, 10));
- QCOMPARE(alloc1.size(), QSize(3001, 220));
-
- QGeneralAreaAllocator alloc2(QSize(400, 200));
- QCOMPARE(alloc2.size(), QSize(512, 256));
- QCOMPARE(alloc2.minimumAllocation(), QSize(8, 8));
- QCOMPARE(alloc2.margin(), QSize(0, 0));
-
- alloc2.expand(QSize(256, 96));
- QCOMPARE(alloc2.size(), QSize(512, 256));
-
- alloc2.expand(QSize(256, 257));
- QCOMPARE(alloc2.size(), QSize(512, 512));
-
- alloc2.expand(QSize(513, 257));
- QCOMPARE(alloc2.size(), QSize(1024, 512));
-
- alloc2.expandBy(QSize(-100, -100));
- QCOMPARE(alloc2.size(), QSize(1024, 512));
-
- alloc2.expandBy(QSize(1, 2));
- QCOMPARE(alloc2.size(), QSize(2048, 1024));
-
- QUniformAreaAllocator alloc3(QSize(400, 200), QSize(16, 16));
- QCOMPARE(alloc3.size(), QSize(400, 200));
- QCOMPARE(alloc3.minimumAllocation(), QSize(1, 1));
- QCOMPARE(alloc3.margin(), QSize(0, 0));
-
- alloc3.expand(QSize(256, 96));
- QCOMPARE(alloc3.size(), QSize(400, 200));
-
- alloc3.expand(QSize(256, 257));
- QCOMPARE(alloc3.size(), QSize(400, 257));
-
- alloc3.expand(QSize(513, 257));
- QCOMPARE(alloc3.size(), QSize(513, 257));
-
- alloc3.expandBy(QSize(-100, -100));
- QCOMPARE(alloc3.size(), QSize(513, 257));
-
- alloc3.expandBy(QSize(1, 2));
- QCOMPARE(alloc3.size(), QSize(514, 259));
-}
-
-void tst_QAreaAllocator::allocateSimple()
-{
- // The simple allocator returns regions in a left-to-right,
- // top-to-bottom order across the image extents.
- QSimpleAreaAllocator alloc1(QSize(100, 100));
- QRect rect;
- for (int y = 0; y < 10; ++y) {
- for (int x = 0; x < 10; ++x) {
- rect = alloc1.allocate(QSize(10, 10));
- QCOMPARE(rect, QRect(x * 10, y * 10, 10, 10));
- }
- }
- rect = alloc1.allocate(QSize(10, 10));
- QVERIFY(rect.isNull());
-
- // Release doesn't do anything on the simple allocator.
- alloc1.release(QRect(0, 0, 10, 10));
- rect = alloc1.allocate(QSize(10, 10));
- QVERIFY(rect.isNull());
-
- // Test minimum allocation sizes.
- QSimpleAreaAllocator alloc2(QSize(100, 100));
- alloc2.setMinimumAllocation(QSize(10, 5));
- for (int y = 0; y < 10; ++y) {
- for (int x = 0; x < 10; ++x) {
- rect = alloc2.allocate(QSize(x + 1, y + 1));
- if (y < 5)
- QCOMPARE(rect, QRect(x * 10, y * 5, x + 1, y + 1));
- else
- QCOMPARE(rect, QRect(x * 10, (y - 5) * 10 + 25, x + 1, y + 1));
- }
- }
- rect = alloc2.allocate(QSize(10, 10));
- QCOMPARE(rect, QRect(0, 75, 10, 10)); // Still some space left over.
- rect = alloc2.allocate(QSize(10, 26)); // Won't fit.
- QVERIFY(rect.isNull());
- rect = alloc2.allocate(QSize(10, 10)); // Should still fit.
- QCOMPARE(rect, QRect(10, 75, 10, 10));
-}
-
-void tst_QAreaAllocator::allocateGeneral()
-{
- QGeneralAreaAllocator alloc1(QSize(128, 128));
- QRect rect;
- QList<QRect> allocations;
- for (int y = 0; y < 16; ++y) {
- for (int x = 0; x < 16; ++x) {
- // The order in which allocations are returned is not
- // as predictable as QSimpleAreaAllocator. But we can
- // ensure that all allocations are unique and 8x8-aligned.
- rect = alloc1.allocate(QSize(8, 8));
- QVERIFY((rect.x() % 8) == 0);
- QVERIFY((rect.y() % 8) == 0);
- QVERIFY((rect.height() % 8) == 0);
- QVERIFY((rect.height() % 8) == 0);
- QVERIFY(!allocations.contains(rect));
- allocations += rect;
- }
- }
- QCOMPARE(allocations.size(), 256);
- rect = alloc1.allocate(QSize(8, 8));
- QVERIFY(rect.isNull());
-
- // Double the width and height and then do some more allocations at 16x16.
- alloc1.expandBy(QSize(1, 1));
- for (int z = 0; z < 3; ++z) {
- for (int y = 0; y < 8; ++y) {
- for (int x = 0; x < 8; ++x) {
- rect = alloc1.allocate(QSize(16, 16));
- QVERIFY((rect.x() % 8) == 0);
- QVERIFY((rect.y() % 8) == 0);
- QVERIFY((rect.height() % 16) == 0);
- QVERIFY((rect.height() % 16) == 0);
- QVERIFY(!allocations.contains(rect));
- allocations += rect;
- }
- }
- }
- QCOMPARE(allocations.size(), 256 + 3 * 8 * 8);
- rect = alloc1.allocate(QSize(8, 8));
- QVERIFY(rect.isNull());
-
- // Release the 8x8 allocations.
- for (int y = 0; y < 16; ++y)
- for (int x = 0; x < 16; ++x)
- alloc1.release(QRect(x * 8, y * 8, 8, 8));
- rect = alloc1.allocate(QSize(8, 8));
- QVERIFY(!rect.isNull());
- alloc1.release(rect);
-
- // Allocate some other sizes into the gap we've just made.
- rect = alloc1.allocate(QSize(256, 256)); // Too big.
- QVERIFY(rect.isNull());
- rect = alloc1.allocate(QSize(64, 128));
- QVERIFY(!rect.isNull());
- rect = alloc1.allocate(QSize(64, 64));
- QVERIFY(!rect.isNull());
- rect = alloc1.allocate(QSize(64, 48)); // Over-allocates to 64x64.
- QVERIFY(!rect.isNull());
- rect = alloc1.allocate(QSize(8, 8)); // Will fail.
- QVERIFY(rect.isNull());
-}
-
-void tst_QAreaAllocator::allocateUniform()
-{
- // The uniform allocator initially returns regions in a
- // left-to-right, top-to-bottom order across the image extents.
- QUniformAreaAllocator alloc1(QSize(100, 100), QSize(10, 10));
- QRect rect;
- for (int y = 0; y < 10; ++y) {
- for (int x = 0; x < 10; ++x) {
- rect = alloc1.allocate(QSize(10, 10));
- QCOMPARE(rect, QRect(x * 10, y * 10, 10, 10));
- }
- }
- rect = alloc1.allocate(QSize(10, 10));
- QVERIFY(rect.isNull());
-
- // Release some areas and then allocate again. Should act like a stack.
- rect = QRect(60, 50, 10, 10);
- QRect rect2 = QRect(50, 40, 10, 10);
- alloc1.release(rect);
- alloc1.release(rect2);
- QCOMPARE(alloc1.allocate(QSize(10, 10)), rect2);
- QCOMPARE(alloc1.allocate(QSize(10, 10)), rect);
- QVERIFY(alloc1.allocate(QSize(10, 10)).isNull());
-
- // Expand the allocation area.
- alloc1.release(rect); // Copy across at least 1 free list entry.
- alloc1.expandBy(QSize(10, 10));
- for (int count = 0; count < 22; ++count) {
- rect = alloc1.allocate(QSize(10, 10));
- QVERIFY(!rect.isNull());
- }
- rect = alloc1.allocate(QSize(10, 10));
- QVERIFY(rect.isNull());
-
- // Release everything and then reallocate.
- for (int y = 0; y < 11; ++y) {
- for (int x = 0; x < 11; ++x)
- alloc1.release(QRect(x * 10, y * 10, 10, 10));
- }
- for (int count = 0; count < (11 * 11); ++count) {
- rect = alloc1.allocate(QSize(10, 10));
- QVERIFY(!rect.isNull());
- }
- rect = alloc1.allocate(QSize(10, 10));
- QVERIFY(rect.isNull());
-}
-
-QTEST_APPLESS_MAIN(tst_QAreaAllocator)
-
-#include "tst_qareaallocator.moc"
diff --git a/tests/auto/threed/qarray/qarray.pro b/tests/auto/threed/qarray/qarray.pro
deleted file mode 100644
index 9c5f37e0..00000000
--- a/tests/auto/threed/qarray/qarray.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qarray.cpp
diff --git a/tests/auto/threed/qarray/tst_qarray.cpp b/tests/auto/threed/qarray/tst_qarray.cpp
deleted file mode 100644
index 3a7f36f2..00000000
--- a/tests/auto/threed/qarray/tst_qarray.cpp
+++ /dev/null
@@ -1,1862 +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 <QtTest/QtTest>
-#include "qarray.h"
-#include <QtGui/qvector3d.h>
-#include <QtCore/qstring.h>
-
-// We ensure to test the following types to cover all of the
-// relevant QTypeInfo variations:
-//
-// QArray<float> Primitive types
-// QArray<QString> Movable types
-// QArray<ComplexValue> Complex types
-
-class tst_QArray : public QObject
-{
- Q_OBJECT
-public:
- tst_QArray() {}
- ~tst_QArray() {}
-
-private slots:
- void create();
- void append();
- void appendTwoAtATime();
- void appendThreeAtATime();
- void appendFourAtATime();
- void appendArray();
- void setAt();
- void value();
- void replace();
- void copy();
- void resize();
- void reserve();
- void squeeze();
- void compare();
- void remove();
- void removeFirstLast();
- void extend();
- void reverse();
- void reversed();
- void mid();
- void left();
- void right();
- void iterate();
- void copyPrealloc();
- void insert();
- void fromRawData();
- void fromWritableRawData();
- void search();
- void fill();
- void zeroPrealloc();
- void exceptions();
- void dataStream();
-};
-
-// This must match the default for PreallocSize.
-static const int ExpectedMinCapacity = 8;
-
-// Exception type that is thrown by ComplexValue.
-class ComplexValueException
-{
-public:
- ComplexValueException(int value, bool inCtor)
- : m_value(value), m_inCtor(inCtor) {}
-
- int value() const { return m_value; }
- bool inConstructor() const { return m_inCtor; }
-
-private:
- int m_value;
- bool m_inCtor;
-};
-
-// Complex type that helps the tests determine if QArray is calling
-// constructors, destructors, and copy constructors in the right places.
-class ComplexValue
-{
-public:
- enum Mode
- {
- Default,
- Init,
- Copy,
- CopiedAgain,
- Assign,
- ThrowInCtor,
- ThrowOnCopy
- };
-
- static int destroyCount;
-
- ComplexValue() : m_value(-1), m_mode(Default) {}
- ComplexValue(int value) : m_value(value), m_mode(Init) {}
-#ifndef QT_NO_EXCEPTIONS
- ComplexValue(int value, Mode mode) : m_value(value), m_mode(mode)
- {
- if (mode == ThrowInCtor)
- throw new ComplexValueException(value, true);
- }
-#endif
- ComplexValue(const ComplexValue& other)
- : m_value(other.m_value)
- {
- if (other.m_mode == Copy || other.m_mode == CopiedAgain)
- m_mode = CopiedAgain;
-#ifndef QT_NO_EXCEPTIONS
- else if (other.m_mode == ThrowOnCopy)
- throw new ComplexValueException(other.m_value, false);
-#endif
- else
- m_mode = Copy;
- }
- ~ComplexValue() { ++destroyCount; }
-
- ComplexValue& operator=(const ComplexValue& other)
- {
-#ifndef QT_NO_EXCEPTIONS
- if (other.m_mode == ThrowOnCopy)
- throw new ComplexValueException(other.m_value, false);
-#endif
- m_value = other.m_value;
- m_mode = Assign;
- return *this;
- }
-
- int value() const { return m_value; }
- Mode mode() const { return m_mode; }
-
- bool operator==(const ComplexValue& other) const
- { return m_value == other.m_value; }
- bool operator==(int other) const
- { return m_value == other; }
- bool operator!=(const ComplexValue& other) const
- { return m_value != other.m_value; }
- bool operator!=(int other) const
- { return m_value != other; }
-
-private:
- int m_value;
- Mode m_mode;
-};
-
-int ComplexValue::destroyCount = 0;
-
-void tst_QArray::create()
-{
- QArray<float> array;
-
- // Check the basic properties.
- QVERIFY(array.isEmpty());
- QCOMPARE(array.count(), 0);
- QCOMPARE(array.size(), 0);
- QCOMPARE(array.capacity(), ExpectedMinCapacity);
- QVERIFY(array.constData() != 0);
- QVERIFY(array.data() == array.constData());
- QVERIFY(((const QArray<float> *)&array)->data() == array.constData());
-
- // The current constData() pointer should be pointing into
- // the middle of "array" at the m_prealloc structure.
- const float *d = array.constData();
- QVERIFY(d >= (const float *)&array);
- QVERIFY(d < (const float *)((&array) + 1));
-
- // Add one element and check the basic properties again.
- array.append(1.0f);
- QVERIFY(!array.isEmpty());
- QCOMPARE(array.count(), 1);
- QCOMPARE(array.size(), 1);
- QCOMPARE(array.capacity(), ExpectedMinCapacity);
- QVERIFY(array.constData() != 0);
- QVERIFY(array.data() == array.constData());
- QVERIFY(((const QArray<float> *)&array)->data() == array.constData());
-
- // Create another array that is filled with an initial value.
- QArray<QVector3D> array2(100, QVector3D(1.0f, 2.0f, 3.0f));
- QVERIFY(!array2.isEmpty());
- QCOMPARE(array2.count(), 100);
- QCOMPARE(array2.size(), 100);
- QVERIFY(array2.capacity() >= 100);
- QVERIFY(array2.constData() != 0);
- QVERIFY(array2.data() == array2.constData());
- QVERIFY(((const QArray<QVector3D> *)&array2)->data() == array2.constData());
- for (int index = 0; index < 100; ++index)
- QVERIFY(array2.at(index) == QVector3D(1.0f, 2.0f, 3.0f));
-
- // Create a filled array that is within the prealloc area.
- QArray<float> array3(ExpectedMinCapacity, 42.5f);
- QVERIFY(!array3.isEmpty());
- QCOMPARE(array3.count(), ExpectedMinCapacity);
- QCOMPARE(array3.size(), ExpectedMinCapacity);
- QVERIFY(array3.capacity() == ExpectedMinCapacity);
- QVERIFY(array3.constData() != 0);
- QVERIFY(array3.data() == array3.constData());
- for (int index = 0; index < ExpectedMinCapacity; ++index)
- QVERIFY(array3.at(index) == 42.5f);
-
- // Create an array of strings.
- QArray<QString> array4;
- QCOMPARE(array4.size(), 0);
- array4.append(QLatin1String("foo"));
- array4.append(QLatin1String("bar"));
- array4.append(array4[0]);
- QCOMPARE(array4[0], QLatin1String("foo"));
- QCOMPARE(array4[1], QLatin1String("bar"));
- QCOMPARE(array4[2], QLatin1String("foo"));
-
- // Create an array of complex values and check that the
- // copy constructors were called correctly. Also check that
- // the destructors are called when the array is destroyed.
- ComplexValue::destroyCount = 0;
- {
- QArray<ComplexValue> array5;
- array5.append(ComplexValue(1));
- array5.append(ComplexValue(2));
- array5.append(ComplexValue(3));
- QCOMPARE(ComplexValue::destroyCount, 3); // Destruction of temporaries.
- QCOMPARE(array5.size(), 3);
- QVERIFY(array5[0].value() == 1);
- QVERIFY(array5[0].mode() == ComplexValue::Copy);
- QVERIFY(array5[1].value() == 2);
- QVERIFY(array5[1].mode() == ComplexValue::Copy);
- QVERIFY(array5[2].value() == 3);
- QVERIFY(array5[2].mode() == ComplexValue::Copy);
- }
- QCOMPARE(ComplexValue::destroyCount, 6);
-}
-
-void tst_QArray::append()
-{
- QArray<float> array;
- int index;
-
- // Appending up to the minimum capacity should not cause a realloc.
- const float *d = array.constData();
- for (index = 0; index < ExpectedMinCapacity; ++index) {
- array.append(float(index));
- QVERIFY(array.constData() == d);
- }
-
- // Check that the array contains the values we expected.
- QCOMPARE(array.count(), ExpectedMinCapacity);
- QCOMPARE(array.capacity(), ExpectedMinCapacity);
- for (index = 0; index < ExpectedMinCapacity; ++index) {
- QCOMPARE(array[index], float(index));
- }
-
- // Append 1 more item and check for realloc.
- array += float(1000.0f);
- QCOMPARE(array.count(), ExpectedMinCapacity + 1);
- QVERIFY(array.capacity() > ExpectedMinCapacity);
- QVERIFY(array.capacity() >= array.count());
- QCOMPARE(array.size(), array.count());
-
- // Check that the array still contains the values we expected.
- for (index = 0; index < ExpectedMinCapacity; ++index) {
- QCOMPARE(array[index], float(index));
- }
- QCOMPARE(array[ExpectedMinCapacity], 1000.0f);
-
- // Append a large number of values to test constant reallocation.
- for (index = 0; index < 1000; ++index)
- array.append(float(index));
- QCOMPARE(array.count(), ExpectedMinCapacity + 1 + 1000);
- QCOMPARE(array.size(), array.count());
-
- // Make two copies of the array.
- QVERIFY(array.isDetached());
- QArray<float> array2(array);
- QVERIFY(!array.isDetached());
- QVERIFY(!array2.isDetached());
- QCOMPARE(array2.count(), ExpectedMinCapacity + 1 + 1000);
- QCOMPARE(array2.size(), array2.count());
- QVERIFY(!array2.isEmpty());
- QVERIFY(array2.capacity() >= array2.size());
- QArray<float> array3;
- array3 = array;
- QCOMPARE(array3.count(), ExpectedMinCapacity + 1 + 1000);
- QCOMPARE(array3.size(), array3.count());
- QVERIFY(!array3.isEmpty());
- QVERIFY(array3.capacity() >= array3.size());
-
- // Check that we actually are sharing the data between the copies.
- QVERIFY(array.constData() == array2.constData());
- QVERIFY(array.constData() == array3.constData());
- d = array2.constData();
-
- // Add another item to the original and check that the copy is unchanged.
- array << float(1500.0f);
- QVERIFY(array.isDetached());
- QCOMPARE(array.count(), ExpectedMinCapacity + 1 + 1000 + 1);
- QCOMPARE(array2.count(), ExpectedMinCapacity + 1 + 1000);
- QCOMPARE(array3.count(), ExpectedMinCapacity + 1 + 1000);
-
- // Check that we have detached the first array (copy-on-write).
- QVERIFY(array.constData() != array2.constData());
- QVERIFY(array.constData() != array3.constData());
- QVERIFY(array2.constData() == array3.constData());
- QVERIFY(array2.constData() == d);
-
- // Check that the original and the copy contain the right values.
- for (index = 0; index < ExpectedMinCapacity; ++index) {
- QCOMPARE(array.at(index), float(index));
- QCOMPARE(array2.at(index), float(index));
- QCOMPARE(array3.at(index), float(index));
- }
- QCOMPARE(array.at(ExpectedMinCapacity), 1000.0f);
- QCOMPARE(array2.at(ExpectedMinCapacity), 1000.0f);
- QCOMPARE(array3.at(ExpectedMinCapacity), 1000.0f);
- for (index = 0; index < 1000; ++index) {
- QCOMPARE(array.at(index + ExpectedMinCapacity + 1), float(index));
- }
- QCOMPARE(array[ExpectedMinCapacity + 1000 + 1], 1500.0f);
-
- // Check the detach conditions.
- QVERIFY(!array2.isDetached());
- QVERIFY(!array3.isDetached());
- array3.append(1.0f);
- QVERIFY(array3.isDetached());
- QVERIFY(!array2.isDetached()); // Still thinks it is shared.
- array2.data();
- QVERIFY(array2.isDetached()); // Now knows that it isn't.
-
- // Create a large array of strings.
- QArray<QString> array4;
- for (index = 0; index < 1000; ++index)
- array4.append(QString::number(index));
- QCOMPARE(array4.size(), 1000);
- for (index = 0; index < 1000; ++index)
- QVERIFY(array4[index] == QString::number(index));
-
- // Make a copy of the array of strings and then force a detach.
- QArray<QString> array5(array4);
- QCOMPARE(array4.size(), 1000);
- QCOMPARE(array5.size(), 1000);
- for (index = 0; index < 1000; ++index) {
- QVERIFY(array4[index] == QString::number(index));
- QVERIFY(array5[index] == QString::number(index));
- }
- array5.append(QString::number(1000));
- QCOMPARE(array4.size(), 1000);
- QCOMPARE(array5.size(), 1001);
- for (index = 0; index < 1000; ++index) {
- QVERIFY(array4[index] == QString::number(index));
- QVERIFY(array5[index] == QString::number(index));
- }
- QVERIFY(array5[1000] == QString::number(1000));
-
- // Create an array of complex values and force one realloc
- // to test that copy constructors and destructors are called
- // when moving data from the prealloc array to the heap.
- QArray<ComplexValue> array6;
- ComplexValue::destroyCount = 0;
- for (index = 0; index < ExpectedMinCapacity; ++index)
- array6.append(ComplexValue(index));
- QCOMPARE(ComplexValue::destroyCount, ExpectedMinCapacity);
- ComplexValue::destroyCount = 0;
- array6.append(ComplexValue(ExpectedMinCapacity));
- QCOMPARE(ComplexValue::destroyCount, ExpectedMinCapacity + 1);
- for (index = 0; index < (ExpectedMinCapacity + 1); ++index) {
- QCOMPARE(array6[index].value(), index);
- // The last element should be Copy, but all others are CopiedAgain.
- if (index == ExpectedMinCapacity)
- QVERIFY(array6[index].mode() == ComplexValue::Copy);
- else
- QVERIFY(array6[index].mode() == ComplexValue::CopiedAgain);
- }
-
- // Force another realloc to test heap to heap copies.
- int capacity = array6.capacity();
- for (int index = array6.size(); index < capacity; ++index)
- array6.append(ComplexValue(index));
- ComplexValue::destroyCount = 0;
- array6.append(ComplexValue(capacity));
- QCOMPARE(ComplexValue::destroyCount, capacity + 1);
- for (index = 0; index < (capacity + 1); ++index) {
- QCOMPARE(array6[index].value(), index);
- // The last element should be Copy, but all others are CopiedAgain.
- if (index == capacity)
- QVERIFY(array6[index].mode() == ComplexValue::Copy);
- else
- QVERIFY(array6[index].mode() == ComplexValue::CopiedAgain);
- }
-
- // Make a copy of array6 and force a detach.
- int size = array6.size();
- QArray<ComplexValue> array7(array6);
- QCOMPARE(array6.size(), size);
- QCOMPARE(array7.size(), size);
- for (index = 0; index < size; ++index) {
- QVERIFY(array6[index].value() == index);
- QVERIFY(array7[index].value() == index);
- }
- array7.append(ComplexValue(size));
- QCOMPARE(array6.size(), size);
- QCOMPARE(array7.size(), size + 1);
- for (index = 0; index < size; ++index) {
- QVERIFY(array6[index].value() == index);
- QVERIFY(array7[index].value() == index);
- }
- QVERIFY(array7[size].value() == size);
-
- // Make another copy using operator=.
- QArray<ComplexValue> array8;
- QCOMPARE(array8.size(), 0);
- array8 = array6;
- QCOMPARE(array6.size(), size);
- QCOMPARE(array8.size(), size);
- for (index = 0; index < size; ++index) {
- QVERIFY(array6[index].value() == index);
- QVERIFY(array8[index].value() == index);
- }
- array8.append(ComplexValue(size));
- QCOMPARE(array6.size(), size);
- QCOMPARE(array8.size(), size + 1);
- for (index = 0; index < size; ++index) {
- QVERIFY(array6[index].value() == index);
- QVERIFY(array8[index].value() == index);
- }
- QVERIFY(array8[size].value() == size);
-
- // Copy the same object over itself.
- QArray<ComplexValue> array9(array8);
- QVERIFY(array9.constData() == array8.constData());
- for (index = 0; index < array8.size(); ++index)
- QCOMPARE((*((const QArray<ComplexValue> *)&array9))[index],
- array8.at(index));
- array9 = array8;
- QVERIFY(array9.constData() == array8.constData());
- for (index = 0; index < array8.size(); ++index)
- QCOMPARE(array9.at(index), array8.at(index));
-}
-
-void tst_QArray::appendTwoAtATime()
-{
- int index;
-
- QArray<float> array;
- array.append(1.0f, 2.0f);
- array.append(3.0f, 4.0f);
- QCOMPARE(array[0], 1.0f);
- QCOMPARE(array[1], 2.0f);
- QCOMPARE(array[2], 3.0f);
- QCOMPARE(array[3], 4.0f);
- QCOMPARE(array.count(), 4);
-
- QArray<float> array2;
- for (index = 0; index < 1000; ++index)
- array2.append(float(index), float(index + 1));
- QCOMPARE(array2.count(), 2000);
- for (index = 0; index < 1000; ++index) {
- QCOMPARE(array2[index * 2], float(index));
- QCOMPARE(array2[index * 2 + 1], float(index + 1));
- }
-
- QArray<QString> array3;
- for (index = 0; index < 1000; ++index)
- array3.append(QString::number(index), QString::number(index + 1));
- QCOMPARE(array3.count(), 2000);
- for (index = 0; index < 1000; ++index) {
- QCOMPARE(array3[index * 2], QString::number(index));
- QCOMPARE(array3[index * 2 + 1], QString::number(index + 1));
- }
-
- QArray<ComplexValue> array4;
- for (index = 0; index < 1000; ++index)
- array4.append(ComplexValue(index), ComplexValue(index + 1));
- QCOMPARE(array4.count(), 2000);
- for (index = 0; index < 1000; ++index) {
- QCOMPARE(array4[index * 2].value(), index);
- QCOMPARE(array4[index * 2 + 1].value(), index + 1);
- }
-}
-
-void tst_QArray::appendThreeAtATime()
-{
- int index;
-
- QArray<float> array;
- array.append(1.0f, 2.0f, 3.0f);
- array.append(4.0f, 5.0f, 6.0f);
- QCOMPARE(array[0], 1.0f);
- QCOMPARE(array[1], 2.0f);
- QCOMPARE(array[2], 3.0f);
- QCOMPARE(array[3], 4.0f);
- QCOMPARE(array[4], 5.0f);
- QCOMPARE(array[5], 6.0f);
- QCOMPARE(array.count(), 6);
-
- QArray<float> array2;
- for (index = 0; index < 1000; ++index)
- array2.append(float(index), float(index + 1), float(index + 2));
- QCOMPARE(array2.count(), 3000);
- for (index = 0; index < 1000; ++index) {
- QCOMPARE(array2[index * 3], float(index));
- QCOMPARE(array2[index * 3 + 1], float(index + 1));
- QCOMPARE(array2[index * 3 + 2], float(index + 2));
- }
-
- QArray<QString> array3;
- for (index = 0; index < 1000; ++index)
- array3.append(QString::number(index), QString::number(index + 1),
- QString::number(index + 2));
- QCOMPARE(array3.count(), 3000);
- for (index = 0; index < 1000; ++index) {
- QCOMPARE(array3[index * 3], QString::number(index));
- QCOMPARE(array3[index * 3 + 1], QString::number(index + 1));
- QCOMPARE(array3[index * 3 + 2], QString::number(index + 2));
- }
-
- QArray<ComplexValue> array4;
- for (index = 0; index < 1000; ++index)
- array4.append(ComplexValue(index), ComplexValue(index + 1),
- ComplexValue(index + 2));
- QCOMPARE(array4.count(), 3000);
- for (index = 0; index < 1000; ++index) {
- QCOMPARE(array4[index * 3].value(), index);
- QCOMPARE(array4[index * 3 + 1].value(), index + 1);
- QCOMPARE(array4[index * 3 + 2].value(), index + 2);
- }
-}
-
-void tst_QArray::appendFourAtATime()
-{
- int index;
-
- QArray<float> array;
- array.append(1.0f, 2.0f, 3.0f, 4.0f);
- array.append(5.0f, 6.0f, 7.0f, 8.0f);
- QCOMPARE(array[0], 1.0f);
- QCOMPARE(array[1], 2.0f);
- QCOMPARE(array[2], 3.0f);
- QCOMPARE(array[3], 4.0f);
- QCOMPARE(array[4], 5.0f);
- QCOMPARE(array[5], 6.0f);
- QCOMPARE(array[6], 7.0f);
- QCOMPARE(array[7], 8.0f);
- QCOMPARE(array.count(), 8);
-
- QArray<float> array2;
- for (index = 0; index < 1000; ++index)
- array2.append(float(index), float(index + 1), float(index + 2), float(index + 3));
- QCOMPARE(array2.count(), 4000);
- for (index = 0; index < 1000; ++index) {
- QCOMPARE(array2[index * 4], float(index));
- QCOMPARE(array2[index * 4 + 1], float(index + 1));
- QCOMPARE(array2[index * 4 + 2], float(index + 2));
- QCOMPARE(array2[index * 4 + 3], float(index + 3));
- }
-
- QArray<QString> array3;
- for (index = 0; index < 1000; ++index)
- array3.append(QString::number(index), QString::number(index + 1),
- QString::number(index + 2), QString::number(index + 3));
- QCOMPARE(array3.count(), 4000);
- for (index = 0; index < 1000; ++index) {
- QCOMPARE(array3[index * 4], QString::number(index));
- QCOMPARE(array3[index * 4 + 1], QString::number(index + 1));
- QCOMPARE(array3[index * 4 + 2], QString::number(index + 2));
- QCOMPARE(array3[index * 4 + 3], QString::number(index + 3));
- }
-
- QArray<ComplexValue> array4;
- for (index = 0; index < 1000; ++index)
- array4.append(ComplexValue(index), ComplexValue(index + 1),
- ComplexValue(index + 2), ComplexValue(index + 3));
- QCOMPARE(array4.count(), 4000);
- for (index = 0; index < 1000; ++index) {
- QCOMPARE(array4[index * 4].value(), index);
- QCOMPARE(array4[index * 4 + 1].value(), index + 1);
- QCOMPARE(array4[index * 4 + 2].value(), index + 2);
- QCOMPARE(array4[index * 4 + 3].value(), index + 3);
- }
-}
-
-void tst_QArray::appendArray()
-{
- QArray<float> array;
- QArray<float> array2;
- int index;
-
- for (index = 0; index < 1000; ++index) {
- array.append(index);
- array2.append(1000 - index);
- }
-
- array.append(array2);
- QCOMPARE(array.count(), 2000);
- for (index = 0; index < 1000; ++index) {
- QCOMPARE(array[index], float(index));
- QCOMPARE(array[index + 1000], float(1000 - index));
- }
-
- array2 << array2;
- QCOMPARE(array2.count(), 2000);
- for (index = 0; index < 1000; ++index) {
- QCOMPARE(array2[index], float(1000 - index));
- QCOMPARE(array2[index + 1000], float(1000 - index));
- }
-
- array2 += (QArray<float>());
- QCOMPARE(array2.count(), 2000);
-
- QArray<float> array3(array2.constData(), array2.size());
- QCOMPARE(array3.size(), array2.size());
- for (index = 0; index < array2.size(); ++index)
- QCOMPARE(array3.at(index), array2.at(index));
-}
-
-void tst_QArray::setAt()
-{
- int index;
-
- QArray<float> array;
- array.append(1.0f);
- QCOMPARE(array[0], 1.0f);
-
- array[0] = 6.0f;
- QCOMPARE(array[0], 6.0f);
-
- QArray<float> array2;
- for (index = 0; index < 1000; ++index)
- array2.append(index);
- for (index = 0; index < 1000; ++index)
- array2[index] = index + 1000;
- for (index = 0; index < 1000; ++index)
- QCOMPARE(array2[index], float(index + 1000));
- for (index = 0; index < 1000; ++index)
- array2.replace(index, float(-index));
- for (index = 0; index < 1000; ++index)
- QCOMPARE(array2[index], float(-index));
-}
-
-void tst_QArray::value()
-{
- QArray<float> array;
- for (int index = 0; index < 1000; ++index)
- array.append(float(index));
-
- for (int index = 0; index < 1000; ++index) {
- QCOMPARE(array.value(index), float(index));
- QCOMPARE(array.value(index, 10001.0f), float(index));
- }
-
- QCOMPARE(array.value(-1), 0.0f);
- QCOMPARE(array.value(1000), 0.0f);
-
- QCOMPARE(array.value(-1, 10001.0f), 10001.0f);
- QCOMPARE(array.value(1000, 10001.0f), 10001.0f);
-}
-
-void tst_QArray::replace()
-{
- QArray<float> array;
- QArray<float> array2;
- int index;
-
- for (index = 0; index < 1000; ++index) {
- array.append(index);
- array2.append(1000 - index);
- }
-
- array.replace(500, array2.constData(), 500);
- QCOMPARE(array.count(), 1000);
- for (index = 0; index < 1000; ++index) {
- if (index < 500)
- QCOMPARE(array[index], float(index));
- else
- QCOMPARE(array[index], float(1000 - (index - 500)));
- }
-
- // Replace and extend the array from the middle.
- array.replace(900, array2.constData(), 500);
- QCOMPARE(array.count(), 1400);
- for (index = 0; index < 1400; ++index) {
- if (index < 500)
- QCOMPARE(array[index], float(index));
- else if (index < 900)
- QCOMPARE(array[index], float(1000 - (index - 500)));
- else
- QCOMPARE(array[index], float(1000 - (index - 900)));
- }
-
- // Check the bail-out cases when index is negative or count zero.
- array.replace(900, array2.constData(), 0);
- array.replace(-1, array2.constData(), 900);
- QCOMPARE(array.count(), 1400);
- for (index = 0; index < 1400; ++index) {
- if (index < 500)
- QCOMPARE(array[index], float(index));
- else if (index < 900)
- QCOMPARE(array[index], float(1000 - (index - 500)));
- else
- QCOMPARE(array[index], float(1000 - (index - 900)));
- }
-
- // Replace beyond the end of the array.
- static float const extras[] = {0.0f, 0.0f, 1.0f, 2.0f, 3.0f, 4.0f};
- array.replace(1402, extras + 2, 4);
- QCOMPARE(array.count(), 1406);
- for (index = 0; index < 1406; ++index) {
- if (index < 500)
- QCOMPARE(array[index], float(index));
- else if (index < 900)
- QCOMPARE(array[index], float(1000 - (index - 500)));
- else if (index < 1400)
- QCOMPARE(array[index], float(1000 - (index - 900)));
- else
- QCOMPARE(array[index], extras[index - 1400]);
- }
-
- QArray<ComplexValue> array3;
- QArray<ComplexValue> array4;
- for (index = 0; index < 1000; ++index) {
- array3.append(ComplexValue(index));
- array4.append(ComplexValue(1000 - index));
- }
- array3.replace(0, array4.constData(), array4.size());
- for (index = 0; index < 1000; ++index)
- QVERIFY(array3[index] == array4[index]);
-}
-
-// Exercise the various conditionals in operator=().
-void tst_QArray::copy()
-{
- QArray<float> array, array2, array3;
-
- array2.append(1.0f);
- array2.append(7.0f);
- array = array2;
- QCOMPARE(array.count(), 2);
- QCOMPARE(array.at(0), float(1.0f));
- QCOMPARE(array.at(1), float(7.0f));
-
- array = array3;
- QCOMPARE(array.count(), 0);
-
- array2 = array2;
- QCOMPARE(array2.count(), 2);
- QCOMPARE(array2.at(0), float(1.0f));
- QCOMPARE(array2.at(1), float(7.0f));
-
- QArray<float> array4(array2);
- QCOMPARE(array2.count(), 2);
- QCOMPARE(array2.at(0), float(1.0f));
- QCOMPARE(array2.at(1), float(7.0f));
-
- QArray<float> array5, array6;
- for (int index = 0; index < 32; ++index)
- array5.append(2.0f);
- QCOMPARE(array5.count(), 32);
- array6.append(1.0f);
- array5 = array6;
- QCOMPARE(array5.count(), 1);
- QCOMPARE(array5.at(0), float(1.0f));
-
- array5.clear();
- QCOMPARE(array5.count(), 0);
- QCOMPARE(array6.count(), 1);
- QCOMPARE(array6.at(0), float(1.0f));
- array6.clear();
- QCOMPARE(array5.count(), 0);
-}
-
-void tst_QArray::resize()
-{
- QArray<int> array;
-
- array.resize(-1);
- QCOMPARE(array.count(), 0);
-
- array.resize(ExpectedMinCapacity);
- QCOMPARE(array.count(), ExpectedMinCapacity);
- for (int index = 0; index < ExpectedMinCapacity; ++index)
- QCOMPARE(array[index], 0);
- array.append(1);
-
- array.resize(100);
- QCOMPARE(array.count(), 100);
- QVERIFY(array.capacity() >= 100);
- int cap = array.capacity();
- for (int index = 0; index < 100; ++index){
- if (index != 8)
- QCOMPARE(array[index], 0);
- else
- QCOMPARE(array[index], 1);
- }
-
- array.resize(50);
- QCOMPARE(array.count(), 50);
- QVERIFY(array.capacity() == cap); // Shouldn't change the capacity.
- for (int index = 0; index < 50; ++index){
- if (index != 8)
- QCOMPARE(array[index], 0);
- else
- QCOMPARE(array[index], 1);
- }
-
- array.resize(50);
- QCOMPARE(array.count(), 50);
-
- QArray<int> array2(array);
- array.resize(40);
- QCOMPARE(array.count(), 40);
- QCOMPARE(array2.count(), 50);
-
- array2.resize(20);
- QCOMPARE(array2.count(), 20);
-
- for (int index = 0; index < 40; ++index){
- if (index != 8)
- QCOMPARE(array[index], 0);
- else
- QCOMPARE(array[index], 1);
- }
- for (int index = 0; index < 20; ++index){
- if (index != 8)
- QCOMPARE(array2[index], 0);
- else
- QCOMPARE(array2[index], 1);
- }
-
- // Check that resizing to zero keeps the same memory storage.
- const int *d = array.constData();
- array.resize(0);
- QVERIFY(array.constData() == d);
- QVERIFY(array.capacity() != ExpectedMinCapacity);
-
- // Calling clear will reclaim the storage.
- array.clear();
- QVERIFY(array.constData() != d);
- QVERIFY(array.capacity() == ExpectedMinCapacity);
-}
-
-void tst_QArray::reserve()
-{
- QArray<float> array;
- array.reserve(1000);
- QVERIFY(array.isEmpty());
- QVERIFY(array.capacity() >= 1000);
-
- // Append elements and check for reallocation.
- const float *d = array.constData();
- for (int index = 0; index < 1000; ++index) {
- array.append(float(index));
- QVERIFY(array.constData() == d);
- }
-
- // Reserving less doesn't change the capacity, or the count.
- array.reserve(50);
- QVERIFY(array.capacity() >= 1000);
- QCOMPARE(array.count(), 1000);
-}
-
-void tst_QArray::squeeze()
-{
- QArray<float> array;
- array.reserve(100);
- QVERIFY(array.isEmpty());
- QVERIFY(array.capacity() >= 100);
-
- for (int index = 0; index < 100; ++index)
- array.append(float(index));
-
- array.reserve(400);
- QVERIFY(array.capacity() >= 400);
-
- array.squeeze();
- QCOMPARE(array.capacity(), 100);
- QCOMPARE(array.count(), 100);
-
- // Test squeezing within the preallocated area.
- QArray<float> array2;
- array2.append(1.0f);
- array2.append(2.0f);
- array2.append(3.0f);
- array2.squeeze();
- QCOMPARE(array2.capacity(), ExpectedMinCapacity);
- QCOMPARE(array2.count(), 3);
-
- // Test copy-on-write during squeezing.
- QArray<float> array3(array);
- array3.squeeze();
- QCOMPARE(array3.count(), 100);
- QCOMPARE(array.count(), 100);
-
- // Clear and check that the array reverts to preallocation.
- array.resize(0);
- array.squeeze();
- QCOMPARE(array.size(), 0);
- QCOMPARE(array.capacity(), ExpectedMinCapacity);
-}
-
-void tst_QArray::compare()
-{
- QArray<float> array, array2, array3;
-
- QVERIFY(array == array2);
-
- array.append(1.0f);
- array3.append(1.0f);
- QArray<float> array4(array);
-
- QVERIFY(array == array);
- QVERIFY(array != array2);
- QVERIFY(array == array3);
- QVERIFY(array == array4);
-
- array2.append(2.0f);
- QVERIFY(array != array2);
-
- array2.append(1.0f);
- QVERIFY(array != array2);
-
- for (int index = 0; index < 100; ++index)
- array.append(index);
- array2 = array;
- QVERIFY(array2 == array);
- QVERIFY(!(array2 != array));
-}
-
-void tst_QArray::remove()
-{
- QArray<float> array;
-
- array.remove(0, 100);
- QCOMPARE(array.count(), 0);
-
- for (int index = 0; index < 100; ++index)
- array.append(float(index));
-
- array.remove(100, 60);
- QCOMPARE(array.count(), 100);
- array.remove(-60, 60);
-
- array.remove(10, 20);
- QCOMPARE(array.count(), 80);
- for (int index = 0; index < 80; ++index) {
- if (index < 10)
- QCOMPARE(array[index], float(index));
- else
- QCOMPARE(array[index], float(index + 20));
- }
-
- QArray<float> array2(array);
- array2.remove(-10, 20);
- array2.remove(60, 20);
- QCOMPARE(array2.count(), 60);
- for (int index = 0; index < 60; ++index) {
- QCOMPARE(array2[index], float(index + 30));
- }
-
- array.remove(0, 10);
- QCOMPARE(array.count(), 70);
- for (int index = 0; index < 70; ++index) {
- QCOMPARE(array[index], float(index + 30));
- }
-
- // Remove everything and check that it returns to preallocation.
- array.remove(0, array.size());
- QCOMPARE(array.count(), 0);
- QCOMPARE(array.capacity(), ExpectedMinCapacity);
-
- for (int index = 0; index < 100; ++index)
- array.append(float(index));
- array.erase(array.end() - 1);
- QCOMPARE(array.size(), 99);
- array.erase(array.begin(), array.end());
- QCOMPARE(array.count(), 0);
-}
-
-void tst_QArray::removeFirstLast()
-{
- QArray<float> array;
-
- array.removeFirst();
- QVERIFY(array.isEmpty());
- array.removeLast();
- QVERIFY(array.isEmpty());
-
- for (int index = 0; index < 100; ++index)
- array.append(float(index));
-
- array.removeFirst();
- QCOMPARE(array.size(), 99);
- for (int index = 0; index < array.size(); ++index)
- QCOMPARE(array[index], float(index + 1));
-
- array.removeLast();
- QCOMPARE(array.size(), 98);
- for (int index = 0; index < array.size(); ++index)
- QCOMPARE(array[index], float(index + 1));
-}
-
-void tst_QArray::extend()
-{
- QArray<float> array;
-
- float *ptr = array.extend(4);
- ptr[0] = 1.0f;
- ptr[1] = 2.0f;
- ptr[2] = 3.0f;
- ptr[3] = 4.0f;
- QCOMPARE(array.size(), 4);
- QCOMPARE(array[0], 1.0f);
- QCOMPARE(array[1], 2.0f);
- QCOMPARE(array[2], 3.0f);
- QCOMPARE(array[3], 4.0f);
-
- array.append(5.0f);
- ptr = array.extend(1);
- ptr[0] = 6.0f;
- QCOMPARE(array.size(), 6);
- QCOMPARE(array[0], 1.0f);
- QCOMPARE(array[1], 2.0f);
- QCOMPARE(array[2], 3.0f);
- QCOMPARE(array[3], 4.0f);
- QCOMPARE(array[4], 5.0f);
- QCOMPARE(array[5], 6.0f);
-
- QArray<float> array2(array);
-
- ptr = array.extend(1);
- ptr[0] = 7.0f;
- QCOMPARE(array.size(), 7);
- QCOMPARE(array[0], 1.0f);
- QCOMPARE(array[1], 2.0f);
- QCOMPARE(array[2], 3.0f);
- QCOMPARE(array[3], 4.0f);
- QCOMPARE(array[4], 5.0f);
- QCOMPARE(array[5], 6.0f);
- QCOMPARE(array[6], 7.0f);
-
- QCOMPARE(array2.size(), 6);
-}
-
-void tst_QArray::reverse()
-{
- QArray<float> array0;
-
- // null case
- array0.reverse();
- QCOMPARE(array0.size(), 0);
-
- // basic case
- float *ptr = array0.extend(1);
- ptr[0] = 1.0f;
- array0.reverse();
- QCOMPARE(array0.size(), 1);
- QCOMPARE(array0.at(0), 1.0f);
-
- // odd numbered size
- QArray<float> array1;
- ptr = array1.extend(5);
- ptr[0] = 1.0f;
- ptr[1] = 2.0f;
- ptr[2] = 3.0f;
- ptr[3] = 4.0f;
- ptr[4] = 5.0f;
- array1.reverse();
- QCOMPARE(array1.size(), 5);
- QCOMPARE(array1.at(0), 5.0f);
- QCOMPARE(array1.at(2), 3.0f);
- QCOMPARE(array1.at(4), 1.0f);
-
- // even numbered size
- QArray<float> array2;
- ptr = array2.extend(6);
- ptr[0] = 1.0f;
- ptr[1] = 2.0f;
- ptr[2] = 3.0f;
- ptr[3] = 4.0f;
- ptr[4] = 5.0f;
- ptr[5] = 6.0f;
- array2.reverse();
- QCOMPARE(array2.size(), 6);
- QCOMPARE(array2.at(0), 6.0f);
- QCOMPARE(array2.at(2), 4.0f);
- QCOMPARE(array2.at(3), 3.0f);
- QCOMPARE(array2.at(5), 1.0f);
-
- // complex type
- QVERIFY(QTypeInfo<QString>::isComplex);
- QArray<QString> array3(6, QLatin1String("test"));
- array3[0] = QLatin1String("zero");
- array3[1] = QLatin1String("one");
- array3[2] = QLatin1String("two");
- array3[3] = QLatin1String("three");
- array3[4] = QLatin1String("four");
- array3[5] = QLatin1String("five");
- array3.reverse();
- QCOMPARE(array3.size(), 6);
- QCOMPARE(array3.at(0), QLatin1String("five"));
- QCOMPARE(array3.at(2), QLatin1String("three"));
- QCOMPARE(array3.at(3), QLatin1String("two"));
- QCOMPARE(array3.at(5), QLatin1String("zero"));
-}
-
-void tst_QArray::reversed()
-{
- QArray<float> array0;
-
- // null case
- QArray<float> res0 = array0.reversed();
- QCOMPARE(res0.size(), 0);
-
- // basic case
- float *ptr = array0.extend(1);
- ptr[0] = 1.0f;
- res0 = array0.reversed();
- QCOMPARE(res0.size(), 1);
- QCOMPARE(res0.at(0), 1.0f);
-
- // odd numbered size
- QArray<float> array1;
- ptr = array1.extend(5);
- ptr[0] = 1.0f;
- ptr[1] = 2.0f;
- ptr[2] = 3.0f;
- ptr[3] = 4.0f;
- ptr[4] = 5.0f;
- QArray<float> res1 = array1.reversed();
- QCOMPARE(res1.size(), 5);
- QCOMPARE(res1.at(0), 5.0f);
- QCOMPARE(res1.at(2), 3.0f);
- QCOMPARE(res1.at(4), 1.0f);
-
- // even numbered size
- QArray<float> array2;
- ptr = array2.extend(6);
- ptr[0] = 1.0f;
- ptr[1] = 2.0f;
- ptr[2] = 3.0f;
- ptr[3] = 4.0f;
- ptr[4] = 5.0f;
- ptr[5] = 6.0f;
- QArray<float> res2 = array2.reversed();
- QCOMPARE(res2.size(), 6);
- QCOMPARE(res2.at(0), 6.0f);
- QCOMPARE(res2.at(2), 4.0f);
- QCOMPARE(res2.at(3), 3.0f);
- QCOMPARE(res2.at(5), 1.0f);
-
- // simple type with larger size
- QArray<QVector3D> array4;
- array4.extend(6);
- QVector3D va(1.0f, 2.0f, 3.0f);
- QVector3D vb(11.0f, 12.0f, 13.0f);
- QVector3D vc(21.0f, 22.0f, 23.0f);
- QVector3D vd(31.0f, 32.0f, 33.0f);
- QVector3D ve(41.0f, 42.0f, 43.0f);
- QVector3D vf(51.0f, 52.0f, 53.0f);
- array4[0] = va;
- array4[1] = vb;
- array4[2] = vc;
- array4[3] = vd;
- array4[4] = ve;
- array4[5] = vf;
- QArray<QVector3D> res4 = array4.reversed();
- QCOMPARE(res4.size(), 6);
- QCOMPARE(res4.at(0), vf);
- QCOMPARE(res4.at(2), vd);
- QCOMPARE(res4.at(3), vc);
- QCOMPARE(res4.at(5), va);
-}
-
-void tst_QArray::mid()
-{
- QArray<float> array;
- for (int index = 0; index < 1024; ++index)
- array.append(float(index));
-
- QArray<float> mid = array.mid(0);
- QCOMPARE(mid.size(), array.size());
- QVERIFY(!mid.isEmpty());
- QVERIFY(mid.constData() == array.constData());
- for (int index = 0; index < 1024; ++index) {
- QCOMPARE(mid.at(index), float(index));
- QCOMPARE(mid[index], float(index));
- }
-
- mid = array.mid(500, 20);
- QCOMPARE(mid.size(), 20);
- QVERIFY(!mid.isEmpty());
- for (int index = 0; index < 20; ++index) {
- QCOMPARE(mid.at(index), float(index + 500));
- QCOMPARE(mid[index], float(index + 500));
- }
-
- QArray<float> mid2 = array.mid(500, 20);
- QVERIFY(mid == mid2);
- QVERIFY(!(mid != mid2));
-
- QArray<float> mid3 = array.mid(500, 21);
- QVERIFY(mid != mid3);
- QVERIFY(!(mid == mid3));
-
- QArray<float> mid4 = array.mid(400, 20);
- QVERIFY(mid != mid4);
- QVERIFY(!(mid == mid4));
-
- QArray<float> mid5;
- QArray<float> mid6;
- QVERIFY(mid != mid5);
- QVERIFY(!(mid == mid5));
- QVERIFY(mid5 != mid);
- QVERIFY(!(mid5 == mid));
- QVERIFY(mid5 == mid6);
- QVERIFY(!(mid5 != mid6));
-
- mid = array.mid(500, 0);
- QCOMPARE(mid.size(), 0);
- QVERIFY(mid.isEmpty());
-
- mid = array.mid(1000, 30);
- QCOMPARE(mid.size(), 24);
- QVERIFY(!mid.isEmpty());
- for (int index = 0; index < 24; ++index) {
- QCOMPARE(mid.at(index), float(index + 1000));
- QCOMPARE(mid[index], float(index + 1000));
- }
-}
-
-void tst_QArray::left()
-{
- QArray<float> array;
- for (int index = 0; index < 1024; ++index)
- array.append(float(index));
-
- QArray<float> left = array.left(-1);
- QVERIFY(left == array);
-
- left = array.left(0);
- QVERIFY(left.isEmpty());
-
- left = array.left(500);
- QCOMPARE(left.size(), 500);
- QVERIFY(left == array.mid(0, 500));
-
- left = array.left(2048);
- QVERIFY(left == array);
-}
-
-void tst_QArray::right()
-{
- QArray<float> array;
- for (int index = 0; index < 1024; ++index)
- array.append(float(index));
-
- QArray<float> right = array.right(-1);
- QVERIFY(right == array);
-
- right = array.right(0);
- QVERIFY(right.isEmpty());
-
- right = array.right(500);
- QCOMPARE(right.size(), 500);
- QVERIFY(right == array.mid(1024 - 500, 500));
-
- right = array.right(2048);
- QVERIFY(right == array);
-}
-
-void tst_QArray::iterate()
-{
- QArray<float> array;
- for (int index = 0; index < 1024; ++index)
- array.append(float(index));
-
- QArray<float>::Iterator it1;
- int value = 0;
- for (it1 = array.begin(); it1 != array.end(); ++it1)
- QCOMPARE(*it1, float(value++));
- QCOMPARE(value, array.size());
-
- QArray<float>::ConstIterator it2;
- value = 0;
- for (it2 = array.constBegin(); it2 != array.constEnd(); ++it2)
- QCOMPARE(*it2, float(value++));
- QCOMPARE(value, array.size());
-
- value = 0;
- for (it1 = array.begin(); it1 != array.end(); ++it1)
- *it1 = float(1024 - value++);
- value = 0;
- for (it2 = array.constBegin(); it2 != array.constEnd(); ++it2) {
- QCOMPARE(*it2, float(1024 - value));
- QCOMPARE(array[value], float(1024 - value));
- ++value;
- }
-
- for (int index = 0; index < 1024; ++index)
- array[index] = float(index);
-}
-
-// Verify that when the data is in the preallocated section, it is
-// copied across and the original constData() pointer remains the same.
-void tst_QArray::copyPrealloc()
-{
- QArray<float> array1;
- array1.append(1.0f);
- array1.append(2.0f);
-
- const float *data = array1.constData();
-
- QArray<float> array2(array1);
-
- QVERIFY(array1.constData() == data);
- QVERIFY(array2.constData() != data);
-
- QCOMPARE(array2.size(), 2);
- QCOMPARE(array2[0], float(1.0f));
- QCOMPARE(array2[1], float(2.0f));
-
- QArray<float> array3;
- QCOMPARE(array3.size(), 0);
- array3 = array1;
-
- QVERIFY(array1.constData() == data);
- QVERIFY(array3.constData() != data);
-
- QCOMPARE(array3.size(), 2);
- QCOMPARE(array3[0], float(1.0f));
- QCOMPARE(array3[1], float(2.0f));
-}
-
-void tst_QArray::insert()
-{
- QArray<float> array;
- for (int index = 0; index < 10; ++index)
- array.append(float(index));
-
- array.prepend(-1.0f);
- QCOMPARE(array.size(), 11);
- for (int index = 0; index < array.size(); ++index)
- QCOMPARE(array[index], float(index - 1));
-
- array.insert(array.size(), 10.0f);
- QCOMPARE(array.size(), 12);
- for (int index = 0; index < array.size(); ++index)
- QCOMPARE(array[index], float(index - 1));
-
- array.insert(1, 0.5f);
- QCOMPARE(array.size(), 13);
- QCOMPARE(array[0], -1.0f);
- QCOMPARE(array[1], 0.5f);
- QCOMPARE(array[2], 0.0f);
- QCOMPARE(array[12], 10.0f);
-
- array.insert(10, 0, 7.5f);
- array.insert(10, 4, 7.5f);
- QCOMPARE(array.size(), 17);
- QCOMPARE(array[9], 7.0f);
- QCOMPARE(array[10], 7.5f);
- QCOMPARE(array[11], 7.5f);
- QCOMPARE(array[12], 7.5f);
- QCOMPARE(array[13], 7.5f);
- QCOMPARE(array[14], 8.0f);
- QCOMPARE(array[15], 9.0f);
- QCOMPARE(array[16], 10.0f);
-
- // Repeat the tests with QString
- QArray<QString> array2;
- for (int index = 0; index < 10; ++index)
- array2.append(QString::number(index));
-
- array2.prepend(QString::number(-1));
- QCOMPARE(array2.size(), 11);
- for (int index = 0; index < array2.size(); ++index)
- QCOMPARE(array2[index], QString::number(index - 1));
-
- array2.insert(array2.size(), QString::number(10));
- QCOMPARE(array2.size(), 12);
- for (int index = 0; index < array2.size(); ++index)
- QCOMPARE(array2[index], QString::number(index - 1));
-
- array2.insert(1, QString::number(5));
- QCOMPARE(array2.size(), 13);
- QCOMPARE(array2[0], QString::number(-1));
- QCOMPARE(array2[1], QString::number(5));
- QCOMPARE(array2[2], QString::number(0));
- QCOMPARE(array2[12], QString::number(10));
-
- array2.insert(10, 4, QString::number(3));
- QCOMPARE(array2.size(), 17);
- QCOMPARE(array2[9], QString::number(7));
- QCOMPARE(array2[10], QString::number(3));
- QCOMPARE(array2[11], QString::number(3));
- QCOMPARE(array2[12], QString::number(3));
- QCOMPARE(array2[13], QString::number(3));
- QCOMPARE(array2[14], QString::number(8));
- QCOMPARE(array2[15], QString::number(9));
- QCOMPARE(array2[16], QString::number(10));
-
- // Repeat the tests with ComplexValue
- QArray<ComplexValue> array3;
- for (int index = 0; index < 10; ++index)
- array3.append(ComplexValue(index));
-
- array3.prepend(ComplexValue(-1));
- ComplexValue::destroyCount = 0;
- QCOMPARE(array3.size(), 11);
- for (int index = 0; index < array3.size(); ++index) {
- QVERIFY(array3[index] == (index - 1));
- QVERIFY(array3[index].mode() == ComplexValue::Assign);
- }
- QCOMPARE(ComplexValue::destroyCount, 0);
-
- array3.insert(array3.size(), ComplexValue(10));
- QCOMPARE(array3.size(), 12);
- for (int index = 0; index < array3.size(); ++index)
- QVERIFY(array3[index] == (index - 1));
-
- array3.insert(1, ComplexValue(5));
- QCOMPARE(array3.size(), 13);
- QVERIFY(array3[0] == -1);
- QVERIFY(array3[1] == 5);
- QVERIFY(array3[2] == 0);
- QVERIFY(array3[12] == 10);
-
- array3.insert(10, 4, ComplexValue(3));
- QCOMPARE(array3.size(), 17);
- QVERIFY(array3[9] == 7);
- QVERIFY(array3[10] == 3);
- QVERIFY(array3[11] == 3);
- QVERIFY(array3[12] == 3);
- QVERIFY(array3[13] == 3);
- QVERIFY(array3[14] == 8);
- QVERIFY(array3[15] == 9);
- QVERIFY(array3[16] == 10);
-}
-
-void tst_QArray::fromRawData()
-{
- QArray<float> array;
- float contents[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f,
- 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f};
-
- array = QArray<float>::fromRawData(contents, 0);
- QCOMPARE(array.size(), 0);
- QCOMPARE(array.capacity(), 0);
- QVERIFY(!array.isDetached());
- array.append(1.0f);
- QCOMPARE(array.size(), 1);
- QVERIFY(array.capacity() > 0);
- QCOMPARE(array.at(0), 1.0f);
- QVERIFY(array.isDetached());
-
- array = QArray<float>::fromRawData(contents, 6);
- QCOMPARE(array.size(), 6);
- QCOMPARE(array.capacity(), 6);
- for (int index = 0; index < 6; ++index)
- QCOMPARE(array.at(index), contents[index]);
- QVERIFY(array.constData() == contents);
- QVERIFY(!array.isDetached());
-
- // Force a copy-on-write.
- array[3] = 42.0f;
- QVERIFY(array.isDetached());
- QCOMPARE(contents[3], 4.0f);
- QCOMPARE(array.size(), 6);
- QVERIFY(array.capacity() > 6);
- for (int index = 0; index < 6; ++index) {
- if (index != 3)
- QCOMPARE(array.at(index), contents[index]);
- else
- QCOMPARE(array.at(index), 42.0f);
- }
- QVERIFY(array.constData() != contents);
-
- array = QArray<float>::fromRawData(contents, 12);
- QCOMPARE(array.size(), 12);
- QCOMPARE(array.capacity(), 12);
- for (int index = 0; index < 12; ++index)
- QCOMPARE(array.at(index), contents[index]);
- QVERIFY(array.constData() == contents);
-
- QString strings[] = {QLatin1String("foo"), QLatin1String("bar")};
- QArray<QString> array2;
- array2 = QArray<QString>::fromRawData(strings, 2);
- QCOMPARE(array2.size(), 2);
- QCOMPARE(array2.capacity(), 2);
- QCOMPARE(array2.at(0), QLatin1String("foo"));
- QCOMPARE(array2.at(1), QLatin1String("bar"));
- QVERIFY(array2.constData() == strings);
-
- // Force a copy-on-write.
- array2[1] = QLatin1String("baz");
- QCOMPARE(array2.size(), 2);
- QVERIFY(array2.capacity() > 2);
- QCOMPARE(array2.at(0), QLatin1String("foo"));
- QCOMPARE(array2.at(1), QLatin1String("baz"));
- QVERIFY(array2.constData() != strings);
- QCOMPARE(strings[0], QLatin1String("foo"));
- QCOMPARE(strings[1], QLatin1String("bar"));
-}
-
-void tst_QArray::fromWritableRawData()
-{
- QArray<float> array;
- float contents[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f};
- float contentsModified[] =
- {1.0f, 2.0f, 3.0f, 42.0f, 5.0f, 6.0f, 53.0f};
-
- array = QArray<float>::fromWritableRawData(contents, 0);
- QCOMPARE(array.size(), 0);
- QCOMPARE(array.capacity(), 0);
- array.append(0.0f);
- QCOMPARE(array.size(), 1);
- QVERIFY(array.capacity() > 0);
- QCOMPARE(array.at(0), 0.0f);
-
- array = QArray<float>::fromWritableRawData(contents, 6);
- QCOMPARE(array.size(), 6);
- QCOMPARE(array.capacity(), 6);
- for (int index = 0; index < 6; ++index)
- QCOMPARE(array.at(index), contents[index]);
- QVERIFY(array.constData() == contents);
-
- // Modify the raw data in-place.
- array[3] = 42.0f;
- QVERIFY(array.constData() == contents);
-
- // Force a copy.
- array.append(53.0f);
- QVERIFY(array.constData() != contents);
- for (int index = 0; index < array.size(); ++index)
- QCOMPARE(array.at(index), contentsModified[index]);
-
- // Resize to smaller should stay within the raw data.
- array = QArray<float>::fromWritableRawData(contents, 6);
- array.resize(6);
- QCOMPARE(array.size(), 6);
- array.resize(5);
- QCOMPARE(array.size(), 5);
- QVERIFY(array.constData() == contents);
- for (int index = 0; index < array.size(); ++index)
- QCOMPARE(array.at(index), contentsModified[index]);
- array.append(6.0f);
- QVERIFY(array.constData() == contents);
- for (int index = 0; index < array.size(); ++index)
- QCOMPARE(array.at(index), contentsModified[index]);
-
- // Resize to larger should force a copy.
- array = QArray<float>::fromWritableRawData(contents, 6);
- array.resize(7);
- QVERIFY(array.constData() != contents);
- for (int index = 0; index < 6; ++index)
- QCOMPARE(array.at(index), contentsModified[index]);
- QCOMPARE(array.at(6), 0.0f);
-
- // Reserve to a larger size should force a copy.
- array = QArray<float>::fromWritableRawData(contents, 6);
- array.reserve(7);
- QCOMPARE(array.size(), 6);
- QVERIFY(array.capacity() >= 7);
- QVERIFY(array.constData() != contents);
- for (int index = 0; index < 6; ++index)
- QCOMPARE(array.at(index), contentsModified[index]);
-}
-
-void tst_QArray::search()
-{
- QArray<float> array;
- for (int index = 0; index < 1000; ++index)
- array.append(float(index));
-
- QCOMPARE(array.indexOf(0.0f), 0);
- QCOMPARE(array.indexOf(10.0f), 10);
- QCOMPARE(array.indexOf(999.0f), 999);
- QCOMPARE(array.indexOf(1000.0f), -1);
- QCOMPARE(array.indexOf(10.0f, 9), 10);
- QCOMPARE(array.indexOf(10.0f, 10), 10);
- QCOMPARE(array.indexOf(10.0f, 11), -1);
- QCOMPARE(array.indexOf(999.0f, -1), 999);
- QCOMPARE(array.indexOf(998.0f, -1), -1);
- QCOMPARE(array.indexOf(998.0f, -2), 998);
- QCOMPARE(array.indexOf(998.0f, -3), 998);
- QCOMPARE(array.indexOf(998.0f, -2000), 998);
- QCOMPARE(array.indexOf(998.0f, 2000), -1);
-
- QCOMPARE(array.lastIndexOf(0.0f), 0);
- QCOMPARE(array.lastIndexOf(10.0f), 10);
- QCOMPARE(array.lastIndexOf(999.0f), 999);
- QCOMPARE(array.lastIndexOf(1000.0f), -1);
- QCOMPARE(array.lastIndexOf(10.0f, 9), -1);
- QCOMPARE(array.lastIndexOf(10.0f, 10), 10);
- QCOMPARE(array.lastIndexOf(10.0f, 11), 10);
- QCOMPARE(array.lastIndexOf(999.0f, -1), 999);
- QCOMPARE(array.lastIndexOf(998.0f, -1), 998);
- QCOMPARE(array.lastIndexOf(998.0f, -2), 998);
- QCOMPARE(array.lastIndexOf(998.0f, -3), -1);
- QCOMPARE(array.lastIndexOf(998.0f, -2000), -1);
- QCOMPARE(array.lastIndexOf(998.0f, 2000), 998);
-
- QVERIFY(array.contains(0.0f));
- QVERIFY(array.contains(10.0f));
- QVERIFY(array.contains(999.0f));
- QVERIFY(!array.contains(1000.0f));
- QVERIFY(!array.contains(-1.0f));
-
- array.append(500.0f);
- QCOMPARE(array.count(0.0f), 1);
- QCOMPARE(array.count(10.0f), 1);
- QCOMPARE(array.count(500.0f), 2);
- QCOMPARE(array.count(999.0f), 1);
- QCOMPARE(array.count(1000.0f), 0);
-
- QVERIFY(array.startsWith(0.0f));
- QVERIFY(!array.startsWith(1.0f));
-
- QVERIFY(array.endsWith(500.0f));
- QVERIFY(!array.endsWith(1.0f));
-
- QCOMPARE(array.first(), 0.0f);
- QCOMPARE(array.last(), 500.0f);
-}
-
-void tst_QArray::fill()
-{
- QArray<float> array;
- array.fill(1.0f);
- QCOMPARE(array.size(), 0);
-
- array.fill(1.0f, 100);
- QCOMPARE(array.size(), 100);
- for (int index = 0; index < 100; ++index)
- QCOMPARE(array.at(index), 1.0f);
-
- array.fill(2.0f);
- QCOMPARE(array.size(), 100);
- for (int index = 0; index < 100; ++index)
- QCOMPARE(array.at(index), 2.0f);
-
- array.fill(3.0f, 20);
- QCOMPARE(array.size(), 20);
- for (int index = 0; index < 20; ++index)
- QCOMPARE(array.at(index), 3.0f);
-}
-
-void tst_QArray::zeroPrealloc()
-{
- // Check that the zero-prealloc case actually uses less memory
- // by optimizing away the m_prealloc structure.
- QArray<float, 0> array;
- QArray<float, 1> array2;
- QVERIFY(sizeof(array) < sizeof(array2));
-
- // Check that zero-prealloc arrays act properly by expanding the
- // template on functions that involve preallocation operations.
- QVERIFY(array.isEmpty());
- QCOMPARE(array.size(), 0);
- QCOMPARE(array.capacity(), 0);
- QVERIFY(!array.constData()); // Will be null for PreallocSize == 0.
- array.append(1.0f);
- QCOMPARE(array.size(), 1);
- QCOMPARE(array[0], 1.0f);
- QArray<float, 0> array3(array);
- QVERIFY(array.constData() == array3.constData());
-
- QArray<float, 0> array4(100, 3.0f);
- QCOMPARE(array4.size(), 100);
- for (int index = 0; index < 100; ++index)
- QCOMPARE(array4[index], 3.0f);
- array4.clear();
- QCOMPARE(array4.size(), 0);
-}
-
-void tst_QArray::exceptions()
-{
-#ifndef QT_NO_EXCEPTIONS
-
- // Check that an exception thrown during append() will leave
- // the array in the pre-append state.
- QArray<ComplexValue> array;
- try {
- array.append(ComplexValue(42, ComplexValue::ThrowOnCopy));
- QFAIL("should not be able to append - A");
- } catch (ComplexValueException *e) {
- delete e;
- QCOMPARE(array.size(), 0);
- }
- try {
- array.append(ComplexValue(42, ComplexValue::ThrowOnCopy), ComplexValue(24));
- QFAIL("should not be able to append - B");
- } catch (ComplexValueException *e) {
- delete e;
- QCOMPARE(array.size(), 0);
- }
- try {
- array.append(ComplexValue(24), ComplexValue(42, ComplexValue::ThrowOnCopy));
- QFAIL("should not be able to append - C");
- } catch (ComplexValueException *e) {
- delete e;
- QCOMPARE(array.size(), 1);
- QCOMPARE(array.at(0).value(), 24);
- }
- array.clear();
- try {
- array.append(ComplexValue(42, ComplexValue::ThrowOnCopy),
- ComplexValue(24),
- ComplexValue(16));
- QFAIL("should not be able to append - D");
- } catch (ComplexValueException *e) {
- delete e;
- QCOMPARE(array.size(), 0);
- }
- try {
- array.append(ComplexValue(24),
- ComplexValue(42, ComplexValue::ThrowOnCopy),
- ComplexValue(16));
- QFAIL("should not be able to append - E");
- } catch (ComplexValueException *e) {
- delete e;
- QCOMPARE(array.size(), 1);
- QCOMPARE(array.at(0).value(), 24);
- }
- array.clear();
- try {
- array.append(ComplexValue(24),
- ComplexValue(16),
- ComplexValue(42, ComplexValue::ThrowOnCopy));
- QFAIL("should not be able to append - F");
- } catch (ComplexValueException *e) {
- delete e;
- QCOMPARE(array.size(), 2);
- QCOMPARE(array.at(0).value(), 24);
- QCOMPARE(array.at(1).value(), 16);
- }
- array.clear();
- try {
- array.append(ComplexValue(42, ComplexValue::ThrowOnCopy),
- ComplexValue(24),
- ComplexValue(82),
- ComplexValue(16));
- QFAIL("should not be able to append - G");
- } catch (ComplexValueException *e) {
- delete e;
- QCOMPARE(array.size(), 0);
- }
- try {
- array.append(ComplexValue(24),
- ComplexValue(42, ComplexValue::ThrowOnCopy),
- ComplexValue(82),
- ComplexValue(16));
- QFAIL("should not be able to append - H");
- } catch (ComplexValueException *e) {
- delete e;
- QCOMPARE(array.size(), 1);
- QCOMPARE(array.at(0).value(), 24);
- }
- array.clear();
- try {
- array.append(ComplexValue(24),
- ComplexValue(16),
- ComplexValue(42, ComplexValue::ThrowOnCopy),
- ComplexValue(82));
- QFAIL("should not be able to append - I");
- } catch (ComplexValueException *e) {
- delete e;
- QCOMPARE(array.size(), 2);
- QCOMPARE(array.at(0).value(), 24);
- QCOMPARE(array.at(1).value(), 16);
- }
- array.clear();
- try {
- array.append(ComplexValue(24),
- ComplexValue(16),
- ComplexValue(82),
- ComplexValue(42, ComplexValue::ThrowOnCopy));
- QFAIL("should not be able to append - J");
- } catch (ComplexValueException *e) {
- delete e;
- QCOMPARE(array.size(), 3);
- QCOMPARE(array.at(0).value(), 24);
- QCOMPARE(array.at(1).value(), 16);
- QCOMPARE(array.at(2).value(), 82);
- }
- array.clear();
- ComplexValue values[] = {
- ComplexValue(1),
- ComplexValue(2),
- ComplexValue(3, ComplexValue::ThrowOnCopy)
- };
- try {
- array.append(values, 3);
- QFAIL("should not be able to append - K");
- } catch (ComplexValueException *e) {
- delete e;
- QCOMPARE(array.size(), 2);
- QCOMPARE(array.at(0).value(), 1);
- QCOMPARE(array.at(1).value(), 2);
- }
-
-#endif
-}
-
-void tst_QArray::dataStream()
-{
-#ifndef QT_NO_DATASTREAM
- QArray<float> array;
- for (int index = 0; index < 1024; ++index)
- array.append(float(index));
-
- QByteArray data;
- {
- QDataStream stream(&data, QIODevice::WriteOnly);
- stream << array;
- }
-
- QArray<float> array2;
- {
- QDataStream stream2(data);
- stream2 >> array2;
- }
-
- QVERIFY(array == array2);
-#endif
-}
-
-QTEST_APPLESS_MAIN(tst_QArray)
-
-#include "tst_qarray.moc"
diff --git a/tests/auto/threed/qbox3d/qbox3d.pro b/tests/auto/threed/qbox3d/qbox3d.pro
deleted file mode 100644
index f62181ec..00000000
--- a/tests/auto/threed/qbox3d/qbox3d.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qbox3d.cpp
diff --git a/tests/auto/threed/qbox3d/tst_qbox3d.cpp b/tests/auto/threed/qbox3d/tst_qbox3d.cpp
deleted file mode 100644
index 65c1cd44..00000000
--- a/tests/auto/threed/qbox3d/tst_qbox3d.cpp
+++ /dev/null
@@ -1,1302 +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 <QtTest/QtTest>
-#include "qbox3d.h"
-#include <QtGui/qmatrix4x4.h>
-
-class tst_QBox3D : public QObject
-{
- Q_OBJECT
-public:
- tst_QBox3D() {}
- ~tst_QBox3D() {}
-
-private slots:
- void create();
- void modify();
- void compare();
- void fuzzyCompare();
- void size_data();
- void size();
- void center_data();
- void center();
- void containsPoint_data();
- void containsPoint();
- void containsBox_data();
- void containsBox();
- void intersects_data();
- void intersects();
- void intersect_data();
- void intersect();
- void intersected_data();
- void intersected();
- void intersectRay_data();
- void intersectRay();
- void unitePoint_data();
- void unitePoint();
- void uniteBox_data();
- void uniteBox();
- void unitedPoint_data();
- void unitedPoint();
- void unitedBox_data();
- void unitedBox();
- void transform();
- void transformed();
- void dataStream();
- void properties();
- void metaTypes();
-};
-
-void tst_QBox3D::create()
-{
- QBox3D box1;
- QVERIFY(box1.isNull());
- QVERIFY(!box1.isFinite());
- QVERIFY(!box1.isInfinite());
- QVERIFY(box1.minimum() == QVector3D(0, 0, 0));
- QVERIFY(box1.maximum() == QVector3D(0, 0, 0));
-
- QBox3D box2;
- box2.setToInfinite();
- QVERIFY(!box2.isNull());
- QVERIFY(!box2.isFinite());
- QVERIFY(box2.isInfinite());
- QVERIFY(box2.minimum() == QVector3D(0, 0, 0));
- QVERIFY(box2.maximum() == QVector3D(0, 0, 0));
-
- QBox3D box3(QVector3D(1, 2, 3), QVector3D(4, 5, 6));
- QVERIFY(!box3.isNull());
- QVERIFY(box3.isFinite());
- QVERIFY(!box3.isInfinite());
- QVERIFY(box3.minimum() == QVector3D(1, 2, 3));
- QVERIFY(box3.maximum() == QVector3D(4, 5, 6));
-
- QBox3D box4(QVector3D(4, 5, 6), QVector3D(1, 2, 3));
- QVERIFY(!box4.isNull());
- QVERIFY(box4.isFinite());
- QVERIFY(!box4.isInfinite());
- QVERIFY(box4.minimum() == QVector3D(1, 2, 3));
- QVERIFY(box4.maximum() == QVector3D(4, 5, 6));
-
- QBox3D box5(box4);
- QVERIFY(!box5.isNull());
- QVERIFY(box5.isFinite());
- QVERIFY(!box5.isInfinite());
- QVERIFY(box5.minimum() == QVector3D(1, 2, 3));
- QVERIFY(box5.maximum() == QVector3D(4, 5, 6));
-
- box5 = box2;
- QVERIFY(!box5.isNull());
- QVERIFY(!box5.isFinite());
- QVERIFY(box5.isInfinite());
- QVERIFY(box5.minimum() == QVector3D(0, 0, 0));
- QVERIFY(box5.maximum() == QVector3D(0, 0, 0));
-}
-
-void tst_QBox3D::modify()
-{
- // Use setExtents, which will swap minimum and maximum.
- QBox3D box;
- box.setExtents(QVector3D(-1, -2, -3), QVector3D(-5, -6, -7));
- QVERIFY(!box.isNull());
- QVERIFY(box.isFinite());
- QVERIFY(!box.isInfinite());
- QVERIFY(box.minimum() == QVector3D(-5, -6, -7));
- QVERIFY(box.maximum() == QVector3D(-1, -2, -3));
-
- box.setExtents(QVector3D(1, 2, 3), QVector3D(4, 5, 6));
- QVERIFY(!box.isNull());
- QVERIFY(box.isFinite());
- QVERIFY(!box.isInfinite());
- QVERIFY(box.minimum() == QVector3D(1, 2, 3));
- QVERIFY(box.maximum() == QVector3D(4, 5, 6));
-
- box.setToNull();
- QVERIFY(box.isNull());
- QVERIFY(!box.isFinite());
- QVERIFY(!box.isInfinite());
- QVERIFY(box.minimum() == QVector3D(0, 0, 0));
- QVERIFY(box.maximum() == QVector3D(0, 0, 0));
-
- // Using setExtents will turn a null box into a finite box.
- box.setExtents(QVector3D(-1, -2, -3), QVector3D(-5, -6, -7));
- QVERIFY(!box.isNull());
- QVERIFY(box.isFinite());
- QVERIFY(!box.isInfinite());
- QVERIFY(box.minimum() == QVector3D(-5, -6, -7));
- QVERIFY(box.maximum() == QVector3D(-1, -2, -3));
-
- box.setToInfinite();
- QVERIFY(!box.isNull());
- QVERIFY(!box.isFinite());
- QVERIFY(box.isInfinite());
- QVERIFY(box.minimum() == QVector3D(0, 0, 0));
- QVERIFY(box.maximum() == QVector3D(0, 0, 0));
-
- // Using setExtents will turn an infinite box into a finite box.
- box.setExtents(QVector3D(-1, -2, -3), QVector3D(-5, -6, -7));
- QVERIFY(!box.isNull());
- QVERIFY(box.isFinite());
- QVERIFY(!box.isInfinite());
- QVERIFY(box.minimum() == QVector3D(-5, -6, -7));
- QVERIFY(box.maximum() == QVector3D(-1, -2, -3));
-}
-
-void tst_QBox3D::compare()
-{
- QBox3D box1(QVector3D(-1, -2, -3), QVector3D(-5, -6, -7));
- QBox3D box2(QVector3D(-1, -2, -3), QVector3D(-5, -6, -7));
- QBox3D box3(QVector3D(0, -2, -3), QVector3D(-5, -6, -7));
- QBox3D null1, null2;
- QBox3D infinite1, infinite2;
- infinite1.setToInfinite();
- infinite2.setToInfinite();
-
- QVERIFY(box1 == box2);
- QVERIFY(box1 != box3);
- QVERIFY(box1 != null1);
- QVERIFY(box1 != infinite1);
-
- QVERIFY(null1 == null2);
- QVERIFY(null1 != box1);
- QVERIFY(null1 != infinite1);
-
- QVERIFY(infinite1 == infinite2);
- QVERIFY(infinite1 != box1);
- QVERIFY(infinite1 != null1);
-}
-
-void tst_QBox3D::fuzzyCompare()
-{
- QBox3D box1(QVector3D(-1, -2, -3), QVector3D(-5, -6, -7));
- QBox3D box2(QVector3D(-1, -2, -3), QVector3D(-5, -6, -7));
- QBox3D box3(QVector3D(0, -2, -3), QVector3D(-5, -6, -7));
- QBox3D null1, null2;
- QBox3D infinite1, infinite2;
- infinite1.setToInfinite();
- infinite2.setToInfinite();
-
- QVERIFY(qFuzzyCompare(box1, box2));
- QVERIFY(!qFuzzyCompare(box1, box3));
- QVERIFY(!qFuzzyCompare(box1, null1));
- QVERIFY(!qFuzzyCompare(box1, infinite1));
-
- QVERIFY(qFuzzyCompare(null1, null2));
- QVERIFY(!qFuzzyCompare(null1, box1));
- QVERIFY(!qFuzzyCompare(null1, infinite1));
-
- QVERIFY(qFuzzyCompare(infinite1, infinite2));
- QVERIFY(!qFuzzyCompare(infinite1, box1));
- QVERIFY(!qFuzzyCompare(infinite1, null1));
-}
-
-void tst_QBox3D::size_data()
-{
- QTest::addColumn<qreal>("x1");
- QTest::addColumn<qreal>("y1");
- QTest::addColumn<qreal>("z1");
- QTest::addColumn<qreal>("x2");
- QTest::addColumn<qreal>("y2");
- QTest::addColumn<qreal>("z2");
-
- QTest::newRow("zero")
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0;
-
- QTest::newRow("one")
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)1.0 << (qreal)1.0 << (qreal)1.0;
-
- QTest::newRow("empty")
- << (qreal)1.0 << (qreal)1.0 << (qreal)1.0
- << (qreal)1.0 << (qreal)1.0 << (qreal)1.0;
-
- QTest::newRow("complex")
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)4.0 << (qreal)5.0 << (qreal)6.0;
-}
-void tst_QBox3D::size()
-{
- QFETCH(qreal, x1);
- QFETCH(qreal, y1);
- QFETCH(qreal, z1);
- QFETCH(qreal, x2);
- QFETCH(qreal, y2);
- QFETCH(qreal, z2);
-
- qreal sizex = (x1 < x2) ? (x2 - x1) : (x1 - x2);
- qreal sizey = (y1 < y2) ? (y2 - y1) : (y1 - y2);
- qreal sizez = (z1 < z2) ? (z2 - z1) : (z1 - z2);
-
- QBox3D box(QVector3D(x1, y1, z1), QVector3D(x2, y2, z2));
- QVERIFY(box.size() == QVector3D(sizex, sizey, sizez));
-
- box.setToNull();
- QVERIFY(box.size() == QVector3D(0, 0, 0));
-
- box.setToInfinite();
- QVERIFY(box.size() == QVector3D(0, 0, 0));
-}
-
-void tst_QBox3D::center_data()
-{
- // Use the same test data as the size tests.
- size_data();
-}
-void tst_QBox3D::center()
-{
- QFETCH(qreal, x1);
- QFETCH(qreal, y1);
- QFETCH(qreal, z1);
- QFETCH(qreal, x2);
- QFETCH(qreal, y2);
- QFETCH(qreal, z2);
-
- qreal centerx = (x1 + x2) / 2;
- qreal centery = (y1 + y2) / 2;
- qreal centerz = (z1 + z2) / 2;
-
- QBox3D box(QVector3D(x1, y1, z1), QVector3D(x2, y2, z2));
- QVERIFY(box.center() == QVector3D(centerx, centery, centerz));
-
- box.setToNull();
- QVERIFY(box.center() == QVector3D(0, 0, 0));
-
- box.setToInfinite();
- QVERIFY(box.center() == QVector3D(0, 0, 0));
-}
-
-void tst_QBox3D::containsPoint_data()
-{
- QTest::addColumn<qreal>("x");
- QTest::addColumn<qreal>("y");
- QTest::addColumn<qreal>("z");
- QTest::addColumn<bool>("contained");
-
- QTest::newRow("zero")
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0 << true;
-
- QTest::newRow("boundary1")
- << (qreal)-1 << (qreal)-2 << (qreal)-3 << true;
- QTest::newRow("boundary2")
- << (qreal)-1 << (qreal)5 << (qreal)-3 << true;
- QTest::newRow("boundary3")
- << (qreal)-1 << (qreal)-2 << (qreal)6 << true;
- QTest::newRow("boundary4")
- << (qreal)-1 << (qreal)5 << (qreal)6 << true;
- QTest::newRow("boundary5")
- << (qreal)4 << (qreal)-2 << (qreal)-3 << true;
- QTest::newRow("boundary6")
- << (qreal)4 << (qreal)5 << (qreal)-3 << true;
- QTest::newRow("boundary7")
- << (qreal)4 << (qreal)-2 << (qreal)6 << true;
- QTest::newRow("boundary8")
- << (qreal)4 << (qreal)5 << (qreal)6 << true;
-
- QTest::newRow("outside1")
- << (qreal)-2 << (qreal)-2 << (qreal)-3 << false;
- QTest::newRow("outside2")
- << (qreal)-1 << (qreal)6 << (qreal)-3 << false;
- QTest::newRow("outside3")
- << (qreal)-1 << (qreal)-2 << (qreal)7 << false;
- QTest::newRow("outside4")
- << (qreal)-1 << (qreal)-3 << (qreal)6 << false;
- QTest::newRow("outside5")
- << (qreal)5 << (qreal)-2 << (qreal)-3 << false;
- QTest::newRow("outside6")
- << (qreal)4 << (qreal)6 << (qreal)-3 << false;
- QTest::newRow("outside7")
- << (qreal)4 << (qreal)-2 << (qreal)7 << false;
- QTest::newRow("outside8")
- << (qreal)4 << (qreal)-3 << (qreal)6 << false;
-}
-void tst_QBox3D::containsPoint()
-{
- QFETCH(qreal, x);
- QFETCH(qreal, y);
- QFETCH(qreal, z);
- QFETCH(bool, contained);
-
- QBox3D box(QVector3D(-1, -2, -3), QVector3D(4, 5, 6));
-
- if (contained)
- QVERIFY(box.contains(QVector3D(x, y, z)));
- else
- QVERIFY(!box.contains(QVector3D(x, y, z)));
-
- QBox3D null;
- QVERIFY(!null.contains(QVector3D(x, y, z)));
-
- QBox3D infinite;
- infinite.setToInfinite();
- QVERIFY(infinite.contains(QVector3D(x, y, z)));
-}
-
-void tst_QBox3D::containsBox_data()
-{
- QTest::addColumn<qreal>("x1");
- QTest::addColumn<qreal>("y1");
- QTest::addColumn<qreal>("z1");
- QTest::addColumn<qreal>("x2");
- QTest::addColumn<qreal>("y2");
- QTest::addColumn<qreal>("z2");
- QTest::addColumn<bool>("contained");
- QTest::addColumn<bool>("intersects");
- QTest::addColumn<qreal>("ix1"); // Intersection box
- QTest::addColumn<qreal>("iy1");
- QTest::addColumn<qreal>("iz1");
- QTest::addColumn<qreal>("ix2");
- QTest::addColumn<qreal>("iy2");
- QTest::addColumn<qreal>("iz2");
- QTest::addColumn<qreal>("ex1"); // Expanded box
- QTest::addColumn<qreal>("ey1");
- QTest::addColumn<qreal>("ez1");
- QTest::addColumn<qreal>("ex2");
- QTest::addColumn<qreal>("ey2");
- QTest::addColumn<qreal>("ez2");
-
- QTest::newRow("zero")
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << true << true
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0;
-
- QTest::newRow("side1")
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)-2.0 << (qreal)3.0
- << true << true
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)-2.0 << (qreal)3.0
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0;
- QTest::newRow("side2")
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)-3.0
- << true << true
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)-3.0
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0;
- QTest::newRow("side3")
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)-1.0 << (qreal)2.0 << (qreal)3.0
- << true << true
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)-1.0 << (qreal)2.0 << (qreal)3.0
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0;
- QTest::newRow("side4")
- << (qreal)-1.0 << (qreal)2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0
- << true << true
- << (qreal)-1.0 << (qreal)2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0;
- QTest::newRow("side5")
- << (qreal)1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0
- << true << true
- << (qreal)1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0;
- QTest::newRow("side6")
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0
- << true << true
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0;
-
- QTest::newRow("outside1")
- << (qreal)-1.0 << (qreal)-2.5 << (qreal)-3.0
- << (qreal)1.0 << (qreal)-2.5 << (qreal)3.0
- << false << false
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)-1.0 << (qreal)-2.5 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0;
- QTest::newRow("outside2")
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.5
- << (qreal)1.0 << (qreal)2.0 << (qreal)-3.5
- << false << false
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.5
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0;
- QTest::newRow("outside3")
- << (qreal)-1.5 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)-1.5 << (qreal)2.0 << (qreal)3.0
- << false << false
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)-1.5 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0;
- QTest::newRow("outside4")
- << (qreal)-1.0 << (qreal)2.5 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.5 << (qreal)3.0
- << false << false
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.5 << (qreal)3.0;
- QTest::newRow("outside5")
- << (qreal)1.5 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.5 << (qreal)2.0 << (qreal)3.0
- << false << false
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.5 << (qreal)2.0 << (qreal)3.0;
- QTest::newRow("outside6")
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)3.5
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.5
- << false << false
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)0.0 << (qreal)0.0 << (qreal)0.0
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.5;
-
- QTest::newRow("overlap1")
- << (qreal)-1.0 << (qreal)-2.5 << (qreal)-3.0
- << (qreal)1.0 << (qreal)-1.5 << (qreal)3.0
- << false << true
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)-1.5 << (qreal)3.0
- << (qreal)-1.0 << (qreal)-2.5 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0;
- QTest::newRow("overlap2")
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.5
- << (qreal)1.0 << (qreal)2.0 << (qreal)-2.5
- << false << true
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)-2.5
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.5
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0;
- QTest::newRow("overlap3")
- << (qreal)-1.5 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)-0.5 << (qreal)2.0 << (qreal)3.0
- << false << true
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)-0.5 << (qreal)2.0 << (qreal)3.0
- << (qreal)-1.5 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0;
- QTest::newRow("overlap4")
- << (qreal)-1.0 << (qreal)2.5 << (qreal)-3.0
- << (qreal)1.0 << (qreal)1.5 << (qreal)3.0
- << false << true
- << (qreal)-1.0 << (qreal)2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)1.5 << (qreal)3.0
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.5 << (qreal)3.0;
- QTest::newRow("overlap5")
- << (qreal)1.5 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)0.5 << (qreal)2.0 << (qreal)3.0
- << false << true
- << (qreal)1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)0.5 << (qreal)2.0 << (qreal)3.0
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.5 << (qreal)2.0 << (qreal)3.0;
- QTest::newRow("overlap6")
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)3.5
- << (qreal)1.0 << (qreal)2.0 << (qreal)2.5
- << false << true
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)2.5
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.5;
-
- QTest::newRow("surround")
- << (qreal)-2.0 << (qreal)-3.0 << (qreal)-4.0
- << (qreal)2.0 << (qreal)3.0 << (qreal)4.0
- << false << true
- << (qreal)-1.0 << (qreal)-2.0 << (qreal)-3.0
- << (qreal)1.0 << (qreal)2.0 << (qreal)3.0
- << (qreal)-2.0 << (qreal)-3.0 << (qreal)-4.0
- << (qreal)2.0 << (qreal)3.0 << (qreal)4.0;
-}
-void tst_QBox3D::containsBox()
-{
- QFETCH(qreal, x1);
- QFETCH(qreal, y1);
- QFETCH(qreal, z1);
- QFETCH(qreal, x2);
- QFETCH(qreal, y2);
- QFETCH(qreal, z2);
- QFETCH(bool, contained);
-
- QBox3D box(QVector3D(-1, -2, -3), QVector3D(1, 2, 3));
- QBox3D other(QVector3D(x1, y1, z1), QVector3D(x2, y2, z2));
-
- if (contained)
- QVERIFY(box.contains(other));
- else
- QVERIFY(!box.contains(other));
-
- QBox3D null;
- QVERIFY(!null.contains(other));
-
- QBox3D infinite;
- infinite.setToInfinite();
- QVERIFY(infinite.contains(other));
-
- QVERIFY(!box.contains(null));
- QVERIFY(!box.contains(infinite));
-}
-
-void tst_QBox3D::intersects_data()
-{
- // Use the same test data as containsBox().
- containsBox_data();
-}
-void tst_QBox3D::intersects()
-{
- QFETCH(qreal, x1);
- QFETCH(qreal, y1);
- QFETCH(qreal, z1);
- QFETCH(qreal, x2);
- QFETCH(qreal, y2);
- QFETCH(qreal, z2);
- QFETCH(bool, contained);
- QFETCH(bool, intersects);
-
- Q_UNUSED(contained);
-
- QBox3D box(QVector3D(-1, -2, -3), QVector3D(1, 2, 3));
- QBox3D other(QVector3D(x1, y1, z1), QVector3D(x2, y2, z2));
-
- if (intersects)
- QVERIFY(box.intersects(other));
- else
- QVERIFY(!box.intersects(other));
-
- QBox3D null;
- QVERIFY(!null.intersects(other));
-
- QBox3D infinite;
- infinite.setToInfinite();
- QVERIFY(infinite.intersects(other));
-
- QVERIFY(!box.intersects(null));
- QVERIFY(box.intersects(infinite));
-}
-
-void tst_QBox3D::intersect_data()
-{
- // Use the same test data as containsBox().
- containsBox_data();
-}
-void tst_QBox3D::intersect()
-{
- QFETCH(qreal, x1);
- QFETCH(qreal, y1);
- QFETCH(qreal, z1);
- QFETCH(qreal, x2);
- QFETCH(qreal, y2);
- QFETCH(qreal, z2);
- QFETCH(bool, contained);
- QFETCH(bool, intersects);
- QFETCH(qreal, ix1);
- QFETCH(qreal, iy1);
- QFETCH(qreal, iz1);
- QFETCH(qreal, ix2);
- QFETCH(qreal, iy2);
- QFETCH(qreal, iz2);
-
- Q_UNUSED(contained);
-
- QBox3D box(QVector3D(-1, -2, -3), QVector3D(1, 2, 3));
- QBox3D other(QVector3D(x1, y1, z1), QVector3D(x2, y2, z2));
- QBox3D result(QVector3D(ix1, iy1, iz1), QVector3D(ix2, iy2, iz2));
-
- QBox3D ibox(box);
- ibox.intersect(other);
- if (intersects)
- QVERIFY(ibox == result);
- else
- QVERIFY(ibox.isNull());
-
- QBox3D null;
- null.intersect(other);
- QVERIFY(null.isNull());
-
- QBox3D infinite;
- infinite.setToInfinite();
- infinite.intersect(other);
- QVERIFY(infinite == other);
-
- QBox3D ibox2(box);
- QBox3D null2;
- ibox2.intersect(null2);
- QVERIFY(ibox2.isNull());
-
- QBox3D ibox3(box);
- QBox3D infinite2;
- infinite2.setToInfinite();
- ibox3.intersect(infinite2);
- QVERIFY(ibox3 == box);
-}
-
-void tst_QBox3D::intersected_data()
-{
- // Use the same test data as containsBox().
- containsBox_data();
-}
-void tst_QBox3D::intersected()
-{
- QFETCH(qreal, x1);
- QFETCH(qreal, y1);
- QFETCH(qreal, z1);
- QFETCH(qreal, x2);
- QFETCH(qreal, y2);
- QFETCH(qreal, z2);
- QFETCH(bool, contained);
- QFETCH(bool, intersects);
- QFETCH(qreal, ix1);
- QFETCH(qreal, iy1);
- QFETCH(qreal, iz1);
- QFETCH(qreal, ix2);
- QFETCH(qreal, iy2);
- QFETCH(qreal, iz2);
-
- Q_UNUSED(contained);
-
- QBox3D box(QVector3D(-1, -2, -3), QVector3D(1, 2, 3));
- QBox3D other(QVector3D(x1, y1, z1), QVector3D(x2, y2, z2));
- QBox3D result(QVector3D(ix1, iy1, iz1), QVector3D(ix2, iy2, iz2));
-
- QBox3D ibox = box.intersected(other);
- if (intersects)
- QVERIFY(ibox == result);
- else
- QVERIFY(ibox.isNull());
-
- QBox3D null;
- ibox = null.intersected(other);
- QVERIFY(ibox.isNull());
-
- QBox3D infinite;
- infinite.setToInfinite();
- ibox = infinite.intersected(other);
- QVERIFY(ibox == other);
-
- QVERIFY(box.intersected(null).isNull());
- QVERIFY(box.intersected(infinite) == box);
-}
-
-void tst_QBox3D::intersectRay_data()
-{
- QTest::addColumn<qreal>("x1");
- QTest::addColumn<qreal>("y1");
- QTest::addColumn<qreal>("z1");
- QTest::addColumn<qreal>("x2");
- QTest::addColumn<qreal>("y2");
- QTest::addColumn<qreal>("z2");
- QTest::addColumn<bool>("intersects");
- QTest::addColumn<qreal>("mint");
- QTest::addColumn<qreal>("maxt");
- QTest::addColumn<qreal>("originx");
- QTest::addColumn<qreal>("originy");
- QTest::addColumn<qreal>("originz");
- QTest::addColumn<qreal>("directionx");
- QTest::addColumn<qreal>("directiony");
- QTest::addColumn<qreal>("directionz");
-
- QTest::newRow("zero")
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << false << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0);
-
- QTest::newRow("zero-x")
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << true << qreal(1.0) << qreal(1.0)
- << qreal(-1.0) << qreal(0.0) << qreal(0.0)
- << qreal(1.0) << qreal(0.0) << qreal(0.0);
-
- QTest::newRow("zero-neg-x")
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << true << qreal(-1.0) << qreal(-1.0)
- << qreal(-1.0) << qreal(0.0) << qreal(0.0)
- << qreal(-1.0) << qreal(0.0) << qreal(0.0);
-
- QTest::newRow("zero-x-miss")
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << false << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(1.0) << qreal(0.0)
- << qreal(1.0) << qreal(0.0) << qreal(0.0);
-
- QTest::newRow("zero-y")
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << true << qreal(1.0) << qreal(1.0)
- << qreal(0.0) << qreal(-1.0) << qreal(0.0)
- << qreal(0.0) << qreal(1.0) << qreal(0.0);
-
- QTest::newRow("zero-neg-y")
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << true << qreal(-1.0) << qreal(-1.0)
- << qreal(0.0) << qreal(-1.0) << qreal(0.0)
- << qreal(0.0) << qreal(-1.0) << qreal(0.0);
-
- QTest::newRow("zero-y-miss")
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << false << qreal(0.0) << qreal(0.0)
- << qreal(1.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(-1.0) << qreal(0.0);
-
- QTest::newRow("zero-z")
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << true << qreal(1.0) << qreal(1.0)
- << qreal(0.0) << qreal(0.0) << qreal(1.0)
- << qreal(0.0) << qreal(0.0) << qreal(-1.0);
-
- QTest::newRow("zero-neg-z")
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << true << qreal(-1.0) << qreal(-1.0)
- << qreal(0.0) << qreal(0.0) << qreal(1.0)
- << qreal(0.0) << qreal(0.0) << qreal(1.0);
-
- QTest::newRow("zero-z-miss")
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << false << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(1.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(1.0);
-
- QTest::newRow("normal-no-ray")
- << qreal(-1.0) << qreal(-2.0) << qreal(-3.0)
- << qreal(1.0) << qreal(2.0) << qreal(3.0)
- << false << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0);
-
- QTest::newRow("normal-from-inside-x")
- << qreal(-1.0) << qreal(-2.0) << qreal(-3.0)
- << qreal(1.0) << qreal(2.0) << qreal(3.0)
- << true << qreal(-1.0) << qreal(1.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(1.0) << qreal(0.0) << qreal(0.0);
-
- QTest::newRow("normal-from-inside-neg-x")
- << qreal(-1.0) << qreal(-2.0) << qreal(-3.0)
- << qreal(1.0) << qreal(2.0) << qreal(3.0)
- << true << qreal(-2.0) << qreal(2.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(-0.5) << qreal(0.0) << qreal(0.0);
-
- QTest::newRow("normal-from-inside-y")
- << qreal(-1.0) << qreal(-2.0) << qreal(-3.0)
- << qreal(1.0) << qreal(2.0) << qreal(3.0)
- << true << qreal(-2.0) << qreal(2.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(1.0) << qreal(0.0);
-
- QTest::newRow("normal-from-inside-neg-y")
- << qreal(-1.0) << qreal(-2.0) << qreal(-3.0)
- << qreal(1.0) << qreal(2.0) << qreal(3.0)
- << true << qreal(-4.0) << qreal(4.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(-0.5) << qreal(0.0);
-
- QTest::newRow("normal-from-inside-z")
- << qreal(-1.0) << qreal(-2.0) << qreal(-3.0)
- << qreal(1.0) << qreal(2.0) << qreal(3.0)
- << true << qreal(-3.0) << qreal(3.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(1.0);
-
- QTest::newRow("normal-from-inside-neg-z")
- << qreal(-1.0) << qreal(-2.0) << qreal(-3.0)
- << qreal(1.0) << qreal(2.0) << qreal(3.0)
- << true << qreal(-6.0) << qreal(6.0)
- << qreal(0.0) << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(0.0) << qreal(-0.5);
-
- QTest::newRow("normal-from-outside-x")
- << qreal(-1.0) << qreal(-2.0) << qreal(-3.0)
- << qreal(1.0) << qreal(2.0) << qreal(3.0)
- << true << qreal(1.0) << qreal(3.0)
- << qreal(-2.0) << qreal(0.0) << qreal(0.0)
- << qreal(1.0) << qreal(0.0) << qreal(0.0);
-
- QTest::newRow("normal-from-outside-neg-x")
- << qreal(-1.0) << qreal(-2.0) << qreal(-3.0)
- << qreal(1.0) << qreal(2.0) << qreal(3.0)
- << true << qreal(-6.0) << qreal(-2.0)
- << qreal(-2.0) << qreal(0.0) << qreal(0.0)
- << qreal(-0.5) << qreal(0.0) << qreal(0.0);
-
- QTest::newRow("normal-from-outside-miss-x")
- << qreal(-1.0) << qreal(-2.0) << qreal(-3.0)
- << qreal(1.0) << qreal(2.0) << qreal(3.0)
- << false << qreal(0.0) << qreal(0.0)
- << qreal(-2.0) << qreal(3.0) << qreal(0.0)
- << qreal(1.0) << qreal(0.0) << qreal(0.0);
-
- QTest::newRow("normal-from-outside-y")
- << qreal(-1.0) << qreal(-2.0) << qreal(-3.0)
- << qreal(1.0) << qreal(2.0) << qreal(3.0)
- << true << qreal(1.0) << qreal(5.0)
- << qreal(0.0) << qreal(-3.0) << qreal(0.0)
- << qreal(0.0) << qreal(1.0) << qreal(0.0);
-
- QTest::newRow("normal-from-outside-neg-y")
- << qreal(-1.0) << qreal(-2.0) << qreal(-3.0)
- << qreal(1.0) << qreal(2.0) << qreal(3.0)
- << true << qreal(-10.0) << qreal(-2.0)
- << qreal(0.0) << qreal(-3.0) << qreal(0.0)
- << qreal(0.0) << qreal(-0.5) << qreal(0.0);
-
- QTest::newRow("normal-from-outside-miss-y")
- << qreal(-1.0) << qreal(-2.0) << qreal(-3.0)
- << qreal(1.0) << qreal(2.0) << qreal(3.0)
- << false << qreal(0.0) << qreal(0.0)
- << qreal(2.0) << qreal(-3.0) << qreal(0.0)
- << qreal(0.0) << qreal(1.5) << qreal(0.0);
-
- QTest::newRow("normal-from-outside-z")
- << qreal(-1.0) << qreal(-2.0) << qreal(-3.0)
- << qreal(1.0) << qreal(2.0) << qreal(3.0)
- << true << qreal(1.0) << qreal(7.0)
- << qreal(0.0) << qreal(0.0) << qreal(-4.0)
- << qreal(0.0) << qreal(0.0) << qreal(1.0);
-
- QTest::newRow("normal-from-outside-neg-z")
- << qreal(-1.0) << qreal(-2.0) << qreal(-3.0)
- << qreal(1.0) << qreal(2.0) << qreal(3.0)
- << true << qreal(-14.0) << qreal(-2.0)
- << qreal(0.0) << qreal(0.0) << qreal(-4.0)
- << qreal(0.0) << qreal(0.0) << qreal(-0.5);
-
- QTest::newRow("normal-from-outside-miss-z")
- << qreal(-1.0) << qreal(-2.0) << qreal(-3.0)
- << qreal(1.0) << qreal(2.0) << qreal(3.0)
- << false << qreal(0.0) << qreal(0.0)
- << qreal(0.0) << qreal(3.0) << qreal(-4.0)
- << qreal(0.0) << qreal(0.0) << qreal(1.5);
-}
-
-void tst_QBox3D::intersectRay()
-{
- QFETCH(qreal, x1);
- QFETCH(qreal, y1);
- QFETCH(qreal, z1);
- QFETCH(qreal, x2);
- QFETCH(qreal, y2);
- QFETCH(qreal, z2);
- QFETCH(bool, intersects);
- QFETCH(qreal, mint);
- QFETCH(qreal, maxt);
- QFETCH(qreal, originx);
- QFETCH(qreal, originy);
- QFETCH(qreal, originz);
- QFETCH(qreal, directionx);
- QFETCH(qreal, directiony);
- QFETCH(qreal, directionz);
-
- QBox3D box(QVector3D(x1, y1, z1), QVector3D(x2, y2, z2));
- QRay3D ray(QVector3D(originx, originy, originz),
- QVector3D(directionx, directiony, directionz));
-
- qreal minimum_t = -1.0f, maximum_t = -1.0f;
- if (intersects) {
- QVERIFY(box.intersection(ray, &minimum_t, &maximum_t));
- QCOMPARE(minimum_t, mint);
- QCOMPARE(maximum_t, maxt);
- QVERIFY(box.intersects(ray));
- qreal t = box.intersection(ray);
- if (mint >= 0.0f)
- QCOMPARE(t, mint);
- else if (maxt >= 0.0f)
- QCOMPARE(t, maxt);
- else
- QVERIFY(qIsNaN(t));
- } else {
- QVERIFY(!box.intersection(ray, &minimum_t, &maximum_t));
- QVERIFY(qIsNaN(minimum_t));
- QVERIFY(qIsNaN(maximum_t));
- QVERIFY(!box.intersects(ray));
- QVERIFY(qIsNaN(box.intersection(ray)));
- }
-}
-
-void tst_QBox3D::unitePoint_data()
-{
- // Use the same test data as containsPoint().
- containsPoint_data();
-}
-void tst_QBox3D::unitePoint()
-{
- QFETCH(qreal, x);
- QFETCH(qreal, y);
- QFETCH(qreal, z);
- QFETCH(bool, contained);
-
- QBox3D box(QVector3D(-1, -2, -3), QVector3D(4, 5, 6));
-
- QBox3D result(box);
- result.unite(QVector3D(x, y, z));
-
- if (contained) {
- QVERIFY(result == box);
- } else {
- qreal minx = (x < -1) ? x : -1;
- qreal miny = (y < -2) ? y : -2;
- qreal minz = (z < -3) ? z : -3;
- qreal maxx = (x > 4) ? x : 4;
- qreal maxy = (y > 5) ? y : 5;
- qreal maxz = (z > 6) ? z : 6;
- QBox3D expected(QVector3D(minx, miny, minz), QVector3D(maxx, maxy, maxz));
- QVERIFY(result == expected);
- }
-
- QBox3D null;
- null.unite(QVector3D(x, y, z));
- QVERIFY(null == QBox3D(QVector3D(x, y, z), QVector3D(x, y, z)));
-
- QBox3D infinite;
- infinite.setToInfinite();
- infinite.unite(QVector3D(x, y, z));
- QVERIFY(infinite.isInfinite());
-}
-
-void tst_QBox3D::uniteBox_data()
-{
- // Use the same test data as containsBox().
- containsBox_data();
-}
-void tst_QBox3D::uniteBox()
-{
- QFETCH(qreal, x1);
- QFETCH(qreal, y1);
- QFETCH(qreal, z1);
- QFETCH(qreal, x2);
- QFETCH(qreal, y2);
- QFETCH(qreal, z2);
- QFETCH(bool, contained);
- QFETCH(bool, intersects);
- QFETCH(qreal, ix1);
- QFETCH(qreal, iy1);
- QFETCH(qreal, iz1);
- QFETCH(qreal, ix2);
- QFETCH(qreal, iy2);
- QFETCH(qreal, iz2);
- QFETCH(qreal, ex1);
- QFETCH(qreal, ey1);
- QFETCH(qreal, ez1);
- QFETCH(qreal, ex2);
- QFETCH(qreal, ey2);
- QFETCH(qreal, ez2);
-
- Q_UNUSED(contained);
- Q_UNUSED(intersects);
- Q_UNUSED(ix1);
- Q_UNUSED(iy1);
- Q_UNUSED(iz1);
- Q_UNUSED(ix2);
- Q_UNUSED(iy2);
- Q_UNUSED(iz2);
-
- QBox3D box(QVector3D(-1, -2, -3), QVector3D(1, 2, 3));
- QBox3D other(QVector3D(x1, y1, z1), QVector3D(x2, y2, z2));
- QBox3D result(QVector3D(ex1, ey1, ez1), QVector3D(ex2, ey2, ez2));
-
- QBox3D ibox(box);
- ibox.unite(other);
- QVERIFY(ibox == result);
-
- QBox3D null;
- null.unite(other);
- QVERIFY(null == other);
-
- QBox3D infinite;
- infinite.setToInfinite();
- infinite.unite(other);
- QVERIFY(infinite.isInfinite());
-
- QBox3D ibox2(box);
- QBox3D null2;
- ibox2.unite(null2);
- QVERIFY(ibox2 == box);
-
- QBox3D ibox3(box);
- QBox3D infinite2;
- infinite2.setToInfinite();
- ibox3.unite(infinite2);
- QVERIFY(ibox3.isInfinite());
-}
-
-void tst_QBox3D::unitedPoint_data()
-{
- // Use the same test data as containsPoint().
- containsPoint_data();
-}
-void tst_QBox3D::unitedPoint()
-{
- QFETCH(qreal, x);
- QFETCH(qreal, y);
- QFETCH(qreal, z);
- QFETCH(bool, contained);
-
- QBox3D box(QVector3D(-1, -2, -3), QVector3D(4, 5, 6));
-
- QBox3D result = box.united(QVector3D(x, y, z));
-
- if (contained) {
- QVERIFY(result == box);
- } else {
- qreal minx = (x < -1) ? x : -1;
- qreal miny = (y < -2) ? y : -2;
- qreal minz = (z < -3) ? z : -3;
- qreal maxx = (x > 4) ? x : 4;
- qreal maxy = (y > 5) ? y : 5;
- qreal maxz = (z > 6) ? z : 6;
- QBox3D expected(QVector3D(minx, miny, minz), QVector3D(maxx, maxy, maxz));
- QVERIFY(result == expected);
- }
-
- QBox3D null;
- result = null.united(QVector3D(x, y, z));
- QVERIFY(result == QBox3D(QVector3D(x, y, z), QVector3D(x, y, z)));
-
- QBox3D infinite;
- infinite.setToInfinite();
- result = infinite.united(QVector3D(x, y, z));
- QVERIFY(result.isInfinite());
-}
-
-void tst_QBox3D::unitedBox_data()
-{
- // Use the same test data as containsBox().
- containsBox_data();
-}
-void tst_QBox3D::unitedBox()
-{
- QFETCH(qreal, x1);
- QFETCH(qreal, y1);
- QFETCH(qreal, z1);
- QFETCH(qreal, x2);
- QFETCH(qreal, y2);
- QFETCH(qreal, z2);
- QFETCH(bool, contained);
- QFETCH(bool, intersects);
- QFETCH(qreal, ix1);
- QFETCH(qreal, iy1);
- QFETCH(qreal, iz1);
- QFETCH(qreal, ix2);
- QFETCH(qreal, iy2);
- QFETCH(qreal, iz2);
- QFETCH(qreal, ex1);
- QFETCH(qreal, ey1);
- QFETCH(qreal, ez1);
- QFETCH(qreal, ex2);
- QFETCH(qreal, ey2);
- QFETCH(qreal, ez2);
-
- Q_UNUSED(contained);
- Q_UNUSED(intersects);
- Q_UNUSED(ix1);
- Q_UNUSED(iy1);
- Q_UNUSED(iz1);
- Q_UNUSED(ix2);
- Q_UNUSED(iy2);
- Q_UNUSED(iz2);
-
- QBox3D box(QVector3D(-1, -2, -3), QVector3D(1, 2, 3));
- QBox3D other(QVector3D(x1, y1, z1), QVector3D(x2, y2, z2));
- QBox3D result(QVector3D(ex1, ey1, ez1), QVector3D(ex2, ey2, ez2));
-
- QBox3D ibox = box.united(other);
- QVERIFY(ibox == result);
-
- QBox3D null;
- ibox = null.united(other);
- QVERIFY(ibox == other);
-
- QBox3D infinite;
- infinite.setToInfinite();
- ibox = infinite.united(other);
- QVERIFY(ibox.isInfinite());
-
- QBox3D ibox2(box);
- QBox3D null2;
- ibox = ibox2.united(null2);
- QVERIFY(ibox == box);
-
- QBox3D ibox3(box);
- QBox3D infinite2;
- infinite2.setToInfinite();
- ibox = ibox3.united(infinite2);
- QVERIFY(ibox.isInfinite());
-}
-
-void tst_QBox3D::transform()
-{
- QBox3D box(QVector3D(-1, -2, -3), QVector3D(1, 2, 3));
- QMatrix4x4 m;
- m.rotate(90, 0, 1, 0);
- box.transform(m);
- QVERIFY(box.minimum() == QVector3D(-3, -2, -1));
- QVERIFY(box.maximum() == QVector3D(3, 2, 1));
-
- QBox3D null;
- null.transform(m);
- QVERIFY(null.isNull());
-
- QBox3D infinite;
- infinite.setToInfinite();
- infinite.transform(m);
- QVERIFY(infinite.isInfinite());
-}
-
-void tst_QBox3D::transformed()
-{
- QBox3D box(QVector3D(-1, -2, -3), QVector3D(1, 2, 3));
- QMatrix4x4 m;
- m.rotate(90, 0, 1, 0);
- QBox3D box2 = box.transformed(m);
- QVERIFY(box2.minimum() == QVector3D(-3, -2, -1));
- QVERIFY(box2.maximum() == QVector3D(3, 2, 1));
-
- QBox3D null;
- box2 = null.transformed(m);
- QVERIFY(box2.isNull());
-
- QBox3D infinite;
- infinite.setToInfinite();
- box2 = infinite.transformed(m);
- QVERIFY(box2.isInfinite());
-}
-
-void tst_QBox3D::dataStream()
-{
-#ifndef QT_NO_DATASTREAM
- QBox3D box1(QVector3D(1.0f, 2.0f, 3.0f), QVector3D(4.0f, 5.0f, 6.0f));
- QBox3D box2; // null
- QBox3D box3;
- box3.setToInfinite();
-
- QByteArray data;
- {
- QDataStream stream(&data, QIODevice::WriteOnly);
- stream << box1;
- stream << box2;
- stream << box3;
- }
-
- QBox3D rbox1;
- QBox3D rbox2;
- QBox3D rbox3;
- {
- QDataStream stream2(data);
- stream2 >> rbox1;
- stream2 >> rbox2;
- stream2 >> rbox3;
- }
-
- QVERIFY(box1 == rbox1);
- QVERIFY(box2 == rbox2);
- QVERIFY(box3 == rbox3);
-#endif
-}
-
-class tst_QBox3DProperties : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QBox3D box READ box WRITE setBox)
-public:
- tst_QBox3DProperties(QObject *parent = 0) : QObject(parent) {}
-
- QBox3D box() const { return b; }
- void setBox(const QBox3D& value) { b = value; }
-
-private:
- QBox3D b;
-};
-
-// Test getting and setting properties via the metaobject system.
-void tst_QBox3D::properties()
-{
- tst_QBox3DProperties obj;
-
- qRegisterMetaType<QBox3D>();
-
- obj.setBox(QBox3D(QVector3D(1, 2, 3), QVector3D(4, 5, 6)));
-
- QBox3D b = qVariantValue<QBox3D>(obj.property("box"));
- QCOMPARE(b.minimum(), QVector3D(1, 2, 3));
- QCOMPARE(b.maximum(), QVector3D(4, 5, 6));
-
- obj.setProperty("box",
- qVariantFromValue
- (QBox3D(QVector3D(-1, -2, -3), QVector3D(-4, -5, -6))));
-
- b = qVariantValue<QBox3D>(obj.property("box"));
- QCOMPARE(b.minimum(), QVector3D(-4, -5, -6));
- QCOMPARE(b.maximum(), QVector3D(-1, -2, -3));
-}
-
-void tst_QBox3D::metaTypes()
-{
- int id = qMetaTypeId<QBox3D>();
- QVERIFY(QMetaType::type("QBox3D") == id);
- QCOMPARE(QByteArray(QMetaType::typeName(id)), QByteArray("QBox3D"));
- QVERIFY(QMetaType::isRegistered(id));
-}
-
-QTEST_APPLESS_MAIN(tst_QBox3D)
-
-#include "tst_qbox3d.moc"
diff --git a/tests/auto/threed/qcolor4ub/qcolor4ub.pro b/tests/auto/threed/qcolor4ub/qcolor4ub.pro
deleted file mode 100644
index e5643b5c..00000000
--- a/tests/auto/threed/qcolor4ub/qcolor4ub.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qcolor4ub.cpp
diff --git a/tests/auto/threed/qcolor4ub/tst_qcolor4ub.cpp b/tests/auto/threed/qcolor4ub/tst_qcolor4ub.cpp
deleted file mode 100644
index 73c625ee..00000000
--- a/tests/auto/threed/qcolor4ub/tst_qcolor4ub.cpp
+++ /dev/null
@@ -1,341 +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 <QtTest/QtTest>
-#include "qcolor4ub.h"
-
-class tst_QColor4ub : public QObject
-{
- Q_OBJECT
-public:
- tst_QColor4ub() {}
- ~tst_QColor4ub() {}
-
-private slots:
- void create();
- void modify();
- void copy();
- void compare_data();
- void compare();
- void toColor();
- void checkSize();
-};
-
-#define fuzzyCompare(x,y) (qAbs((x) - (y)) < 0.0001)
-
-void tst_QColor4ub::create()
-{
- QColor4ub c1;
- QCOMPARE(c1.red(), 0);
- QCOMPARE(c1.green(), 0);
- QCOMPARE(c1.blue(), 0);
- QCOMPARE(c1.alpha(), 255);
- QCOMPARE(c1.redF(), qreal(0.0));
- QCOMPARE(c1.greenF(), qreal(0.0));
- QCOMPARE(c1.blueF(), qreal(0.0));
- QCOMPARE(c1.alphaF(), qreal(1.0));
-
- QColor4ub c2(162, 54, 39);
- QCOMPARE(c2.red(), 162);
- QCOMPARE(c2.green(), 54);
- QCOMPARE(c2.blue(), 39);
- QCOMPARE(c2.alpha(), 255);
- QVERIFY(fuzzyCompare(c2.redF(), qreal(162 / 255.0f)));
- QVERIFY(fuzzyCompare(c2.greenF(), qreal(54 / 255.0f)));
- QVERIFY(fuzzyCompare(c2.blueF(), qreal(39 / 255.0f)));
- QVERIFY(fuzzyCompare(c2.alphaF(), qreal(1.0)));
-
- QColor4ub c3(162, 54, 39, 41);
- QCOMPARE(c3.red(), 162);
- QCOMPARE(c3.green(), 54);
- QCOMPARE(c3.blue(), 39);
- QCOMPARE(c3.alpha(), 41);
- QVERIFY(fuzzyCompare(c3.redF(), qreal(162 / 255.0f)));
- QVERIFY(fuzzyCompare(c3.greenF(), qreal(54 / 255.0f)));
- QVERIFY(fuzzyCompare(c3.blueF(), qreal(39 / 255.0f)));
- QVERIFY(fuzzyCompare(c3.alphaF(), qreal(41 / 255.0f)));
-
- QColor4ub c4(QColor(162, 54, 39, 41));
- QCOMPARE(c4.red(), 162);
- QCOMPARE(c4.green(), 54);
- QCOMPARE(c4.blue(), 39);
- QCOMPARE(c4.alpha(), 41);
-
- QColor4ub c5(Qt::red);
- QCOMPARE(c5.red(), 255);
- QCOMPARE(c5.green(), 0);
- QCOMPARE(c5.blue(), 0);
- QCOMPARE(c5.alpha(), 255);
-
- QColor4ub c6(qRgb(162, 54, 39));
- QCOMPARE(c6.red(), 162);
- QCOMPARE(c6.green(), 54);
- QCOMPARE(c6.blue(), 39);
- QCOMPARE(c6.alpha(), 255);
-
- QColor4ub c7(qRgba(162, 54, 39, 41));
- QCOMPARE(c7.red(), 162);
- QCOMPARE(c7.green(), 54);
- QCOMPARE(c7.blue(), 39);
- QCOMPARE(c7.alpha(), 41);
-
- QColor4ub c8(256, -3, 1); // truncates from int to uchar
- QCOMPARE(c8.red(), 0);
- QCOMPARE(c8.green(), 253);
- QCOMPARE(c8.blue(), 1);
- QCOMPARE(c8.alpha(), 255);
-
- QColor4ub c9 = QColor4ub::fromRgb(162, 54, 39);
- QCOMPARE(c9.red(), 162);
- QCOMPARE(c9.green(), 54);
- QCOMPARE(c9.blue(), 39);
- QCOMPARE(c9.alpha(), 255);
- c9 = QColor4ub::fromRgb(162, 54, 39, 41);
- QCOMPARE(c9.red(), 162);
- QCOMPARE(c9.green(), 54);
- QCOMPARE(c9.blue(), 39);
- QCOMPARE(c9.alpha(), 41);
-
- QColor4ub c10 = QColor4ub::fromRgbF(1.0f, 0.5f, 0.25f);
- QCOMPARE(c10.red(), 255);
- QCOMPARE(c10.green(), 128);
- QCOMPARE(c10.blue(), 64);
- QCOMPARE(c10.alpha(), 255);
- c10 = QColor4ub::fromRgbF(1.0f, 0.5f, 0.25f, 0.75f);
- QCOMPARE(c10.red(), 255);
- QCOMPARE(c10.green(), 128);
- QCOMPARE(c10.blue(), 64);
- QCOMPARE(c10.alpha(), 191);
-
- static uchar const data[4] = {uchar(162), uchar(54), uchar(39), uchar(255)};
- QColor4ub c11 = QColor4ub::fromRaw(data);
- QCOMPARE(c11.red(), 162);
- QCOMPARE(c11.green(), 54);
- QCOMPARE(c11.blue(), 39);
- QCOMPARE(c11.alpha(), 255);
-}
-
-void tst_QColor4ub::modify()
-{
- QColor4ub c1(162, 54, 39, 41);
- c1.setRed(34);
- c1.setGreen(163);
- c1.setBlue(2);
- c1.setAlpha(200);
- QCOMPARE(c1.red(), 34);
- QCOMPARE(c1.green(), 163);
- QCOMPARE(c1.blue(), 2);
- QCOMPARE(c1.alpha(), 200);
- QVERIFY(fuzzyCompare(c1.redF(), qreal(34 / 255.0f)));
- QVERIFY(fuzzyCompare(c1.greenF(), qreal(163 / 255.0f)));
- QVERIFY(fuzzyCompare(c1.blueF(), qreal(2 / 255.0f)));
- QVERIFY(fuzzyCompare(c1.alphaF(), qreal(200 / 255.0f)));
-
- QColor4ub c2;
- c2.setRedF(1.0f);
- c2.setGreenF(0.5f);
- c2.setBlueF(0.25f);
- c2.setAlphaF(0.75f);
- QCOMPARE(c2.red(), 255);
- QCOMPARE(c2.green(), 128);
- QCOMPARE(c2.blue(), 64);
- QCOMPARE(c2.alpha(), 191);
- QVERIFY(fuzzyCompare(c2.redF(), qreal(1.0)));
- QVERIFY(fuzzyCompare(c2.greenF(), qreal(128 / 255.0f)));
- QVERIFY(fuzzyCompare(c2.blueF(), qreal(64 / 255.0f)));
- QVERIFY(fuzzyCompare(c2.alphaF(), qreal(191 / 255.0f)));
-
- QColor4ub c3;
- c3.setRgb(162, 54, 39);
- QCOMPARE(c3.red(), 162);
- QCOMPARE(c3.green(), 54);
- QCOMPARE(c3.blue(), 39);
- QCOMPARE(c3.alpha(), 255);
- c3.setRgb(162, 54, 39, 41);
- QCOMPARE(c3.red(), 162);
- QCOMPARE(c3.green(), 54);
- QCOMPARE(c3.blue(), 39);
- QCOMPARE(c3.alpha(), 41);
-
- QColor4ub c4;
- c4.setRgbF(1.0f, 0.5f, 0.25f);
- QCOMPARE(c4.red(), 255);
- QCOMPARE(c4.green(), 128);
- QCOMPARE(c4.blue(), 64);
- QCOMPARE(c4.alpha(), 255);
- c4.setRgbF(1.0f, 0.5f, 0.25f, 0.75f);
- QCOMPARE(c4.red(), 255);
- QCOMPARE(c4.green(), 128);
- QCOMPARE(c4.blue(), 64);
- QCOMPARE(c4.alpha(), 191);
-}
-
-void tst_QColor4ub::copy()
-{
- QColor4ub c1(162, 54, 39, 41);
- QColor4ub c2(c1);
- QCOMPARE(c2.red(), 162);
- QCOMPARE(c2.green(), 54);
- QCOMPARE(c2.blue(), 39);
- QCOMPARE(c2.alpha(), 41);
-
- QColor4ub c3;
- c3 = c2;
- QCOMPARE(c3.red(), 162);
- QCOMPARE(c3.green(), 54);
- QCOMPARE(c3.blue(), 39);
- QCOMPARE(c3.alpha(), 41);
-
- c1 = Qt::red;
- QCOMPARE(c1.red(), 255);
- QCOMPARE(c1.green(), 0);
- QCOMPARE(c1.blue(), 0);
- QCOMPARE(c1.alpha(), 255);
-
- c2 = QColor(162, 54, 39, 41);
- QCOMPARE(c2.red(), 162);
- QCOMPARE(c2.green(), 54);
- QCOMPARE(c2.blue(), 39);
- QCOMPARE(c2.alpha(), 41);
-
- c1 = c2;
- QCOMPARE(c1.red(), 162);
- QCOMPARE(c1.green(), 54);
- QCOMPARE(c1.blue(), 39);
- QCOMPARE(c1.alpha(), 41);
-}
-
-void tst_QColor4ub::compare_data()
-{
- QTest::addColumn<int>("red1");
- QTest::addColumn<int>("green1");
- QTest::addColumn<int>("blue1");
- QTest::addColumn<int>("alpha1");
- QTest::addColumn<int>("red2");
- QTest::addColumn<int>("green2");
- QTest::addColumn<int>("blue2");
- QTest::addColumn<int>("alpha2");
- QTest::addColumn<bool>("isEqual");
-
- QTest::newRow("black")
- << 0 << 0 << 0 << 0
- << 0 << 0 << 0 << 0
- << true;
-
- QTest::newRow("white")
- << 255 << 255 << 255 << 255
- << 255 << 255 << 255 << 255
- << true;
-
- QTest::newRow("mixed")
- << 162 << 54 << 39 << 41
- << 162 << 54 << 39 << 41
- << true;
-
- QTest::newRow("red-diff")
- << 162 << 54 << 39 << 41
- << 161 << 54 << 39 << 41
- << false;
-
- QTest::newRow("green-diff")
- << 162 << 54 << 39 << 41
- << 162 << 53 << 39 << 41
- << false;
-
- QTest::newRow("blue-diff")
- << 162 << 54 << 39 << 41
- << 162 << 54 << 38 << 41
- << false;
-
- QTest::newRow("alpha-diff")
- << 162 << 54 << 39 << 41
- << 162 << 54 << 39 << 40
- << false;
-
- QTest::newRow("all-diff")
- << 162 << 54 << 39 << 41
- << 161 << 53 << 38 << 40
- << false;
-}
-
-void tst_QColor4ub::compare()
-{
- QFETCH(int, red1);
- QFETCH(int, green1);
- QFETCH(int, blue1);
- QFETCH(int, alpha1);
- QFETCH(int, red2);
- QFETCH(int, green2);
- QFETCH(int, blue2);
- QFETCH(int, alpha2);
- QFETCH(bool, isEqual);
-
- QColor4ub c1(red1, green1, blue1, alpha1);
- QColor4ub c2(red2, green2, blue2, alpha2);
-
- if (isEqual) {
- QVERIFY(c1 == c2);
- QVERIFY(!(c1 != c2));
- } else {
- QVERIFY(!(c1 == c2));
- QVERIFY(c1 != c2);
- }
-}
-
-void tst_QColor4ub::toColor()
-{
- QColor4ub c1(162, 54, 39, 41);
- QColor c2 = c1.toColor();
- QCOMPARE(c2.red(), 162);
- QCOMPARE(c2.green(), 54);
- QCOMPARE(c2.blue(), 39);
- QCOMPARE(c2.alpha(), 41);
-}
-
-void tst_QColor4ub::checkSize()
-{
- // We need QColor4ub to be precisely packed as four single-byte values.
- QCOMPARE(sizeof(QColor4ub), sizeof(uchar) * 4);
-}
-
-QTEST_APPLESS_MAIN(tst_QColor4ub)
-
-#include "tst_qcolor4ub.moc"
diff --git a/tests/auto/threed/qcustomdataarray/qcustomdataarray.pro b/tests/auto/threed/qcustomdataarray/qcustomdataarray.pro
deleted file mode 100644
index 7b5d0495..00000000
--- a/tests/auto/threed/qcustomdataarray/qcustomdataarray.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qcustomdataarray.cpp
diff --git a/tests/auto/threed/qcustomdataarray/tst_qcustomdataarray.cpp b/tests/auto/threed/qcustomdataarray/tst_qcustomdataarray.cpp
deleted file mode 100644
index f65aa798..00000000
--- a/tests/auto/threed/qcustomdataarray/tst_qcustomdataarray.cpp
+++ /dev/null
@@ -1,139 +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 <QtTest/QtTest>
-#include "qcustomdataarray.h"
-
-class tst_QCustomDataArray : public QObject
-{
- Q_OBJECT
-public:
- tst_QCustomDataArray() {}
- ~tst_QCustomDataArray() {}
-
-private slots:
- void create();
-};
-
-void tst_QCustomDataArray::create()
-{
- QCustomDataArray array1;
- QVERIFY(array1.elementType() == QCustomDataArray::Float);
- QVERIFY(array1.elementSize() == sizeof(float));
- QCOMPARE(array1.size(), 0);
- QCOMPARE(array1.count(), 0);
- QVERIFY(array1.isEmpty());
-
- array1.setElementType(QCustomDataArray::Vector3D);
- QVERIFY(array1.elementType() == QCustomDataArray::Vector3D);
- QVERIFY(array1.elementSize() == sizeof(QVector3D));
- QCOMPARE(array1.size(), 0);
- QCOMPARE(array1.count(), 0);
- QVERIFY(array1.isEmpty());
-
- QCustomDataArray array2(QCustomDataArray::Vector2D);
- QVERIFY(array2.elementType() == QCustomDataArray::Vector2D);
- QVERIFY(array2.elementSize() == sizeof(QVector2D));
- QCOMPARE(array2.size(), 0);
- QCOMPARE(array2.count(), 0);
- QVERIFY(array2.isEmpty());
-
- QCustomDataArray array3(QCustomDataArray::Vector3D, 20);
- QVERIFY(array3.elementType() == QCustomDataArray::Vector3D);
- QVERIFY(array3.elementSize() == sizeof(QVector3D));
- QCOMPARE(array3.size(), 20);
- QCOMPARE(array3.count(), 20);
- QVERIFY(!array3.isEmpty());
- QVERIFY(array3.capacity() >= 20);
-
- QCustomDataArray array4(QCustomDataArray::Vector4D, 20);
- QVERIFY(array4.elementType() == QCustomDataArray::Vector4D);
- QVERIFY(array4.elementSize() == sizeof(QVector4D));
- QCOMPARE(array4.size(), 20);
- QCOMPARE(array4.count(), 20);
- QVERIFY(!array4.isEmpty());
- array4.append(QVector4D(1.0f, 2.0f, 3.0f, 4.0f));
-
- QCustomDataArray array5(QCustomDataArray::Color, 10);
- QVERIFY(array5.elementType() == QCustomDataArray::Color);
- QVERIFY(array5.elementSize() == sizeof(QColor4ub));
- QCOMPARE(array5.size(), 10);
- QCOMPARE(array5.count(), 10);
- QVERIFY(!array5.isEmpty());
- array5.append(Qt::red);
- array5.setAt(4, Qt::green);
- QVERIFY(array5.colorAt(4) == Qt::green);
-
- QCustomDataArray array6(array5);
- QVERIFY(array6.elementType() == QCustomDataArray::Color);
- QVERIFY(array6.elementSize() == sizeof(QColor4ub));
- QCOMPARE(array6.size(), 11);
- QCOMPARE(array6.count(), 11);
- QVERIFY(!array6.isEmpty());
- QVERIFY(array6.colorAt(10) == Qt::red);
-
- // Changes element type from Color to Vector4D.
- array6 = array4;
- QVERIFY(array6.elementType() == QCustomDataArray::Vector4D);
- QVERIFY(array6.elementSize() == sizeof(QVector4D));
- QCOMPARE(array6.size(), 21);
- QCOMPARE(array6.count(), 21);
- QVERIFY(!array6.isEmpty());
- QVERIFY(array6.vector4DAt(20) == QVector4D(1.0f, 2.0f, 3.0f, 4.0f));
-
- array6.clear();
- QVERIFY(array6.elementType() == QCustomDataArray::Vector4D);
- QVERIFY(array6.elementSize() == sizeof(QVector4D));
- QCOMPARE(array6.size(), 0);
- QCOMPARE(array6.count(), 0);
- QVERIFY(array6.isEmpty());
-
- array6.setElementType(QCustomDataArray::Vector3D);
- QVERIFY(array6.elementType() == QCustomDataArray::Vector3D);
- QVERIFY(array6.elementSize() == sizeof(QVector3D));
- QCOMPARE(array6.size(), 0);
- QCOMPARE(array6.count(), 0);
- QVERIFY(array6.isEmpty());
-}
-
-QTEST_APPLESS_MAIN(tst_QCustomDataArray)
-
-#include "tst_qcustomdataarray.moc"
diff --git a/tests/auto/threed/qgeometrydata/qgeometrydata.pro b/tests/auto/threed/qgeometrydata/qgeometrydata.pro
deleted file mode 100644
index a03425bb..00000000
--- a/tests/auto/threed/qgeometrydata/qgeometrydata.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-INCLUDEPATH += ../../../shared
-INCLUDEPATH += ../../../../src/threed/geometry
-
-SOURCES += tst_qgeometrydata.cpp
diff --git a/tests/auto/threed/qgeometrydata/tst_qgeometrydata.cpp b/tests/auto/threed/qgeometrydata/tst_qgeometrydata.cpp
deleted file mode 100644
index 7dd77956..00000000
--- a/tests/auto/threed/qgeometrydata/tst_qgeometrydata.cpp
+++ /dev/null
@@ -1,629 +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 <QtTest/QtTest>
-#include <QtCore/qpointer.h>
-
-#include "qgeometrydata.h"
-#include "qvector_utils_p.h"
-#include "qtest_helpers.h"
-#include "qglpainter.h"
-
-#include <QtCore/qdebug.h>
-
-class tst_QGeometryData : public QObject
-{
- Q_OBJECT
-public:
- tst_QGeometryData() {}
- ~tst_QGeometryData() {}
-
-private slots:
- void createDefault();
- void appendVertex();
- void appendNormal();
- void appendVertexNormal();
- void copy();
- void interleaveWith();
- void boundingBox();
- void center();
- void normalizeNormals();
- void reversed();
- void translated();
- void generateTextureCoordinates();
- void clear();
- void draw();
-};
-
-void tst_QGeometryData::createDefault()
-{
- QGeometryData data;
- QCOMPARE(data.count(), 0);
- QCOMPARE(data.attributes().count(), 0);
- QCOMPARE(data.fields(), quint32(0));
- QCOMPARE(data.vertices().count(), 0);
- data.normalizeNormals();
- QCOMPARE(data.boundingBox(), QBox3D());
-
- // copy constructor on initialization - null default
- QGeometryData other = data;
- QCOMPARE(other.count(), 0);
- QCOMPARE(other.attributes().count(), 0);
- QCOMPARE(other.fields(), quint32(0));
-
- // copy constructor on default
- QGeometryData copy(data);
- QCOMPARE(copy.count(), 0);
- QCOMPARE(copy.attributes().count(), 0);
- QCOMPARE(copy.fields(), quint32(0));
-}
-
-void tst_QGeometryData::appendVertex()
-{
- QVector3D a(1.1, 1.2, 1.3);
- QVector3D b(2.1, 2.2, 2.3);
- QVector3D c(3.1, 3.2, 3.3);
- QVector3D d(4.1, 4.2, 4.3);
- {
- QGeometryData data;
- data.appendVertex(a);
- QCOMPARE(data.count(), 1);
- QCOMPARE(data.fields(), QGL::fieldMask(QGL::Position));
- QCOMPARE(data.vertices().count(), 1);
- QCOMPARE(data.vertices().at(0), a);
- }
- {
- QGeometryData data;
- data.appendVertex(a, b);
- QCOMPARE(data.count(), 2);
- QCOMPARE(data.fields(), QGL::fieldMask(QGL::Position));
- QCOMPARE(data.vertices().count(), 2);
- QCOMPARE(data.vertices().at(0), a);
- QCOMPARE(data.vertices().at(1), b);
- }
- {
- QGeometryData data;
- data.appendVertex(a, b, c);
- QCOMPARE(data.count(), 3);
- QCOMPARE(data.fields(), QGL::fieldMask(QGL::Position));
- QCOMPARE(data.vertices().count(), 3);
- QCOMPARE(data.vertices().at(0), a);
- QCOMPARE(data.vertices().at(1), b);
- QCOMPARE(data.vertices().at(2), c);
- }
- {
- QGeometryData data;
- data.appendVertex(a, b, c, d);
- QCOMPARE(data.count(), 4);
- QCOMPARE(data.fields(), QGL::fieldMask(QGL::Position));
- QCOMPARE(data.vertices().count(), 4);
- QCOMPARE(data.vertices().at(0), a);
- QCOMPARE(data.vertices().at(1), b);
- QCOMPARE(data.vertices().at(2), c);
- QCOMPARE(data.vertices().at(3), d);
- }
- {
- QGeometryData data;
- data.appendVertex(a, b, c, d);
- data.appendVertex(a, b, c, d);
- data.appendVertex(a);
- QCOMPARE(data.count(), 9);
- QCOMPARE(data.fields(), QGL::fieldMask(QGL::Position));
- QCOMPARE(data.vertices().count(), 9);
- QCOMPARE(data.vertices().at(0), a);
- QCOMPARE(data.vertices().at(1), b);
- QCOMPARE(data.vertices().at(5), b);
- QCOMPARE(data.vertices().at(8), a);
- }
-}
-
-void tst_QGeometryData::appendNormal()
-{
- QVector3D a(1.1, 1.2, 1.3);
- QVector3D b(2.1, 2.2, 2.3);
- QVector3D c(3.1, 3.2, 3.3);
- QVector3D d(4.1, 4.2, 4.3);
- {
- QGeometryData data;
- data.appendNormal(a);
- QCOMPARE(data.count(), 1);
- QCOMPARE(data.fields(), QGL::fieldMask(QGL::Normal));
- QCOMPARE(data.normals().count(), 1);
- QCOMPARE(data.normals().at(0), a);
- }
- {
- QGeometryData data;
- data.appendNormal(a, b);
- QCOMPARE(data.count(), 2);
- QCOMPARE(data.fields(), QGL::fieldMask(QGL::Normal));
- QCOMPARE(data.normals().count(), 2);
- QCOMPARE(data.normals().at(0), a);
- QCOMPARE(data.normals().at(1), b);
- }
- {
- QGeometryData data;
- data.appendNormal(a, b, c);
- QCOMPARE(data.count(), 3);
- QCOMPARE(data.fields(), QGL::fieldMask(QGL::Normal));
- QCOMPARE(data.normals().count(), 3);
- QCOMPARE(data.normals().at(0), a);
- QCOMPARE(data.normals().at(1), b);
- QCOMPARE(data.normals().at(2), c);
- }
- {
- QGeometryData data;
- data.appendNormal(a, b, c, d);
- QCOMPARE(data.count(), 4);
- QCOMPARE(data.fields(), QGL::fieldMask(QGL::Normal));
- QCOMPARE(data.normals().count(), 4);
- QCOMPARE(data.normals().at(0), a);
- QCOMPARE(data.normals().at(1), b);
- QCOMPARE(data.normals().at(2), c);
- QCOMPARE(data.normals().at(3), d);
- }
- {
- QGeometryData data;
- data.appendNormal(a, b, c, d);
- data.appendNormal(a, b, c, d);
- data.appendNormal(a);
- QCOMPARE(data.count(), 9);
- QCOMPARE(data.fields(), QGL::fieldMask(QGL::Normal));
- QCOMPARE(data.normals().count(), 9);
- QCOMPARE(data.normals().at(0), a);
- QCOMPARE(data.normals().at(1), b);
- QCOMPARE(data.normals().at(5), b);
- QCOMPARE(data.normals().at(8), a);
- }
-}
-
-void tst_QGeometryData::appendVertexNormal()
-{
- QVector3D a(1.1, 1.2, 1.3);
- QVector3D b(2.1, 2.2, 2.3);
- QVector3D c(3.1, 3.2, 3.3);
- QVector3D d(4.1, 4.2, 4.3);
- QVector3D an(5.1, 5.2, 5.3);
- QVector3D bn(6.1, 6.2, 6.3);
- QVector3D cn(7.1, 7.2, 7.3);
- QVector3D dn(8.1, 8.2, 8.3);
- {
- QGeometryData data;
- data.appendVertex(a);
- data.appendNormal(an);
- QCOMPARE(data.count(), 1);
- QCOMPARE(data.fields(), QGL::fieldMask(QGL::Position) | QGL::fieldMask(QGL::Normal));
- QCOMPARE(data.vertices().count(), 1);
- QCOMPARE(data.vertices().at(0), a);
- }
- {
- QGeometryData data;
- data.appendVertex(a, b);
- data.appendNormal(an, bn);
- QCOMPARE(data.count(), 2);
- QCOMPARE(data.fields(), QGL::fieldMask(QGL::Position) | QGL::fieldMask(QGL::Normal));
- QCOMPARE(data.vertices().count(), 2);
- QCOMPARE(data.vertices().at(0), a);
- QCOMPARE(data.vertex(1), b);
- QCOMPARE(data.normals().count(), 2);
- QCOMPARE(data.normal(0), an);
- QCOMPARE(data.normals().at(1), bn);
- }
- {
- QGeometryData data;
- data.appendVertex(a, b, c);
- data.appendNormal(an, bn, cn);
- QCOMPARE(data.count(), 3);
- QCOMPARE(data.fields(), QGL::fieldMask(QGL::Position) | QGL::fieldMask(QGL::Normal));
- QCOMPARE(data.vertices().count(), 3);
- QCOMPARE(data.vertices().at(0), a);
- QCOMPARE(data.vertices().at(1), b);
- QCOMPARE(data.vertices().at(2), c);
- QCOMPARE(data.normals().count(), 3);
- QCOMPARE(data.normal(0), an);
- QCOMPARE(data.normals().at(1), bn);
- QCOMPARE(data.normal(2), cn);
- }
- {
- QGeometryData data;
- data.appendVertex(a, b, c, d);
- data.appendNormal(an, bn, cn, dn);
- QCOMPARE(data.count(), 4);
- QCOMPARE(data.fields(), QGL::fieldMask(QGL::Position) | QGL::fieldMask(QGL::Normal));
- QCOMPARE(data.vertices().count(), 4);
- QCOMPARE(data.vertices().at(0), a);
- QCOMPARE(data.vertices().at(1), b);
- QCOMPARE(data.vertices().at(2), c);
- QCOMPARE(data.vertices().at(3), d);
- QCOMPARE(data.normals().count(), 4);
- QCOMPARE(data.normals().at(0), an);
- QCOMPARE(data.normals().at(1), bn);
- QCOMPARE(data.normals().at(2), cn);
- QCOMPARE(data.normals().at(3), dn);
- }
- {
- QGeometryData data;
- data.appendVertex(a, b, c, d);
- data.appendNormal(an, bn, cn, dn);
- data.appendVertex(a, b, c, d);
- data.appendNormal(an, bn, cn, dn);
- data.appendVertex(a);
- data.appendNormal(an);
- QCOMPARE(data.count(), 9);
- QCOMPARE(data.fields(), QGL::fieldMask(QGL::Position) | QGL::fieldMask(QGL::Normal));
- QCOMPARE(data.vertices().count(), 9);
- QCOMPARE(data.vertices().at(0), a);
- QCOMPARE(data.vertices().at(1), b);
- QCOMPARE(data.vertices().at(5), b);
- QCOMPARE(data.vertices().at(8), a);
- QCOMPARE(data.normals().count(), 9);
- QCOMPARE(data.normals().at(0), an);
- QCOMPARE(data.normals().at(1), bn);
- QCOMPARE(data.normals().at(5), bn);
- QCOMPARE(data.normals().at(8), an);
- }
-}
-
-
-QVector3D avec(99.1, 99.2, 99.3);
-
-static QGeometryData aFunc(const QGeometryData& g) // not a copy but a ref
-{
- QGeometryData d = g; // copy constructor
- d.appendVertex(avec);
- return d; // assingment operator
-}
-
-void tst_QGeometryData::copy()
-{
- QVector3D a(1.1, 1.2, 1.3);
- QVector3D b(2.1, 2.2, 2.3);
- QVector3D c(3.1, 3.2, 3.3);
- QVector3D d(4.1, 4.2, 4.3);
- {
- QGeometryData data;
- QCOMPARE(data.count(), 0);
- QCOMPARE(data.fields(), (quint32)0);
- QGeometryData other;
- other.appendVertex(QVector3D());
- QCOMPARE(other.count(), 1);
- QCOMPARE(other.fields(), QGL::fieldMask(QGL::Position));
- other = aFunc(data); // assignment op - throw away previous d
- QCOMPARE(other.count(), 1);
- QCOMPARE(other.fields(), QGL::fieldMask(QGL::Position));
- QVector3D res = other.vertices().at(0);
- QCOMPARE(res, avec);
- }
- {
- QGeometryData data;
- data.appendVertex(a, b, c, d);
- QGeometryData other;
- QCOMPARE(other.count(), 0);
- QCOMPARE(other.fields(), (quint32)0);
- other = aFunc(data); // assignment operator
- other.appendVertex(a);
- QCOMPARE(other.count(), 6);
- QCOMPARE(other.fields(), QGL::fieldMask(QGL::Position));
- QCOMPARE(other.vertices().count(), 6);
- QCOMPARE(other.vertices().at(0), a);
- QCOMPARE(other.vertices().at(1), b);
- QCOMPARE(other.vertices().at(4), avec);
- QCOMPARE(other.vertices().at(5), a);
- }
-}
-
-void tst_QGeometryData::interleaveWith()
-{
- QVector3D a(1.1, 1.2, 1.3);
- QVector3D b(2.1, 2.2, 2.3);
- QVector3D c(3.1, 3.2, 3.3);
- QVector3D d(4.1, 4.2, 4.3);
- QVector3D vx(0.7071, 0.7071, 0.0);
- QVector2D at(0.11, 0.12);
- QVector2D bt(0.21, 0.22);
- QVector2D ct(0.31, 0.32);
- QVector2D dt(0.41, 0.42);
- QVector2D tx(1.0, 1.0);
-
- QGeometryData data;
- data.appendVertex(a, b, c, d);
- data.appendTexCoord(at, bt, ct, dt);
- QGeometryData dat2;
-
- // count is the smaller of the two - nothing in this null case
- // also make sure the argument does not somehow change - its a const
- // so it shouldn't...
- dat2.interleaveWith(data);
- QCOMPARE(data.count(), 4);
- QCOMPARE(data.vertex(0), a);
- QCOMPARE(dat2.count(), 0);
- QCOMPARE(dat2.count(QGL::Position), 0);
- QCOMPARE(dat2.fields(), quint32(0));
-
- // dat2 is smaller and has less fields
- dat2.appendVertex(a + vx, b + vx);
- dat2.interleaveWith(data);
- QCOMPARE(data.count(), 4);
- QCOMPARE(data.vertex(0), a);
- QCOMPARE(dat2.count(), 4);
- QCOMPARE(dat2.count(QGL::Position), 4);
- QCOMPARE(dat2.count(QGL::TextureCoord0), 0);
- QCOMPARE(dat2.fields(), QGL::fieldMask(QGL::Position));
- QCOMPARE(dat2.vertex(0), a + vx);
- QCOMPARE(dat2.vertex(1), a);
- QCOMPARE(dat2.vertex(2), b + vx);
- QCOMPARE(dat2.vertex(3), b);
-
- // full zip with both sides have 4 verts & textures
- dat2.clear();
- for (int i = 0; i < data.count(); ++i)
- {
- dat2.appendVertex(data.vertex(i) + vx);
- dat2.appendTexCoord(data.texCoord(i) + tx);
- }
- dat2.interleaveWith(data);
- QCOMPARE(dat2.count(), 8);
- QCOMPARE(dat2.count(QGL::Position), 8);
- QCOMPARE(dat2.count(QGL::TextureCoord0), 8);
- QCOMPARE(dat2.fields(), QGL::fieldMask(QGL::Position) |
- QGL::fieldMask(QGL::TextureCoord0));
- QCOMPARE(dat2.vertex(0), a + vx);
- QCOMPARE(dat2.vertex(1), a);
- QCOMPARE(dat2.vertex(4), c + vx);
- QCOMPARE(dat2.vertex(7), d);
- QCOMPARE(dat2.texCoord(0), at + tx);
- QCOMPARE(dat2.texCoord(3), bt);
- QCOMPARE(dat2.texCoord(7), dt);
-}
-
-void tst_QGeometryData::boundingBox()
-{
- QVector3D a(1.1, 1.2, 1.3);
- QVector3D b(2.1, 2.2, 2.3);
- QVector3D c(3.1, 3.2, 3.3);
- QVector3D d(4.1, 4.2, 4.3);
-
- QGeometryData data;
- data.appendVertex(a, b, c, d);
-
- QBox3D bb = data.boundingBox();
- QCOMPARE(bb.maximum(), d);
- QCOMPARE(bb.minimum(), a);
-}
-
-void tst_QGeometryData::center()
-{
- QVector3D a(1.1, 1.2, 1.3);
- QVector3D b(2.1, 2.2, 2.3);
- QVector3D c(3.1, 3.2, 3.3);
- QVector3D d(4.1, 4.2, 4.3);
-
- QGeometryData data;
- data.appendVertex(a, b, c, d);
-
- QVector3D center = data.center();
- QCOMPARE(center, QVector3D(2.6, 2.7, 2.8));
-}
-
-void tst_QGeometryData::normalizeNormals()
-{
- QVector3D a(1.1, 1.2, 1.3);
- QVector3D b(2.1, 2.2, 2.3);
- QVector3D c(3.1, 3.2, 3.3);
- QVector3D d(4.1, 4.2, 4.3);
- QVector3D an(5.1, 5.2, 5.3);
- QVector3D bn(6.1, 6.2, 6.3);
- QVector3D cn(7.1, 7.2, 7.3);
- QVector3D dn(8.1, 8.2, 8.3);
-
- QGeometryData data;
- data.appendVertex(a, b, c, d);
- data.appendNormal(an, bn, cn, dn);
-
- data.normalizeNormals();
- QVector3D n = data.normalAt(1);
- QVERIFY(qFskCompare(data.normalAt(0), QVector3D(0.566178, 0.577279, 0.588381)));
- QVERIFY(qFskCompare(data.normalAt(1), QVector3D(0.567989, 0.577300, 0.586612)));
- QVERIFY(qFskCompare(data.normalAt(2), QVector3D(0.569295, 0.577313, 0.585331)));
- QVERIFY(qFskCompare(data.normalAt(3), QVector3D(0.570281, 0.577322, 0.584362)));
- QVERIFY(qFskCompare(data.normalAt(0).lengthSquared(), qreal(1.0f)));
- QVERIFY(qFskCompare(data.normalAt(1).lengthSquared(), qreal(1.0f)));
- QVERIFY(qFskCompare(data.normalAt(2).lengthSquared(), qreal(1.0f)));
- QVERIFY(qFskCompare(data.normalAt(3).lengthSquared(), qreal(1.0f)));
-}
-
-void tst_QGeometryData::reversed()
-{
- QVector3D a(1.1, 1.2, 1.3);
- QVector3D b(2.1, 2.2, 2.3);
- QVector3D c(3.1, 3.2, 3.3);
- QVector3D d(4.1, 4.2, 4.3);
- QVector3D an(5.1, 5.2, 5.3);
- QVector3D bn(6.1, 6.2, 6.3);
- QVector3D cn(7.1, 7.2, 7.3);
- QVector3D dn(8.1, 8.2, 8.3);
-
- QGeometryData data;
- data.appendVertex(a, b, c, d);
- data.appendNormal(an, bn, cn, dn);
-
- QGeometryData reversed = data.reversed();
-
- QCOMPARE(data.vertexAt(0), reversed.vertexAt(3));
- QCOMPARE(data.vertexAt(1), reversed.vertexAt(2));
- QCOMPARE(data.vertexAt(2), reversed.vertexAt(1));
- QCOMPARE(data.vertexAt(3), reversed.vertexAt(0));
- QCOMPARE(data.normalAt(0), reversed.normalAt(3));
- QCOMPARE(data.normalAt(1), reversed.normalAt(2));
- QCOMPARE(data.normalAt(2), reversed.normalAt(1));
- QCOMPARE(data.normalAt(3), reversed.normalAt(0));
-}
-
-void tst_QGeometryData::translated()
-{
- QVector3D a(1.1, 1.2, 1.3);
- QVector3D b(2.1, 2.2, 2.3);
- QVector3D c(3.1, 3.2, 3.3);
- QVector3D d(4.1, 4.2, 4.3);
- QVector3D an(5.1, 5.2, 5.3);
- QVector3D bn(6.1, 6.2, 6.3);
- QVector3D cn(7.1, 7.2, 7.3);
- QVector3D dn(8.1, 8.2, 8.3);
-
- QGeometryData data;
- data.appendVertex(a, b, c, d);
- data.appendNormal(an, bn, cn, dn);
-
- QVector3D t(0.5, -0.5, -0.5);
- QGeometryData translated = data.translated(t);
-
- QVector3D at = a + t;
- QVector3D bt = b + t;
- QVector3D ct = c + t;
- QVector3D dt = d + t;
-
- QCOMPARE(at, translated.vertexAt(0));
- QCOMPARE(bt, translated.vertexAt(1));
- QCOMPARE(ct, translated.vertexAt(2));
- QCOMPARE(dt, translated.vertexAt(3));
- QCOMPARE(an, translated.normalAt(0));
- QCOMPARE(bn, translated.normalAt(1));
- QCOMPARE(cn, translated.normalAt(2));
- QCOMPARE(dn, translated.normalAt(3));
-}
-
-void tst_QGeometryData::generateTextureCoordinates()
-{
- QGeometryData top;
-
- top.appendVertex(QVector3D(0.0, 0.0, 0.0));
- top.appendVertex(QVector3D(6.0, 3.6, 0.0)); // (v1 - v0).length() = 7.0
- top.appendVertex(QVector3D(10.0, 0.6, 0.0)); // (v2 - v1).length() = 5.0
- top.appendVertex(QVector3D(13.0, 3.24, 0.0)); // (v3 - v2).length() = 4.0
-
- // generate x (Qt::Horizontal) texture coordinates
- top.generateTextureCoordinates(); // spread over 7 + 5 + 4 = 16
-
- QVERIFY(qFskCompare(top.texCoordAt(0), QVector2D()));
- QVERIFY(qFskCompare(top.texCoordAt(1), QVector2D(0.43750349, 0.0)));
- QVERIFY(qFskCompare(top.texCoordAt(2), QVector2D(0.75013363, 0.0)));
- QVERIFY(qFskCompare(top.texCoordAt(3), QVector2D(1.0, 0.0)));
-
- QGeometryData side;
-
- side.appendVertex(QVector3D(0.0, 0.0, 0.0));
- side.appendVertex(QVector3D(3.6, 6.0, 0.0)); // (v1 - v0).length() = 7.0
- side.appendVertex(QVector3D(0.6, 10.0, 0.0)); // (v2 - v1).length() = 5.0
- side.appendVertex(QVector3D(3.24, 13.0, 0.0)); // (v3 - v2).length() = 4.0
-
- // generate x (Qt::Vertical) texture coordinates
- side.generateTextureCoordinates(Qt::Vertical); // spread over 7 + 5 + 4 = 16
-
- QVERIFY(qFskCompare(side.texCoordAt(0), QVector2D()));
- QVERIFY(qFskCompare(side.texCoordAt(1), QVector2D(0.0, 0.43750349)));
- QVERIFY(qFskCompare(side.texCoordAt(2), QVector2D(0.0, 0.75013363)));
- QVERIFY(qFskCompare(side.texCoordAt(3), QVector2D(0.0, 1.0)));
-}
-
-void tst_QGeometryData::clear()
-{
- QVector3D a(1.1, 1.2, 1.3);
- QVector3D b(2.1, 2.2, 2.3);
- QVector3D c(3.1, 3.2, 3.3);
- QVector3D d(4.1, 4.2, 4.3);
- QVector3D an(5.1, 5.2, 5.3);
- QVector3D bn(6.1, 6.2, 6.3);
- QVector3D cn(7.1, 7.2, 7.3);
- QVector3D dn(8.1, 8.2, 8.3);
-
- QGeometryData data;
- data.appendVertex(a, b, c, d);
- data.appendNormal(an, bn, cn, dn);
-
- quint32 f = data.fields();
- quint32 expectedFields = QGL::fieldMask(QGL::Normal) | QGL::fieldMask(QGL::Position);
- QCOMPARE(f, expectedFields);
- QCOMPARE(data.count(), 4);
- QCOMPARE(data.count(QGL::Normal), 4);
- QCOMPARE(data.count(QGL::Position), 4);
-
- data.clear();
- QCOMPARE(f, expectedFields);
- QCOMPARE(data.count(), 0);
- QCOMPARE(data.count(QGL::Normal), 0);
- QCOMPARE(data.count(QGL::Position), 0);
-
- data.appendVertex(a, b, c, d);
- data.appendNormal(an, bn, cn, dn);
-
- data.clear(QGL::Normal);
-
- f = data.fields();
- expectedFields = QGL::fieldMask(QGL::Position);
- QCOMPARE(f, expectedFields);
- QCOMPARE(data.count(), 4);
- QCOMPARE(data.count(QGL::Normal), 0);
- QCOMPARE(data.count(QGL::Position), 4);
-}
-
-void tst_QGeometryData::draw()
-{
- QVector3D a(1.1, 1.2, 1.3);
- QVector3D b(2.1, 2.2, 2.3);
- QVector3D c(3.1, 3.2, 3.3);
- QVector3D d(4.1, 4.2, 4.3);
- QVector3D an(5.1, 5.2, 5.3);
- QVector3D bn(6.1, 6.2, 6.3);
- QVector3D cn(7.1, 7.2, 7.3);
- QVector3D dn(8.1, 8.2, 8.3);
-
- QGeometryData data;
- data.appendVertex(a, b, c, d);
- data.appendNormal(an, bn, cn, dn);
-
- QGLWidget w;
- QGLPainter p(&w);
- data.draw(&p, 0, 4);
-}
-
-
-QTEST_MAIN(tst_QGeometryData)
-
-#include "tst_qgeometrydata.moc"
diff --git a/tests/auto/threed/qglabstractsurface/qglabstractsurface.pro b/tests/auto/threed/qglabstractsurface/qglabstractsurface.pro
deleted file mode 100644
index 8cd363ea..00000000
--- a/tests/auto/threed/qglabstractsurface/qglabstractsurface.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qglabstractsurface.cpp
diff --git a/tests/auto/threed/qglabstractsurface/tst_qglabstractsurface.cpp b/tests/auto/threed/qglabstractsurface/tst_qglabstractsurface.cpp
deleted file mode 100644
index 66a6dafc..00000000
--- a/tests/auto/threed/qglabstractsurface/tst_qglabstractsurface.cpp
+++ /dev/null
@@ -1,333 +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 <QtTest/QtTest>
-#include "qglabstractsurface.h"
-#include "qglwidgetsurface.h"
-#include "qglframebufferobjectsurface.h"
-#include "qglpixelbuffersurface.h"
-#include "qglsubsurface.h"
-#include "qopenglfunctions.h"
-
-class tst_QGLAbstractSurface : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLAbstractSurface() {}
- ~tst_QGLAbstractSurface() {}
-
-private slots:
- void glWidgetSurface();
- void fboSurface();
- void pbufferSurface();
- void subSurface();
-
-private:
- bool isFboCurrent(QGLFramebufferObject *fbo);
-};
-
-bool tst_QGLAbstractSurface::isFboCurrent(QGLFramebufferObject *fbo)
-{
- GLint currentFbo = -1;
- glGetIntegerv(GL_FRAMEBUFFER_BINDING, &currentFbo);
- if (currentFbo == -1)
- return true; // XXX: Mesa 7.0.3 bug?
- if (fbo)
- return fbo->handle() == GLuint(currentFbo);
- else
- return currentFbo == 0;
-}
-
-void tst_QGLAbstractSurface::glWidgetSurface()
-{
- QGLWidget glw;
- if (!glw.isValid())
- QSKIP("GL Implementation not valid", SkipSingle);
-
-
- QGLWidgetSurface surface1;
- QVERIFY(surface1.surfaceType() == QGLAbstractSurface::Widget);
- QVERIFY(surface1.widget() == 0);
- surface1.setWidget(&glw);
- QVERIFY(surface1.widget() == &glw);
- QVERIFY(surface1.device() == &glw);
- QCOMPARE(surface1.viewportRect(), glw.rect());
-
- QVERIFY(surface1.activate());
- QVERIFY(QGLContext::currentContext() == glw.context());
- QCOMPARE(surface1.viewportGL(), QRect(0, 0, glw.width(), glw.height()));
-
- surface1.deactivate();
- QVERIFY(QGLContext::currentContext() == glw.context()); // Left current.
-
- QGLWidget glw2;
-
- QGLWidgetSurface surface2(&glw2);
- QVERIFY(surface2.surfaceType() == QGLAbstractSurface::Widget);
- QVERIFY(surface2.widget() == &glw2);
- QVERIFY(surface2.device() == &glw2);
-
- QVERIFY(surface1.activate());
- QVERIFY(surface1.switchTo(&surface2));
-
- QVERIFY(QGLContext::currentContext() == glw2.context());
-
- QVERIFY(surface2.switchTo(&surface1));
- QVERIFY(QGLContext::currentContext() == glw.context());
-}
-
-void tst_QGLAbstractSurface::fboSurface()
-{
- if (!QGLFramebufferObject::hasOpenGLFramebufferObjects())
- QSKIP("fbo's are not supported", SkipSingle);
-
- QGLWidget glw;
- if (!glw.isValid())
- QSKIP("GL Implementation not valid", SkipSingle);
-
- QGLWidgetSurface surface1(&glw);
- QVERIFY(surface1.activate());
- QCOMPARE(surface1.viewportGL(), QRect(0, 0, glw.width(), glw.height()));
-
- QGLFramebufferObject fbo1(128, 128);
- QVERIFY(fbo1.handle() != 0);
-
- QGLFramebufferObjectSurface surface2(&fbo1);
- QVERIFY(surface2.surfaceType() == QGLAbstractSurface::FramebufferObject);
- QVERIFY(surface2.framebufferObject() == &fbo1);
- QVERIFY(surface2.device() == &fbo1);
-
- QVERIFY(isFboCurrent(0));
-
- QVERIFY(surface2.activate());
- QVERIFY(QGLContext::currentContext() == glw.context());
- QVERIFY(isFboCurrent(&fbo1));
- QCOMPARE(surface2.viewportGL(), QRect(QPoint(0, 0), fbo1.size()));
-
- surface2.deactivate();
- QVERIFY(isFboCurrent(0));
- QVERIFY(QGLContext::currentContext() == glw.context());
-
- surface2.setContext(glw.context());
-
- QGLWidget glw2;
- QGLWidgetSurface surface3(&glw2);
- QVERIFY(surface3.activate());
- QVERIFY(QGLContext::currentContext() == glw2.context());
- QCOMPARE(surface3.viewportGL(), QRect(0, 0, glw2.width(), glw2.height()));
-
- QVERIFY(surface3.switchTo(&surface2));
- QVERIFY(isFboCurrent(&fbo1));
- QVERIFY(QGLContext::currentContext() == glw.context());
- QCOMPARE(surface2.viewportGL(), QRect(QPoint(0, 0), fbo1.size()));
-
- QVERIFY(surface2.switchTo(&surface3));
- QVERIFY(isFboCurrent(0));
- QVERIFY(QGLContext::currentContext() == glw2.context());
- QCOMPARE(surface3.viewportGL(), QRect(0, 0, glw2.width(), glw2.height()));
-
- surface3.deactivate();
-
- surface1.activate();
- QCOMPARE(surface1.viewportGL(), QRect(0, 0, glw.width(), glw.height()));
-
- QGLFramebufferObject fbo2(256, 256);
- QVERIFY(fbo2.handle() != 0);
-
- QGLFramebufferObjectSurface surface4;
- QVERIFY(surface4.surfaceType() == QGLAbstractSurface::FramebufferObject);
- QVERIFY(surface4.framebufferObject() == 0);
- QVERIFY(surface4.device() == 0);
- QVERIFY(!surface4.activate(0));
- QVERIFY(surface4.viewportGL().isNull());
- surface4.setFramebufferObject(&fbo2);
- QVERIFY(surface4.framebufferObject() == &fbo2);
- QVERIFY(surface4.device() == &fbo2);
- surface4.setContext(glw.context());
-
- QVERIFY(surface1.switchTo(&surface2));
- QVERIFY(QGLContext::currentContext() == glw.context());
- QVERIFY(isFboCurrent(&fbo1));
- QCOMPARE(surface2.viewportGL(), QRect(QPoint(0, 0), fbo1.size()));
-
- QVERIFY(surface2.switchTo(&surface4));
- QVERIFY(QGLContext::currentContext() == glw.context());
- QVERIFY(isFboCurrent(&fbo2));
- QCOMPARE(surface4.viewportGL(), QRect(QPoint(0, 0), fbo2.size()));
-
- QVERIFY(surface3.switchTo(&surface2));
- QVERIFY(QGLContext::currentContext() == glw.context());
- QVERIFY(isFboCurrent(&fbo1));
- QCOMPARE(surface2.viewportGL(), QRect(QPoint(0, 0), fbo1.size()));
-
- QVERIFY(surface2.switchTo(&surface1));
- QVERIFY(QGLContext::currentContext() == glw.context());
- QVERIFY(isFboCurrent(0));
- QCOMPARE(surface1.viewportGL(), QRect(0, 0, glw.width(), glw.height()));
-}
-
-void tst_QGLAbstractSurface::pbufferSurface()
-{
- if (!QGLPixelBuffer::hasOpenGLPbuffers())
- QSKIP("pbuffer's are not supported", SkipSingle);
-
- QGLWidget glw;
- if (!glw.isValid())
- QSKIP("GL Implementation not valid", SkipSingle);
-
- QGLWidgetSurface surface1(&glw);
- QVERIFY(surface1.activate());
- QCOMPARE(surface1.viewportGL(), QRect(0, 0, glw.width(), glw.height()));
-
- QGLPixelBuffer pbuffer1(128, 128);
- QVERIFY(pbuffer1.handle() != 0);
-
- QGLPixelBufferSurface surface2(&pbuffer1);
- QVERIFY(surface2.surfaceType() == QGLAbstractSurface::PixelBuffer);
- QVERIFY(surface2.pixelBuffer() == &pbuffer1);
- QVERIFY(surface2.device() == &pbuffer1);
-
- QVERIFY(surface2.activate());
- QVERIFY(QGLContext::currentContext() != glw.context());
- const QGLContext *surface2ctx = QGLContext::currentContext();
- QCOMPARE(surface2.viewportGL(), QRect(QPoint(0, 0), pbuffer1.size()));
-
- surface2.deactivate();
- QVERIFY(QGLContext::currentContext() == surface2ctx); // Left current.
-
- QGLWidget glw2;
- QGLWidgetSurface surface3(&glw2);
- QVERIFY(surface3.activate());
- QVERIFY(QGLContext::currentContext() == glw2.context());
- QCOMPARE(surface3.viewportGL(), QRect(0, 0, glw2.width(), glw2.height()));
-
- QVERIFY(surface3.switchTo(&surface2));
- QVERIFY(QGLContext::currentContext() == surface2ctx);
- QCOMPARE(surface2.viewportGL(), QRect(QPoint(0, 0), pbuffer1.size()));
-
- QVERIFY(surface2.switchTo(&surface3));
- QVERIFY(QGLContext::currentContext() == glw2.context());
- QCOMPARE(surface3.viewportGL(), QRect(0, 0, glw2.width(), glw2.height()));
-
- surface3.deactivate();
-
- surface1.activate();
- QCOMPARE(surface1.viewportGL(), QRect(0, 0, glw.width(), glw.height()));
-
- QGLPixelBuffer pbuffer2(256, 256);
- QVERIFY(pbuffer2.handle() != 0);
-
- QGLPixelBufferSurface surface4;
- QVERIFY(surface4.surfaceType() == QGLAbstractSurface::PixelBuffer);
- QVERIFY(surface4.pixelBuffer() == 0);
- QVERIFY(surface4.device() == 0);
- QVERIFY(!surface4.activate(0));
- QVERIFY(surface4.viewportGL().isNull());
- surface4.setPixelBuffer(&pbuffer2);
- QVERIFY(surface4.pixelBuffer() == &pbuffer2);
- QVERIFY(surface4.device() == &pbuffer2);
-
- QVERIFY(surface1.switchTo(&surface2));
- QVERIFY(QGLContext::currentContext() == surface2ctx);
- QCOMPARE(surface2.viewportGL(), QRect(QPoint(0, 0), pbuffer1.size()));
-
- QVERIFY(surface2.switchTo(&surface4));
- const QGLContext *surface4ctx = QGLContext::currentContext();
- QVERIFY(surface4ctx != glw.context());
- QVERIFY(surface4ctx != surface2ctx);
- QCOMPARE(surface4.viewportGL(), QRect(QPoint(0, 0), pbuffer2.size()));
-
- QVERIFY(surface4.switchTo(&surface2));
- QVERIFY(QGLContext::currentContext() == surface2ctx);
- QCOMPARE(surface2.viewportGL(), QRect(QPoint(0, 0), pbuffer1.size()));
-
- QVERIFY(surface2.switchTo(&surface1));
- QVERIFY(QGLContext::currentContext() == glw.context());
- QCOMPARE(surface1.viewportGL(), QRect(0, 0, glw.width(), glw.height()));
-}
-
-void tst_QGLAbstractSurface::subSurface()
-{
- QGLWidget glw;
- if (!glw.isValid())
- QSKIP("GL Implementation not valid", SkipSingle);
-
- QGLWidgetSurface surface1(&glw);
-
- QGLSubsurface surface2(&surface1, QRect(0, 0, 32, 16));
- QVERIFY(surface2.surfaceType() == QGLAbstractSurface::Subsurface);
- QVERIFY(surface2.surface() == &surface1);
- QVERIFY(surface2.device() == &glw);
- QCOMPARE(surface2.region(), QRect(0, 0, 32, 16));
-
- QVERIFY(surface2.activate());
- QVERIFY(QGLContext::currentContext() == glw.context());
- QCOMPARE(surface2.viewportGL(), QRect(0, glw.height() - 16, 32, 16));
-
- QGLSubsurface surface3(&surface1, QRect(16, 8, 32, 16));
- QVERIFY(surface3.surfaceType() == QGLAbstractSurface::Subsurface);
- QVERIFY(surface3.surface() == &surface1);
- QCOMPARE(surface3.region(), QRect(16, 8, 32, 16));
-
- QVERIFY(surface2.switchTo(&surface3));
- QVERIFY(QGLContext::currentContext() == glw.context());
- QCOMPARE(surface3.viewportGL(), QRect(16, glw.height() - (8 + 16), 32, 16));
-
- QGLSubsurface surface4;
- QVERIFY(surface4.surfaceType() == QGLAbstractSurface::Subsurface);
- QVERIFY(surface4.surface() == 0);
- QVERIFY(surface4.device() == 0);
- QVERIFY(surface4.region().isNull());
- QVERIFY(!surface4.activate(0));
- surface4.setRegion(QRect(4, 6, 12, 8));
- QCOMPARE(surface4.viewportGL(), QRect(4, 0, 12, 8));
- surface4.setSurface(&surface3);
- QVERIFY(surface4.surface() == &surface3);
- QCOMPARE(surface4.region(), QRect(4, 6, 12, 8));
-
- QVERIFY(surface2.switchTo(&surface4));
- QVERIFY(QGLContext::currentContext() == glw.context());
- QCOMPARE(surface4.viewportGL(), QRect(16 + 4, glw.height() - (6 + 8 + 8), 12, 8));
-}
-
-QTEST_MAIN(tst_QGLAbstractSurface)
-
-#include "tst_qglabstractsurface.moc"
diff --git a/tests/auto/threed/qglattributedescription/qglattributedescription.pro b/tests/auto/threed/qglattributedescription/qglattributedescription.pro
deleted file mode 100644
index 92cb86f3..00000000
--- a/tests/auto/threed/qglattributedescription/qglattributedescription.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-INCLUDEPATH += ../../../../threed/viewing
-VPATH += ../../../../threed/viewing
-
-SOURCES += tst_qglattributedescription.cpp
diff --git a/tests/auto/threed/qglattributedescription/tst_qglattributedescription.cpp b/tests/auto/threed/qglattributedescription/tst_qglattributedescription.cpp
deleted file mode 100644
index b8c92e26..00000000
--- a/tests/auto/threed/qglattributedescription/tst_qglattributedescription.cpp
+++ /dev/null
@@ -1,137 +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 <QtTest/QtTest>
-#include "qglattributedescription.h"
-#include "qopenglfunctions.h"
-
-class tst_QGLAttributeDescription : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLAttributeDescription() {}
- ~tst_QGLAttributeDescription() {}
-
-private slots:
- void defaultValue();
- void explicitValue();
- void modifyValue();
- void typeSizes();
-};
-
-void tst_QGLAttributeDescription::defaultValue()
-{
- QGLAttributeDescription desc;
- QVERIFY(desc.isNull());
- QVERIFY(desc.attribute() == QGL::Position);
- QVERIFY(desc.type() == GL_FLOAT);
- QCOMPARE(desc.sizeOfType(), int(sizeof(GLfloat)));
- QCOMPARE(desc.tupleSize(), 0);
- QCOMPARE(desc.stride(), 0);
-}
-
-void tst_QGLAttributeDescription::explicitValue()
-{
- QGLAttributeDescription desc(QGL::Color, 4, GL_UNSIGNED_BYTE, 20);
- QVERIFY(!desc.isNull());
- QVERIFY(desc.attribute() == QGL::Color);
- QVERIFY(desc.type() == GL_UNSIGNED_BYTE);
- QCOMPARE(desc.sizeOfType(), int(sizeof(GLubyte)));
- QCOMPARE(desc.tupleSize(), 4);
- QCOMPARE(desc.stride(), 20);
-}
-
-void tst_QGLAttributeDescription::modifyValue()
-{
- QGLAttributeDescription desc;
- desc.setAttribute(QGL::Color);
- desc.setType(GL_UNSIGNED_BYTE);
- desc.setTupleSize(4);
- desc.setStride(20);
- QVERIFY(!desc.isNull());
- QVERIFY(desc.attribute() == QGL::Color);
- QVERIFY(desc.type() == GL_UNSIGNED_BYTE);
- QCOMPARE(desc.sizeOfType(), int(sizeof(GLubyte)));
- QCOMPARE(desc.tupleSize(), 4);
- QCOMPARE(desc.stride(), 20);
-}
-
-void tst_QGLAttributeDescription::typeSizes()
-{
- QGLAttributeDescription desc;
-
- desc.setType(GL_BYTE);
- QCOMPARE(desc.sizeOfType(), int(sizeof(GLbyte)));
-
- desc.setType(GL_UNSIGNED_BYTE);
- QCOMPARE(desc.sizeOfType(), int(sizeof(GLubyte)));
-
- desc.setType(GL_SHORT);
- QCOMPARE(desc.sizeOfType(), int(sizeof(GLshort)));
-
- desc.setType(GL_UNSIGNED_SHORT);
- QCOMPARE(desc.sizeOfType(), int(sizeof(GLushort)));
-
- desc.setType(GL_INT);
- QCOMPARE(desc.sizeOfType(), int(sizeof(GLint)));
-
- desc.setType(GL_UNSIGNED_INT);
- QCOMPARE(desc.sizeOfType(), int(sizeof(GLuint)));
-
- desc.setType(GL_FLOAT);
- QCOMPARE(desc.sizeOfType(), int(sizeof(GLfloat)));
-
-#if defined(GL_DOUBLE) && !defined(QT_OPENGL_ES)
- desc.setType(GL_DOUBLE);
- QCOMPARE(desc.sizeOfType(), int(sizeof(GLdouble)));
-#endif
-
- desc.setType(GL_TEXTURE0); // Something that isn't a GL type.
- QCOMPARE(desc.sizeOfType(), 0);
-
- QVERIFY(desc.isNull());
- desc.setTupleSize(3);
- QVERIFY(!desc.isNull());
-}
-
-QTEST_APPLESS_MAIN(tst_QGLAttributeDescription)
-
-#include "tst_qglattributedescription.moc"
diff --git a/tests/auto/threed/qglattributeset/qglattributeset.pro b/tests/auto/threed/qglattributeset/qglattributeset.pro
deleted file mode 100644
index 64b4619c..00000000
--- a/tests/auto/threed/qglattributeset/qglattributeset.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qglattributeset.cpp
diff --git a/tests/auto/threed/qglattributeset/tst_qglattributeset.cpp b/tests/auto/threed/qglattributeset/tst_qglattributeset.cpp
deleted file mode 100644
index 77cfb1fc..00000000
--- a/tests/auto/threed/qglattributeset/tst_qglattributeset.cpp
+++ /dev/null
@@ -1,211 +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 <QtTest/QtTest>
-#include "qglattributeset.h"
-
-class tst_QGLAttributeSet : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLAttributeSet() {}
- ~tst_QGLAttributeSet() {}
-
-private slots:
- void defaultValue();
- void clear();
- void insert();
- void remove();
- void list();
- void compare();
- void unite();
- void intersect();
- void subtract();
-};
-
-void tst_QGLAttributeSet::defaultValue()
-{
- QGLAttributeSet set;
- QVERIFY(set.isEmpty());
- for (int index = -50; index <= 50; ++index)
- QVERIFY(!set.contains(QGL::VertexAttribute(index)));
-}
-
-void tst_QGLAttributeSet::clear()
-{
- QGLAttributeSet set;
- set.insert(QGL::TextureCoord0);
- QVERIFY(!set.isEmpty());
- QVERIFY(set.contains(QGL::TextureCoord0));
- set.clear();
- QVERIFY(set.isEmpty());
- QVERIFY(!set.contains(QGL::TextureCoord0));
-}
-
-void tst_QGLAttributeSet::insert()
-{
- for (int index = -50; index <= 50; ++index) {
- QGLAttributeSet set;
- set.insert(QGL::VertexAttribute(index));
- if (index < 0 || index > 31)
- QVERIFY(!set.contains(QGL::VertexAttribute(index)));
- else
- QVERIFY(set.contains(QGL::VertexAttribute(index)));
- for (int index2 = -50; index2 <= 50; ++index2) {
- if (index2 != index)
- QVERIFY(!set.contains(QGL::VertexAttribute(index2)));
- }
- }
-}
-
-void tst_QGLAttributeSet::remove()
-{
- for (int index = -50; index <= 50; ++index) {
- QGLAttributeSet set;
- for (int index2 = 0; index2 < 32; ++index2)
- set.insert(QGL::VertexAttribute(index2));
- set.remove(QGL::VertexAttribute(index));
- for (int index2 = 0; index2 < 32; ++index2) {
- if (index == index2)
- QVERIFY(!set.contains(QGL::VertexAttribute(index2)));
- else
- QVERIFY(set.contains(QGL::VertexAttribute(index2)));
- }
- }
-}
-
-void tst_QGLAttributeSet::list()
-{
- QList<QGL::VertexAttribute> list;
- QVERIFY(QGLAttributeSet::fromList(list).isEmpty());
-
- list.append(QGL::VertexAttribute(-50));
- list.append(QGL::TextureCoord1);
- list.append(QGL::VertexAttribute(50));
-
- QGLAttributeSet set1 = QGLAttributeSet::fromList(list);
- QGLAttributeSet set2;
- set2.insert(QGL::TextureCoord1);
- QVERIFY(set1 == set2);
-
- QList<QGL::VertexAttribute> list2 = set1.toList();
- QCOMPARE(list2.count(), 1);
- QVERIFY(list2[0] == QGL::TextureCoord1);
-}
-
-void tst_QGLAttributeSet::compare()
-{
- QGLAttributeSet set1;
- QGLAttributeSet set2;
-
- QVERIFY(set1 == set2);
- QVERIFY(!(set1 != set2));
-
- set1.insert(QGL::Position);
- QVERIFY(set1 != set2);
- QVERIFY(!(set1 == set2));
-
- set2.insert(QGL::Position);
- QVERIFY(set1 == set2);
- QVERIFY(!(set1 != set2));
-
- set2.insert(QGL::TextureCoord0);
- QVERIFY(set1 != set2);
- QVERIFY(!(set1 == set2));
-}
-
-void tst_QGLAttributeSet::unite()
-{
- QGLAttributeSet set1;
- QGLAttributeSet set2;
-
- set1.insert(QGL::Position);
- set1.insert(QGL::Color);
-
- set2.insert(QGL::Position);
- set2.insert(QGL::TextureCoord0);
-
- set1.unite(set2);
- QVERIFY(set1.contains(QGL::Position));
- QVERIFY(set1.contains(QGL::Color));
- QVERIFY(set1.contains(QGL::TextureCoord0));
- QVERIFY(!set1.contains(QGL::Normal));
-}
-
-void tst_QGLAttributeSet::intersect()
-{
- QGLAttributeSet set1;
- QGLAttributeSet set2;
-
- set1.insert(QGL::Position);
- set1.insert(QGL::Color);
-
- set2.insert(QGL::Position);
- set2.insert(QGL::TextureCoord0);
-
- set1.intersect(set2);
- QVERIFY(set1.contains(QGL::Position));
- QVERIFY(!set1.contains(QGL::Color));
- QVERIFY(!set1.contains(QGL::TextureCoord0));
- QVERIFY(!set1.contains(QGL::Normal));
-}
-
-void tst_QGLAttributeSet::subtract()
-{
- QGLAttributeSet set1;
- QGLAttributeSet set2;
-
- set1.insert(QGL::Position);
- set1.insert(QGL::Color);
-
- set2.insert(QGL::Position);
- set2.insert(QGL::TextureCoord0);
-
- set1.subtract(set2);
- QVERIFY(!set1.contains(QGL::Position));
- QVERIFY(set1.contains(QGL::Color));
- QVERIFY(!set1.contains(QGL::TextureCoord0));
- QVERIFY(!set1.contains(QGL::Normal));
-}
-
-QTEST_APPLESS_MAIN(tst_QGLAttributeSet)
-
-#include "tst_qglattributeset.moc"
diff --git a/tests/auto/threed/qglattributevalue/qglattributevalue.pro b/tests/auto/threed/qglattributevalue/qglattributevalue.pro
deleted file mode 100644
index d8e98255..00000000
--- a/tests/auto/threed/qglattributevalue/qglattributevalue.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-INCLUDEPATH += ../../../../threed/viewing
-VPATH += ../../../../threed/viewing
-
-SOURCES += tst_qglattributevalue.cpp
diff --git a/tests/auto/threed/qglattributevalue/tst_qglattributevalue.cpp b/tests/auto/threed/qglattributevalue/tst_qglattributevalue.cpp
deleted file mode 100644
index 69988b48..00000000
--- a/tests/auto/threed/qglattributevalue/tst_qglattributevalue.cpp
+++ /dev/null
@@ -1,262 +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 <QtTest/QtTest>
-#include "qglattributevalue.h"
-#include "qopenglfunctions.h"
-
-class tst_QGLAttributeValue : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLAttributeValue() {}
- ~tst_QGLAttributeValue() {}
-
-private slots:
- void defaultValue();
- void explicitValue();
- void fromArray();
- void typeSizes_data();
- void typeSizes();
-};
-
-void tst_QGLAttributeValue::defaultValue()
-{
- QGLAttributeValue value;
- QVERIFY(value.isNull());
- QVERIFY(value.description(QGL::Normal).isNull());
- QVERIFY(value.description(QGL::Normal).attribute() == QGL::Normal);
- QVERIFY(value.type() == GL_FLOAT);
- QCOMPARE(value.sizeOfType(), int(sizeof(GLfloat)));
- QCOMPARE(value.tupleSize(), 0);
- QCOMPARE(value.stride(), 0);
- QVERIFY(value.data() == 0);
- QCOMPARE(value.count(), 0);
-}
-
-void tst_QGLAttributeValue::explicitValue()
-{
- unsigned char data[4] = {1, 2, 3, 4};
- QGLAttributeValue value(4, GL_UNSIGNED_BYTE, 20, data, 1);
- QVERIFY(!value.isNull());
- QVERIFY(value.type() == GL_UNSIGNED_BYTE);
- QCOMPARE(value.sizeOfType(), int(sizeof(GLubyte)));
- QCOMPARE(value.tupleSize(), 4);
- QCOMPARE(value.stride(), 20);
- QVERIFY(value.data() == data);
- QCOMPARE(value.count(), 1);
- QVERIFY(!value.description(QGL::Color).isNull());
- QVERIFY(value.description(QGL::Color).attribute() == QGL::Color);
-
- QGLAttributeValue value2(4, GL_UNSIGNED_BYTE, 20, 23, 1);
- QVERIFY(!value2.isNull());
- QVERIFY(value2.type() == GL_UNSIGNED_BYTE);
- QCOMPARE(value2.sizeOfType(), int(sizeof(GLubyte)));
- QCOMPARE(value2.tupleSize(), 4);
- QCOMPARE(value2.stride(), 20);
- QVERIFY(value2.data() == reinterpret_cast<const void *>(23));
- QCOMPARE(value2.count(), 1);
-
- QGLAttributeDescription desc(QGL::Color, 4, GL_UNSIGNED_BYTE, 20);
- QGLAttributeValue value3(desc, data, 1);
- QVERIFY(!value3.isNull());
- QVERIFY(value3.type() == GL_UNSIGNED_BYTE);
- QCOMPARE(value3.sizeOfType(), int(sizeof(GLubyte)));
- QCOMPARE(value3.tupleSize(), 4);
- QCOMPARE(value3.stride(), 20);
- QVERIFY(value3.data() == data);
- QCOMPARE(value3.count(), 1);
-
- QGLAttributeValue value4(desc, 23, 1);
- QVERIFY(!value4.isNull());
- QVERIFY(value4.type() == GL_UNSIGNED_BYTE);
- QCOMPARE(value4.sizeOfType(), int(sizeof(GLubyte)));
- QCOMPARE(value4.tupleSize(), 4);
- QCOMPARE(value4.stride(), 20);
- QVERIFY(value4.data() == reinterpret_cast<const void *>(23));
- QCOMPARE(value4.count(), 1);
-}
-
-void tst_QGLAttributeValue::fromArray()
-{
- QArray<float> floatArray;
- floatArray += 1.0f;
- floatArray += 2.0f;
- floatArray += 3.0f;
- floatArray += 4.0f;
- QGLAttributeValue valueFloat(floatArray);
- QVERIFY(!valueFloat.isNull());
- QVERIFY(valueFloat.type() == GL_FLOAT);
- QCOMPARE(valueFloat.sizeOfType(), int(sizeof(GLfloat)));
- QCOMPARE(valueFloat.tupleSize(), 1);
- QCOMPARE(valueFloat.stride(), 0);
- QVERIFY(valueFloat.data() == floatArray.constData());
- QCOMPARE(valueFloat.count(), floatArray.count());
-
- QCustomDataArray floatCustomArray(floatArray);
- QGLAttributeValue valueFloatCustom(floatCustomArray);
- QVERIFY(!valueFloatCustom.isNull());
- QVERIFY(valueFloatCustom.type() == GL_FLOAT);
- QCOMPARE(valueFloatCustom.sizeOfType(), int(sizeof(GLfloat)));
- QCOMPARE(valueFloatCustom.tupleSize(), 1);
- QCOMPARE(valueFloatCustom.stride(), 0);
- QVERIFY(valueFloatCustom.data() == floatCustomArray.data());
- QCOMPARE(valueFloatCustom.count(), floatCustomArray.count());
-
- QArray<QVector2D> vec2Array;
- vec2Array += QVector2D(1.0f, 2.0f);
- vec2Array += QVector2D(2.0f, 3.0f);
- QGLAttributeValue valueVec2(vec2Array);
- QVERIFY(!valueVec2.isNull());
- QVERIFY(valueVec2.type() == GL_FLOAT);
- QCOMPARE(valueVec2.sizeOfType(), int(sizeof(GLfloat)));
- QCOMPARE(valueVec2.tupleSize(), 2);
- QCOMPARE(valueVec2.stride(), 0);
- QVERIFY(valueVec2.data() == vec2Array.constData());
- QCOMPARE(valueVec2.count(), vec2Array.count());
-
- QCustomDataArray vec2CustomArray(vec2Array);
- QGLAttributeValue valueVec2Custom(vec2CustomArray);
- QVERIFY(!valueVec2Custom.isNull());
- QVERIFY(valueVec2Custom.type() == GL_FLOAT);
- QCOMPARE(valueVec2Custom.sizeOfType(), int(sizeof(GLfloat)));
- QCOMPARE(valueVec2Custom.tupleSize(), 2);
- QCOMPARE(valueVec2Custom.stride(), 0);
- QVERIFY(valueVec2Custom.data() == vec2CustomArray.data());
- QCOMPARE(valueVec2Custom.count(), vec2CustomArray.count());
-
- QArray<QVector3D> vec3Array;
- vec3Array += QVector3D(1.0f, 2.0f, 3.0f);
- vec3Array += QVector3D(2.0f, 3.0f, 4.0f);
- QGLAttributeValue valueVec3(vec3Array);
- QVERIFY(!valueVec3.isNull());
- QVERIFY(valueVec3.type() == GL_FLOAT);
- QCOMPARE(valueVec3.sizeOfType(), int(sizeof(GLfloat)));
- QCOMPARE(valueVec3.tupleSize(), 3);
- QCOMPARE(valueVec3.stride(), 0);
- QVERIFY(valueVec3.data() == vec3Array.constData());
- QCOMPARE(valueVec3.count(), vec3Array.count());
-
- QCustomDataArray vec3CustomArray(vec3Array);
- QGLAttributeValue valueVec3Custom(vec3CustomArray);
- QVERIFY(!valueVec3Custom.isNull());
- QVERIFY(valueVec3Custom.type() == GL_FLOAT);
- QCOMPARE(valueVec3Custom.sizeOfType(), int(sizeof(GLfloat)));
- QCOMPARE(valueVec3Custom.tupleSize(), 3);
- QCOMPARE(valueVec3Custom.stride(), 0);
- QVERIFY(valueVec3Custom.data() == vec3CustomArray.data());
- QCOMPARE(valueVec3Custom.count(), vec3CustomArray.count());
-
- QArray<QVector4D> vec4Array;
- vec4Array += QVector4D(1.0f, 2.0f, 3.0f, 4.0f);
- vec4Array += QVector4D(2.0f, 3.0f, 4.0f, 5.0f);
- QGLAttributeValue valueVec4(vec4Array);
- QVERIFY(!valueVec4.isNull());
- QVERIFY(valueVec4.type() == GL_FLOAT);
- QCOMPARE(valueVec4.sizeOfType(), int(sizeof(GLfloat)));
- QCOMPARE(valueVec4.tupleSize(), 4);
- QCOMPARE(valueVec4.stride(), 0);
- QVERIFY(valueVec4.data() == vec4Array.constData());
- QCOMPARE(valueVec4.count(), vec4Array.count());
-
- QCustomDataArray vec4CustomArray(vec4Array);
- QGLAttributeValue valueVec4Custom(vec4CustomArray);
- QVERIFY(!valueVec4Custom.isNull());
- QVERIFY(valueVec4Custom.type() == GL_FLOAT);
- QCOMPARE(valueVec4Custom.sizeOfType(), int(sizeof(GLfloat)));
- QCOMPARE(valueVec4Custom.tupleSize(), 4);
- QCOMPARE(valueVec4Custom.stride(), 0);
- QVERIFY(valueVec4Custom.data() == vec4CustomArray.data());
- QCOMPARE(valueVec4Custom.count(), vec4CustomArray.count());
-
- QArray<QColor4ub> colorArray;
- colorArray += QColor4ub(1, 2, 3, 4);
- colorArray += QColor4ub(2, 3, 4, 5);
- QGLAttributeValue valueColor(colorArray);
- QVERIFY(!valueColor.isNull());
- QVERIFY(valueColor.type() == GL_UNSIGNED_BYTE);
- QCOMPARE(valueColor.sizeOfType(), int(sizeof(GLubyte)));
- QCOMPARE(valueColor.tupleSize(), 4);
- QCOMPARE(valueColor.stride(), 0);
- QVERIFY(valueColor.data() == colorArray.constData());
- QCOMPARE(valueColor.count(), colorArray.count());
-
- QCustomDataArray colorCustomArray(colorArray);
- QGLAttributeValue valueColorCustom(colorCustomArray);
- QVERIFY(!valueColorCustom.isNull());
- QVERIFY(valueColorCustom.type() == GL_UNSIGNED_BYTE);
- QCOMPARE(valueColorCustom.sizeOfType(), int(sizeof(GLubyte)));
- QCOMPARE(valueColorCustom.tupleSize(), 4);
- QCOMPARE(valueColorCustom.stride(), 0);
- QVERIFY(valueColorCustom.data() == colorCustomArray.data());
- QCOMPARE(valueColorCustom.count(), colorCustomArray.count());
-}
-
-void tst_QGLAttributeValue::typeSizes_data()
-{
- QTest::addColumn<int>("type");
- QTest::addColumn<int>("size");
-
- QTest::newRow("byte") << int(GL_BYTE) << int(sizeof(GLbyte));
- QTest::newRow("ubyte") << int(GL_UNSIGNED_BYTE) << int(sizeof(GLubyte));
- QTest::newRow("short") << int(GL_SHORT) << int(sizeof(GLshort));
- QTest::newRow("ushort") << int(GL_UNSIGNED_SHORT) << int(sizeof(GLushort));
- QTest::newRow("int") << int(GL_INT) << int(sizeof(GLint));
- QTest::newRow("uint") << int(GL_UNSIGNED_INT) << int(sizeof(GLuint));
- QTest::newRow("float") << int(GL_FLOAT) << int(sizeof(GLfloat));
-#if defined(GL_DOUBLE) && !defined(QT_OPENGL_ES)
- QTest::newRow("double") << int(GL_DOUBLE) << int(sizeof(GLdouble));
-#endif
- QTest::newRow("non-type") << int(GL_TEXTURE0) << int(0);
-}
-
-void tst_QGLAttributeValue::typeSizes()
-{
- QFETCH(int, type);
- QFETCH(int, size);
-
- QGLAttributeValue value(4, GLenum(type), 0, 0);
- QCOMPARE(value.sizeOfType(), size);
-}
-
-QTEST_APPLESS_MAIN(tst_QGLAttributeValue)
-
-#include "tst_qglattributevalue.moc"
diff --git a/tests/auto/threed/qglbezierpatches/qglbezierpatches.pro b/tests/auto/threed/qglbezierpatches/qglbezierpatches.pro
deleted file mode 100644
index d85b77d0..00000000
--- a/tests/auto/threed/qglbezierpatches/qglbezierpatches.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qglbezierpatches.cpp
diff --git a/tests/auto/threed/qglbezierpatches/tst_qglbezierpatches.cpp b/tests/auto/threed/qglbezierpatches/tst_qglbezierpatches.cpp
deleted file mode 100644
index 089afc84..00000000
--- a/tests/auto/threed/qglbezierpatches/tst_qglbezierpatches.cpp
+++ /dev/null
@@ -1,214 +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 <QtTest/QtTest>
-#include "qglbezierpatches.h"
-#include "qglbuilder.h"
-#include "qglteapot.h"
-
-class tst_QGLBezierPatches : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLBezierPatches() {}
- ~tst_QGLBezierPatches() {}
-
-private slots:
- void defaultValue();
- void modify();
- void teapot();
- void build();
- void transform();
-};
-
-void tst_QGLBezierPatches::defaultValue()
-{
- QGLBezierPatches patches;
- QVERIFY(patches.positions().isEmpty());
- QVERIFY(patches.textureCoords().isEmpty());
- QCOMPARE(patches.subdivisionDepth(), 4);
-}
-
-void tst_QGLBezierPatches::modify()
-{
- QVector3DArray positions;
- for (int index = 0; index < 32; ++index)
- positions.append(index, index + 1, index + 2);
-
- QVector2DArray texCoords;
- texCoords.append(0.0f, 0.5f);
- texCoords.append(0.5f, 1.0f);
- texCoords.append(0.5f, 0.0f);
- texCoords.append(1.0f, 0.5f);
-
- QGLBezierPatches patches;
- patches.setPositions(positions);
- patches.setTextureCoords(texCoords);
- patches.setSubdivisionDepth(23);
-
- QCOMPARE(patches.positions().size(), positions.size());
- QVERIFY(patches.positions() == positions);
- QCOMPARE(patches.textureCoords().size(), texCoords.size());
- QVERIFY(patches.textureCoords() == texCoords);
- QCOMPARE(patches.subdivisionDepth(), 23);
-
- QGLBezierPatches patches2(patches);
- QCOMPARE(patches2.positions().size(), positions.size());
- QVERIFY(patches2.positions() == positions);
- QCOMPARE(patches2.textureCoords().size(), texCoords.size());
- QVERIFY(patches2.textureCoords() == texCoords);
- QCOMPARE(patches2.subdivisionDepth(), 23);
-
- patches2.setPositions(QVector3DArray());
- patches2.setTextureCoords(QVector2DArray());
- patches2.setSubdivisionDepth(18);
-
- QCOMPARE(patches.positions().size(), positions.size());
- QVERIFY(patches.positions() == positions);
- QCOMPARE(patches.textureCoords().size(), texCoords.size());
- QVERIFY(patches.textureCoords() == texCoords);
- QCOMPARE(patches.subdivisionDepth(), 23);
-
- QVERIFY(patches2.positions().isEmpty());
- QVERIFY(patches2.textureCoords().isEmpty());
- QCOMPARE(patches2.subdivisionDepth(), 18);
-
- QGLBezierPatches patches3;
- patches3 = patches;
-
- QCOMPARE(patches3.positions().size(), positions.size());
- QVERIFY(patches3.positions() == positions);
- QCOMPARE(patches3.textureCoords().size(), texCoords.size());
- QVERIFY(patches3.textureCoords() == texCoords);
- QCOMPARE(patches3.subdivisionDepth(), 23);
-
- patches3.setPositions(QVector3DArray());
- patches3.setTextureCoords(QVector2DArray());
- patches3.setSubdivisionDepth(18);
-
- QCOMPARE(patches.positions().size(), positions.size());
- QVERIFY(patches.positions() == positions);
- QCOMPARE(patches.textureCoords().size(), texCoords.size());
- QVERIFY(patches.textureCoords() == texCoords);
- QCOMPARE(patches.subdivisionDepth(), 23);
-
- QVERIFY(patches3.positions().isEmpty());
- QVERIFY(patches3.textureCoords().isEmpty());
- QCOMPARE(patches3.subdivisionDepth(), 18);
-
- patches = QGLBezierPatches();
- QVERIFY(patches.positions().isEmpty());
- QVERIFY(patches.textureCoords().isEmpty());
- QCOMPARE(patches.subdivisionDepth(), 4);
-}
-
-void tst_QGLBezierPatches::teapot()
-{
- // Verify that patch data is added by QGLTeapot's constructor,
- // but not what that patch data is.
- QGLTeapot teapot;
- QCOMPARE(teapot.positions().size(), 32 * 16);
- QCOMPARE(teapot.textureCoords().size(), 0);
- QCOMPARE(teapot.subdivisionDepth(), 4);
-}
-
-void tst_QGLBezierPatches::build()
-{
- // Call the build routines with different options. It isn't really
- // easy to determine if the correct triangles were generated. Leave
- // that up to visual acceptance tests.
-
- QGLBuilder builder;
-
- QGLTeapot teapot1;
- builder << teapot1;
-
- QGLTeapot teapot2;
- QVector2DArray texCoords;
- for (int index = 0; index < 32; ++index) {
- texCoords.append(0.0f, 0.5f);
- texCoords.append(0.5f, 1.0f);
- }
- teapot2.setTextureCoords(texCoords);
- builder << teapot2;
-
- delete builder.finalizedSceneNode();
-}
-
-void tst_QGLBezierPatches::transform()
-{
- QVector3DArray positions;
- for (int index = 0; index < 32; ++index)
- positions.append(index, index + 1, index + 2);
-
- QMatrix4x4 m;
- m.translate(-1.0f, 2.5f, 5.0f);
- m.rotate(45.0f, 1.0f, 1.0f, 1.0f);
- m.scale(23.5f);
-
- QVector3DArray positions2 = positions.transformed(m);
-
- QVector2DArray texCoords;
- texCoords.append(0.0f, 0.5f);
- texCoords.append(0.5f, 1.0f);
- texCoords.append(0.5f, 0.0f);
- texCoords.append(1.0f, 0.5f);
-
- QGLBezierPatches patches;
- patches.setPositions(positions);
- patches.setTextureCoords(texCoords);
- patches.setSubdivisionDepth(18);
-
- QGLBezierPatches patches2(patches);
- patches2.transform(m);
- QVERIFY(patches2.positions() == positions2);
- QVERIFY(patches2.textureCoords() == texCoords);
- QCOMPARE(patches2.subdivisionDepth(), 18);
-
- QGLBezierPatches patches3 = patches.transformed(m);
- QVERIFY(patches3.positions() == positions2);
- QVERIFY(patches3.textureCoords() == texCoords);
- QCOMPARE(patches3.subdivisionDepth(), 18);
-}
-
-QTEST_APPLESS_MAIN(tst_QGLBezierPatches)
-
-#include "tst_qglbezierpatches.moc"
diff --git a/tests/auto/threed/qglbuilder/qglbuilder.pro b/tests/auto/threed/qglbuilder/qglbuilder.pro
deleted file mode 100644
index 0853f935..00000000
--- a/tests/auto/threed/qglbuilder/qglbuilder.pro
+++ /dev/null
@@ -1,8 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-INCLUDEPATH += ../../../shared
-SOURCES += tst_qglbuilder.cpp
-INCLUDEPATH += ../../../../src/threed/geometry
diff --git a/tests/auto/threed/qglbuilder/tst_qglbuilder.cpp b/tests/auto/threed/qglbuilder/tst_qglbuilder.cpp
deleted file mode 100644
index dc8e4a45..00000000
--- a/tests/auto/threed/qglbuilder/tst_qglbuilder.cpp
+++ /dev/null
@@ -1,888 +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 <QtTest/QtTest>
-#include <QtCore/qpointer.h>
-#include "qglbuilder.h"
-#include "qvector2darray.h"
-#include "qvector3darray.h"
-#include "qglsection_p.h"
-#include "qglmaterialcollection.h"
-#include "qglscenenode.h"
-#include "qglabstracteffect.h"
-#include "qtest_helpers.h"
-#include "qgeometrydata.h"
-
-class tst_QGLBuilder : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLBuilder() {}
- ~tst_QGLBuilder() {}
-
-private slots:
- void createDefault();
- void newSection();
- void newNode();
- void pushNode();
- void popNode();
- void geometryBuild();
- void addTriangles();
- void addQuads();
- void addTriangleFan();
- void addTriangulatedFace();
- void extrude();
- void finalize();
-};
-
-// Indices in a QGL::IndexArray are int on desktop, ushort on OpenGL/ES.
-// This macro works around the discrepancy to avoid confusing QCOMPARE.
-#define QCOMPARE_INDEX(x,y) QCOMPARE(int(x), int(y))
-
-class TestBuilder : public QGLBuilder
-{
-public:
- QGLSection *currentSection() { return QGLBuilder::currentSection(); }
- QList<QGLSection*> sections() { return QGLBuilder::sections(); }
-};
-
-void tst_QGLBuilder::createDefault()
-{
- // Test that a newly created builder works with no defaults
- TestBuilder builder;
- QCOMPARE(builder.currentSection(), (QGLSection*)0);
- QCOMPARE(builder.sections().size(), 0);
- QVERIFY(builder.currentNode() != 0);
- QVERIFY(builder.sceneNode() != 0);
- QVERIFY(builder.sceneNode()->geometry().isEmpty());
- QVERIFY(builder.palette() != 0);
- QGLSceneNode *root = builder.sceneNode();
- QCOMPARE(builder.finalizedSceneNode(), root);
-}
-
-void tst_QGLBuilder::newSection()
-{
- TestBuilder builder;
- builder.newSection(); // defaults to smooth
- QGLSection *s = builder.currentSection();
- QCOMPARE(s, builder.currentSection());
- QCOMPARE(builder.sections().count(), 1);
- QVERIFY(builder.sections().contains(s));
- QCOMPARE(s->smoothing(), QGL::Smooth);
- builder.newSection(QGL::Faceted);
- QGLSection *s2 = builder.currentSection();
- QCOMPARE(builder.sections().count(), 2);
- QVERIFY(builder.sections().contains(s2));
- builder << QGL::Faceted;
- QCOMPARE(builder.sections().count(), 3);
- QGLSceneNode *root = builder.sceneNode();
- QCOMPARE(builder.finalizedSceneNode(), root);
-}
-
-class TestEffect : public QGLAbstractEffect
-{
- void setActive(QGLPainter *, bool)
- {
- }
- void update(QGLPainter *, QGLPainter::Updates)
- {
- }
-};
-
-void tst_QGLBuilder::newNode()
-{
- TestBuilder builder;
- builder.newSection(); // calls new node
- QGLSceneNode *node = builder.currentNode();
-
- // newly created node works and has all defaults
- QCOMPARE(node->effect(), QGL::FlatColor); // flat color is the default
- QCOMPARE(node->userEffect(), (QGLAbstractEffect *)0);
- QCOMPARE(node->materialIndex(), -1);
- QCOMPARE(node->start(), 0);
- QCOMPARE(node->count(), 0);
-
- // add some settings and geometry to the new node
- node->setEffect(QGL::LitDecalTexture2D);
- QGLAbstractEffect *eff = new TestEffect;
- node->setUserEffect(eff);
- node->setMaterialIndex(5);
- QGeometryData p;
- p.appendVertex(QVector3D(), QVector3D(1.0f, 2.0f, 3.0f), QVector3D(4.0f, 5.0f, 6.0f));
- builder.addTriangles(p);
-
- // now create a new node
- QGLSceneNode *node2 = builder.newNode();
-
- // the previous node got cleaned up properly, with its count updated
- QCOMPARE(node->start(), 0);
- QCOMPARE(node->count(), 3);
-
- // new node counts off from where the previous one finished and has same defaults
- QCOMPARE(node2->start(), 3);
- QCOMPARE(node2->count(), 0);
- QCOMPARE(node2->effect(), QGL::FlatColor); // lit material is the default
- QCOMPARE(node2->userEffect(), (QGLAbstractEffect *)0);
- QCOMPARE(node2->materialIndex(), -1);
-
- builder.addTriangles(p);
- builder.newNode();
-
- // confirm that 2nd and last node in chain was also finished properly
- QCOMPARE(node2->start(), 3);
- QCOMPARE(node2->count(), 3);
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLBuilder::pushNode()
-{
- TestBuilder builder;
- builder.newSection();
- QGLSceneNode *node = builder.newNode();
- node->setEffect(QGL::LitDecalTexture2D);
- QGLAbstractEffect *eff = new TestEffect;
- node->setUserEffect(eff);
- node->setMaterialIndex(5);
- QGeometryData p;
- p.appendVertex(QVector3D(), QVector3D(1.0f, 2.0f, 3.0f), QVector3D(4.0f, 5.0f, 6.0f));
- builder.addTriangles(p);
-
- QGLSceneNode *node2 = builder.pushNode();
- QCOMPARE(node->start(), 0);
- QCOMPARE(node->count(), 3);
- QCOMPARE(builder.currentNode(), node2);
- QCOMPARE(node2->start(), 3);
- QCOMPARE(node2->count(), 0);
- QCOMPARE(node2->parent(), node);
- QCOMPARE(node2->effect(), QGL::FlatColor); // lit material is the default
- QCOMPARE(node2->userEffect(), (QGLAbstractEffect *)0);
- QCOMPARE(node2->materialIndex(), -1);
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLBuilder::popNode()
-{
- TestBuilder builder;
- builder.newSection();
- QGLSceneNode *node = builder.newNode();
- node->setEffect(QGL::LitDecalTexture2D);
- QGLAbstractEffect *eff = new TestEffect;
- QMatrix4x4 mat;
- mat.rotate(45.0f, 0.0f, 1.0f, 0.0f);
- node->setLocalTransform(mat);
- node->setUserEffect(eff);
- node->setMaterialIndex(5);
- QGeometryData p;
- p.appendVertex(QVector3D(), QVector3D(1.0f, 2.0f, 3.0f), QVector3D(4.0f, 5.0f, 6.0f));
- builder.addTriangles(p);
-
- QGLSceneNode *node2 = builder.pushNode();
-
- builder.addTriangles(p);
-
- QGLSceneNode *node3 = builder.popNode();
- QCOMPARE(node2->start(), 3);
- QCOMPARE(node2->count(), 3);
-
- QCOMPARE(node3->effect(), QGL::LitDecalTexture2D);
- QCOMPARE(node3->userEffect(), eff);
- QCOMPARE(node3->materialIndex(), 5);
- QCOMPARE(node3->localTransform(), mat);
- QCOMPARE(node3->start(), 6);
- QCOMPARE(node3->count(), 0);
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLBuilder::geometryBuild()
-{
- // here we really just test that the right values get added
- // to the underlying QGeometryData
- TestBuilder builder;
- builder.newSection();
- QGLSection *sec = builder.currentSection();
- QGLSceneNode *node = builder.currentNode();
-
- QCOMPARE(sec->count(), 0); // empty to start off with
- QCOMPARE(node->count(), 0);
-
- QVector3D a(-1.0f, -1.0f, 0.0f);
- QVector3D b(1.0f, -1.0f, 0.0f);
- QVector3D c(1.0f, 1.0f, 0.0f);
- QVector3D d(-1.0f, 1.0f, 0.0f);
- QVector3D e(1.0f, 2.0f, 0.0f);
- QVector3D f(-1.0f, 2.0f, 0.0f);
- QVector3D origin;
- QVector3D norm(0.0f, 0.0f, 1.0f);
-
- QGeometryData p;
- p.appendVertex(a, b, c);
- builder.addTriangles(p);
- QCOMPARE(sec->count(), 3);
- QCOMPARE(sec->vertex(0), a);
- QCOMPARE(sec->vertex(1), b);
- QCOMPARE(sec->vertex(2), c);
- QCOMPARE(sec->normal(0).normalized(), norm);
- QCOMPARE(sec->normal(1).normalized(), norm);
- QCOMPARE(sec->normal(2).normalized(), norm);
- QCOMPARE(node->count(), 3);
-
- builder.newSection();
- QGeometryData q;
- sec = builder.currentSection();
- node = builder.currentNode();
- QCOMPARE(sec->count(), 0); // empty to start off with
- QCOMPARE(node->count(), 0);
- QVector3DArray data;
- data << a << b << d << c << f << e;
- q.appendVertexArray(data);
- builder.addTriangleStrip(q);
- QCOMPARE(sec->count(), 6);
- QCOMPARE(sec->vertex(0), a);
- QCOMPARE(sec->vertex(1), b);
- QCOMPARE(sec->vertex(2), d);
- QCOMPARE(sec->vertex(3), c);
- QCOMPARE(sec->vertex(4), f);
- QCOMPARE(sec->vertex(5), e);
- QCOMPARE(sec->normal(0).normalized(), norm);
- QCOMPARE(sec->normal(3).normalized(), norm);
- QCOMPARE(sec->normal(5).normalized(), norm);
- QCOMPARE(node->count(), 12); // TRIANGLE_STRIP will here draw 4 triangles = 12 indices
-
- // now go on and test TRIANGLE_FAN
- builder.newSection();
- sec = builder.currentSection();
- node = builder.currentNode();
- QGeometryData r;
- r.appendVertex(a);
- r.appendNormal(norm);
- r.appendVertex(b);
- r.appendNormal(norm);
- r.appendVertex(c);
- r.appendNormal(norm);
- r.appendVertex(d);
- r.appendNormal(norm);
- r.appendVertex(e);
- r.appendNormal(norm);
- builder.addTriangleFan(r);
- QCOMPARE(sec->count(), 5);
- QCOMPARE(sec->vertex(0), a);
- QCOMPARE(sec->vertex(2), c);
- QCOMPARE(sec->vertex(4), e);
- QCOMPARE(sec->normal(0).normalized(), norm);
- QCOMPARE(sec->normal(4).normalized(), norm);
- QCOMPARE(node->count(), 9); // TRIANGLE_FAN will here draw 3 triangles = 9 indices
-
- QGeometryData s;
- //builder.begin(QGL::TRIANGULATED_FACE);
- builder.newSection();
- sec = builder.currentSection();
- node = builder.currentNode();
- s.appendVertex(a);
- s.appendColor(Qt::red);
- s.appendVertex(b);
- s.appendColor(QColor4ub(Qt::green));
- s.appendVertex(c);
- s.appendVertex(d);
- s.appendVertex(e);
- QArray<QColor4ub> cdata;
- cdata.append(Qt::blue, Qt::yellow, Qt::black);
- s.appendColorArray(cdata);
- builder.addTriangulatedFace(s);
- QCOMPARE(sec->count(), 5);
- QCOMPARE(sec->vertex(0), a);
- QCOMPARE(sec->vertex(4), e);
- QCOMPARE(sec->colorAt(0), QColor4ub(Qt::red));
- QCOMPARE(sec->colorAt(1), QColor4ub(Qt::green));
- QCOMPARE(sec->colorAt(2), QColor4ub(Qt::blue));
- QCOMPARE(sec->colorAt(3), QColor4ub(Qt::yellow));
- QCOMPARE(sec->colorAt(4), QColor4ub(Qt::black));
- QCOMPARE(node->count(), 12); // TRIANGLE_FAN will here draw 4 triangles = 12 indices
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLBuilder::addTriangles()
-{
- TestBuilder builder;
- builder.newSection();
- QGLSection *sec = builder.currentSection();
- QGLSceneNode *node = builder.currentNode();
- QVector3D a(-1.0f, -1.0f, 0.0f);
- QVector3D b(1.0f, -1.0f, 0.0f);
- QVector3D c(1.0f, 1.0f, 0.0f);
- QVector2D ta(0.0, 0.0);
- QVector2D tb(1.0, 0.0);
- QVector2D tc(1.0, 1.0);
- QVector3D norm(0.0f, 0.0f, 1.0f);
- QGeometryData p;
- p.appendVertex(a, b, c);
- p.appendNormal(norm, norm, norm);
-
- builder.addTriangles(p);
- QCOMPARE(sec->vertices().count(), 3);
- QCOMPARE(sec->vertex(0), a);
- QCOMPARE(sec->vertex(1), b);
- QCOMPARE(sec->vertex(2), c);
- QCOMPARE(sec->normals().count(), 3);
- QCOMPARE(sec->indices().size(), 3);
- QCOMPARE_INDEX(sec->indices()[0], 0);
- QCOMPARE_INDEX(sec->indices()[1], 1);
- QCOMPARE_INDEX(sec->indices()[2], 2);
- QCOMPARE(sec->fields(), QGL::fieldMask(QGL::Position) | QGL::fieldMask(QGL::Normal));
-
- QVector3D d(-1.0f, 1.0f, 0.0f);
- QVector2D td(0.0f, 1.0f);
- QGeometryData q;
- q.appendVertex(a, c, d);
- p.appendNormal(norm, norm, norm, norm);
- builder.addTriangles(q);
- QCOMPARE(sec->vertices().count(), 4);
- QCOMPARE(sec->vertex(3), d);
- QCOMPARE(sec->normals().count(), 4);
- QCOMPARE(sec->normal(0).normalized(), norm);
- QCOMPARE(sec->normal(1).normalized(), norm);
- QCOMPARE(sec->normal(2).normalized(), norm);
- QCOMPARE(sec->normal(3).normalized(), norm);
- QCOMPARE(sec->indices().size(), 6);
- QCOMPARE_INDEX(sec->indices()[3], 0);
- QCOMPARE_INDEX(sec->indices()[4], 2);
- QCOMPARE_INDEX(sec->indices()[5], 3);
- QCOMPARE(sec->fields(), QGL::fieldMask(QGL::Position) | QGL::fieldMask(QGL::Normal));
-
- QCOMPARE(node->start(), 0);
- QCOMPARE(node->count(), 6);
-
- builder.newSection();
- sec = builder.currentSection();
- node = builder.currentNode();
- QGeometryData r;
- r.appendVertex(a, b, c);
- r.appendTexCoord(ta, tb, tc);
- builder.addTriangles(r);
- QCOMPARE(sec->vertices().count(), 3);
- QCOMPARE(sec->vertex(0), a);
- QCOMPARE(sec->vertex(1), b);
- QCOMPARE(sec->vertex(2), c);
- QCOMPARE(sec->normals().count(), 3);
- QCOMPARE(sec->normal(0).normalized(), norm);
- QCOMPARE(sec->normal(1).normalized(), norm);
- QCOMPARE(sec->normal(2).normalized(), norm);
- QCOMPARE(sec->texCoords().count(), 3);
- QCOMPARE(sec->texCoords().at(0), ta);
- QCOMPARE(sec->texCoords().at(1), tb);
- QCOMPARE(sec->texCoords().at(2), tc);
- QCOMPARE(sec->indices().size(), 3);
- QCOMPARE_INDEX(sec->indices()[0], 0);
- QCOMPARE_INDEX(sec->indices()[1], 1);
- QCOMPARE_INDEX(sec->indices()[2], 2);
- QCOMPARE(sec->fields(),
- QGL::fieldMask(QGL::Position) | QGL::fieldMask(QGL::Normal) | QGL::fieldMask(QGL::TextureCoord0));
-
- QGeometryData s;
- s.appendVertex(a, b, d);
- s.appendTexCoord(ta, tb, td);
- builder.addTriangles(s);
- QCOMPARE(sec->vertices().count(), 4);
- QCOMPARE(sec->vertex(3), d);
- QCOMPARE(sec->normals().count(), 4);
- QCOMPARE(sec->normal(0).normalized(), norm);
- QCOMPARE(sec->normal(1).normalized(), norm);
- QCOMPARE(sec->normal(2).normalized(), norm);
- QCOMPARE(sec->normal(3).normalized(), norm);
- QCOMPARE(sec->texCoords().count(), 4);
- QCOMPARE(sec->texCoords().at(0), QVector2D(0.0f, 0.0f));
- QCOMPARE(sec->texCoords().at(1), QVector2D(1.0f, 0.0f));
- QCOMPARE(sec->texCoords().at(2), QVector2D(1.0f, 1.0f));
- QCOMPARE(sec->texCoords().at(3), QVector2D(0.0f, 1.0f));
- QCOMPARE(sec->indices().size(), 6);
- QCOMPARE_INDEX(sec->indices()[3], 0);
- QCOMPARE_INDEX(sec->indices()[4], 1);
- QCOMPARE_INDEX(sec->indices()[5], 3);
- QCOMPARE(sec->fields(),
- QGL::fieldMask(QGL::Position) | QGL::fieldMask(QGL::Normal) | QGL::fieldMask(QGL::TextureCoord0));
-
- QCOMPARE(node->start(), 0);
- QCOMPARE(node->count(), 6);
-
- // correctly handle not being a multiple of 3 - discard spare ones
- builder.newSection();
- sec = builder.currentSection();
- QGeometryData t;
- t.appendVertex(a, b, c, d);
- builder.addTriangles(t);
- QCOMPARE(sec->count(), 3);
- QCOMPARE(sec->vertex(0), a);
- QCOMPARE(sec->vertex(1), b);
- QCOMPARE(sec->vertex(2), c);
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLBuilder::addQuads()
-{
- TestBuilder builder;
- builder.newSection();
- QGLSection *sec = builder.currentSection();
- QGLSceneNode *node = builder.currentNode();
- QVector3D a(-1.0f, -1.0f, 0.0f);
- QVector3D b(1.0f, -1.0f, 0.0f);
- QVector3D c(1.0f, 1.0f, 0.0f);
- QVector3D d(-1.0f, 1.0f, 0.0f);
- QVector3D norm(0.0f, 0.0f, 1.0f);
- QGeometryData p;
- p.appendVertex(a, b, c, d);
- p.appendNormal(norm, norm, norm, norm);
-
- builder.addQuads(p);
- QCOMPARE(sec->vertices().count(), 4);
- QCOMPARE(sec->vertex(0), a);
- QCOMPARE(sec->vertex(1), b);
- QCOMPARE(sec->vertex(2), c);
- QCOMPARE(sec->vertex(3), d);
- QCOMPARE(sec->normals().count(), 4);
- QCOMPARE(sec->normal(0).normalized(), norm);
- QCOMPARE(sec->normal(1).normalized(), norm);
- QCOMPARE(sec->normal(2).normalized(), norm);
- QCOMPARE(sec->normal(3).normalized(), norm);
- QCOMPARE(sec->indices().size(), 6);
- QCOMPARE_INDEX(sec->indices()[3], 0);
- QCOMPARE_INDEX(sec->indices()[0], 0);
- QCOMPARE_INDEX(sec->indices()[1], 1);
- QCOMPARE_INDEX(sec->indices()[2], 2);
- QCOMPARE_INDEX(sec->indices()[3], 0);
- QCOMPARE_INDEX(sec->indices()[4], 2);
- QCOMPARE_INDEX(sec->indices()[5], 3);
- QCOMPARE(sec->fields(), QGL::fieldMask(QGL::Position) | QGL::fieldMask(QGL::Normal));
-
- QCOMPARE(node->start(), 0);
- QCOMPARE(node->count(), 6);
-
- builder.newSection();
- sec = builder.currentSection();
- node = builder.currentNode();
- QVector2D ta(0.0f, 0.0f);
- QVector2D tb(1.0f, 0.0f);
- QVector2D tc(1.0f, 1.0f);
- QVector2D td(0.0f, 1.0f);
- QGeometryData q;
- q.appendVertex(a, b, c, d);
- q.appendTexCoord(ta, tb, tc, td);
- builder.addQuads(q);
-
- QCOMPARE(sec->vertices().count(), 4);
- QCOMPARE(sec->vertex(0), a);
- QCOMPARE(sec->vertex(1), b);
- QCOMPARE(sec->vertex(2), c);
- QCOMPARE(sec->vertex(3), d);
- QCOMPARE(sec->normals().count(), 4);
- QCOMPARE(sec->normal(0).normalized(), norm);
- QCOMPARE(sec->normal(1).normalized(), norm);
- QCOMPARE(sec->normal(2).normalized(), norm);
- QCOMPARE(sec->normal(3).normalized(), norm);
- QCOMPARE(sec->texCoords().count(), 4);
- QCOMPARE(sec->texCoords().at(0), ta);
- QCOMPARE(sec->texCoords().at(1), tb);
- QCOMPARE(sec->texCoords().at(2), tc);
- QCOMPARE(sec->texCoords().at(3), td);
- QCOMPARE(sec->indices().size(), 6);
- QCOMPARE_INDEX(sec->indices()[0], 0);
- QCOMPARE_INDEX(sec->indices()[1], 1);
- QCOMPARE_INDEX(sec->indices()[2], 2);
- QCOMPARE_INDEX(sec->indices()[3], 0);
- QCOMPARE_INDEX(sec->indices()[4], 2);
- QCOMPARE_INDEX(sec->indices()[5], 3);
- QCOMPARE(sec->fields(),
- QGL::fieldMask(QGL::Position) | QGL::fieldMask(QGL::Normal) | QGL::fieldMask(QGL::TextureCoord0));
-
- QCOMPARE(node->start(), 0);
- QCOMPARE(node->count(), 6);
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLBuilder::addTriangleFan()
-{
- TestBuilder builder;
- builder.newSection(QGL::Faceted);
- QGLSection *sec = builder.currentSection();
- QGLSceneNode *node = builder.currentNode();
- QVector3D a(-1.0f, -1.0f, 0.0f);
- QVector3D b(1.0f, -1.0f, 0.0f);
- QVector3D c(1.0f, 1.0f, 0.0f);
- QVector3D d(-1.0f, 1.0f, 0.0f);
- qreal one_on_root2 = 1.0f / sqrt(2.0f);
- QVector3D n1(0.0f, -one_on_root2, one_on_root2);
- QVector3D n2(one_on_root2, 0.0f, one_on_root2);
- QVector3D n3(0.0f, one_on_root2, one_on_root2);
- QVector3D center(0.0f, 0.0f, 1.0f);
- QVector2DArray edges;
-
- // if edges has length < 2, exit without doing anything
- QGeometryData p;
- p.appendVertex(center);
- builder.addTriangleFan(p);
- QCOMPARE(sec->vertices().count(), 0);
- QCOMPARE(sec->normals().count(), 0);
- QCOMPARE(sec->indices().size(), 0);
-
- p.appendVertex(a, b, c, d);
-
- builder.addTriangleFan(p);
- sec->normalizeNormals();
- QCOMPARE(sec->vertices().count(), 9);
- QCOMPARE(sec->vertex(0), center);
- QCOMPARE(sec->vertex(1), a);
- QCOMPARE(sec->vertex(2), b);
- QCOMPARE(sec->vertex(3), center);
- QCOMPARE(sec->vertex(4), b);
- QCOMPARE(sec->vertex(5), c);
- QCOMPARE(sec->vertex(6), center);
- QCOMPARE(sec->vertex(7), c);
- QCOMPARE(sec->vertex(8), d);
- QCOMPARE(sec->normals().count(), 9);
- QCOMPARE(sec->normal(0), n1);
- QCOMPARE(sec->normal(1), n1);
- QCOMPARE(sec->normal(2), n1);
- QCOMPARE(sec->normal(3), n2);
- QCOMPARE(sec->normal(4), n2);
- QCOMPARE(sec->normal(5), n2);
- QCOMPARE(sec->normal(6), n3);
- QCOMPARE(sec->normal(7), n3);
- QCOMPARE(sec->normal(8), n3);
- QCOMPARE(sec->indices().size(), 9);
- QCOMPARE_INDEX(sec->indices()[0], 0);
- QCOMPARE_INDEX(sec->indices()[1], 1);
- QCOMPARE_INDEX(sec->indices()[2], 2);
- QCOMPARE_INDEX(sec->indices()[3], 3);
- QCOMPARE_INDEX(sec->indices()[4], 4);
- QCOMPARE_INDEX(sec->indices()[5], 5);
- QCOMPARE_INDEX(sec->indices()[6], 6);
- QCOMPARE_INDEX(sec->indices()[7], 7);
- QCOMPARE_INDEX(sec->indices()[8], 8);
- QCOMPARE(sec->fields(), QGL::fieldMask(QGL::Position) | QGL::fieldMask(QGL::Normal));
-
- QCOMPARE(node->start(), 0);
- QCOMPARE(node->count(), 9);
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLBuilder::addTriangulatedFace()
-{
- TestBuilder builder;
- builder.newSection(QGL::Faceted);
- QGLSection *sec = builder.currentSection();
- QGLSceneNode *node = builder.currentNode();
- QVector3D a(-1.0f, -1.0f, 0.0f);
- QVector3D b(1.0f, -1.0f, 0.0f);
- QVector3D c(1.0f, 1.0f, 0.0f);
- QVector3D d(-1.0f, 1.0f, 0.0f);
- QVector3D n(0.0f, 0.0f, 1.0f);
- QVector3D center(0.0f, 0.0f, 0.0f);
- QVector2DArray edges;
-
- // if edges has length < 2, exit without doing anything
- QGeometryData p;
- builder.addTriangleFan(p);
- QCOMPARE(sec->vertices().count(), 0);
- QCOMPARE(sec->normals().count(), 0);
- QCOMPARE(sec->indices().size(), 0);
-
- p.appendVertex(center);
- p.appendVertex(a, b, c, d);
-
- builder.addTriangulatedFace(p);
- sec->normalizeNormals();
- QCOMPARE(sec->vertices().count(), 5);
- QCOMPARE(sec->vertex(0), center);
- QCOMPARE(sec->vertex(1), a);
- QCOMPARE(sec->vertex(2), b);
- QCOMPARE(sec->vertex(3), c);
- QCOMPARE(sec->vertex(4), d);
- QCOMPARE(sec->normals().count(), 5);
- QCOMPARE(sec->normal(0), n);
- QCOMPARE(sec->normal(1), n);
- QCOMPARE(sec->normal(2), n);
- QCOMPARE(sec->normal(3), n);
- QCOMPARE(sec->normal(4), n);
- QCOMPARE(sec->indices().size(), 12);
- QCOMPARE_INDEX(sec->indices()[0], 0);
- QCOMPARE_INDEX(sec->indices()[1], 1);
- QCOMPARE_INDEX(sec->indices()[2], 2);
- QCOMPARE_INDEX(sec->indices()[3], 0);
- QCOMPARE_INDEX(sec->indices()[4], 2);
- QCOMPARE_INDEX(sec->indices()[5], 3);
- QCOMPARE_INDEX(sec->indices()[6], 0);
- QCOMPARE_INDEX(sec->indices()[7], 3);
- QCOMPARE_INDEX(sec->indices()[8], 4);
- QCOMPARE_INDEX(sec->indices()[9], 0);
- QCOMPARE_INDEX(sec->indices()[10], 4);
- QCOMPARE_INDEX(sec->indices()[11], 1);
- QCOMPARE(sec->fields(), QGL::fieldMask(QGL::Position) | QGL::fieldMask(QGL::Normal));
-
- QCOMPARE(node->start(), 0);
- QCOMPARE(node->count(), 12);
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLBuilder::extrude()
-{
- TestBuilder builder;
- builder.newSection();
- QGLSection *sec = builder.currentSection();
- QGLSceneNode *node = builder.currentNode();
- QVector3D a(-1.0f, -1.0f, 0.0f);
- QVector3D b(1.0f, -1.0f, 0.0f);
- QVector3D c(1.0f, 1.0f, 0.0f);
- QVector3D d(-1.0f, 1.0f, 0.0f);
- QVector3D n(0.0f, 0.0f, 1.0f);
- QVector3DArray edges;
-
- // if edges has length < 2, exit without doing anything
- QGeometryData p;
- QGeometryData q;
- builder.addQuadsInterleaved(p, q);
- QCOMPARE(sec->vertices().count(), 0);
- QCOMPARE(sec->normals().count(), 0);
- QCOMPARE(sec->indices().size(), 0);
-
- p.appendVertex(a, b, c, d);
- edges = p.vertices();
- p.appendVertex(a);
- q = p.translated(-n);
-
- qreal one_on_root2 = 1.0f / sqrt(2.0f);
- QVector3D n1(-one_on_root2, -one_on_root2, 0.0f);
- QVector3D n2(one_on_root2, -one_on_root2, 0.0f);
- QVector3D n3(one_on_root2, one_on_root2, 0.0f);
- QVector3D n4(-one_on_root2, one_on_root2, 0.0f);
-
- builder.addQuadsInterleaved(p, q);
- //sec->normalizeNormals();
-
- QCOMPARE(sec->count(), 8);
- QVector3DArray vrts = sec->vertices();
- QVector3DArray nrms = sec->normals();
- QGL::IndexArray inxs = sec->indices();
-
- QCOMPARE(vrts.count(), 8);
- QCOMPARE(vrts.at(0), edges.at(0) - n);
- QCOMPARE(vrts.at(1), edges.at(1) - n);
- QCOMPARE(vrts.at(2), edges.at(1));
- QCOMPARE(vrts.at(3), edges.at(0));
- QCOMPARE(vrts.at(4), edges.at(2) - n);
- QCOMPARE(vrts.at(5), edges.at(2));
- QCOMPARE(vrts.at(6), edges.at(3) - n);
- QCOMPARE(vrts.at(7), edges.at(3));
-
- QCOMPARE(nrms.count(), 8);
- QCOMPARE(nrms.at(0).normalized(), n1);
- QCOMPARE(nrms.at(1).normalized(), n2);
- QCOMPARE(nrms.at(2).normalized(), n2);
- QCOMPARE(nrms.at(3).normalized(), n1);
- QCOMPARE(nrms.at(4).normalized(), n3);
- QCOMPARE(nrms.at(5).normalized(), n3);
- QCOMPARE(nrms.at(6).normalized(), n4);
- QCOMPARE(nrms.at(7).normalized(), n4);
-
- static int checkIx[] = {
- 0, 1, 2, 0, 2, 3,
- 1, 4, 5, 1, 5, 2,
- 4, 6, 7, 4, 7, 5,
- 6, 0, 3, 6, 3, 7
- };
- QCOMPARE(sec->indices().size(), 24);
-
- QCOMPARE_INDEX(inxs[0], checkIx[0]);
- QCOMPARE_INDEX(inxs[1], checkIx[1]);
- QCOMPARE_INDEX(inxs[2], checkIx[2]);
- QCOMPARE_INDEX(inxs[3], checkIx[3]);
- QCOMPARE_INDEX(inxs[4], checkIx[4]);
- QCOMPARE_INDEX(inxs[5], checkIx[5]);
- QCOMPARE_INDEX(inxs[6], checkIx[6]);
- QCOMPARE_INDEX(inxs[7], checkIx[7]);
- QCOMPARE_INDEX(inxs[8], checkIx[8]);
- QCOMPARE_INDEX(inxs[9], checkIx[9]);
- QCOMPARE_INDEX(inxs[10], checkIx[10]);
- QCOMPARE_INDEX(inxs[11], checkIx[11]);
- QCOMPARE_INDEX(inxs[12], checkIx[12]);
- QCOMPARE_INDEX(inxs[13], checkIx[13]);
- QCOMPARE_INDEX(inxs[14], checkIx[14]);
- QCOMPARE_INDEX(inxs[15], checkIx[15]);
- QCOMPARE_INDEX(inxs[16], checkIx[16]);
- QCOMPARE_INDEX(inxs[17], checkIx[17]);
- QCOMPARE_INDEX(inxs[18], checkIx[18]);
- QCOMPARE_INDEX(inxs[19], checkIx[19]);
- QCOMPARE_INDEX(inxs[20], checkIx[20]);
- QCOMPARE_INDEX(inxs[21], checkIx[21]);
- QCOMPARE_INDEX(inxs[22], checkIx[22]);
- QCOMPARE_INDEX(inxs[23], checkIx[23]);
-
- QCOMPARE(sec->fields(), QGL::fieldMask(QGL::Position) | QGL::fieldMask(QGL::Normal));
-
- QCOMPARE(node->start(), 0);
- QCOMPARE(node->count(), 24);
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLBuilder::finalize()
-{
- QVector3D a(-1.0f, -1.0f, 0.0f);
- QVector3D b(1.0f, -1.0f, 0.0f);
- QVector3D c(1.0f, 1.0f, 0.0f);
- QVector3D d(-1.0f, 1.0f, 0.0f);
- QVector3D center(0.0f, 0.0f, 0.0f);
- QVector3D n(0.0f, 0.0f, 1.0f);
-
- // backwards wound triangle - on back face
- QVector3D e(1.0f, -1.0f, 1.0f);
- QVector3D f(-1.0f, -1.0f, 1.0f);
- QVector3D g(-1.0f, 1.0f, 1.0f);
- // normal points back
- QVector3D n10(0.0f, 0.0f, -1.0f);
-
- QGeometryData p;
- p.appendVertex(center);
- p.appendVertex(a, b, c, d);
-
- qreal one_on_root2 = 1.0f / sqrt(2.0f);
- QVector3D n0(0.0f, 0.0f, 1.0f);
- QVector3D n1(-one_on_root2, -one_on_root2, 0.0f);
- QVector3D n2(one_on_root2, -one_on_root2, 0.0f);
- QVector3D n3(one_on_root2, one_on_root2, 0.0f);
- QVector3D n4(-one_on_root2, one_on_root2, 0.0f);
-
- TestBuilder builder;
- builder.newSection();
- QGLSceneNode *node = builder.currentNode();
-
- builder.addTriangulatedFace(p);
-
- builder.newSection();
- QGLSceneNode *node2 = builder.currentNode();
-
- QGeometryData s;
- s.appendVertex(a, b, c, d);
- s.appendVertex(a);
- builder.addQuadsInterleaved(s, s.translated(-n));
-
- QPointer<QGLSceneNode> nodeEmpty0 = builder.newNode();
-
- builder.newSection();
- QGLSceneNode *node3 = builder.currentNode();
-
- QGeometryData q;
- QVector2D ta(0.0f, 0.0f);
- QVector2D tb(1.0f, 0.0f);
- QVector2D tc(1.0f, 1.0f);
- q.appendVertex(e, f, g);
- q.appendTexCoord(ta, tb, tc);
- // reverse winding, backwards normal == n10
- builder.addTriangles(q);
-
- QPointer<QGLSceneNode> nodeEmpty1 = builder.pushNode();
-
- builder.finalizedSceneNode();
-
- QCOMPARE(nodeEmpty0.data(), (QGLSceneNode*)0);
- QCOMPARE(nodeEmpty1.data(), (QGLSceneNode*)0);
-
- QCOMPARE(builder.sections().count(), 0);
-
- QGeometryData geom = node->geometry();
- QGL::IndexArray ids = geom.indices();
-
- QCOMPARE(geom.count(QGL::Position), 13);
- QCOMPARE(ids.size(), 36);
-
- // triangulated face
- int tf = ids[node->start()]; // beginning of triangulated face
- QCOMPARE(node->count(), 12);
- QCOMPARE(geom.vertexAt(tf), center);
- QCOMPARE(geom.vertexAt(tf + 2), b);
- QCOMPARE(geom.normalAt(tf), n0);
- QCOMPARE(geom.normalAt(tf + 2), n0);
-
- geom = node2->geometry();
- ids = geom.indices();
-
- int ext = ids[node2->start()]; // beginning of extrude
- int last = ids[node2->start() + (node2->count() - 1)];
- QCOMPARE(node2->count(), 24);
- QCOMPARE(geom.vertexAt(ext), a - n);
- QCOMPARE(geom.normalAt(ext), n1);
- QCOMPARE(geom.vertexAt(last), d);
- QCOMPARE(geom.normalAt(last), n4);
-
- // the first two nodes and the builder itself all reference the same
- // geometry object, since they all have the same types: just vertices
- // and normals. the last node has geometry with textures, so its in
- // a different geometry object.
- QVERIFY(node->geometry() == geom);
- QVERIFY(node2->geometry() == geom);
- QVERIFY(!(node3->geometry() == geom));
-
- geom = node3->geometry();
- QGL::IndexArray ids2 = geom.indices();
-
- int tri = ids2[node->start()];
- QCOMPARE(geom.vertexAt(tri), e);
- QCOMPARE(geom.normalAt(tri), n10);
- QCOMPARE(geom.texCoordAt(tri), ta);
-}
-
-QTEST_APPLESS_MAIN(tst_QGLBuilder)
-
-#include "tst_qglbuilder.moc"
diff --git a/tests/auto/threed/qglcamera/qglcamera.pro b/tests/auto/threed/qglcamera/qglcamera.pro
deleted file mode 100644
index dfe16b82..00000000
--- a/tests/auto/threed/qglcamera/qglcamera.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-INCLUDEPATH += ../../../../threed/viewing
-VPATH += ../../../../threed/viewing
-
-SOURCES += \
- tst_qglcamera.cpp
diff --git a/tests/auto/threed/qglcamera/tst_qglcamera.cpp b/tests/auto/threed/qglcamera/tst_qglcamera.cpp
deleted file mode 100644
index 2240a1b8..00000000
--- a/tests/auto/threed/qglcamera/tst_qglcamera.cpp
+++ /dev/null
@@ -1,327 +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 <QtTest/QtTest>
-#include "qglcamera.h"
-
-class tst_QGLCamera : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLCamera() {}
- ~tst_QGLCamera() {}
-
-private slots:
- void create();
- void modify();
- void minViewSize();
- void translation_data();
- void translation();
- void rotate_data();
- void rotate();
-};
-
-void tst_QGLCamera::create()
-{
- // Test that a newly created object has the correct defaults.
- QGLCamera camera;
- QVERIFY(camera.projectionType() == QGLCamera::Perspective);
- QCOMPARE(camera.fieldOfView(), (qreal)0.0f);
- QCOMPARE(camera.nearPlane(), (qreal)5.0f);
- QCOMPARE(camera.farPlane(), (qreal)1000.0f);
- QCOMPARE(camera.viewSize(), QSizeF(2.0f, 2.0f));
- QCOMPARE(camera.minViewSize(), QSizeF(0.0001f, 0.0001f));
- QCOMPARE(camera.screenRotation(), 0);
- QVERIFY(camera.eye() == QVector3D(0, 0, 10));
- QVERIFY(camera.upVector() == QVector3D(0, 1, 0));
- QVERIFY(camera.center() == QVector3D(0, 0, 0));
- QCOMPARE(camera.eyeSeparation(), (qreal)0.0f);
- QVERIFY(camera.motionAdjustment() == QVector3D(0, 0, 1));
- QVERIFY(camera.adjustForAspectRatio());
-}
-
-void tst_QGLCamera::modify()
-{
- // Test modifying each field individually.
- QGLCamera camera;
- QSignalSpy spy1(&camera, SIGNAL(projectionChanged()));
- QSignalSpy spy2(&camera, SIGNAL(viewChanged()));
- camera.setProjectionType(QGLCamera::Orthographic);
- QVERIFY(camera.projectionType() == QGLCamera::Orthographic);
- QCOMPARE(spy1.size(), 1);
- camera.setFieldOfView(60.0f);
- QCOMPARE(camera.fieldOfView(), (qreal)60.0f);
- QCOMPARE(spy1.size(), 2);
- camera.setNearPlane(-3.0f);
- QCOMPARE(camera.nearPlane(), (qreal)-3.0f);
- QCOMPARE(spy1.size(), 3);
- camera.setFarPlane(3000.0f);
- QCOMPARE(camera.farPlane(), (qreal)3000.0f);
- QCOMPARE(spy1.size(), 4);
- camera.setViewSize(QSizeF(45.0f, 25.5f));
- QCOMPARE(camera.viewSize(), QSizeF(45.0f, 25.5f));
- QCOMPARE(spy1.size(), 5);
- camera.setMinViewSize(QSizeF(0.05f, 0.025f));
- QCOMPARE(camera.minViewSize(), QSizeF(0.05f, 0.025f));
- QCOMPARE(spy1.size(), 6);
- camera.setScreenRotation(270);
- QCOMPARE(camera.screenRotation(), 270);
- QCOMPARE(spy1.size(), 7);
- camera.setEye(QVector3D(1.0f, 2.0f, 3.0f));
- QVERIFY(camera.eye() == QVector3D(1.0f, 2.0f, 3.0f));
- QCOMPARE(spy2.size(), 1);
- camera.setUpVector(QVector3D(4.0f, 5.0f, 6.0f));
- QVERIFY(camera.upVector() == QVector3D(4.0f, 5.0f, 6.0f));
- QCOMPARE(spy2.size(), 2);
- camera.setCenter(QVector3D(7.0f, 8.0f, 9.0f));
- QVERIFY(camera.center() == QVector3D(7.0f, 8.0f, 9.0f));
- QCOMPARE(spy2.size(), 3);
- camera.setEyeSeparation(3.0f);
- QCOMPARE(camera.eyeSeparation(), (qreal)3.0f);
- QCOMPARE(spy2.size(), 4);
- camera.setMotionAdjustment(QVector3D(10.0f, 11.0f, 12.0f));
- QVERIFY(camera.motionAdjustment() == QVector3D(10.0f, 11.0f, 12.0f));
- QCOMPARE(spy2.size(), 5);
- camera.setAdjustForAspectRatio(false);
- QVERIFY(!camera.adjustForAspectRatio());
- QCOMPARE(spy2.size(), 6);
-
- // Test that we don't get any side effects between properties.
- QVERIFY(camera.projectionType() == QGLCamera::Orthographic);
- QCOMPARE(camera.fieldOfView(), (qreal)60.0f);
- QCOMPARE(camera.nearPlane(), (qreal)-3.0f);
- QCOMPARE(camera.farPlane(), (qreal)3000.0f);
- QCOMPARE(camera.viewSize(), QSizeF(45.0f, 25.5f));
- QCOMPARE(camera.minViewSize(), QSizeF(0.05f, 0.025f));
- QCOMPARE(camera.screenRotation(), 270);
- QVERIFY(camera.eye() == QVector3D(1.0f, 2.0f, 3.0f));
- QVERIFY(camera.upVector() == QVector3D(4.0f, 5.0f, 6.0f));
- QVERIFY(camera.center() == QVector3D(7.0f, 8.0f, 9.0f));
- QCOMPARE(camera.eyeSeparation(), (qreal)3.0f);
- QVERIFY(camera.motionAdjustment() == QVector3D(10.0f, 11.0f, 12.0f));
- QVERIFY(!camera.adjustForAspectRatio());
-
- // Test that changing to the same values does not emit any signals.
- camera.setProjectionType(QGLCamera::Orthographic);
- camera.setFieldOfView(60.0f);
- camera.setNearPlane(-3.0f);
- camera.setFarPlane(3000.0f);
- camera.setViewSize(QSizeF(45.0f, 25.5f));
- camera.setMinViewSize(QSizeF(0.05f, 0.025f));
- camera.setScreenRotation(270);
- camera.setEye(QVector3D(1.0f, 2.0f, 3.0f));
- camera.setUpVector(QVector3D(4.0f, 5.0f, 6.0f));
- camera.setCenter(QVector3D(7.0f, 8.0f, 9.0f));
- camera.setEyeSeparation(3.0f);
- camera.setMotionAdjustment(QVector3D(10.0f, 11.0f, 12.0f));
- camera.setAdjustForAspectRatio(false);
- QCOMPARE(spy1.size(), 7);
- QCOMPARE(spy2.size(), 6);
-}
-
-// Check that the minimum view size works correctly, including when
-// the view size goes negative (e.g. for flipped y co-ordinates).
-void tst_QGLCamera::minViewSize()
-{
- QGLCamera camera;
- camera.setMinViewSize(QSizeF(0.05f, 0.05f));
- QCOMPARE(camera.minViewSize(), QSizeF(0.05f, 0.05f));
- camera.setViewSize(QSizeF(-20.0f, -30.0f));
- QCOMPARE(camera.viewSize(), QSizeF(-20.0f, -30.0f));
- camera.setViewSize(QSizeF(0.0f, 1.0f));
- QCOMPARE(camera.viewSize(), QSizeF(0.05f, 1.0f));
- camera.setViewSize(QSizeF(-0.01f, 1.0f));
- QCOMPARE(camera.viewSize(), QSizeF(-0.05f, 1.0f));
- camera.setViewSize(QSizeF(-1.0f, 0.0f));
- QCOMPARE(camera.viewSize(), QSizeF(-1.0f, 0.05f));
- camera.setViewSize(QSizeF(-1.0f, -0.01f));
- QCOMPARE(camera.viewSize(), QSizeF(-1.0f, -0.05f));
-}
-
-static bool fuzzyCompare(const QVector3D &v1, const QVector3D &v2)
-{
- if (qAbs(v1.x() - v2.x()) <= 0.00001 &&
- qAbs(v1.y() - v2.y()) <= 0.00001 &&
- qAbs(v1.z() - v2.z()) <= 0.00001) {
- return true;
- }
- qWarning() << "actual:" << v1 << "expected:" << v2;
- return false;
-}
-
-static bool fuzzyCompare(const QQuaternion &q1, const QQuaternion &q2)
-{
- if (qAbs(q1.x() - q2.x()) <= 0.00001 &&
- qAbs(q1.y() - q2.y()) <= 0.00001 &&
- qAbs(q1.z() - q2.z()) <= 0.00001 &&
- qAbs(q1.scalar() - q2.scalar()) <= 0.00001) {
- return true;
- }
- qWarning() << "actual:" << q1 << "expected:" << q2;
- return false;
-}
-
-void tst_QGLCamera::translation_data()
-{
- QTest::addColumn<QVector3D>("eye");
- QTest::addColumn<QVector3D>("upVector");
- QTest::addColumn<QVector3D>("center");
-
- QTest::newRow("default")
- << QVector3D(0, 0, 10) << QVector3D(0, 1, 0) << QVector3D(0, 0, 0);
- QTest::newRow("random")
- << QVector3D(2, -3, 5) << QVector3D(1, -1, 1) << QVector3D(-1, 6, -2);
-}
-
-void tst_QGLCamera::translation()
-{
- QFETCH(QVector3D, eye);
- QFETCH(QVector3D, upVector);
- QFETCH(QVector3D, center);
-
- QGLCamera camera;
- camera.setEye(eye);
- camera.setUpVector(upVector);
- camera.setCenter(center);
-
- QVector3D viewVector = center - eye;
- QVector3D sideVector = QVector3D::crossProduct(viewVector, upVector);
-
- QVector3D nup = upVector.normalized();
- QVector3D nview = viewVector.normalized();
- QVector3D nside = sideVector.normalized();
-
- QVERIFY(fuzzyCompare(camera.translation(0, 0, 0), QVector3D(0, 0, 0)));
-
- QVERIFY(fuzzyCompare(camera.translation(2.5f, 0, 0), 2.5f * nside));
- QVERIFY(fuzzyCompare(camera.translation(0, -1.5f, 0), -1.5f * nup));
- QVERIFY(fuzzyCompare(camera.translation(0, 0, 2.0f), 2.0f * nview));
-
- QVector3D t = camera.translation(2.5f, -1.5f, 2.0f);
- QVERIFY(fuzzyCompare(t, 2.5f * nside - 1.5f * nup + 2.0f * nview));
-
- camera.translateEye(2.5f, -1.5f, 2.0f);
- QVERIFY(fuzzyCompare(camera.eye(), eye + t));
- QVERIFY(fuzzyCompare(camera.center(), center));
- QVERIFY(fuzzyCompare(camera.upVector(), upVector));
-
- camera.setEye(eye);
-
- camera.translateCenter(2.5f, -1.5f, 2.0f);
- QVERIFY(fuzzyCompare(camera.eye(), eye));
- QVERIFY(fuzzyCompare(camera.center(), center + t));
- QVERIFY(fuzzyCompare(camera.upVector(), upVector));
-}
-
-void tst_QGLCamera::rotate_data()
-{
- translation_data();
-}
-
-void tst_QGLCamera::rotate()
-{
- QFETCH(QVector3D, eye);
- QFETCH(QVector3D, upVector);
- QFETCH(QVector3D, center);
-
- QGLCamera camera;
- camera.setEye(eye);
- camera.setUpVector(upVector);
- camera.setCenter(center);
-
- QVector3D viewVector = center - eye;
- QVector3D sideVector = QVector3D::crossProduct(viewVector, upVector);
-
- QQuaternion tilt = camera.tilt(-30.0f);
- QQuaternion pan = camera.pan(125.0f);
- QQuaternion roll = camera.roll(45.0f);
-
- QVERIFY(fuzzyCompare(tilt, QQuaternion::fromAxisAndAngle(sideVector, -30.0f)));
- QVERIFY(fuzzyCompare(pan, QQuaternion::fromAxisAndAngle(upVector, 125.0f)));
- QVERIFY(fuzzyCompare(roll, QQuaternion::fromAxisAndAngle(viewVector, 45.0f)));
-
- QQuaternion combined = tilt * pan * roll;
- camera.rotateEye(combined);
-
- QVERIFY(fuzzyCompare(camera.eye(), eye));
- QVERIFY(fuzzyCompare(camera.upVector(), combined.rotatedVector(upVector)));
- QVERIFY(fuzzyCompare(camera.center(), eye + combined.rotatedVector(viewVector)));
-
- camera.setEye(eye);
- camera.setUpVector(upVector);
- camera.setCenter(center);
-
- camera.rotateCenter(combined);
- QVERIFY(fuzzyCompare(camera.eye(), center - combined.rotatedVector(viewVector)));
- QVERIFY(fuzzyCompare(camera.upVector(), combined.rotatedVector(upVector)));
- QVERIFY(fuzzyCompare(camera.center(), center));
-
-#define TestTiltPanRoll(order, combine) \
- do { \
- combined = combine; \
- camera.setEye(eye); \
- camera.setUpVector(upVector); \
- camera.setCenter(center); \
- camera.tiltPanRollEye(-30.0f, 125.0f, 45.0f, QGLCamera::order); \
- QVERIFY(fuzzyCompare(camera.eye(), eye)); \
- QVERIFY(fuzzyCompare(camera.upVector(), combined.rotatedVector(upVector))); \
- QVERIFY(fuzzyCompare(camera.center(), eye + combined.rotatedVector(viewVector))); \
- camera.setEye(eye); \
- camera.setUpVector(upVector); \
- camera.setCenter(center); \
- camera.tiltPanRollCenter(-30.0f, 125.0f, 45.0f, QGLCamera::order); \
- QVERIFY(fuzzyCompare(camera.eye(), center - combined.rotatedVector(viewVector))); \
- QVERIFY(fuzzyCompare(camera.upVector(), combined.rotatedVector(upVector))); \
- QVERIFY(fuzzyCompare(camera.center(), center)); \
- } while (0)
-
- // Quaternions are multiplied in the reverse order of applying them.
- TestTiltPanRoll(TiltPanRoll, roll * pan * tilt);
- TestTiltPanRoll(TiltRollPan, pan * roll * tilt);
- TestTiltPanRoll(PanTiltRoll, roll * tilt * pan);
- TestTiltPanRoll(PanRollTilt, tilt * roll * pan);
- TestTiltPanRoll(RollTiltPan, pan * tilt * roll);
- TestTiltPanRoll(RollPanTilt, tilt * pan * roll);
-}
-
-QTEST_APPLESS_MAIN(tst_QGLCamera)
-
-#include "tst_qglcamera.moc"
diff --git a/tests/auto/threed/qglcameraanimation/qglcameraanimation.pro b/tests/auto/threed/qglcameraanimation/qglcameraanimation.pro
deleted file mode 100644
index b197daca..00000000
--- a/tests/auto/threed/qglcameraanimation/qglcameraanimation.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-INCLUDEPATH += ../../../../threed/viewing
-VPATH += ../../../../threed/viewing
-
-SOURCES += tst_qglcameraanimation.cpp
diff --git a/tests/auto/threed/qglcameraanimation/tst_qglcameraanimation.cpp b/tests/auto/threed/qglcameraanimation/tst_qglcameraanimation.cpp
deleted file mode 100644
index 6a589755..00000000
--- a/tests/auto/threed/qglcameraanimation/tst_qglcameraanimation.cpp
+++ /dev/null
@@ -1,162 +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 <QtTest/QtTest>
-#include "qglcameraanimation.h"
-#include "qglcamera.h"
-
-class tst_QGLCameraAnimation : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLCameraAnimation() {}
- ~tst_QGLCameraAnimation() {}
-
-private slots:
- void properties();
- void animationStartEnd();
-};
-
-// Will try to wait for the condition while allowing event processing
-#define QTRY_VERIFY(__expr) \
- do { \
- const int __step = 50; \
- const int __timeout = 5000; \
- if (!(__expr)) { \
- QTest::qWait(0); \
- } \
- for (int __i = 0; __i < __timeout && !(__expr); __i+=__step) { \
- QTest::qWait(__step); \
- } \
- QVERIFY(__expr); \
- } while (0)
-
-// Will try to wait for the condition while allowing event processing
-#define QTRY_COMPARE(__expr, __expected) \
- do { \
- const int __step = 50; \
- const int __timeout = 5000; \
- if ((__expr) != (__expected)) { \
- QTest::qWait(0); \
- } \
- for (int __i = 0; __i < __timeout && ((__expr) != (__expected)); __i+=__step) { \
- QTest::qWait(__step); \
- } \
- QCOMPARE(__expr, __expected); \
- } while (0)
-
-void tst_QGLCameraAnimation::properties()
-{
- // Check the default property values.
- QGLCameraAnimation anim;
- QVERIFY(anim.camera() == 0);
- QVERIFY(anim.startEye() == QVector3D(0.0f, 0.0f, 10.0f));
- QVERIFY(anim.startUpVector() == QVector3D(0.0f, 1.0f, 0.0f));
- QVERIFY(anim.startCenter() == QVector3D(0.0f, 0.0f, 0.0f));
- QVERIFY(anim.endEye() == QVector3D(0.0f, 0.0f, 10.0f));
- QVERIFY(anim.endUpVector() == QVector3D(0.0f, 1.0f, 0.0f));
- QVERIFY(anim.endCenter() == QVector3D(0.0f, 0.0f, 0.0f));
- QCOMPARE(anim.duration(), 250);
- QVERIFY(anim.easingCurve() == QEasingCurve());
-
- // Change the properties.
- QGLCamera camera;
- anim.setCamera(&camera);
- anim.setStartEye(QVector3D(1, -2, 3));
- anim.setStartUpVector(QVector3D(-4, 5, -6));
- anim.setStartCenter(QVector3D(7, -8, 9));
- anim.setEndEye(QVector3D(-1, 2, -3));
- anim.setEndUpVector(QVector3D(4, -5, 6));
- anim.setEndCenter(QVector3D(-7, 8, -9));
- anim.setDuration(500);
- anim.setEasingCurve(QEasingCurve::OutQuad);
-
- // Check that the properties have their new values.
- QVERIFY(anim.camera() == &camera);
- QVERIFY(anim.startEye() == QVector3D(1, -2, 3));
- QVERIFY(anim.startUpVector() == QVector3D(-4, 5, -6));
- QVERIFY(anim.startCenter() == QVector3D(7, -8, 9));
- QVERIFY(anim.endEye() == QVector3D(-1, 2, -3));
- QVERIFY(anim.endUpVector() == QVector3D(4, -5, 6));
- QVERIFY(anim.endCenter() == QVector3D(-7, 8, -9));
- QCOMPARE(anim.duration(), 500);
- QVERIFY(anim.easingCurve() == QEasingCurve(QEasingCurve::OutQuad));
-}
-
-void tst_QGLCameraAnimation::animationStartEnd()
-{
- QGLCameraAnimation anim;
- QGLCamera camera;
- QGLCamera camera2;
-
- anim.setCamera(&camera);
- anim.setStartEye(QVector3D(1, -2, 3));
- anim.setStartUpVector(QVector3D(-4, 5, -6));
- anim.setStartCenter(QVector3D(7, -8, 9));
- anim.setEndEye(QVector3D(-1, 2, -3));
- anim.setEndUpVector(QVector3D(4, -5, 6));
- anim.setEndCenter(QVector3D(-7, 8, -9));
- anim.setDuration(1);
-
- // Verify the start state.
- anim.start();
- QVERIFY(camera.eye() == anim.startEye());
- QVERIFY(camera.upVector() == anim.startUpVector());
- QVERIFY(camera.center() == anim.startCenter());
-
- // Wait for the animation to end
- QTRY_COMPARE(anim.state(), QAbstractAnimation::Stopped);
- QVERIFY(camera.eye() == anim.endEye());
- QVERIFY(camera.upVector() == anim.endUpVector());
- QVERIFY(camera.center() == anim.endCenter());
-
- // Zero duration animation instantly transitions to the end state.
- anim.setCamera(&camera2);
- anim.setDuration(0);
- anim.start();
- QVERIFY(camera2.eye() == anim.endEye());
- QVERIFY(camera2.upVector() == anim.endUpVector());
- QVERIFY(camera2.center() == anim.endCenter());
-}
-
-QTEST_MAIN(tst_QGLCameraAnimation)
-
-#include "tst_qglcameraanimation.moc"
diff --git a/tests/auto/threed/qglcolladafxeffectfactory/collada_cube.xml b/tests/auto/threed/qglcolladafxeffectfactory/collada_cube.xml
deleted file mode 100644
index 85d30d58..00000000
--- a/tests/auto/threed/qglcolladafxeffectfactory/collada_cube.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<COLLADA xmlns="http://www.collada.org/2008/03/COLLADASchema" version="1.5.0">
- <asset>
- <created>2005-11-14T02:16:38Z</created>
- <modified>2005-11-15T11:36:38Z</modified>
- <revision>1.0</revision>
- </asset>
- <library_effects>
- <effect id="whitePhong">
- <profile_COMMON>
- <technique sid="phong1">
- <phong>
- <emission>
- <color>0 0 0.3 1.0</color>
- </emission>
- <ambient>
- <color>1.0 0 0 1.0</color>
- </ambient>
- <diffuse>
- <color>0 1 0 1.0</color>
- </diffuse>
- <specular>
- <color>1.0 1.0 1.0 1.0</color>
- </specular>
- <shininess>
- <float>20.0</float>
- </shininess>
- <reflective>
- <color>1.0 1.0 1.0 1.0</color>
- </reflective>
- <reflectivity>
- <float>0.5</float>
- </reflectivity>
- <transparent>
- <color>1.0 1.0 1.0 1.0</color>
- </transparent>
- <transparency>
- <float>1.0</float>
- </transparency>
- </phong>
- </technique>
- </profile_COMMON>
- </effect>
- </library_effects>
- <library_materials>
- <material id="whiteMaterial">
- <instance_effect url="#whitePhong"/>
- </material>
- </library_materials>
- <library_geometries>
- <geometry id="box" name="box">
- <mesh>
- <source id="box-Pos">
- <float_array id="box-Pos-array" count="24">
- -0.5 0.5 0.5
- 0.5 0.5 0.5
- -0.5 -0.5 0.5
- 0.5 -0.5 0.5
- -0.5 0.5 -0.5
- 0.5 0.5 -0.5
- -0.5 -0.5 -0.5
- 0.5 -0.5 -0.5
- </float_array>
- <technique_common>
- <accessor source="#box-Pos-array" count="8" stride="3">
- <param name="X" type="float" />
- <param name="Y" type="float" />
- <param name="Z" type="float" />
- </accessor>
- </technique_common>
- </source>
- <source id="box-0-Normal">
- <float_array id="box-0-Normal-array" count="18">
- 1.0 0.0 0.0
- -1.0 0.0 0.0
- 0.0 1.0 0.0
- 0.0 -1.0 0.0
- 0.0 0.0 1.0
- 0.0 0.0 -1.0
- </float_array>
- <technique_common>
- <accessor source="#box-0-Normal-array" count="6" stride="3">
- <param name="X" type="float"/>
- <param name="Y" type="float"/>
- <param name="Z" type="float"/>
- </accessor>
- </technique_common>
- </source>
- <vertices id="box-Vtx">
- <input semantic="POSITION" source="#box-Pos"/>
- </vertices>
- <polygons count="6" material="WHITE">
- <input semantic="VERTEX" source="#box-Vtx" offset="0"/>
- <input semantic="NORMAL" source="#box-0-Normal" offset="1"/>
- <p>0 4 2 4 3 4 1 4</p>
- <p>0 2 1 2 5 2 4 2</p>
- <p>6 3 7 3 3 3 2 3</p>
- <p>0 1 4 1 6 1 2 1</p>
- <p>3 0 7 0 5 0 1 0</p>
- <p>5 5 7 5 6 5 4 5</p>
- </polygons>
- </mesh>
- </geometry>
- </library_geometries>
- <library_visual_scenes>
- <visual_scene id="DefaultScene">
- <node id="Box" name="Box">
- <translate> 0 0 0</translate>
- <rotate> 0 0 1 0</rotate>
- <rotate> 0 1 0 0</rotate>
- <rotate> 1 0 0 0</rotate>
- <scale> 1 1 1</scale>
- <instance_geometry url="#box">
- <bind_material>
- <technique_common>
- <instance_material symbol="WHITE" target="#whiteMaterial"/>
- </technique_common>
- </bind_material>
- </instance_geometry>
- </node>
- </visual_scene>
- </library_visual_scenes>
- <scene>
- <instance_visual_scene url="#DefaultScene"/>
- </scene>
-</COLLADA>
-
diff --git a/tests/auto/threed/qglcolladafxeffectfactory/qglcolladafxeffectfactory.pro b/tests/auto/threed/qglcolladafxeffectfactory/qglcolladafxeffectfactory.pro
deleted file mode 100644
index 05540601..00000000
--- a/tests/auto/threed/qglcolladafxeffectfactory/qglcolladafxeffectfactory.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE = app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-INCLUDEPATH += ../../../../demos/shaderwizard/
-VPATH += ../../../../demos/shaderwizard/
-
-SOURCES += \
- tst_qglcolladafxeffectfactory.cpp
-
-OTHER_FILES += collada_cube.xml
-RESOURCES += tst_qglcolladafxeffectfactory.qrc
diff --git a/tests/auto/threed/qglcolladafxeffectfactory/rose01.jpg b/tests/auto/threed/qglcolladafxeffectfactory/rose01.jpg
deleted file mode 100644
index e65d975b..00000000
--- a/tests/auto/threed/qglcolladafxeffectfactory/rose01.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/auto/threed/qglcolladafxeffectfactory/tst_qglcolladafxeffectfactory.cpp b/tests/auto/threed/qglcolladafxeffectfactory/tst_qglcolladafxeffectfactory.cpp
deleted file mode 100644
index b60f122b..00000000
--- a/tests/auto/threed/qglcolladafxeffectfactory/tst_qglcolladafxeffectfactory.cpp
+++ /dev/null
@@ -1,312 +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 <QtTest/QtTest>
-#include "qglcolladafxeffectfactory.h"
-#include <QXmlStreamReader>
-#include <QColor>
-#include "qgl.h"
-
-QT_BEGIN_NAMESPACE
-class QGLColladaFxEffect;
-QT_END_NAMESPACE
-
-Q_DECLARE_METATYPE(QGLColladaFxEffect*)
-
-static void cleanupEffectList(QList<QGLColladaFxEffect*> &effects)
-{
- while (effects.count())
- {
- delete effects.back();
- effects.pop_back();
- }
-}
-
-
-
-// Inherit from QGLColladaFxEffectFactory to get access to it's innards
-class tst_QGLColladaFxEffectFactory : public QObject, QGLColladaFxEffectFactory
-{
- Q_OBJECT
-public:
- tst_QGLColladaFxEffectFactory() {}
- ~tst_QGLColladaFxEffectFactory() {}
-
-private slots:
- void create_data();
- void create();
- void processFloatList_data();
- void processFloatList();
- void processFloatListArray_data();
- void processFloatListArray();
- void processColorElement_data();
- void processColorElement();
- void processLibraryImagesElement();
- void loadEffectsFromFile();
- void exportImportEffect_data();
- void exportImportEffect();
-};
-
-
-
-void tst_QGLColladaFxEffectFactory::create_data()
-{
- QTest::addColumn<QString>("fileName");
- QTest::addColumn<int>("effectCount");
-
- QTest::newRow("null") << "" << 0;
- QTest::newRow("nonexistent file") << "nonexistentfile.dae" << 0;
- QTest::newRow("collada cube example") << ":/collada_cube.xml" << 1;
-}
-
-
-
-void tst_QGLColladaFxEffectFactory::create()
-{
- QFETCH(QString, fileName);
- QFETCH(int, effectCount);
-
- QList<QGLColladaFxEffect*> effects = QGLColladaFxEffectFactory::loadEffectsFromFile(fileName);
- QCOMPARE(effects.count(), effectCount);
- cleanupEffectList(effects);
-}
-
-
-
-void tst_QGLColladaFxEffectFactory::processFloatList_data()
-{
- QTest::addColumn<QString>("xmlString");
- QTest::addColumn<QVariant >("expectedResult");
-
- QTest::newRow("null") << "" << QVariant();
-
- QVariant expectedSingleResult = 0.456f;
- QTest::newRow("single_float") << "<floats>0.456</floats>" << expectedSingleResult;
-
- QVariant expectedPrecisionResult = 1.234567f;
- QTest::newRow("seven digit accuracy") << "<floats>1.234567</floats>" << expectedPrecisionResult;
-
- QVariant expected3Dresult = QVector3D(0.0f, 0.3f, 6.6f);
- QTest::newRow("3 floats to vector 3D") << "<floats>0.0 0.3 6.6</floats>" << expected3Dresult;
-
- QVariant expected4DResult = QVector4D(0.0f, 1.1f, 2.2f, 3.3f);
- QTest::newRow("4 floats to vector 4D") << "<floats>0.0 1.1 2.2 3.3</floats>" << expected4DResult;
-
- QVariant expectedColorResult = QVector4D(0.0f, 1.1f, 2.2f, 3.3f);
- QTest::newRow("4 float color to vector 4D") << "<color>0.0 1.1 2.2 3.3</color>" << expectedColorResult;
-}
-
-
-
-void tst_QGLColladaFxEffectFactory::processFloatList()
-{
- QFETCH(QString, xmlString);
- QFETCH(QVariant, expectedResult);
-
- QXmlStreamReader xml(xmlString);
-
- xml.readNext(); // startDocument
- xml.readNext();
-
- QVariant result = QGLColladaFxEffectFactory::processFloatList( xml );
-
- QCOMPARE(result, expectedResult);
-}
-
-void tst_QGLColladaFxEffectFactory::processFloatListArray_data()
-{
- QTest::addColumn<QString>("xmlString");
- QTest::addColumn<QArray<float> >("expectedResult");
-
- QArray<float> expectedSevenDigitArray;
- expectedSevenDigitArray << 1234567.0f << 1.234567f << 76.54321f << 1111.111f << 22222.22f << 7645213.0f;
- QTest::newRow("seven_digits") << "<floats>1234567.0 1.234567 76.54321 1111.111 22222.22 7645213.0</floats>" << expectedSevenDigitArray;
-
-}
-
-void tst_QGLColladaFxEffectFactory::processFloatListArray()
-{
- QFETCH(QString, xmlString);
- QFETCH(QArray<float>, expectedResult);
-
- QXmlStreamReader xml(xmlString);
-
- xml.readNext(); // startDocument
- xml.readNext();
-
- QArray<float> result = QGLColladaFxEffectFactory::processFloatList( xml ).value<QArray<float> >();
-
- QCOMPARE(result, expectedResult);
-
-}
-
-void tst_QGLColladaFxEffectFactory::processColorElement_data()
-{
- QTest::addColumn<QString>("xmlString");
- QTest::addColumn<QColor>("expectedResult");
-
- QColor errorColor = QColor(0, 0, 0, 255);
- QTest::newRow("null") << "" << errorColor;
-
- QColor expectedColor3dResult = QColor::fromRgbF(0.0f, 0.4f, 0.8f);
- QTest::newRow("color 3 floats") << "<color>0.0 0.4 0.8</color>" << expectedColor3dResult;
-
- QColor expectedColor4dResult = QColor::fromRgbF(0.0f, 0.2f, 0.4f, 0.8f);
- QTest::newRow("color 4 floats") << "<color>0.0 0.2 0.4 0.8</color>" << expectedColor4dResult;
-
- QTest::newRow("malformed color 1 float") << "<color>0.5</color>" << errorColor;
- QTest::newRow("malformed color 2 float") << "<color>0.1 0.7</color>" << errorColor;
- QTest::newRow("malformed color 5 float") << "<color>0.1 0.2 0.3 0.4 0.5</color>" << errorColor;
-}
-
-
-
-void tst_QGLColladaFxEffectFactory::processColorElement()
-{
- QFETCH(QString, xmlString);
- QFETCH(QColor, expectedResult);
-
- QXmlStreamReader xml(xmlString);
-
- xml.readNext(); // startDocument
- xml.readNext();
-
- QColor result = QGLColladaFxEffectFactory::processColorElement( xml );
- QCOMPARE(result, expectedResult);
-}
-
-
-void tst_QGLColladaFxEffectFactory::processLibraryImagesElement()
-{
- // Example from Collada Fx 1.4 (escapes and ':' character added):
- QXmlStreamReader xml("<library_images>\
- <image name=\"Rose\">\
- <init_from>\
- :../flowers/rose01.jpg\
- </init_from>\
- </image>\
- </library_images>");
-
- xml.readNext(); // startDocument
- xml.readNext();
-
- ResultState state;
- QGLColladaFxEffectFactory::processLibraryImagesElement( xml, &state );
-
- // The structure is just an implementation detail, but the param and image
- // should be well formed:
- QVariant param = state.paramNames.values().at(0);
- QCOMPARE(param.type(), QVariant::Image);
- QCOMPARE(state.paramNames.value(QLatin1String("Rose")), param);
- QImage image = param.value<QImage>();
- QCOMPARE(image.size(), QSize(50,75));
-}
-
-void tst_QGLColladaFxEffectFactory::loadEffectsFromFile()
-{
- QList<QGLColladaFxEffect*> cubeResult =
- QGLColladaFxEffectFactory::loadEffectsFromFile(QLatin1String(":/collada_cube.xml"));
-
- QCOMPARE(cubeResult.count(), 1);
-
- QGLColladaFxEffect* cubeEffect = cubeResult.at(0);
-
- QEXPECT_FAIL("", "Missing functionality", Continue);
- QCOMPARE(cubeEffect->id(), QLatin1String("whitePhong"));
-
- QCOMPARE(cubeEffect->sid(), QLatin1String("phong1"));
- QVERIFY2(cubeEffect->material()->emittedLight() ==
- QColor::fromRgbF(0.0f, 0.0f, 0.3f, 1.0f), "Emission color doesn't match");
- QVERIFY2(cubeEffect->material()->ambientColor() ==
- QColor::fromRgbF(1.0f, 0.0f, 0.0f, 1.0f), "Ambient color doesn't match");
- QVERIFY2(cubeEffect->material()->diffuseColor() == QColor::fromRgbF(0.0f, 1.0f, 0.0f, 1.0f),
- "Diffuse color doesn't match");
- QVERIFY2(cubeEffect->material()->specularColor() ==
- QColor::fromRgbF(1.0f, 1.0f, 1.0f, 1.0f),
- "Specular color doesn't match");
- QVERIFY2(cubeEffect->material()->shininess() == 20, "Shininess doesn't match");
-}
-
-void tst_QGLColladaFxEffectFactory::exportImportEffect_data()
-{
- QTest::addColumn<QGLColladaFxEffect*>("effect");
- QTest::addColumn<QString>("effectId");
- QTest::addColumn<QString>("techniqueSid");
-
- QGLColladaFxEffect* effect = new QGLColladaFxEffect;
- QTest::newRow("empty effect") << effect << QString::fromLatin1("EmptyEffect") << QString::fromLatin1("EmptyTechnique");
-
- effect = new QGLColladaFxEffect;
- effect->setFragmentShader("test fragment shader");
- effect->setVertexShader("Test vertex shader");
- QGLMaterial* material = new QGLMaterial;
- material->setAmbientColor(QColor(1,2,3));
- material->setDiffuseColor(QColor(2,3,4));
- material->setEmittedLight(QColor(255,255,255));
- material->setShininess(129);
- material->setSpecularColor(QColor(3,4,5));
- effect->setMaterial(material);
-
- QTest::newRow("Test Effect") << effect << QString::fromLatin1("TestEffect") << QString::fromLatin1("TestTechnique");
-}
-
-void tst_QGLColladaFxEffectFactory::exportImportEffect()
-{
- QFETCH(QGLColladaFxEffect*, effect);
- QFETCH(QString, effectId);
- QFETCH(QString, techniqueSid);
- QString colladaEffectString = QGLColladaFxEffectFactory::exportEffect(effect, effectId, techniqueSid);
- QXmlStreamReader xml(colladaEffectString);
-
- QList<QGLColladaFxEffect*> importedEffects = QGLColladaFxEffectFactory::loadEffectsFromXml(xml);
- QCOMPARE(importedEffects.count(), 1);
-
- QGLColladaFxEffect* importedEffect = importedEffects[0];
- QCOMPARE(effect->fragmentShader(), importedEffect->fragmentShader());
- QCOMPARE(effect->vertexShader(), importedEffect->vertexShader());
- QEXPECT_FAIL("Test Effect", "QGLColladaFxEffect import/export does not respect materials", Continue);
- QCOMPARE(effect->material(), importedEffect->material());
- QCOMPARE(effect->supportsPicking(), importedEffect->supportsPicking());
-}
-
-QTEST_APPLESS_MAIN(tst_QGLColladaFxEffectFactory)
-
-#include "tst_qglcolladafxeffectfactory.moc"
diff --git a/tests/auto/threed/qglcolladafxeffectfactory/tst_qglcolladafxeffectfactory.qrc b/tests/auto/threed/qglcolladafxeffectfactory/tst_qglcolladafxeffectfactory.qrc
deleted file mode 100644
index 8d4efc40..00000000
--- a/tests/auto/threed/qglcolladafxeffectfactory/tst_qglcolladafxeffectfactory.qrc
+++ /dev/null
@@ -1,8 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>collada_cube.xml</file>
- </qresource>
- <qresource prefix="/../flowers">
- <file>rose01.jpg</file>
- </qresource>
-</RCC>
diff --git a/tests/auto/threed/qglcube/qglcube.pro b/tests/auto/threed/qglcube/qglcube.pro
deleted file mode 100644
index 4153abf2..00000000
--- a/tests/auto/threed/qglcube/qglcube.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-INCLUDEPATH += ../../../shared
-SOURCES += tst_qglcube.cpp
diff --git a/tests/auto/threed/qglcube/tst_qglcube.cpp b/tests/auto/threed/qglcube/tst_qglcube.cpp
deleted file mode 100644
index d43fb44c..00000000
--- a/tests/auto/threed/qglcube/tst_qglcube.cpp
+++ /dev/null
@@ -1,185 +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 <QtTest/QtTest>
-
-#include "qglcube.h"
-#include "qglbuilder.h"
-#include "qtest_helpers.h"
-
-class tst_QGLCube : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLCube() {}
- ~tst_QGLCube() {}
-
-private slots:
- void create();
- void size();
-};
-
-#define QGL_CUBE_SIZE (6 * 6 * (3 + 3 + 2))
-static float const cubeVertices[QGL_CUBE_SIZE] = {
- -0.5f, -0.5f, -0.5f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f,
- -0.5f, -0.5f, 0.5f, -1.0f, 0.0f, 0.0f, 1.0f, 0.0f,
- -0.5f, 0.5f, 0.5f, -1.0f, 0.0f, 0.0f, 1.0f, 1.0f,
- -0.5f, -0.5f, -0.5f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f,
- -0.5f, 0.5f, 0.5f, -1.0f, 0.0f, 0.0f, 1.0f, 1.0f,
- -0.5f, 0.5f, -0.5f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f,
-
- -0.5f, 0.5f, -0.5f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f,
- -0.5f, 0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f,
- 0.5f, 0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f,
- -0.5f, 0.5f, -0.5f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f,
- 0.5f, 0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f,
- 0.5f, 0.5f, -0.5f, 0.0f, 1.0f,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f,
- -0.5f, -0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f,
- 0.5f, 0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 0.0f, 1.0f,
- -0.5f, -0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f,
- -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 1.0f, 1.0f
-};
-
-static int findVertex(const QGeometryData &ary, const QVector3D &v, const QVector3D &n)
-{
- int result = -1;
- for (int i = 0; i < ary.count() && result == -1; ++i)
- {
- if (qFuzzyCompare(v, ary.vertexAt(i)) && qFuzzyCompare(n, ary.normalAt(i)))
- result = i;
- }
- if (result == -1)
- {
- qDebug() << "Could not find expected vertex" << v << "with normal" << n;
- }
- return result;
-}
-
-void tst_QGLCube::create()
-{
- QGLCube cube;
- QGLBuilder list;
- list.newSection(QGL::Faceted);
- QGLSceneNode *node = list.currentNode();
- list << cube;
- QGLSceneNode *root = list.finalizedSceneNode();
- QGeometryData ary = node->geometry();
- for (int i = 0; i < QGL_CUBE_SIZE; i += 8)
- {
- const QVector3D *vdata = reinterpret_cast<const QVector3D*>(cubeVertices + i);
- const QVector2D *tdata = reinterpret_cast<const QVector2D*>(cubeVertices + i + 6);
- int ix = findVertex(ary, vdata[0], vdata[1]);
- QVERIFY(ix != -1);
- QCOMPARE(ary.texCoordAt(ix), tdata[0]);
- }
- delete root;
-}
-
-void tst_QGLCube::size()
-{
- qreal size0 = 3.2f;
- qreal size1 = 5.2f;
- QGLCube cube(size0);
- QCOMPARE(cube.size(), size0);
- {
- QGLBuilder list;
- list.newSection(QGL::Faceted);
- QGLSceneNode *node = list.currentNode();
- list << cube;
- QGLSceneNode *root = list.finalizedSceneNode();
- QGeometryData ary = node->geometry();
- for (int i = 0, v = 0; i < QGL_CUBE_SIZE; ++v, i += 8)
- {
- const QVector3D *vdata = reinterpret_cast<const QVector3D*>(cubeVertices + i);
- const QVector2D *tdata = reinterpret_cast<const QVector2D*>(cubeVertices + i + 6);
- int ix = findVertex(ary, vdata[0] * size0, vdata[1]);
- QVERIFY(ix != -1);
- QCOMPARE(ary.texCoordAt(ix), tdata[0]);
- }
- delete root;
- }
- cube.setSize(size1);
- {
- QGLBuilder list;
- list.newSection(QGL::Faceted);
- QGLSceneNode *node = list.currentNode();
- list << cube;
- QGLSceneNode *root = list.finalizedSceneNode();
- QGeometryData ary = node->geometry();
- for (int i = 0, v = 0; i < QGL_CUBE_SIZE; ++v, i += 8)
- {
- const QVector3D *vdata = reinterpret_cast<const QVector3D*>(cubeVertices + i);
- const QVector2D *tdata = reinterpret_cast<const QVector2D*>(cubeVertices + i + 6);
- int ix = findVertex(ary, vdata[0] * size1, vdata[1]);
- QVERIFY(ix != -1);
- QCOMPARE(ary.texCoordAt(ix), tdata[0]);
- }
- delete root;
- }
-}
-
-QTEST_APPLESS_MAIN(tst_QGLCube)
-
-#include "tst_qglcube.moc"
diff --git a/tests/auto/threed/qglcylinder/qglcylinder.pro b/tests/auto/threed/qglcylinder/qglcylinder.pro
deleted file mode 100644
index c8f6e42f..00000000
--- a/tests/auto/threed/qglcylinder/qglcylinder.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-INCLUDEPATH += ../../../shared
-SOURCES += tst_qglcylinder.cpp
diff --git a/tests/auto/threed/qglcylinder/tst_qglcylinder.cpp b/tests/auto/threed/qglcylinder/tst_qglcylinder.cpp
deleted file mode 100644
index ba6da836..00000000
--- a/tests/auto/threed/qglcylinder/tst_qglcylinder.cpp
+++ /dev/null
@@ -1,283 +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 <QtTest/QtTest>
-
-#include "qglcylinder.h"
-#include "qglbuilder.h"
-
-class tst_QGLCylinder : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLCylinder() {}
- ~tst_QGLCylinder() {}
-
-private slots:
- void create();
- void modify();
- void build();
-
-private:
- bool validateCylinder(QGLSceneNode *node, qreal topDiameter, qreal baseDiameter, qreal height, bool top, bool base);
-};
-
-void tst_QGLCylinder::create()
-{
- //Test all possible constructor parameters to ensure they are actually
- //setting the correct values.
-
- //Defaults
- QGLCylinder cylinder1;
- QCOMPARE(cylinder1.diameterTop(), qreal(1.0f));
- QCOMPARE(cylinder1.diameterBottom(), qreal(1.0f));
- QCOMPARE(cylinder1.height(), qreal(1.0f));
- QCOMPARE(cylinder1.slices(), 6);
- QCOMPARE(cylinder1.layers(), 3);
- QCOMPARE(cylinder1.topEnabled(), true);
- QCOMPARE(cylinder1.baseEnabled(), true);
-
- //Top diameter
- QGLCylinder cylinder2(0.5f);
- QCOMPARE(cylinder2.diameterTop(), qreal(0.5f));
- QCOMPARE(cylinder2.diameterBottom(), qreal(1.0f));
- QCOMPARE(cylinder2.height(), qreal(1.0f));
- QCOMPARE(cylinder2.slices(), 6);
- QCOMPARE(cylinder2.layers(), 3);
- QCOMPARE(cylinder2.topEnabled(), true);
- QCOMPARE(cylinder2.baseEnabled(), true);
-
- //Top and Bottom diameter
- QGLCylinder cylinder3(0.5f, 1.5f);
- QCOMPARE(cylinder3.diameterTop(), qreal(0.5f));
- QCOMPARE(cylinder3.diameterBottom(), qreal(1.5f));
- QCOMPARE(cylinder3.height(), qreal(1.0f));
- QCOMPARE(cylinder3.slices(), 6);
- QCOMPARE(cylinder3.layers(), 3);
- QCOMPARE(cylinder3.topEnabled(), true);
- QCOMPARE(cylinder3.baseEnabled(), true);
-
- //Top & Bottom diameter, Height
- QGLCylinder cylinder4(0.5f, 1.5f, 3.0f);
- QCOMPARE(cylinder4.diameterTop(), qreal(0.5f));
- QCOMPARE(cylinder4.diameterBottom(), qreal(1.5f));
- QCOMPARE(cylinder4.height(), qreal(3.0f));
- QCOMPARE(cylinder4.slices(), 6);
- QCOMPARE(cylinder4.layers(), 3);
- QCOMPARE(cylinder4.topEnabled(), true);
- QCOMPARE(cylinder4.baseEnabled(), true);
-
- //Top & Bottom diameter, Height, Slices
- QGLCylinder cylinder5(0.5f, 1.5f, 3.0f, 10);
- QCOMPARE(cylinder5.diameterTop(), qreal(0.5f));
- QCOMPARE(cylinder5.diameterBottom(), qreal(1.5f));
- QCOMPARE(cylinder5.height(), qreal(3.0f));
- QCOMPARE(cylinder5.slices(), 10);
- QCOMPARE(cylinder5.layers(), 3);
- QCOMPARE(cylinder5.topEnabled(), true);
- QCOMPARE(cylinder5.baseEnabled(), true);
-
- //Top & Bottom diameter, Height, Slices, Layers
- QGLCylinder cylinder6(0.5f, 1.5f, 3.0f, 10, 5);
- QCOMPARE(cylinder6.diameterTop(), qreal(0.5f));
- QCOMPARE(cylinder6.diameterBottom(), qreal(1.5f));
- QCOMPARE(cylinder6.height(), qreal(3.0f));
- QCOMPARE(cylinder6.slices(), 10);
- QCOMPARE(cylinder6.layers(), 5);
- QCOMPARE(cylinder6.topEnabled(), true);
- QCOMPARE(cylinder6.baseEnabled(), true);
-
- //Top & Bottom diameter, Height, Slices, Layers, Top disabled
- QGLCylinder cylinder7(0.5f, 1.5f, 3.0f, 10, 5, false);
- QCOMPARE(cylinder7.diameterTop(), qreal(0.5f));
- QCOMPARE(cylinder7.diameterBottom(), qreal(1.5f));
- QCOMPARE(cylinder7.height(), qreal(3.0f));
- QCOMPARE(cylinder7.slices(), 10);
- QCOMPARE(cylinder7.layers(), 5);
- QCOMPARE(cylinder7.topEnabled(), false);
- QCOMPARE(cylinder7.baseEnabled(), true);
-
- //Top & Bottom diameter, Height, Slices, Layers, Top disabled, Bottom disabled.
- QGLCylinder cylinder8(0.5f, 1.5f, 3.0f, 10, 5, false, false);
- QCOMPARE(cylinder8.diameterTop(), qreal(0.5f));
- QCOMPARE(cylinder8.diameterBottom(), qreal(1.5f));
- QCOMPARE(cylinder8.height(), qreal(3.0f));
- QCOMPARE(cylinder8.slices(), 10);
- QCOMPARE(cylinder8.layers(), 5);
- QCOMPARE(cylinder8.topEnabled(), false);
- QCOMPARE(cylinder8.baseEnabled(), false);
-}
-
-void tst_QGLCylinder::modify()
-{
- //Modify all sphere parameters to ensure they're working.
- QGLCylinder cylinder1;
-
- cylinder1.setDiameterTop(0.5f);
- QCOMPARE(cylinder1.diameterTop(), qreal(0.5f));
-
- cylinder1.setDiameterBottom(1.5f);
- QCOMPARE(cylinder1.diameterBottom(), qreal(1.5f));
-
- cylinder1.setHeight(3.0f);
- QCOMPARE(cylinder1.height(), qreal(3.0f));
-
- cylinder1.setSlices(10);
- QCOMPARE(cylinder1.slices(), 10);
-
- cylinder1.setLayers(5);
- QCOMPARE(cylinder1.layers(), 5);
-
- cylinder1.setTopEnabled(false);
- QCOMPARE(cylinder1.topEnabled(), false);
-
- cylinder1.setBaseEnabled(false);
- QCOMPARE(cylinder1.baseEnabled(), false);
-}
-
-// Validates the geometry in a cylinder node to check that all vertices
-// on the top and bottom are at the correct height, and that all normals
-// are of length 1. It also ensures that all points are within the defined
-// top and bottom diameters for the cylinder.
-bool tst_QGLCylinder::validateCylinder(QGLSceneNode *node, qreal topDiameter, qreal baseDiameter, qreal height, bool topAttached, bool baseAttached)
-{
- QGLSceneNode *lid = node->findChild<QGLSceneNode *>("Cylinder Top");
- QGLSceneNode *sides = node->findChild<QGLSceneNode *>("Cylinder Sides");
- QGLSceneNode *base = node->findChild<QGLSceneNode *>("Cylinder Base");
-
- //Top of the cylinder - test the normals and vertical position
- if (topAttached)
- {
- if (!lid) {
- return false;
- }
-
- QGeometryData dataTop = lid->geometry();
- int start = lid->start();
- int count = lid->count();
-
- if (count <= 0) {
- return false;
- }
- QGL::IndexArray indices = dataTop.indices();
-
- for (int index = 0; index < count; ++index) {
- QVector3D v = dataTop.vertexAt(indices.at(index + start));
- QVector3D n = dataTop.normalAt(indices.at(index + start));
- if (v.z()!=height) {
- return false;
- }
- QVector2D p(v.x(), v.y());
- if (qAbs(p.length())>(topDiameter/2.0)) {
- return false;
- }
- if (qAbs(n.length() - 1.0f) >= 0.0001) {
- return false;
- }
- }
- }
-
- //Base of the cylinder - test the normals and vertical position
- if (baseAttached)
- {
- if (!base)
- return false;
- QGeometryData dataBase = sides->geometry();
- int start = sides->start();
- int count = sides->count();
- if (count <= 0)
- return false;
- QGL::IndexArray indices = dataBase.indices();
- for (int index = 0; index < count; ++index) {
- QVector3D v = dataBase.vertexAt(indices.at(index + start));
- QVector3D n = dataBase.normalAt(indices.at(index + start));
- QVector2D p(v.x(), v.y());
- if (qAbs(p.length())>(baseDiameter/2.0)) {
- return false;
- }
- if (qAbs(n.length() - 1.0f) >= 0.0001) {
- return false;
- }
- }
- }
-
- //Sides of the cylinder - just a basic test of the normals here.
- if (!sides) {
- return false;
- }
- QGeometryData dataSides = sides->geometry();
- int start = sides->start();
- int count = sides->count();
-
- if (count <= 0) {
- return false;
- }
- QGL::IndexArray indices = dataSides.indices();
- for (int index = 0; index < count; ++index) {
- QVector3D n = dataSides.normalAt(indices.at(index + start));
- if (qAbs(n.length() - 1.0f) >= 0.0001) {
- return false;
- }
- }
-
- //If we've made it this far, we must have passed the test.
- return true;
-
-}
-
-void tst_QGLCylinder::build()
-{
- QGLBuilder builder1;
- builder1 << QGLCylinder(0.5f, 1.5f, 3.0f);
- QGLSceneNode *root1 = builder1.finalizedSceneNode();
- QVERIFY(validateCylinder(root1, 0.5f, 1.5f, 3.0f, true, true));
- delete root1;
-
- QGLBuilder builder2;
- builder2 << QGLCylinder(0.5f, 1.5f, 3.0f, 6,3,false, false);
- QGLSceneNode *root2 = builder2.finalizedSceneNode();
- QVERIFY(validateCylinder(root2, 0.5f, 1.5f, 3.0f, false, false));
- delete root2;
-}
-
-QTEST_APPLESS_MAIN(tst_QGLCylinder)
-
-#include "tst_qglcylinder.moc"
diff --git a/tests/auto/threed/qglindexbuffer/qglindexbuffer.pro b/tests/auto/threed/qglindexbuffer/qglindexbuffer.pro
deleted file mode 100644
index ede0e40c..00000000
--- a/tests/auto/threed/qglindexbuffer/qglindexbuffer.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qglindexbuffer.cpp
diff --git a/tests/auto/threed/qglindexbuffer/tst_qglindexbuffer.cpp b/tests/auto/threed/qglindexbuffer/tst_qglindexbuffer.cpp
deleted file mode 100644
index a7083762..00000000
--- a/tests/auto/threed/qglindexbuffer/tst_qglindexbuffer.cpp
+++ /dev/null
@@ -1,478 +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 <QtTest/QtTest>
-#include <QtOpenGL/qgl.h>
-#include "qglindexbuffer.h"
-#include "qopenglfunctions.h"
-
-class tst_QGLIndexBuffer : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLIndexBuffer() {}
- ~tst_QGLIndexBuffer() {}
-
-private slots:
- void initTestCase();
- void create();
- void replaceIndexes();
- void appendSimple_data();
- void appendSimple();
- void appendCombined_data();
- void appendCombined();
-
-private:
- QArray<ushort> indexesUShort1024;
- QArray<uint> indexesUInt1024;
- QArray<ushort> indexesUShort1024Rev;
- QArray<uint> indexesUInt1024Rev;
-};
-
-void tst_QGLIndexBuffer::initTestCase()
-{
- for (uint index = 0; index < 1024; ++index) {
- indexesUShort1024.append(ushort(index));
- indexesUInt1024.append(index);
- indexesUShort1024Rev.append(ushort(1024 - index));
- indexesUInt1024Rev.append(1024 - index);
- }
-}
-
-void tst_QGLIndexBuffer::create()
-{
- QGLIndexBuffer buf1;
- QVERIFY(buf1.usagePattern() == QGLBuffer::StaticDraw);
- QVERIFY(buf1.elementType() == GL_UNSIGNED_SHORT);
- QVERIFY(buf1.indexesUShort().isEmpty());
- QVERIFY(buf1.indexesUInt().isEmpty());
- QVERIFY(buf1.isEmpty());
- QCOMPARE(buf1.indexCount(), 0);
- QVERIFY(!buf1.buffer().isCreated());
- QVERIFY(!buf1.isUploaded());
-
- // Setting an index array as ushort must stay ushort.
- buf1.setIndexes(indexesUShort1024);
- QVERIFY(buf1.usagePattern() == QGLBuffer::StaticDraw);
- QVERIFY(buf1.elementType() == GL_UNSIGNED_SHORT);
- QVERIFY(buf1.indexesUShort() == indexesUShort1024);
- QVERIFY(buf1.indexesUInt().isEmpty());
- QVERIFY(!buf1.isEmpty());
- QCOMPARE(buf1.indexCount(), 1024);
- QVERIFY(!buf1.buffer().isCreated());
- QVERIFY(!buf1.isUploaded());
-
- // Setting an index array as uint may convert to ushort on
- // embedded systems that don't have GL_OES_element_index_uint.
- buf1.setIndexes(indexesUInt1024);
- QVERIFY(buf1.usagePattern() == QGLBuffer::StaticDraw);
- if (buf1.elementType() == GL_UNSIGNED_SHORT) {
- QVERIFY(buf1.elementType() == GL_UNSIGNED_SHORT);
- QVERIFY(buf1.indexesUShort() == indexesUShort1024);
- QVERIFY(buf1.indexesUInt().isEmpty());
- } else {
- QVERIFY(buf1.elementType() == GL_UNSIGNED_INT);
- QVERIFY(buf1.indexesUShort().isEmpty());
- QVERIFY(buf1.indexesUInt() == indexesUInt1024);
- }
- QVERIFY(!buf1.isEmpty());
- QCOMPARE(buf1.indexCount(), 1024);
- QVERIFY(!buf1.buffer().isCreated());
- QVERIFY(!buf1.isUploaded());
-
- // Set back to ushort again.
- buf1.setIndexes(indexesUShort1024);
- QVERIFY(buf1.usagePattern() == QGLBuffer::StaticDraw);
- QVERIFY(buf1.elementType() == GL_UNSIGNED_SHORT);
- QVERIFY(buf1.indexesUShort() == indexesUShort1024);
- QVERIFY(buf1.indexesUInt().isEmpty());
- QVERIFY(!buf1.isEmpty());
- QCOMPARE(buf1.indexCount(), 1024);
- QVERIFY(!buf1.buffer().isCreated());
- QVERIFY(!buf1.isUploaded());
-}
-
-void tst_QGLIndexBuffer::replaceIndexes()
-{
- QGLIndexBuffer buf1;
- buf1.setIndexes(indexesUShort1024);
- buf1.replaceIndexes(0, indexesUShort1024Rev);
- QCOMPARE(buf1.indexCount(), indexesUShort1024Rev.size());
- QVERIFY(buf1.indexesUShort() == indexesUShort1024Rev);
-
- QArray<ushort> result1(indexesUShort1024Rev);
- result1.replace(512, indexesUShort1024.constData(), indexesUShort1024.size());
- buf1.replaceIndexes(512, indexesUShort1024);
- QVERIFY(buf1.indexesUShort() == result1);
- QCOMPARE(buf1.indexCount(), result1.size());
-
- QGLIndexBuffer buf2;
- buf2.setIndexes(indexesUInt1024);
- buf2.replaceIndexes(0, indexesUInt1024Rev);
- QCOMPARE(buf2.indexCount(), indexesUShort1024Rev.size());
- if (buf2.elementType() == GL_UNSIGNED_SHORT) {
- QVERIFY(buf2.indexesUShort() == indexesUShort1024Rev);
- buf2.replaceIndexes(512, indexesUInt1024);
- QVERIFY(buf2.indexesUShort() == result1);
- QCOMPARE(buf2.indexCount(), result1.size());
- } else {
- QVERIFY(buf2.indexesUInt() == indexesUInt1024Rev);
- QArray<uint> result2(indexesUInt1024Rev);
- result2.replace(512, indexesUInt1024.constData(), indexesUInt1024.size());
- buf2.replaceIndexes(512, indexesUInt1024);
- QVERIFY(buf2.indexesUInt() == result2);
- QCOMPARE(buf2.indexCount(), result2.size());
- }
-}
-
-void tst_QGLIndexBuffer::appendSimple_data()
-{
- QTest::addColumn<int>("buf1Type");
- QTest::addColumn<int>("buf2Type");
-
- QTest::newRow("ushort, ushort")
- << int(GL_UNSIGNED_SHORT) << int(GL_UNSIGNED_SHORT);
- QTest::newRow("ushort, uint")
- << int(GL_UNSIGNED_SHORT) << int(GL_UNSIGNED_INT);
- QTest::newRow("uint, ushort")
- << int(GL_UNSIGNED_INT) << int(GL_UNSIGNED_SHORT);
- QTest::newRow("uint, uint")
- << int(GL_UNSIGNED_INT) << int(GL_UNSIGNED_INT);
-}
-
-void tst_QGLIndexBuffer::appendSimple()
-{
- QFETCH(int, buf1Type);
- QFETCH(int, buf2Type);
-
- QGLIndexBuffer buf1;
- QGLIndexBuffer buf2;
- if (buf1Type == GL_UNSIGNED_SHORT)
- buf1.setIndexes(indexesUShort1024);
- else
- buf1.setIndexes(indexesUInt1024);
- if (buf2Type == GL_UNSIGNED_SHORT)
- buf2.setIndexes(indexesUShort1024Rev);
- else
- buf2.setIndexes(indexesUInt1024Rev);
- buf1.append(buf2, 23);
-
- if (buf1.elementType() == GL_UNSIGNED_SHORT) {
- QArray<ushort> result1(indexesUShort1024);
- for (int index = 0; index < indexesUShort1024Rev.size(); ++index)
- result1.append(indexesUShort1024Rev[index] + 23);
- QVERIFY(buf1.indexesUShort() == result1);
- QCOMPARE(buf1.indexCount(), result1.size());
- } else {
- QArray<uint> result2(indexesUInt1024);
- for (int index = 0; index < indexesUInt1024Rev.size(); ++index)
- result2.append(indexesUInt1024Rev[index] + 23);
- QVERIFY(buf1.indexesUInt() == result2);
- QCOMPARE(buf1.indexCount(), result2.size());
- }
-}
-
-void tst_QGLIndexBuffer::appendCombined_data()
-{
- QTest::addColumn<int>("combineMode");
- QTest::addColumn<int>("offset");
- QTest::addColumn<QString>("buf1Values");
- QTest::addColumn<QString>("buf2Values");
- QTest::addColumn<QString>("resultValues");
-
- QTest::newRow("triangles")
- << int(QGL::Triangles) << 0
- << "0 1 2 3 4 5"
- << "4 5 6 7 8 9"
- << "0 1 2 3 4 5 4 5 6 7 8 9";
-
- QTest::newRow("triangles, empty A")
- << int(QGL::Triangles) << 20
- << ""
- << "4 5 6 7 8"
- << "24 25 26 27 28";
-
- QTest::newRow("triangles, empty B")
- << int(QGL::Triangles) << 10
- << "0 1 2 3 4 5"
- << ""
- << "0 1 2 3 4 5";
-
- QTest::newRow("triangle strip, even")
- << int(QGL::TriangleStrip) << 2
- << "0 1 2 3"
- << "0 1 2 3"
- << "0 1 2 3 4 5";
-
- QTest::newRow("triangle strip, odd")
- << int(QGL::TriangleStrip) << 0
- << "0 1 2"
- << "1 2 3 4 5"
- << "0 1 2 3 4 5";
-
- QTest::newRow("triangle strip, odd reversed")
- << int(QGL::TriangleStrip) << 0
- << "0 1 2"
- << "2 1 3 4 5"
- << "0 1 2 3 4 5";
-
- QTest::newRow("triangle strip, no common")
- << int(QGL::TriangleStrip) << 0
- << "0 1 2"
- << "3 4 5"
- << "0 1 2 3 4 5";
-
- QTest::newRow("triangle strip, empty A")
- << int(QGL::TriangleStrip) << 0
- << "0 1 2"
- << ""
- << "0 1 2";
-
- QTest::newRow("triangle strip, empty B")
- << int(QGL::TriangleStrip) << 0
- << ""
- << "0 1 2"
- << "0 1 2";
-
- QTest::newRow("line strip")
- << int(QGL::LineStrip) << 0
- << "0 1 2"
- << "2 3 4"
- << "0 1 2 3 4";
-
- QTest::newRow("line strip, offset")
- << int(QGL::LineStrip) << 2
- << "0 1 2"
- << "0 1 2"
- << "0 1 2 3 4";
-
- QTest::newRow("line strip, no common")
- << int(QGL::LineStrip) << 0
- << "0 1 2"
- << "3 4"
- << "0 1 2 3 4";
-
- QTest::newRow("line strip, empty A")
- << int(QGL::LineStrip) << 0
- << ""
- << "0 1 2"
- << "0 1 2";
-
- QTest::newRow("line strip, empty B")
- << int(QGL::LineStrip) << 0
- << "0 1 2"
- << ""
- << "0 1 2";
-
- QTest::newRow("quad strip")
- << int(0x0008) << 0
- << "0 1 2 3"
- << "2 3 4 5"
- << "0 1 2 3 4 5";
-
- QTest::newRow("quad strip, offset")
- << int(0x0008) << 2
- << "0 1 2 3"
- << "0 1 2 3"
- << "0 1 2 3 4 5";
-
- QTest::newRow("quad strip, no common")
- << int(0x0008) << 0
- << "0 1 2 3"
- << "3 2 4 5"
- << "0 1 2 3 3 2 4 5";
-
- QTest::newRow("triangle fan")
- << int(QGL::TriangleFan) << 0
- << "0 1 2 3"
- << "0 3 4 5"
- << "0 1 2 3 4 5";
-
- QTest::newRow("triangle fan, offset")
- << int(QGL::TriangleFan) << 10
- << "10 11 12 13"
- << "0 3 4 5"
- << "10 11 12 13 14 15";
-
- QTest::newRow("triangle fan, no common")
- << int(QGL::TriangleFan) << 0
- << "0 1 2 3"
- << "1 3 4 5"
- << "0 1 2 3 1 3 4 5";
-
- QTest::newRow("triangle fan, no common 2")
- << int(QGL::TriangleFan) << 0
- << "0 1 2 3"
- << "0 2 4 5"
- << "0 1 2 3 0 2 4 5";
-
- QTest::newRow("line strip adjacency")
- << int(QGL::LineStripAdjacency) << 0
- << "0 1 2 3"
- << "1 2 3 4"
- << "0 1 2 3 4";
-
- QTest::newRow("line strip adjacency, offset")
- << int(QGL::LineStripAdjacency) << 10
- << "10 11 12 13"
- << "1 2 3 4"
- << "10 11 12 13 14";
-
- QTest::newRow("line strip adjacency, no common")
- << int(QGL::LineStripAdjacency) << 0
- << "0 1 2 3"
- << "2 3 4 5"
- << "0 1 2 3 2 3 4 5";
-
- QTest::newRow("triangle strip adjacency, even")
- << int(QGL::TriangleStripAdjacency) << 0
- << "1 2 3 4 5 6"
- << "3 1 5 6 7 8"
- << "1 2 3 4 5 6 7 8";
-
- QTest::newRow("triangle strip adjacency, odd")
- << int(QGL::TriangleStripAdjacency) << 0
- << "1 2 3 4 5 6 7 8"
- << "5 3 7 8 9 10"
- << "1 2 3 4 5 6 7 8 9 10";
-
- QTest::newRow("triangle strip adjacency, even again")
- << int(QGL::TriangleStripAdjacency) << 0
- << "1 2 3 4 5 6 7 8 9 10"
- << "7 5 9 10 11 12"
- << "1 2 3 4 5 6 7 8 9 10 11 12";
-
- QTest::newRow("triangle strip adjacency, no common")
- << int(QGL::TriangleStripAdjacency) << 0
- << "1 2 3 4 5 6 7 8 9 10"
- << "5 7 9 10 11 12"
- << "1 2 3 4 5 6 7 8 9 10 5 7 9 10 11 12";
-
- QTest::newRow("triangle strip adjacency, offset")
- << int(QGL::TriangleStripAdjacency) << 100
- << "101 102 103 104 105 106 107 108 109 110"
- << "7 5 9 10 11 12"
- << "101 102 103 104 105 106 107 108 109 110 111 112";
-}
-
-static QArray<ushort> stringToUShortArray(const QString &str)
-{
- QStringList list = str.split(QLatin1String(" "));
- QArray<ushort> array;
- if (str.isEmpty())
- return array;
- foreach (QString s, list)
- array.append(ushort(s.toInt()));
- return array;
-}
-
-static QArray<uint> stringToUIntArray(const QString &str)
-{
- QStringList list = str.split(QLatin1String(" "));
- QArray<uint> array;
- if (str.isEmpty())
- return array;
- foreach (QString s, list)
- array.append(s.toUInt());
- return array;
-}
-
-static bool sameIndexes(const QGLIndexBuffer &buf, const QArray<ushort> &result)
-{
- if (buf.elementType() == GL_UNSIGNED_SHORT) {
- return buf.indexesUShort() == result;
- } else {
- QArray<uint> result2;
- for (int index = 0; index < result.size(); ++index)
- result2.append(result[index]);
- return buf.indexesUInt() == result2;
- }
-}
-
-void tst_QGLIndexBuffer::appendCombined()
-{
- QFETCH(int, combineMode);
- QFETCH(int, offset);
- QFETCH(QString, buf1Values);
- QFETCH(QString, buf2Values);
- QFETCH(QString, resultValues);
-
- // Test ushort, ushort appends.
- QGLIndexBuffer buf1, buf2;
- buf1.setIndexes(stringToUShortArray(buf1Values));
- buf2.setIndexes(stringToUShortArray(buf2Values));
- buf1.append(buf2, uint(offset), QGL::DrawingMode(combineMode));
-
- QArray<ushort> result = stringToUShortArray(resultValues);
- QVERIFY(buf1.indexesUShort() == result);
- QCOMPARE(buf1.indexCount(), result.size());
-
- // Test ushort, uint appends.
- QGLIndexBuffer buf3, buf4;
- buf3.setIndexes(stringToUShortArray(buf1Values));
- buf4.setIndexes(stringToUIntArray(buf2Values));
- buf3.append(buf4, uint(offset), QGL::DrawingMode(combineMode));
-
- QVERIFY(sameIndexes(buf3, result));
- QCOMPARE(buf3.indexCount(), result.size());
-
- // Test uint, ushort appends.
- QGLIndexBuffer buf5, buf6;
- buf5.setIndexes(stringToUIntArray(buf1Values));
- buf6.setIndexes(stringToUShortArray(buf2Values));
- buf5.append(buf6, uint(offset), QGL::DrawingMode(combineMode));
-
- QVERIFY(sameIndexes(buf5, result));
- QCOMPARE(buf5.indexCount(), result.size());
-
- // Test uint, uint appends.
- QGLIndexBuffer buf7, buf8;
- buf7.setIndexes(stringToUIntArray(buf1Values));
- buf8.setIndexes(stringToUIntArray(buf2Values));
- buf7.append(buf8, uint(offset), QGL::DrawingMode(combineMode));
-
- QVERIFY(sameIndexes(buf7, result));
- QCOMPARE(buf7.indexCount(), result.size());
-}
-
-QTEST_MAIN(tst_QGLIndexBuffer)
-
-#include "tst_qglindexbuffer.moc"
diff --git a/tests/auto/threed/qgllightmodel/qgllightmodel.pro b/tests/auto/threed/qgllightmodel/qgllightmodel.pro
deleted file mode 100644
index 19f78ca0..00000000
--- a/tests/auto/threed/qgllightmodel/qgllightmodel.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qgllightmodel.cpp
diff --git a/tests/auto/threed/qgllightmodel/tst_qgllightmodel.cpp b/tests/auto/threed/qgllightmodel/tst_qgllightmodel.cpp
deleted file mode 100644
index b0b90af1..00000000
--- a/tests/auto/threed/qgllightmodel/tst_qgllightmodel.cpp
+++ /dev/null
@@ -1,122 +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 <QtTest/QtTest>
-#include "qgllightmodel.h"
-
-class tst_QGLLightModel : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLLightModel() {}
- ~tst_QGLLightModel() {}
-
-private slots:
- void create();
- void modify();
-};
-
-void tst_QGLLightModel::create()
-{
- // Test that a newly created object has the correct defaults.
- QGLLightModel model;
- QVERIFY(model.model() == QGLLightModel::OneSided);
- QVERIFY(model.colorControl() == QGLLightModel::SingleColor);
- QVERIFY(model.viewerPosition() == QGLLightModel::ViewerAtInfinity);
- QCOMPARE(model.ambientSceneColor().redF(), 0.2);
- QCOMPARE(model.ambientSceneColor().greenF(), 0.2);
- QCOMPARE(model.ambientSceneColor().blueF(), 0.2);
- QCOMPARE(model.ambientSceneColor().alphaF(), 1.0);
-}
-
-void tst_QGLLightModel::modify()
-{
- // Test modifying each field individually.
- QGLLightModel model;
- QSignalSpy modelSpy(&model, SIGNAL(modelChanged()));
- QSignalSpy controlSpy(&model, SIGNAL(colorControlChanged()));
- QSignalSpy viewerSpy(&model, SIGNAL(viewerPositionChanged()));
- QSignalSpy ambientSpy(&model, SIGNAL(ambientSceneColorChanged()));
- QSignalSpy objectSpy(&model, SIGNAL(lightModelChanged()));
-
- model.setModel(QGLLightModel::TwoSided);
- QVERIFY(model.model() == QGLLightModel::TwoSided);
- QCOMPARE(modelSpy.size(), 1);
- QCOMPARE(objectSpy.size(), 1);
-
- model.setColorControl(QGLLightModel::SeparateSpecularColor);
- QVERIFY(model.colorControl() == QGLLightModel::SeparateSpecularColor);
- QCOMPARE(controlSpy.size(), 1);
- QCOMPARE(objectSpy.size(), 2);
-
- model.setViewerPosition(QGLLightModel::LocalViewer);
- QVERIFY(model.viewerPosition() == QGLLightModel::LocalViewer);
- QCOMPARE(viewerSpy.size(), 1);
- QCOMPARE(objectSpy.size(), 3);
-
- model.setAmbientSceneColor(Qt::red);
- QCOMPARE(model.ambientSceneColor().red(), 255);
- QCOMPARE(model.ambientSceneColor().green(), 0);
- QCOMPARE(model.ambientSceneColor().blue(), 0);
- QCOMPARE(model.ambientSceneColor().alpha(), 255);
- QCOMPARE(ambientSpy.size(), 1);
- QCOMPARE(objectSpy.size(), 4);
-
- // Test that we don't get any side effects between properties.
- QVERIFY(model.model() == QGLLightModel::TwoSided);
- QVERIFY(model.colorControl() == QGLLightModel::SeparateSpecularColor);
- QVERIFY(model.viewerPosition() == QGLLightModel::LocalViewer);
-
- // Set the properties to same values and check for no further signals.
- model.setModel(QGLLightModel::TwoSided);
- model.setColorControl(QGLLightModel::SeparateSpecularColor);
- model.setViewerPosition(QGLLightModel::LocalViewer);
- model.setAmbientSceneColor(Qt::red);
- QCOMPARE(modelSpy.size(), 1);
- QCOMPARE(controlSpy.size(), 1);
- QCOMPARE(viewerSpy.size(), 1);
- QCOMPARE(ambientSpy.size(), 1);
- QCOMPARE(objectSpy.size(), 4);
-}
-
-QTEST_APPLESS_MAIN(tst_QGLLightModel)
-
-#include "tst_qgllightmodel.moc"
diff --git a/tests/auto/threed/qgllightparameters/qgllightparameters.pro b/tests/auto/threed/qgllightparameters/qgllightparameters.pro
deleted file mode 100644
index 0cd20a44..00000000
--- a/tests/auto/threed/qgllightparameters/qgllightparameters.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qgllightparameters.cpp
diff --git a/tests/auto/threed/qgllightparameters/tst_qgllightparameters.cpp b/tests/auto/threed/qgllightparameters/tst_qgllightparameters.cpp
deleted file mode 100644
index 387e78d3..00000000
--- a/tests/auto/threed/qgllightparameters/tst_qgllightparameters.cpp
+++ /dev/null
@@ -1,275 +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 <QtTest/QtTest>
-#include "qgllightparameters.h"
-#include <QtGui/qmatrix4x4.h>
-
-class tst_QGLLightParameters : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLLightParameters() {}
- ~tst_QGLLightParameters() {}
-
-private slots:
- void create();
- void modify();
- void type();
- void transform();
-};
-
-void tst_QGLLightParameters::create()
-{
- // Test that a newly created object has the correct defaults.
- QGLLightParameters params;
- QVERIFY(params.type() == QGLLightParameters::Directional);
- QVERIFY(params.position() == QVector3D(0, 0, 0));
- QVERIFY(params.direction() == QVector3D(0, 0, 1));
- QVERIFY(params.ambientColor() == QColor(0, 0, 0, 255));
- QVERIFY(params.diffuseColor() == QColor(255, 255, 255, 255));
- QVERIFY(params.specularColor() == QColor(255, 255, 255, 255));
- QVERIFY(params.spotDirection() == QVector3D(0, 0, -1));
- QCOMPARE(params.spotExponent(), (qreal)0.0f);
- QCOMPARE(params.spotAngle(), (qreal)180.0f);
- QCOMPARE(params.spotCosAngle(), (qreal)-1.0f);
- QCOMPARE(params.constantAttenuation(), (qreal)1.0f);
- QCOMPARE(params.linearAttenuation(), (qreal)0.0f);
- QCOMPARE(params.quadraticAttenuation(), (qreal)0.0f);
-}
-
-void tst_QGLLightParameters::modify()
-{
- // Test modifying each field individually.
- QGLLightParameters params;
- QSignalSpy positionSpy(&params, SIGNAL(positionChanged()));
- QSignalSpy directionSpy(&params, SIGNAL(directionChanged()));
- QSignalSpy ambientSpy(&params, SIGNAL(ambientColorChanged()));
- QSignalSpy diffuseSpy(&params, SIGNAL(diffuseColorChanged()));
- QSignalSpy specularSpy(&params, SIGNAL(specularColorChanged()));
- QSignalSpy spotDirectionSpy(&params, SIGNAL(spotDirectionChanged()));
- QSignalSpy spotExponentSpy(&params, SIGNAL(spotExponentChanged()));
- QSignalSpy spotAngleSpy(&params, SIGNAL(spotAngleChanged()));
- QSignalSpy constSpy(&params, SIGNAL(constantAttenuationChanged()));
- QSignalSpy linearSpy(&params, SIGNAL(linearAttenuationChanged()));
- QSignalSpy quadSpy(&params, SIGNAL(quadraticAttenuationChanged()));
- QSignalSpy lightSpy(&params, SIGNAL(lightChanged()));
-
- params.setPosition(QVector3D(1, 2, -3));
- QVERIFY(params.position() == QVector3D(1.0f, 2.0f, -3.0f));
- QVERIFY(params.direction() == QVector3D(0, 0, 0));
- QVERIFY(params.type() == QGLLightParameters::Positional);
- QCOMPARE(positionSpy.size(), 1);
- QCOMPARE(directionSpy.size(), 1);
- QCOMPARE(lightSpy.size(), 1);
-
- params.setDirection(QVector3D(-1, -2, 3));
- QVERIFY(params.position() == QVector3D(0, 0, 0));
- QVERIFY(params.direction() == QVector3D(-1.0f, -2.0f, 3.0f));
- QVERIFY(params.type() == QGLLightParameters::Directional);
- QCOMPARE(positionSpy.size(), 2);
- QCOMPARE(directionSpy.size(), 2);
- QCOMPARE(lightSpy.size(), 2);
-
- params.setAmbientColor(Qt::red);
- QCOMPARE(params.ambientColor().red(), 255);
- QCOMPARE(params.ambientColor().green(), 0);
- QCOMPARE(params.ambientColor().blue(), 0);
- QCOMPARE(params.ambientColor().alpha(), 255);
- QCOMPARE(ambientSpy.size(), 1);
- QCOMPARE(lightSpy.size(), 3);
-
- params.setDiffuseColor(Qt::green);
- QCOMPARE(params.diffuseColor().red(), 0);
- QCOMPARE(params.diffuseColor().green(), 255);
- QCOMPARE(params.diffuseColor().blue(), 0);
- QCOMPARE(params.diffuseColor().alpha(), 255);
- QCOMPARE(diffuseSpy.size(), 1);
- QCOMPARE(lightSpy.size(), 4);
-
- params.setSpecularColor(Qt::black);
- QCOMPARE(params.specularColor().red(), 0);
- QCOMPARE(params.specularColor().green(), 0);
- QCOMPARE(params.specularColor().blue(), 0);
- QCOMPARE(params.specularColor().alpha(), 255);
- QCOMPARE(specularSpy.size(), 1);
- QCOMPARE(lightSpy.size(), 5);
-
- params.setSpotDirection(QVector3D(0, 1, 0));
- QVERIFY(params.spotDirection() == QVector3D(0.0f, 1.0f, 0.0f));
- QCOMPARE(spotDirectionSpy.size(), 1);
- QCOMPARE(lightSpy.size(), 6);
-
- params.setSpotExponent(23.5f);
- QCOMPARE(params.spotExponent(), (qreal)23.5f);
- QCOMPARE(spotExponentSpy.size(), 1);
- QCOMPARE(lightSpy.size(), 7);
-
- params.setSpotAngle(90.0f);
- QCOMPARE(params.spotAngle(), (qreal)90.0f);
- QVERIFY(params.spotCosAngle() <= 0.000001f); // Fuzzy compare is not fuzzy enough!
- QCOMPARE(spotAngleSpy.size(), 1);
- QCOMPARE(lightSpy.size(), 8);
-
- params.setSpotAngle(180.0f);
- QCOMPARE(params.spotCosAngle(), (qreal)-1.0f);
- QCOMPARE(spotAngleSpy.size(), 2);
- QCOMPARE(lightSpy.size(), 9);
-
- params.setConstantAttenuation(16.0f);
- QCOMPARE(params.constantAttenuation(), (qreal)16.0f);
- QCOMPARE(constSpy.size(), 1);
- QCOMPARE(lightSpy.size(), 10);
-
- params.setLinearAttenuation(-3.5f);
- QCOMPARE(params.linearAttenuation(), (qreal)-3.5f);
- QCOMPARE(linearSpy.size(), 1);
- QCOMPARE(lightSpy.size(), 11);
-
- params.setQuadraticAttenuation(4.0f);
- QCOMPARE(params.quadraticAttenuation(), (qreal)4.0f);
- QCOMPARE(quadSpy.size(), 1);
- QCOMPARE(lightSpy.size(), 12);
-
- // Test that we don't get any side effects between properties.
- QVERIFY(params.position() == QVector3D(0, 0, 0));
- QVERIFY(params.direction() == QVector3D(-1.0f, -2.0f, 3.0f));
- QVERIFY(params.type() == QGLLightParameters::Directional);
- QCOMPARE(params.ambientColor().red(), 255);
- QCOMPARE(params.ambientColor().green(), 0);
- QCOMPARE(params.ambientColor().blue(), 0);
- QCOMPARE(params.ambientColor().alpha(), 255);
- QCOMPARE(params.diffuseColor().red(), 0);
- QCOMPARE(params.diffuseColor().green(), 255);
- QCOMPARE(params.diffuseColor().blue(), 0);
- QCOMPARE(params.diffuseColor().alpha(), 255);
- QCOMPARE(params.specularColor().red(), 0);
- QCOMPARE(params.specularColor().green(), 0);
- QCOMPARE(params.specularColor().blue(), 0);
- QCOMPARE(params.specularColor().alpha(), 255);
- QVERIFY(params.spotDirection() == QVector3D(0.0f, 1.0f, 0.0f));
- QCOMPARE(params.spotExponent(), (qreal)23.5f);
- QCOMPARE(params.spotAngle(), (qreal)180.0f);
- QCOMPARE(params.spotCosAngle(), (qreal)-1.0f);
- QCOMPARE(params.constantAttenuation(), (qreal)16.0f);
- QCOMPARE(params.linearAttenuation(), (qreal)-3.5f);
- QCOMPARE(params.quadraticAttenuation(), (qreal)4.0f);
-
- // Set the properties to same values and check for no further signals.
- params.setDirection(QVector3D(-1, -2, 3));
- params.setAmbientColor(Qt::red);
- params.setDiffuseColor(Qt::green);
- params.setSpecularColor(Qt::black);
- params.setSpotDirection(QVector3D(0, 1, 0));
- params.setSpotExponent(23.5f);
- params.setSpotAngle(180.0f);
- params.setConstantAttenuation(16.0f);
- params.setLinearAttenuation(-3.5f);
- params.setQuadraticAttenuation(4.0f);
- QCOMPARE(positionSpy.size(), 2);
- QCOMPARE(directionSpy.size(), 2);
- QCOMPARE(ambientSpy.size(), 1);
- QCOMPARE(diffuseSpy.size(), 1);
- QCOMPARE(specularSpy.size(), 1);
- QCOMPARE(spotDirectionSpy.size(), 1);
- QCOMPARE(spotExponentSpy.size(), 1);
- QCOMPARE(spotAngleSpy.size(), 2);
- QCOMPARE(constSpy.size(), 1);
- QCOMPARE(linearSpy.size(), 1);
- QCOMPARE(quadSpy.size(), 1);
- QCOMPARE(lightSpy.size(), 12);
-
- // Check signal emission when changing from positional to positional.
- params.setPosition(QVector3D(1, 2, -3));
- QCOMPARE(positionSpy.size(), 3);
- QCOMPARE(directionSpy.size(), 3);
- QCOMPARE(lightSpy.size(), 13);
- params.setPosition(QVector3D(1, 2, -3));
- QVERIFY(params.position() == QVector3D(1.0f, 2.0f, -3.0f));
- QVERIFY(params.direction() == QVector3D(0, 0, 0));
- QCOMPARE(positionSpy.size(), 3);
- QCOMPARE(directionSpy.size(), 3);
- QCOMPARE(lightSpy.size(), 13);
- params.setPosition(QVector3D(4, 1, -2));
- QCOMPARE(positionSpy.size(), 4);
- QCOMPARE(directionSpy.size(), 3);
- QCOMPARE(lightSpy.size(), 14);
- QVERIFY(params.position() == QVector3D(4.0f, 1.0f, -2.0f));
- QVERIFY(params.direction() == QVector3D(0, 0, 0));
-}
-
-void tst_QGLLightParameters::type()
-{
- QGLLightParameters params;
- QVERIFY(params.type() == QGLLightParameters::Directional);
- QCOMPARE(params.position(), QVector3D(0.0f, 0.0f, 0.0f));
- QCOMPARE(params.direction(), QVector3D(0.0f, 0.0f, 1.0f));
- params.setDirection(QVector3D(1.0f, 0.0f, 1.0f));
- QVERIFY(params.type() == QGLLightParameters::Directional);
- QCOMPARE(params.position(), QVector3D(0.0f, 0.0f, 0.0f));
- QCOMPARE(params.direction(), QVector3D(1.0f, 0.0f, 1.0f));
- params.setPosition(QVector3D(2.0f, 0.0f, 2.0f));
- QVERIFY(params.type() == QGLLightParameters::Positional);
- QCOMPARE(params.position(), QVector3D(2.0f, 0.0f, 2.0f));
- QCOMPARE(params.direction(), QVector3D(0.0f, 0.0f, 0.0f));
-}
-
-void tst_QGLLightParameters::transform()
-{
- QGLLightParameters params;
- params.setPosition(QVector3D(1, 2, -3));
- params.setSpotDirection(QVector3D(-5, 1, 3));
-
- QMatrix4x4 m;
- m.translate(-5.0f, 1.5f, 0.5f);
- m.rotate(45.0f, 1.0f, 1.0f, 1.0f);
- m.scale(2.0f);
-
- QCOMPARE(params.eyePosition(m), m * QVector4D(1, 2, -3, 1));
- QCOMPARE(params.eyeSpotDirection(m), m.mapVector(QVector3D(-5, 1, 3)));
-
- params.setDirection(QVector3D(-1, -2, 3));
- QCOMPARE(params.eyePosition(m), m * QVector4D(-1, -2, 3, 0));
-}
-
-QTEST_APPLESS_MAIN(tst_QGLLightParameters)
-
-#include "tst_qgllightparameters.moc"
diff --git a/tests/auto/threed/qglmaterial/qglmaterial.pro b/tests/auto/threed/qglmaterial/qglmaterial.pro
deleted file mode 100644
index 2ed58123..00000000
--- a/tests/auto/threed/qglmaterial/qglmaterial.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qglmaterial.cpp
diff --git a/tests/auto/threed/qglmaterial/tst_qglmaterial.cpp b/tests/auto/threed/qglmaterial/tst_qglmaterial.cpp
deleted file mode 100644
index ea6c50b0..00000000
--- a/tests/auto/threed/qglmaterial/tst_qglmaterial.cpp
+++ /dev/null
@@ -1,714 +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 <QtTest/QtTest>
-#include "qglmaterial.h"
-#include "qglcolormaterial.h"
-#include "qgltwosidedmaterial.h"
-#include "qgllightparameters.h"
-#include "qgllightmodel.h"
-#include "qgltexture2d.h"
-#include "qglcamera.h"
-#include "qglpainter.h"
-#include "qglvertexbundle.h"
-#include "qvector2darray.h"
-#include "qvector3darray.h"
-#include <QtCore/qeventloop.h>
-#include <QtGui/qvector3d.h>
-#include <QtGui/qvector4d.h>
-
-class TestWidget;
-
-class tst_QGLMaterial : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLMaterial() : widget(0) {}
- ~tst_QGLMaterial() {}
-
-private slots:
- void initTestCase();
-
- void standardMaterial();
- void textureLayers();
- void colorMaterial();
- void twoSidedMaterial();
-
- void standardMaterialDraw();
- void colorMaterialDraw();
-
- void cleanupTestCase();
-
-private:
- TestWidget *widget;
-};
-
-class TestWidget : public QGLWidget
-{
- Q_OBJECT
-public:
- TestWidget(QWidget *parent = 0);
- ~TestWidget();
-
- bool runTest(QGLAbstractMaterial *mat, int timeout = 5000);
- bool sameColor(const QColor &color) const;
-
- void setClearColor(const QColor &color) { clearColor = color; }
-
-protected:
- void initializeGL();
- void paintGL();
-
-private:
- QGLCamera camera;
- QGLVertexBundle bundle;
- QGLAbstractMaterial *material;
- QEventLoop *eventLoop;
- bool paintDone;
- QColor pixel;
- QColor clearColor;
-};
-
-TestWidget::TestWidget(QWidget *parent)
- : QGLWidget(parent)
- , material(0)
- , eventLoop(0)
- , paintDone(false)
- , clearColor(Qt::black)
-{
- QVector3DArray positions;
- QVector3DArray normals;
- QVector2DArray texCoords;
-
- positions.append(QVector3D(-0.5, -0.5, 0.0));
- positions.append(QVector3D(0.5, -0.5, 0.0));
- positions.append(QVector3D(0.5, 0.5, 0.0));
- positions.append(QVector3D(-0.5, 0.5, 0.0));
-
- normals.append(QVector3D(0, 0, 1));
- normals.append(QVector3D(0, 0, 1));
- normals.append(QVector3D(0, 0, 1));
- normals.append(QVector3D(0, 0, 1));
-
- texCoords.append(QVector2D(0.0f, 0.0f));
- texCoords.append(QVector2D(1.0f, 0.0f));
- texCoords.append(QVector2D(1.0f, 1.0f));
- texCoords.append(QVector2D(0.0f, 1.0f));
-
- bundle.addAttribute(QGL::Position, positions);
- bundle.addAttribute(QGL::Normal, normals);
- bundle.addAttribute(QGL::TextureCoord0, texCoords);
-}
-
-TestWidget::~TestWidget()
-{
-}
-
-bool TestWidget::runTest(QGLAbstractMaterial *mat, int timeout)
-{
- material = mat;
- paintDone = false;
- pixel = QColor();
- eventLoop = new QEventLoop(this);
- QTimer::singleShot(timeout, eventLoop, SLOT(quit()));
- if (!isVisible()) {
- show();
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(this);
-#endif
- } else {
- updateGL();
- }
- if (!paintDone)
- eventLoop->exec();
- delete eventLoop;
- material = 0;
- eventLoop = 0;
- return paintDone;
-}
-
-bool TestWidget::sameColor(const QColor &color) const
-{
- if (!pixel.isValid()) {
- qWarning("did not get a valid pixel");
- return false;
- }
- if (qAbs(pixel.red() - color.red()) <= 16 &&
- qAbs(pixel.green() - color.green()) <= 16 &&
- qAbs(pixel.blue() - color.blue()) <= 16)
- return true;
- qWarning() << "pixel color does not match, actual:"
- << pixel.name() << "expected:" << color.name();
- return false;
-}
-
-void TestWidget::initializeGL()
-{
- bundle.upload();
-
- QGLPainter painter(this);
- if (painter.hasOpenGLFeature(QOpenGLFunctions::BlendColor))
- painter.glBlendColor(0, 0, 0, 0);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- if (painter.hasOpenGLFeature(QOpenGLFunctions::BlendEquation))
- painter.glBlendEquation(GL_FUNC_ADD);
- else if (painter.hasOpenGLFeature(QOpenGLFunctions::BlendEquationSeparate))
- painter.glBlendEquationSeparate(GL_FUNC_ADD, GL_FUNC_ADD);
-}
-
-void TestWidget::paintGL()
-{
- QGLPainter painter(this);
- painter.setClearColor(clearColor);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- painter.setCamera(&camera);
-
- painter.clearAttributes();
- painter.setVertexBundle(bundle);
-
- if (material) {
- material->bind(&painter);
- material->prepareToDraw(&painter, painter.attributes());
- painter.draw(QGL::TriangleFan, 4);
- material->release(&painter, 0);
- }
-
- QImage capture = grabFrameBuffer();
- if (capture.width() > 0 && capture.height() > 0)
- pixel = QColor(capture.pixel(capture.width() / 2, capture.height() / 2));
-
- if (!paintDone && eventLoop) {
- paintDone = true;
- eventLoop->quit();
- }
-}
-
-void tst_QGLMaterial::initTestCase()
-{
- widget = new TestWidget();
-}
-
-void tst_QGLMaterial::cleanupTestCase()
-{
- delete widget;
-}
-
-static inline bool fuzzyCompare(qreal x, qreal y)
-{
- return qAbs(x - y) <= 0.00001;
-}
-
-void tst_QGLMaterial::standardMaterial()
-{
- // Test that a newly created object has the correct defaults.
- QGLMaterial mat1;
- QVERIFY(fuzzyCompare(mat1.ambientColor().redF(), qreal(0.2f)));
- QVERIFY(fuzzyCompare(mat1.ambientColor().greenF(), qreal(0.2f)));
- QVERIFY(fuzzyCompare(mat1.ambientColor().blueF(), qreal(0.2f)));
- QVERIFY(fuzzyCompare(mat1.ambientColor().alphaF(), qreal(1.0f)));
- QVERIFY(fuzzyCompare(mat1.diffuseColor().redF(), qreal(0.8f)));
- QVERIFY(fuzzyCompare(mat1.diffuseColor().greenF(), qreal(0.8f)));
- QVERIFY(fuzzyCompare(mat1.diffuseColor().blueF(), qreal(0.8f)));
- QVERIFY(fuzzyCompare(mat1.diffuseColor().alphaF(), qreal(1.0f)));
- QCOMPARE(mat1.specularColor().red(), 0);
- QCOMPARE(mat1.specularColor().green(), 0);
- QCOMPARE(mat1.specularColor().blue(), 0);
- QCOMPARE(mat1.specularColor().alpha(), 255);
- QCOMPARE(mat1.emittedLight().red(), 0);
- QCOMPARE(mat1.emittedLight().green(), 0);
- QCOMPARE(mat1.emittedLight().blue(), 0);
- QCOMPARE(mat1.emittedLight().alpha(), 255);
- QCOMPARE(mat1.shininess(), qreal(0));
- QVERIFY(!mat1.isTransparent());
-
- // Test modifying each field individually, including expected signals.
- QGLMaterial mat2;
- QSignalSpy ambientSpy(&mat2, SIGNAL(ambientColorChanged()));
- QSignalSpy diffuseSpy(&mat2, SIGNAL(diffuseColorChanged()));
- QSignalSpy specularSpy(&mat2, SIGNAL(specularColorChanged()));
- QSignalSpy emittedSpy(&mat2, SIGNAL(emittedLightChanged()));
- QSignalSpy shininessSpy(&mat2, SIGNAL(shininessChanged()));
- QSignalSpy texturesSpy(&mat2, SIGNAL(texturesChanged()));
- QSignalSpy materialSpy(&mat2, SIGNAL(materialChanged()));
- mat2.setAmbientColor(Qt::green);
- QCOMPARE(mat2.ambientColor().red(), 0);
- QCOMPARE(mat2.ambientColor().green(), 255);
- QCOMPARE(mat2.ambientColor().blue(), 0);
- QCOMPARE(mat2.ambientColor().alpha(), 255);
- QCOMPARE(ambientSpy.count(), 1);
- QCOMPARE(diffuseSpy.count(), 0);
- QCOMPARE(specularSpy.count(), 0);
- QCOMPARE(emittedSpy.count(), 0);
- QCOMPARE(shininessSpy.count(), 0);
- QCOMPARE(texturesSpy.count(), 0);
- QCOMPARE(materialSpy.count(), 1);
- mat2.setDiffuseColor(Qt::blue);
- QCOMPARE(mat2.diffuseColor().red(), 0);
- QCOMPARE(mat2.diffuseColor().green(), 0);
- QCOMPARE(mat2.diffuseColor().blue(), 255);
- QCOMPARE(mat2.diffuseColor().alpha(), 255);
- QCOMPARE(ambientSpy.count(), 1);
- QCOMPARE(diffuseSpy.count(), 1);
- QCOMPARE(specularSpy.count(), 0);
- QCOMPARE(emittedSpy.count(), 0);
- QCOMPARE(shininessSpy.count(), 0);
- QCOMPARE(texturesSpy.count(), 0);
- QCOMPARE(materialSpy.count(), 2);
- mat2.setSpecularColor(Qt::cyan);
- QCOMPARE(mat2.specularColor().red(), 0);
- QCOMPARE(mat2.specularColor().green(), 255);
- QCOMPARE(mat2.specularColor().blue(), 255);
- QCOMPARE(mat2.specularColor().alpha(), 255);
- QCOMPARE(ambientSpy.count(), 1);
- QCOMPARE(diffuseSpy.count(), 1);
- QCOMPARE(specularSpy.count(), 1);
- QCOMPARE(emittedSpy.count(), 0);
- QCOMPARE(shininessSpy.count(), 0);
- QCOMPARE(texturesSpy.count(), 0);
- QCOMPARE(materialSpy.count(), 3);
- mat2.setEmittedLight(Qt::white);
- QCOMPARE(mat2.emittedLight().red(), 255);
- QCOMPARE(mat2.emittedLight().green(), 255);
- QCOMPARE(mat2.emittedLight().blue(), 255);
- QCOMPARE(mat2.emittedLight().alpha(), 255);
- QCOMPARE(ambientSpy.count(), 1);
- QCOMPARE(diffuseSpy.count(), 1);
- QCOMPARE(specularSpy.count(), 1);
- QCOMPARE(emittedSpy.count(), 1);
- QCOMPARE(shininessSpy.count(), 0);
- QCOMPARE(texturesSpy.count(), 0);
- QCOMPARE(materialSpy.count(), 4);
- mat2.setShininess(128);
- QCOMPARE(mat2.shininess(), qreal(128));
- QCOMPARE(ambientSpy.count(), 1);
- QCOMPARE(diffuseSpy.count(), 1);
- QCOMPARE(specularSpy.count(), 1);
- QCOMPARE(emittedSpy.count(), 1);
- QCOMPARE(shininessSpy.count(), 1);
- QCOMPARE(texturesSpy.count(), 0);
- QCOMPARE(materialSpy.count(), 5);
-
- // Modify to the same values and check for no further signals.
- mat2.setAmbientColor(Qt::green);
- mat2.setDiffuseColor(Qt::blue);
- mat2.setSpecularColor(Qt::cyan);
- mat2.setEmittedLight(Qt::white);
- mat2.setShininess(128);
- QCOMPARE(ambientSpy.count(), 1);
- QCOMPARE(diffuseSpy.count(), 1);
- QCOMPARE(specularSpy.count(), 1);
- QCOMPARE(emittedSpy.count(), 1);
- QCOMPARE(shininessSpy.count(), 1);
- QCOMPARE(texturesSpy.count(), 0);
- QCOMPARE(materialSpy.count(), 5);
-
- // Check clamping of shininess to the range 0..128.
- mat1.setShininess(-0.5f);
- QCOMPARE(mat1.shininess(), qreal(0.0f));
- mat1.setShininess(128.5f);
- QCOMPARE(mat1.shininess(), qreal(128.0f));
-
- // Test that we don't get any side effects between properties.
- QCOMPARE(mat2.ambientColor().red(), 0);
- QCOMPARE(mat2.ambientColor().green(), 255);
- QCOMPARE(mat2.ambientColor().blue(), 0);
- QCOMPARE(mat2.ambientColor().alpha(), 255);
- QCOMPARE(mat2.diffuseColor().red(), 0);
- QCOMPARE(mat2.diffuseColor().green(), 0);
- QCOMPARE(mat2.diffuseColor().blue(), 255);
- QCOMPARE(mat2.diffuseColor().alpha(), 255);
- QCOMPARE(mat2.specularColor().red(), 0);
- QCOMPARE(mat2.specularColor().green(), 255);
- QCOMPARE(mat2.specularColor().blue(), 255);
- QCOMPARE(mat2.specularColor().alpha(), 255);
- QCOMPARE(mat2.emittedLight().red(), 255);
- QCOMPARE(mat2.emittedLight().green(), 255);
- QCOMPARE(mat2.emittedLight().blue(), 255);
- QCOMPARE(mat2.emittedLight().alpha(), 255);
- QCOMPARE(mat2.shininess(), qreal(128));
-
- // Test the material fetch functions from QGLAbstractMaterial.
- QVERIFY(mat1.front() == &mat1);
- QVERIFY(mat1.back() == 0);
- QVERIFY(mat2.front() == &mat2);
- QVERIFY(mat2.back() == 0);
-
- // Test setting a pseudo-flat color via QGLMaterial::setColor().
- mat2.setColor(QColor::fromRgbF(0.2f, 0.8f, 0.5f, 0.7f));
- QVERIFY(fuzzyCompare(mat2.ambientColor().redF(), qreal(0.2f * 0.2f)));
- QVERIFY(fuzzyCompare(mat2.ambientColor().greenF(), qreal(0.2f * 0.8f)));
- QVERIFY(fuzzyCompare(mat2.ambientColor().blueF(), qreal(0.2f * 0.5f)));
- QVERIFY(fuzzyCompare(mat2.ambientColor().alphaF(), qreal(0.7f)));
- QVERIFY(fuzzyCompare(mat2.diffuseColor().redF(), qreal(0.8f * 0.2f)));
- QVERIFY(fuzzyCompare(mat2.diffuseColor().greenF(), qreal(0.8f * 0.8f)));
- QVERIFY(fuzzyCompare(mat2.diffuseColor().blueF(), qreal(0.8f * 0.5f)));
- QVERIFY(fuzzyCompare(mat2.diffuseColor().alphaF(), qreal(0.7f)));
- QCOMPARE(ambientSpy.count(), 2);
- QCOMPARE(diffuseSpy.count(), 2);
- QCOMPARE(specularSpy.count(), 1);
- QCOMPARE(emittedSpy.count(), 1);
- QCOMPARE(shininessSpy.count(), 1);
- QCOMPARE(texturesSpy.count(), 0);
- QCOMPARE(materialSpy.count(), 6);
-}
-
-void tst_QGLMaterial::textureLayers()
-{
- QGLMaterial mat1;
- QCOMPARE(mat1.textureLayerCount(), 0);
- QVERIFY(mat1.texture() == 0);
- QVERIFY(mat1.texture(3) == 0);
-
- QSignalSpy texturesSpy(&mat1, SIGNAL(texturesChanged()));
- QSignalSpy materialSpy(&mat1, SIGNAL(materialChanged()));
-
- QGLTexture2D *tex1 = new QGLTexture2D(this);
- QSignalSpy tex1Spy(tex1, SIGNAL(destroyed()));
- mat1.setTexture(tex1);
- QCOMPARE(texturesSpy.count(), 1);
- QCOMPARE(materialSpy.count(), 1);
- QCOMPARE(mat1.textureLayerCount(), 1);
- QVERIFY(mat1.texture() == tex1);
-
- QGLTexture2D *tex2 = new QGLTexture2D(this);
- mat1.setTexture(tex2, 3);
- QCOMPARE(texturesSpy.count(), 2);
- QCOMPARE(materialSpy.count(), 2);
- QCOMPARE(mat1.textureLayerCount(), 4);
- QVERIFY(mat1.texture() == tex1);
- QVERIFY(mat1.texture(1) == 0);
- QVERIFY(mat1.texture(2) == 0);
- QVERIFY(mat1.texture(3) == tex2);
-
- QVERIFY(mat1.textureCombineMode() == QGLMaterial::Modulate);
- QVERIFY(mat1.textureCombineMode(2) == QGLMaterial::Modulate);
- QVERIFY(mat1.textureCombineMode(3) == QGLMaterial::Modulate);
- QVERIFY(mat1.textureCombineMode(-32) == QGLMaterial::Modulate);
-
- mat1.setTextureCombineMode(QGLMaterial::Decal);
- QCOMPARE(texturesSpy.count(), 3);
- QCOMPARE(materialSpy.count(), 3);
-
- QVERIFY(mat1.textureCombineMode() == QGLMaterial::Decal);
- QVERIFY(mat1.textureCombineMode(2) == QGLMaterial::Modulate);
- QVERIFY(mat1.textureCombineMode(3) == QGLMaterial::Modulate);
-
- mat1.setTextureCombineMode(QGLMaterial::Replace, 3);
- QCOMPARE(texturesSpy.count(), 4);
- QCOMPARE(materialSpy.count(), 4);
-
- QVERIFY(mat1.textureCombineMode() == QGLMaterial::Decal);
- QVERIFY(mat1.textureCombineMode(2) == QGLMaterial::Modulate);
- QVERIFY(mat1.textureCombineMode(3) == QGLMaterial::Replace);
-
- mat1.setTextureCombineMode(QGLMaterial::Modulate, 0);
- QCOMPARE(texturesSpy.count(), 5);
- QCOMPARE(materialSpy.count(), 5);
-
- QVERIFY(mat1.textureCombineMode() == QGLMaterial::Modulate);
- QVERIFY(mat1.textureCombineMode(2) == QGLMaterial::Modulate);
- QVERIFY(mat1.textureCombineMode(3) == QGLMaterial::Replace);
-
- QVERIFY(!mat1.textureUrl().isValid());
- QVERIFY(!mat1.textureUrl(2).isValid());
- QVERIFY(!mat1.textureUrl(3).isValid());
-
- // This will delete the texture object and replace it with a new one.
- // This texture is not intended to actually "load" as such, but rather
- // to simply test the setting of notional textures.
- mat1.setTextureUrl(QUrl(QLatin1String("foo://bar.com/texture.png")));
- QCOMPARE(tex1Spy.count(), 1);
- QCOMPARE(texturesSpy.count(), 6);
- QCOMPARE(materialSpy.count(), 6);
- QVERIFY(mat1.texture() != 0);
- QVERIFY(mat1.texture()->url() == QUrl(QLatin1String("foo://bar.com/texture.png")));
-
- // Setting the url to empty will delete the texture object entirely.
- QSignalSpy tex3Spy(mat1.texture(), SIGNAL(destroyed()));
- mat1.setTextureUrl(QUrl());
- QCOMPARE(tex3Spy.count(), 1);
- QCOMPARE(texturesSpy.count(), 7);
- QCOMPARE(materialSpy.count(), 7);
- QVERIFY(mat1.texture() == 0);
-
- // Changing properties to the same thing should do nothing.
- mat1.setTexture(tex2, 3);
- mat1.setTextureCombineMode(QGLMaterial::Replace, 3);
- mat1.setTextureUrl(QUrl());
-
- // Check final texture assignments and properties.
- QVERIFY(mat1.texture() == 0);
- QVERIFY(mat1.texture(1) == 0);
- QVERIFY(mat1.texture(2) == 0);
- QVERIFY(mat1.texture(3) == tex2);
- QVERIFY(mat1.textureCombineMode() == QGLMaterial::Modulate);
- QVERIFY(mat1.textureCombineMode(2) == QGLMaterial::Modulate);
- QVERIFY(mat1.textureCombineMode(3) == QGLMaterial::Replace);
- QCOMPARE(mat1.textureLayerCount(), 4);
-}
-
-void tst_QGLMaterial::colorMaterial()
-{
- QGLColorMaterial mat1;
- QVERIFY(mat1.color() == QColor(Qt::white));
- QVERIFY(!mat1.isTransparent());
-
- QSignalSpy colorSpy(&mat1, SIGNAL(colorChanged()));
- QSignalSpy materialSpy(&mat1, SIGNAL(materialChanged()));
-
- mat1.setColor(Qt::red);
- QCOMPARE(colorSpy.count(), 1);
- QCOMPARE(materialSpy.count(), 1);
- QVERIFY(mat1.color() == QColor(Qt::red));
-
- mat1.setColor(Qt::red);
- QCOMPARE(colorSpy.count(), 1);
- QCOMPARE(materialSpy.count(), 1);
-
- mat1.setColor(QColor(24, 56, 98, 43));
- QVERIFY(mat1.isTransparent());
-}
-
-void tst_QGLMaterial::twoSidedMaterial()
-{
- QGLTwoSidedMaterial mat1;
- QVERIFY(mat1.front() == 0);
- QVERIFY(mat1.back() == 0);
-
- QSignalSpy frontSpy(&mat1, SIGNAL(frontChanged()));
- QSignalSpy backSpy(&mat1, SIGNAL(backChanged()));
- QSignalSpy materialSpy(&mat1, SIGNAL(materialChanged()));
-
- QGLMaterial mat2;
- QGLMaterial mat3;
- mat1.setFront(&mat2);
- QCOMPARE(frontSpy.count(), 1);
- QCOMPARE(backSpy.count(), 0);
- QCOMPARE(materialSpy.count(), 1);
- mat1.setBack(&mat3);
- QCOMPARE(frontSpy.count(), 1);
- QCOMPARE(backSpy.count(), 1);
- QCOMPARE(materialSpy.count(), 2);
- QVERIFY(mat1.front() == &mat2);
- QVERIFY(mat1.back() == &mat3);
-
- mat2.setAmbientColor(Qt::red);
- QCOMPARE(materialSpy.count(), 3);
-
- mat3.setAmbientColor(Qt::green);
- QCOMPARE(materialSpy.count(), 4);
-
- QGLMaterial mat4;
- QGLMaterial mat5;
-
- mat1.setFront(&mat4);
- QCOMPARE(frontSpy.count(), 2);
- QCOMPARE(backSpy.count(), 1);
- QCOMPARE(materialSpy.count(), 5);
-
- mat2.setAmbientColor(Qt::blue);
- QCOMPARE(materialSpy.count(), 5);
-
- mat1.setBack(&mat5);
- QCOMPARE(frontSpy.count(), 2);
- QCOMPARE(backSpy.count(), 2);
- QCOMPARE(materialSpy.count(), 6);
- QVERIFY(mat1.front() == &mat4);
- QVERIFY(mat1.back() == &mat5);
-
- mat3.setAmbientColor(Qt::cyan);
- QCOMPARE(materialSpy.count(), 6);
-
- mat1.setFront(&mat4);
- mat1.setBack(&mat5);
- QCOMPARE(frontSpy.count(), 2);
- QCOMPARE(backSpy.count(), 2);
- QCOMPARE(materialSpy.count(), 6);
-
- mat1.setFront(0);
- QCOMPARE(frontSpy.count(), 3);
- QCOMPARE(backSpy.count(), 2);
- QCOMPARE(materialSpy.count(), 7);
- mat1.setBack(0);
- QCOMPARE(frontSpy.count(), 3);
- QCOMPARE(backSpy.count(), 3);
- QCOMPARE(materialSpy.count(), 8);
- QVERIFY(mat1.front() == 0);
- QVERIFY(mat1.back() == 0);
-
- mat1.setFront(&mat2);
- mat1.setBack(&mat2);
- QCOMPARE(frontSpy.count(), 4);
- QCOMPARE(backSpy.count(), 4);
- QCOMPARE(materialSpy.count(), 10);
-
- mat2.setAmbientColor(Qt::white);
- QCOMPARE(materialSpy.count(), 11);
-}
-
-static inline QVector4D colorToVector4D(const QColor &color)
-{
- return QVector4D(color.redF(), color.greenF(),
- color.blueF(), color.alphaF());
-}
-
-static inline qreal clampRange(qreal value)
-{
- if (value < 0.0f)
- return 0.0f;
- else if (value > 1.0f)
- return 1.0f;
- else
- return value;
-}
-
-static inline QColor vector4DToColor(const QVector4D &value, qreal alpha)
-{
- return QColor::fromRgbF(clampRange(value.x()),
- clampRange(value.y()),
- clampRange(value.z()),
- alpha);
-}
-
-// Evaluate the standard GL lighting algorithm to determine what the
-// lit pixel on the screen will be with the supplied parameters.
-static QColor litColor(const QGLMaterial &material)
-{
- QGLLightParameters light;
- QGLLightModel model;
-
- QVector4D color = colorToVector4D(material.emittedLight());
- color += colorToVector4D(material.ambientColor()) *
- colorToVector4D(model.ambientSceneColor());
- QVector4D scolor(0, 0, 0, 0);
-
- QVector3D normal(0, 0, 1);
- QVector3D vertex(-0.5f, -0.5f, 0.0f);
-
- QVector3D toEye;
- if (model.viewerPosition() == QGLLightModel::ViewerAtInfinity)
- toEye = QVector3D(0, 0, 1);
- else
- toEye = (-vertex).normalized();
-
- QVector3D toLight;
- QVector4D pli = light.eyePosition(QMatrix4x4());
- if (pli.w() == 0.0f)
- toLight = pli.toVector3D().normalized();
- else
- toLight = (pli.toVector3D() - vertex).normalized();
-
- qreal angle = qMax(QVector3D::dotProduct(normal, toLight), qreal(0.0f));
-
- QVector4D adcomponent = colorToVector4D(material.ambientColor()) *
- colorToVector4D(light.ambientColor());
- adcomponent += angle * colorToVector4D(material.diffuseColor()) *
- colorToVector4D(light.diffuseColor());
-
- QVector4D scomponent;
- if (angle != 0.0f) {
- QVector3D h = (toLight + toEye).normalized();
- angle = qMax(QVector3D::dotProduct(normal, h), qreal(0.0f));
- if (material.shininess() != 0.0f) {
- scomponent = qPow(angle, material.shininess()) *
- colorToVector4D(material.specularColor()) *
- colorToVector4D(light.specularColor());
- } else {
- scomponent = colorToVector4D(material.specularColor()) *
- colorToVector4D(light.specularColor());
- }
- } else {
- scomponent = QVector4D(0, 0, 0, 0);
- }
-
- if (light.spotAngle() != 180.0f) {
- qreal spot = qMax(QVector3D::dotProduct
- (vertex - pli.toVector3D(), light.spotDirection()), qreal(0.0f));
- if (spot < light.spotCosAngle()) {
- adcomponent = QVector4D(0, 0, 0, 0);
- scomponent = QVector4D(0, 0, 0, 0);
- } else {
- spot = qPow(spot, light.spotExponent());
- adcomponent *= spot;
- scomponent *= spot;
- }
- }
-
- if (pli.w() != 0.0f) {
- qreal attenuation = light.constantAttenuation();
- qreal len = (pli.toVector3D() - vertex).length();
- attenuation += light.linearAttenuation() * len;
- attenuation += light.quadraticAttenuation() * len * len;
- color += adcomponent / attenuation;
- scolor += scomponent / attenuation;
- } else {
- color += adcomponent;
- scolor += scomponent;
- }
-
- return vector4DToColor(color + scolor, material.diffuseColor().alphaF());
-}
-
-void tst_QGLMaterial::standardMaterialDraw()
-{
- if (!widget->isValid())
- QSKIP("GL Implementation not valid", SkipSingle);
-
- QGLMaterial mat1;
- QVERIFY(widget->runTest(&mat1));
- QVERIFY(widget->sameColor(litColor(mat1)));
-}
-
-void tst_QGLMaterial::colorMaterialDraw()
-{
- if (!widget->isValid())
- QSKIP("GL Implementation not valid", SkipSingle);
-
- QGLColorMaterial mat1;
- mat1.setColor(Qt::blue);
- QVERIFY(widget->runTest(&mat1));
- QVERIFY(widget->sameColor(Qt::blue));
-}
-
-QTEST_MAIN(tst_QGLMaterial)
-
-#include "tst_qglmaterial.moc"
diff --git a/tests/auto/threed/qglmaterialcollection/qglmaterialcollection.pro b/tests/auto/threed/qglmaterialcollection/qglmaterialcollection.pro
deleted file mode 100644
index dddbfca3..00000000
--- a/tests/auto/threed/qglmaterialcollection/qglmaterialcollection.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qglmaterialcollection.cpp
diff --git a/tests/auto/threed/qglmaterialcollection/tst_qglmaterialcollection.cpp b/tests/auto/threed/qglmaterialcollection/tst_qglmaterialcollection.cpp
deleted file mode 100644
index 24ecacb1..00000000
--- a/tests/auto/threed/qglmaterialcollection/tst_qglmaterialcollection.cpp
+++ /dev/null
@@ -1,236 +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 <QtTest/QtTest>
-#include "qglmaterialcollection.h"
-
-class tst_QGLMaterialCollection : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLMaterialCollection() : destroyCount(0) {}
- ~tst_QGLMaterialCollection() {}
-
-private slots:
- void simple();
- void addMaterial();
- void ownership();
- void markUsed();
-
-public slots:
- void materialDestroyed() { ++destroyCount; }
-
-private:
- int destroyCount;
-};
-
-// Simple sanity check on the collection.
-void tst_QGLMaterialCollection::simple()
-{
- QGLMaterialCollection *coll = new QGLMaterialCollection();
- QVERIFY(coll->isEmpty());
- QCOMPARE(coll->size(), 0);
- QVERIFY(!coll->material(0));
- QCOMPARE(coll->indexOf(QLatin1String("foo")), -1);
-
- destroyCount = 0;
-
- QGLMaterial *mat = new QGLMaterial(this);
- mat->setObjectName(QLatin1String("foo"));
- connect(mat, SIGNAL(destroyed()), this, SLOT(materialDestroyed()));
- QCOMPARE(coll->addMaterial(mat), 0);
- QVERIFY(mat->parent() == coll); // Ownership transfers to collection.
-
- QVERIFY(!coll->isEmpty());
- QCOMPARE(coll->size(), 1);
- QVERIFY(coll->material(0) == mat);
- QCOMPARE(coll->indexOf(QLatin1String("foo")), 0);
- QCOMPARE(coll->indexOf(QLatin1String("bar")), -1);
-
- QCOMPARE(destroyCount, 0);
- delete coll;
- QCOMPARE(destroyCount, 1); // Check that the material was destroyed.
-}
-
-// Test adding lots of materials and then looking them up.
-// Also acts as a torture test for the underlying data structures.
-void tst_QGLMaterialCollection::addMaterial()
-{
- QGLMaterialCollection *coll = new QGLMaterialCollection();
-
- const int Size = 2048;
-
- QGLMaterial **materials = new QGLMaterial *[Size];
- for (int index = 0; index < Size; ++index) {
- QGLMaterial *mat = new QGLMaterial();
- mat->setObjectName(QString::number(index));
- connect(mat, SIGNAL(destroyed()), this, SLOT(materialDestroyed()));
- materials[index] = mat;
- QCOMPARE(coll->addMaterial(mat), index);
- }
- QCOMPARE(coll->size(), Size);
- QVERIFY(!coll->isEmpty());
-
- for (int index = 0; index < Size; ++index) {
- QString name = QString::number(index);
- QVERIFY(coll->material(index) == materials[index]);
- QVERIFY(coll->material(name) == materials[index]);
- QVERIFY(coll->contains(materials[index]));
- QVERIFY(coll->contains(name));
- QCOMPARE(coll->indexOf(materials[index]), index);
- QCOMPARE(coll->indexOf(name), index);
- QCOMPARE(coll->materialName(index), name);
- }
-
- QGLMaterial *mat = new QGLMaterial();
-
- QVERIFY(!coll->material(-1));
- QVERIFY(!coll->material(coll->size()));
- QVERIFY(!coll->contains(0));
- QVERIFY(!coll->contains(mat));
- QVERIFY(!coll->contains(QLatin1String("foo")));
- QCOMPARE(coll->indexOf(0), -1);
- QCOMPARE(coll->indexOf(mat), -1);
- QCOMPARE(coll->indexOf(QLatin1String("foo")), -1);
-
- delete mat;
-
- destroyCount = 0;
- delete coll;
- QCOMPARE(destroyCount, Size);
-}
-
-// Test collection ownership.
-void tst_QGLMaterialCollection::ownership()
-{
- QGLMaterialCollection coll;
-
- QGLMaterial *mat = new QGLMaterial(this);
- mat->setObjectName(QLatin1String("foo"));
-
- QGLMaterial *mat2 = new QGLMaterial(this);
- mat2->setObjectName(QLatin1String("bar"));
-
- // Adding the same material multiple times returns the same index.
- QCOMPARE(coll.addMaterial(mat), 0);
- QCOMPARE(coll.addMaterial(mat2), 1);
- QCOMPARE(coll.addMaterial(mat), 0);
- QVERIFY(coll.material(0) == mat);
- QVERIFY(coll.material(1) == mat2);
- QCOMPARE(coll.indexOf(QLatin1String("foo")), 0);
- QCOMPARE(coll.indexOf(QLatin1String("bar")), 1);
- QCOMPARE(coll.size(), 2);
-
- // Shouldn't be able to add to another collection yet.
- QGLMaterialCollection coll2;
- QCOMPARE(coll2.addMaterial(mat), -1);
- QVERIFY(coll2.isEmpty());
-
- // Remove a material from the first collection and add it to the second.
- QVERIFY(mat->parent() == &coll);
- coll.removeMaterial(mat);
- QVERIFY(!mat->parent()); // Parent should revert to null when removed.
- QCOMPARE(coll.size(), 2); // Still two elements, one is null.
- QVERIFY(coll.material(0) == 0);
- QVERIFY(coll.material(1) == mat2);
- QCOMPARE(coll.indexOf(QLatin1String("foo")), -1);
- QCOMPARE(coll.indexOf(QLatin1String("bar")), 1);
- QCOMPARE(coll2.addMaterial(mat), 0);
- QVERIFY(mat->parent() == &coll2);
- QCOMPARE(coll2.size(), 1);
- QVERIFY(coll2.material(0) == mat);
- QCOMPARE(coll2.indexOf(QLatin1String("foo")), 0);
-}
-
-// Test material marking.
-void tst_QGLMaterialCollection::markUsed()
-{
- QGLMaterialCollection coll;
-
- QGLMaterial *mat = new QGLMaterial(this);
- mat->setObjectName(QLatin1String("foo"));
- connect(mat, SIGNAL(destroyed()), this, SLOT(materialDestroyed()));
-
- QGLMaterial *mat2 = new QGLMaterial(this);
- mat2->setObjectName(QLatin1String("bar"));
- connect(mat2, SIGNAL(destroyed()), this, SLOT(materialDestroyed()));
-
- QGLMaterial *mat3 = new QGLMaterial(this);
- mat3->setObjectName(QLatin1String("baz"));
- connect(mat3, SIGNAL(destroyed()), this, SLOT(materialDestroyed()));
-
- coll.addMaterial(mat);
- coll.addMaterial(mat2);
- coll.addMaterial(mat3);
-
- QVERIFY(!coll.isMaterialUsed(0));
- QVERIFY(!coll.isMaterialUsed(1));
- QVERIFY(!coll.isMaterialUsed(2));
-
- coll.markMaterialAsUsed(1);
- QVERIFY(!coll.isMaterialUsed(0));
- QVERIFY(coll.isMaterialUsed(1));
- QVERIFY(!coll.isMaterialUsed(2));
-
- QVERIFY(coll.material(0) == mat);
- QVERIFY(coll.material(1) == mat2);
- QVERIFY(coll.material(2) == mat3);
-
- destroyCount = 0;
- coll.removeUnusedMaterials();
- QCOMPARE(destroyCount, 2);
-
- QVERIFY(coll.material(0) == 0);
- QVERIFY(coll.material(1) == mat2);
- QVERIFY(coll.material(2) == 0);
-
- QVERIFY(!coll.contains(QLatin1String("foo")));
- QVERIFY(coll.contains(QLatin1String("bar")));
- QVERIFY(!coll.contains(QLatin1String("baz")));
-
- // Bounds checks.
- QVERIFY(!coll.isMaterialUsed(-1));
- QVERIFY(!coll.isMaterialUsed(3));
-}
-
-QTEST_APPLESS_MAIN(tst_QGLMaterialCollection)
-
-#include "tst_qglmaterialcollection.moc"
diff --git a/tests/auto/threed/qglpainter/qglpainter.pro b/tests/auto/threed/qglpainter/qglpainter.pro
deleted file mode 100644
index 0f195dcf..00000000
--- a/tests/auto/threed/qglpainter/qglpainter.pro
+++ /dev/null
@@ -1,15 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-INCLUDEPATH += ../../../shared
-VPATH += ../../../shared
-
-SOURCES += tst_qglpainter.cpp \
- qgltestwidget.cpp \
- compareimage.cpp \
- qglsimulator.cpp
-HEADERS += qgltestwidget.h \
- compareimage.h \
- qglsimulator.h
diff --git a/tests/auto/threed/qglpainter/qglsimulator.cpp b/tests/auto/threed/qglpainter/qglsimulator.cpp
deleted file mode 100644
index 80cf4d60..00000000
--- a/tests/auto/threed/qglpainter/qglsimulator.cpp
+++ /dev/null
@@ -1,129 +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 "qglsimulator.h"
-
-QGLSimulator::QGLSimulator(QPainter *painter, const QSize& size)
- : m_painter(painter),
- m_size(size),
- m_clearColor(Qt::black),
- m_viewport(0, 0, size.width(), size.height())
-{
-}
-
-QGLSimulator::~QGLSimulator()
-{
-}
-
-void QGLSimulator::clear()
-{
- m_painter->fillRect(0, 0, m_size.width(), m_size.height(), m_clearColor);
-}
-
-void QGLSimulator::setScissor(const QRect& rect)
-{
- m_scissor = rect;
- m_painter->setClipRect(rect);
-}
-
-void QGLSimulator::intersectScissor(const QRect& rect)
-{
- m_scissor = rect.intersected(m_scissor);
- m_painter->setClipRect(m_scissor);
-}
-
-void QGLSimulator::expandScissor(const QRect& rect)
-{
- m_scissor = rect.united(m_scissor);
- m_painter->setClipRect(m_scissor);
-}
-
-void QGLSimulator::clearScissor()
-{
- m_painter->setClipping(false);
-}
-
-void QGLSimulator::setViewport(int x, int y, int width, int height)
-{
- m_viewport = QRect(x, y, width, height);
-}
-
-// Set the flat color for drawing triangles.
-void QGLSimulator::setColor(const QColor& color)
-{
- m_painter->setBrush(QBrush(color));
- m_painter->setPen(QPen());
-}
-
-// Draw a set of triangles from a vertex array.
-void QGLSimulator::drawTriangles(const QVector2DArray& array)
-{
- QVector<QPointF> points;
-
- for (int index = 0; index < array.count(); ++index) {
- QVector3D v = array[index];
- points.append(project(v));
- }
-
- m_painter->drawPolygon(points);
-}
-
-void QGLSimulator::drawTriangles(const QVector3DArray& array)
-{
- QVector<QPointF> points;
-
- for (int index = 0; index < array.count(); ++index) {
- QVector3D v = array[index];
- points.append(project(v));
- }
-
- m_painter->drawPolygon(points);
-}
-
-// Project a 3D point to 2D and convert to left-handed QPainter co-ordinates.
-QPointF QGLSimulator::project(const QVector3D& vector) const
-{
- QVector3D pt = (m_projectionMatrix * m_modelViewMatrix) * vector;
- qreal x = (pt.x() + 1.0f) * m_viewport.width() * 0.5f + m_viewport.x();
- qreal y = (pt.y() + 1.0f) * m_viewport.height() * 0.5f + m_viewport.y();
- y = (m_viewport.height() - 1) - y;
- return QPointF(x, y);
-}
diff --git a/tests/auto/threed/qglpainter/qglsimulator.h b/tests/auto/threed/qglpainter/qglsimulator.h
deleted file mode 100644
index dc4a4439..00000000
--- a/tests/auto/threed/qglpainter/qglsimulator.h
+++ /dev/null
@@ -1,91 +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 QGLSIMULATOR_H
-#define QGLSIMULATOR_H
-
-#include <QtGui/qpainter.h>
-#include <QtGui/qcolor.h>
-#include <QtGui/qmatrix4x4.h>
-#include <QtGui/qvector3d.h>
-#include "qvector2darray.h"
-#include "qvector3darray.h"
-
-class QGLSimulator
-{
-public:
- QGLSimulator(QPainter *painter, const QSize& size);
- ~QGLSimulator();
-
- void setClearColor(const QColor& color) { m_clearColor = color; }
- void clear();
-
- void setScissor(const QRect& rect);
- void intersectScissor(const QRect& rect);
- void expandScissor(const QRect& rect);
- void clearScissor();
-
- void setViewport(int x, int y, int width, int height);
-
- QMatrix4x4 projectionMatrix() const { return m_projectionMatrix; }
- void setProjectionMatrix(const QMatrix4x4& m) { m_projectionMatrix = m; }
-
- QMatrix4x4 modelViewMatrix() const { return m_modelViewMatrix; }
- void setModelViewMatrix(const QMatrix4x4& m) { m_modelViewMatrix = m; }
-
- void setColor(const QColor& color);
-
- void drawTriangles(const QVector2DArray& array);
- void drawTriangles(const QVector3DArray& array);
-
-private:
- QPainter *m_painter;
- QSize m_size;
- QColor m_clearColor;
- QRect m_viewport;
- QMatrix4x4 m_projectionMatrix;
- QMatrix4x4 m_modelViewMatrix;
- QRect m_scissor;
-
- QPointF project(const QVector3D& vector) const;
-};
-
-#endif
diff --git a/tests/auto/threed/qglpainter/qgltestwidget.cpp b/tests/auto/threed/qglpainter/qgltestwidget.cpp
deleted file mode 100644
index b54976df..00000000
--- a/tests/auto/threed/qglpainter/qgltestwidget.cpp
+++ /dev/null
@@ -1,121 +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 <QtTest/QtTest>
-#include "qgltestwidget.h"
-#include "compareimage.h"
-#include <QtCore/qeventloop.h>
-#include <QtCore/qtimer.h>
-#include <QtGui/qpainter.h>
-
-QGLTestWidget::QGLTestWidget(QWidget *parent)
- : QGLWidget(parent)
-{
- eventLoop = 0;
- paintDone = false;
- target = 0;
- method = 0;
-}
-
-QGLTestWidget::~QGLTestWidget()
-{
- delete eventLoop;
-}
-
-bool QGLTestWidget::runTest(QObject *target, const char *method, int timeout)
-{
- if (eventLoop)
- delete eventLoop;
- paintDone = false;
- capture = QImage();
- simulated = QImage();
- this->target = target;
- this->method = method;
- eventLoop = new QEventLoop(this);
- QTimer::singleShot(timeout, eventLoop, SLOT(quit()));
- if (!isVisible()) {
- show();
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(this);
-#endif
- } else {
- updateGL();
- }
- if (!paintDone)
- eventLoop->exec();
- delete eventLoop;
- eventLoop = 0;
- this->target = 0;
- this->method = 0;
- if (!paintDone) {
- qWarning("timed out");
- return false;
- }
- if (!qFuzzyCompare(capture, simulated)) {
- qWarning("output is not as expected");
- return false;
- }
- return true;
-}
-
-void QGLTestWidget::paintGL()
-{
- if (target && method)
- QMetaObject::invokeMethod(target, method, Qt::DirectConnection);
- capture = grabFrameBuffer();
- if (target && method) {
- QSize sz = size();
- simulated = QImage(sz, QImage::Format_RGB32);
- QPainter painter;
- painter.begin(&simulated);
- QByteArray meth(method);
- meth.append('Q');
- QMetaObject::invokeMethod
- (target, meth.constData(), Qt::DirectConnection,
- Q_ARG(QPainter *, &painter), Q_ARG(const QSize, sz));
- painter.end();
- }
- if (!paintDone) {
- paintDone = true;
- if (eventLoop)
- eventLoop->quit();
- }
-}
diff --git a/tests/auto/threed/qglpainter/qgltestwidget.h b/tests/auto/threed/qglpainter/qgltestwidget.h
deleted file mode 100644
index 7fb17e6a..00000000
--- a/tests/auto/threed/qglpainter/qgltestwidget.h
+++ /dev/null
@@ -1,75 +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 QGLTESTWIDGET_H
-#define QGLTESTWIDGET_H
-
-#include <QtOpenGL/qgl.h>
-
-QT_BEGIN_NAMESPACE
-class QEventLoop;
-QT_END_NAMESPACE
-
-class QGLTestWidget : public QGLWidget
-{
- Q_OBJECT
-public:
- QGLTestWidget(QWidget *parent = 0);
- ~QGLTestWidget();
-
- bool runTest(QObject *target, const char *method, int timeout = 5000);
-
- QImage actualOutput() const { return capture; }
- QImage simulatedOutput() const { return simulated; }
-
-protected:
- void paintGL();
-
-private:
- QEventLoop *eventLoop;
- bool paintDone;
- QImage capture;
- QImage simulated;
- QObject *target;
- const char *method;
-};
-
-#endif
diff --git a/tests/auto/threed/qglpainter/tst_qglpainter.cpp b/tests/auto/threed/qglpainter/tst_qglpainter.cpp
deleted file mode 100644
index 82ee6521..00000000
--- a/tests/auto/threed/qglpainter/tst_qglpainter.cpp
+++ /dev/null
@@ -1,874 +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 <QtTest/QtTest>
-#include <QtOpenGL/qgl.h>
-#include <QtGui/qpainter.h>
-#include "qgltestwidget.h"
-#include "qglpainter.h"
-#include "qglsimulator.h"
-
-class tst_QGLPainter : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLPainter() : widget(0) {}
- ~tst_QGLPainter() {}
-
-private slots:
- void initTestCase();
- void cleanupTestCase();
- void clear();
- void drawTriangle();
- void scissor();
- void userMatrixStack();
- void projectionMatrixStack();
- void modelViewMatrixStack();
- void worldMatrix();
- void basicCullable();
- void isCullable_data();
- void isCullable();
- void isCullableVert_data();
- void isCullableVert();
- void lights();
- void nextPowerOfTwo_data();
- void nextPowerOfTwo();
-
-public slots:
- void clearPaint();
- void clearPaintQ(QPainter *painter, const QSize& size);
- void drawTrianglePaint();
- void drawTrianglePaintQ(QPainter *painter, const QSize& size);
- void scissorPaint();
- void scissorPaintQ(QPainter *painter, const QSize& size);
-
-private:
- QGLTestWidget *widget;
-};
-
-void tst_QGLPainter::initTestCase()
-{
- widget = new QGLTestWidget();
-}
-
-void tst_QGLPainter::cleanupTestCase()
-{
- delete widget;
-}
-
-void tst_QGLPainter::clear()
-{
- if (!widget->isValid())
- QSKIP("GL Implementation not valid", SkipSingle);
-
- QVERIFY(widget->runTest(this, "clearPaint"));
-}
-
-void tst_QGLPainter::clearPaint()
-{
- QGLPainter painter;
- painter.begin();
- painter.setClearColor(Qt::blue);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-}
-
-void tst_QGLPainter::clearPaintQ(QPainter *painter, const QSize& size)
-{
- QGLSimulator sim(painter, size);
- sim.setClearColor(Qt::blue);
- sim.clear();
-}
-
-void tst_QGLPainter::drawTriangle()
-{
- if (!widget->isValid())
- QSKIP("GL Implementation not valid", SkipSingle);
-
- QVERIFY(widget->runTest(this, "drawTrianglePaint"));
-}
-
-void tst_QGLPainter::drawTrianglePaint()
-{
- QGLPainter painter;
- painter.begin();
- painter.setClearColor(Qt::black);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- QMatrix4x4 projm;
- projm.ortho(widget->rect());
- painter.projectionMatrix() = projm;
- painter.modelViewMatrix().setToIdentity();
-
- QVector2DArray vertices;
- vertices.append(10, 100);
- vertices.append(500, 100);
- vertices.append(500, 500);
-
- painter.clearAttributes();
- painter.setStandardEffect(QGL::FlatColor);
- painter.setColor(Qt::green);
- painter.setVertexAttribute(QGL::Position, vertices);
- painter.draw(QGL::Triangles, 3);
-}
-
-void tst_QGLPainter::drawTrianglePaintQ(QPainter *painter, const QSize& size)
-{
- QGLSimulator sim(painter, size);
-
- sim.clear();
- sim.setColor(Qt::green);
-
- QMatrix4x4 proj;
- proj.ortho(widget->rect());
- sim.setProjectionMatrix(proj);
-
- QVector2DArray vertices;
- vertices.append(10, 100);
- vertices.append(500, 100);
- vertices.append(500, 500);
-
- sim.drawTriangles(vertices);
-}
-
-static QRect fetchGLScissor(const QRect& windowRect)
-{
- GLint scissor[4];
- glGetIntegerv(GL_SCISSOR_BOX, scissor);
- if (scissor[2] != 0 && scissor[3] != 0) {
- return QRect(scissor[0],
- windowRect.height() - (scissor[1] + scissor[3]),
- scissor[2], scissor[3]);
- } else {
- // Normally should be (0, 0, 0, 0) - don't adjust for window height.
- return QRect(scissor[0], scissor[1], scissor[2], scissor[3]);
- }
-}
-
-void tst_QGLPainter::scissor()
-{
- if (!widget->isValid())
- QSKIP("GL Implementation not valid", SkipSingle);
-
- // Run a painting test to check that the scissor works.
- QVERIFY(widget->runTest(this, "scissorPaint"));
-
- // Perform some lower level tests to ensure that the
- // GL state is updated properly as the scissor changes.
- QGLPainter painter;
- painter.begin(widget);
- QRect windowRect = widget->rect();
-
- QVERIFY(!glIsEnabled(GL_SCISSOR_TEST));
-
- painter.setScissor(windowRect);
- QCOMPARE(fetchGLScissor(windowRect), windowRect);
-
- QRect subRect(windowRect.width() / 3,
- windowRect.height() / 3,
- 2 * windowRect.width() / 3,
- 2 * windowRect.height() / 3);
- painter.setScissor(subRect);
- QCOMPARE(fetchGLScissor(windowRect), subRect);
-
- // Empty rectangles should result in glScissor(0, 0, 0, 0).
- painter.setScissor(QRect(0, 0, -2, -2));
- QCOMPARE(fetchGLScissor(windowRect), QRect(0, 0, 0, 0));
- painter.setScissor(QRect(27, 42, 0, 0));
- QCOMPARE(fetchGLScissor(windowRect), QRect(0, 0, 0, 0));
-}
-
-void tst_QGLPainter::scissorPaint()
-{
- QGLPainter painter;
- painter.begin();
- painter.setClearColor(Qt::black);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- QMatrix4x4 projm;
- projm.ortho(widget->rect());
- painter.projectionMatrix() = projm;
- painter.modelViewMatrix().setToIdentity();
-
- QVector2DArray vertices;
- vertices.append(10, 100);
- vertices.append(500, 100);
- vertices.append(500, 500);
-
- // Paint a green triangle.
- painter.clearAttributes();
- painter.setStandardEffect(QGL::FlatColor);
- painter.setColor(Qt::green);
- painter.setVertexAttribute(QGL::Position, vertices);
- painter.draw(QGL::Triangles, 3);
-
- // Change the top part of the triangle to blue.
- QRect scissor(0, 0, widget->width(), qMin(widget->height() / 2, 200));
- painter.setScissor(scissor);
- glEnable(GL_SCISSOR_TEST);
- painter.setColor(Qt::blue);
- painter.draw(QGL::Triangles, 3);
-
- // Intersect and draw red over the blue section.
- painter.setScissor(scissor.intersected
- (QRect(0, 0, widget->width(), qMin(widget->height() / 4, 150))));
- painter.setColor(Qt::red);
- painter.draw(QGL::Triangles, 3);
-
- // Change the bottom part of the triangle to yellow.
- int y = qMin(widget->height() / 2, 350);
- scissor = QRect(0, y, 400, widget->height() - y);
- painter.setScissor(scissor);
- painter.setColor(Qt::yellow);
- painter.draw(QGL::Triangles, 3);
-
- // Intersect and expand, to extend the yellow region.
- scissor &= QRect(0, y + 20, 400, widget->height() - y - 20);
- scissor |= QRect(0, y + 20, 450, widget->height() - y - 20);
- painter.setScissor(scissor);
- painter.setColor(Qt::yellow);
- painter.draw(QGL::Triangles, 3);
-
- glDisable(GL_SCISSOR_TEST);
-}
-
-void tst_QGLPainter::scissorPaintQ(QPainter *painter, const QSize& size)
-{
- QGLSimulator sim(painter, size);
-
- sim.clear();
-
- QMatrix4x4 proj;
- proj.ortho(widget->rect());
- sim.setProjectionMatrix(proj);
-
- QVector2DArray vertices;
- vertices.append(10, 100);
- vertices.append(500, 100);
- vertices.append(500, 500);
-
- // Paint a green triangle.
- sim.setColor(Qt::green);
- sim.drawTriangles(vertices);
-
- // Change the top part of the triangle to blue.
- sim.setScissor
- (QRect(0, 0, widget->width(), qMin(widget->height() / 2, 200)));
- sim.setColor(Qt::blue);
- sim.drawTriangles(vertices);
-
- // Intersect and draw red over the blue section.
- sim.intersectScissor
- (QRect(0, 0, widget->width(), qMin(widget->height() / 4, 150)));
- sim.setColor(Qt::red);
- sim.drawTriangles(vertices);
-
- // Change the bottom part of the triangle to yellow.
- int y = qMin(widget->height() / 2, 350);
- sim.setScissor
- (QRect(0, y, 400, widget->height() - y));
- sim.setColor(Qt::yellow);
- sim.drawTriangles(vertices);
-
- // Intersect and expand, to extend the yellow region.
- sim.intersectScissor
- (QRect(0, y + 20, 400, widget->height() - y - 20));
- sim.expandScissor
- (QRect(0, y + 20, 450, widget->height() - y - 20));
- sim.setColor(Qt::yellow);
- sim.drawTriangles(vertices);
-}
-
-// Test the mathematical correctness of matrix stacks on a user stack.
-// We assume that QMatrix4x4 works and we can use it as an oracle.
-void tst_QGLPainter::userMatrixStack()
-{
- QMatrix4x4Stack stack;
-
- QVERIFY(stack.top().isIdentity());
- QVERIFY(QMatrix4x4(stack).isIdentity());
-
- QMatrix4x4 m;
- m.translate(1, 2, 3);
- m.scale(4, 5, 6);
- m.rotate(90, 0, 1, 0);
-
- stack.translate(1, 2, 3);
- stack.scale(4, 5, 6);
- stack.rotate(90, 0, 1, 0);
- QVERIFY(qFuzzyCompare(m, stack.top()));
- QVERIFY(qFuzzyCompare(m, QMatrix4x4(stack)));
-
- stack.push();
- QVERIFY(qFuzzyCompare(m, stack.top()));
- QVERIFY(qFuzzyCompare(m, QMatrix4x4(stack)));
-
- stack.setToIdentity();
- QVERIFY(stack.top().isIdentity());
-
- stack.translate(QVector3D(1, 2, 3));
- stack.scale(QVector3D(4, 5, 6));
- stack.rotate(90, QVector3D(0, 1, 0));
- QVERIFY(qFuzzyCompare(m, stack.top()));
- QVERIFY(qFuzzyCompare(m, QMatrix4x4(stack)));
-
- QMatrix4x4 m2(m);
- m2.scale(-3);
-
- stack.scale(-3);
- QVERIFY(qFuzzyCompare(m2, stack.top()));
- QVERIFY(qFuzzyCompare(m2, QMatrix4x4(stack)));
-
- stack.pop();
-
- QVERIFY(qFuzzyCompare(m, stack.top()));
- QVERIFY(qFuzzyCompare(m, QMatrix4x4(stack)));
-
- stack.pop(); // at bottom of stack - no change
-
- QVERIFY(qFuzzyCompare(m, stack.top()));
- QVERIFY(qFuzzyCompare(m, QMatrix4x4(stack)));
-
- stack = m2;
- QVERIFY(qFuzzyCompare(m2, stack.top()));
- QVERIFY(qFuzzyCompare(m2, QMatrix4x4(stack)));
-
- QMatrix4x4 m3 = m2 * m;
- stack *= m;
- QVERIFY(qFuzzyCompare(m3, stack.top()));
- QVERIFY(qFuzzyCompare(m3, QMatrix4x4(stack)));
-
- m3.rotate(QQuaternion::fromAxisAndAngle(QVector3D(1, 0, 0), -90));
- stack.rotate(QQuaternion::fromAxisAndAngle(QVector3D(1, 0, 0), -90));
-
- QVERIFY(qFuzzyCompare(m3, stack.top()));
- QVERIFY(qFuzzyCompare(m3, QMatrix4x4(stack)));
-
- QMatrix4x4 m4;
-
- m4.setToIdentity();
- m4.ortho(QRect(2, 3, 4, 5));
- stack.setToIdentity();
- QMatrix4x4 projm;
- projm.ortho(QRect(2, 3, 4, 5));
- stack = projm;
- QVERIFY(qFuzzyCompare(m4, stack.top()));
- QVERIFY(qFuzzyCompare(m4, QMatrix4x4(stack)));
-}
-
-#if defined(QT_OPENGL_ES_2)
-#define QGL_NO_MATRIX_FETCH 1
-#endif
-
-#ifndef QGL_NO_MATRIX_FETCH
-
-static void clearGLMatrix(GLenum type)
-{
- glMatrixMode(type);
- glLoadIdentity();
-}
-
-static bool checkGLMatrix(GLenum type, const QMatrix4x4& expected)
-{
- QMatrix4x4 actual;
- int index;
- GLfloat mat[16];
- glGetFloatv(type, mat);
- qreal *m = actual.data();
- for (index = 0; index < 16; ++index)
- m[index] = mat[index];
- for (index = 0; index < 16; ++index) {
- // Introduce some fuzziness for GL servers that
- // use a different precision from QMatrix4x4.
- if (qAbs(actual.constData()[index] - expected.constData()[index])
- >= 0.001)
- return false;
- }
- return true;
-}
-
-#else
-
-#ifndef GL_PROJECTION
-#define GL_PROJECTION 0
-#endif
-#ifndef GL_PROJECTION_MATRIX
-#define GL_PROJECTION_MATRIX 0
-#endif
-#ifndef GL_MODELVIEW
-#define GL_MODELVIEW 0
-#endif
-#ifndef GL_MODELVIEW_MATRIX
-#define GL_MODELVIEW_MATRIX 0
-#endif
-
-// OpenGL/ES 2.0 does not have server-side matrices.
-// For such platforms, we stub out the checks and just hope that they work.
-static void clearGLMatrix(GLenum) {}
-static bool checkGLMatrix(GLenum, const QMatrix4x4&) { return true; }
-
-#endif
-
-void tst_QGLPainter::projectionMatrixStack()
-{
- if (!widget->isValid())
- QSKIP("GL Implementation not valid", SkipSingle);
-
- QGLPainter painter(widget);
-
- painter.projectionMatrix().setToIdentity();
- QVERIFY(painter.projectionMatrix().top().isIdentity());
- QVERIFY(QMatrix4x4(painter.projectionMatrix()).isIdentity());
-
- // Clear the matrix in the GL server.
- clearGLMatrix(GL_PROJECTION);
-
- QMatrix4x4 m;
- m.ortho(2, 4, 3, 1, 10, 50);
- painter.projectionMatrix() = m;
- QVERIFY(qFuzzyCompare(m, painter.projectionMatrix().top()));
- QVERIFY(qFuzzyCompare(m, QMatrix4x4(painter.projectionMatrix())));
-
- // The matrix in the GL server should still be the identity.
- QVERIFY(checkGLMatrix(GL_PROJECTION_MATRIX, QMatrix4x4()));
-
- // Force an update to the GL server.
- painter.updateFixedFunction(QGLPainter::UpdateProjectionMatrix);
-
- // Check that the server received the value we set.
- QVERIFY(checkGLMatrix(GL_PROJECTION_MATRIX, m));
-}
-
-void tst_QGLPainter::modelViewMatrixStack()
-{
- if (!widget->isValid())
- QSKIP("GL Implementation not valid", SkipSingle);
-
- QGLPainter painter(widget);
-
- painter.modelViewMatrix().setToIdentity();
- QVERIFY(painter.modelViewMatrix().top().isIdentity());
- QVERIFY(QMatrix4x4(painter.modelViewMatrix()).isIdentity());
-
- // Clear the matrix in the GL server.
- clearGLMatrix(GL_MODELVIEW);
-
- QMatrix4x4 m;
- m.translate(1, 2, 3);
- m.scale(4, 5, 6);
- m.rotate(90, 0, 1, 0);
- painter.modelViewMatrix().translate(1, 2, 3);
- painter.modelViewMatrix().scale(4, 5, 6);
- painter.modelViewMatrix().rotate(90, 0, 1, 0);
- QVERIFY(qFuzzyCompare(m, painter.modelViewMatrix().top()));
- QVERIFY(qFuzzyCompare(m, QMatrix4x4(painter.modelViewMatrix())));
-
- // The matrix in the GL server should still be the identity.
- QVERIFY(checkGLMatrix(GL_MODELVIEW_MATRIX, QMatrix4x4()));
-
- // Force an update to the GL server.
- painter.updateFixedFunction(QGLPainter::UpdateModelViewMatrix);
-
- // Check that the server received the value we set.
- QVERIFY(checkGLMatrix(GL_MODELVIEW_MATRIX, m));
-}
-
-static bool fuzzyCompare(const QMatrix4x4 &m1, const QMatrix4x4 &m2)
-{
- for (int row = 0; row < 4; ++row) {
- for (int col = 0; col < 4; ++col) {
- if (qAbs(m1(row, col) - m2(row, col)) >= 0.00001f)
- return false;
- }
- }
- return true;
-}
-
-void tst_QGLPainter::worldMatrix()
-{
- QGLPainter painter(widget);
-
- QGLCamera camera;
- camera.setEye(QVector3D(1, 2, 10));
- camera.setCenter(QVector3D(20, 3, -4));
- camera.setUpVector(QVector3D(1, 1, 1));
- painter.setCamera(&camera);
-
- // The modelview matrix should be the eye look-at component.
- QMatrix4x4 mv;
- mv.lookAt(camera.eye(), camera.center(), camera.upVector());
- QVERIFY(fuzzyCompare(painter.modelViewMatrix(), mv));
-
- // The world matrix should currently be the identity.
- QVERIFY(fuzzyCompare(painter.worldMatrix(), QMatrix4x4()));
-
- // Change the modelview.
- painter.modelViewMatrix().translate(0.0f, 5.0f, 0.0f);
- painter.modelViewMatrix().scale(1.5f);
-
- // Check the modelview and world matrices against their expected values.
- QMatrix4x4 world;
- world.translate(0.0f, 5.0f, 0.0f);
- world.scale(1.5f);
- QVERIFY(fuzzyCompare(painter.modelViewMatrix(), mv * world));
- QVERIFY(fuzzyCompare(painter.worldMatrix(), world));
-}
-
-void tst_QGLPainter::basicCullable()
-{
- QGLWidget w;
- QGLPainter painter(&w);
- painter.modelViewMatrix().setToIdentity();
-
- // Default values for the camera have
- // eye = (0, 0, 10) - so eye at positive 10 on z-axis
- // center = (0, 0, 0) - looking at the origin, in a negative z-direction
- // viewport = 2 x 2 - ideal square view frustum
- // near = 5 - distance from eye to near plane
- // far = 1000 - distance from eye to far plane
- // far plane is a z = -990
- QGLCamera camera;
- painter.setCamera(&camera);
-
- // origin itself and a point 10 further down the view vector
- // both must be visible
- QVERIFY(!painter.isCullable(QVector3D(0, 0, 0)));
- QVERIFY(!painter.isCullable(QVector3D(0, 0, -10)));
-
- // the position of the eye itself, is behind the near plane, so culled.
- QVERIFY(painter.isCullable(QVector3D(0, 0, 10)));
- // Reset the camera and then check boxes in front of the camera
- // that are close to the near and far planes and the eye.
- QGLCamera camera2;
- painter.setCamera(&camera2);
-
- // Box around the eye, but in front of the near plane.
- QBox3D box2(QVector3D(-1, -1, 11), QVector3D(1, 1, 9));
- QVERIFY(painter.isCullable(box2));
-
- // Box that surrounds the near plane.
- QBox3D box3(QVector3D(-1, -1, 6), QVector3D(1, 1, 4));
- QVERIFY(!painter.isCullable(box3));
-
- // Box between the near plane and the eye.
- QBox3D box4(QVector3D(-1, -1, 7), QVector3D(1, 1, 6));
- QVERIFY(painter.isCullable(box4));
-
- // Box extending from behind the eye to inside the viewing cube.
- // Not cullable because it is partially visible.
- QBox3D box5(QVector3D(-1, -1, 11), QVector3D(1, 1, 0));
- QVERIFY(!painter.isCullable(box5));
-
- // Box that surrounds the far plane.
- QBox3D box6(QVector3D(-1, -1, -989), QVector3D(1, 1, -991));
- QVERIFY(!painter.isCullable(box6));
-
- // Box that is between the near and far planes, but close to far plane.
- QBox3D box7(QVector3D(-1, -1, -988), QVector3D(1, 1, -989));
- QVERIFY(!painter.isCullable(box7));
-
- // Box that is beyond the far plane.
- QBox3D box8(QVector3D(-1, -1, -1000), QVector3D(1, 1, -1001));
- QVERIFY(painter.isCullable(box8));
-}
-
-static void setupTestCamera(QGLCamera &camera, float distance)
-{
- // These values are based on the special camera as per the images in
- // doc/src/images/view-frustum*
-
- // Check the cullability of a box at 10 degree increments of rotation.
- // It should be visible between -20 and 20 degrees but otherwise not.
- // Also check the center point of the box.
-
- camera.setNearPlane(2.2f);
- camera.setFarPlane(14.0f);
-
- // This value comes from the ratio of the far plane size 8 x 8 to the
- // far plane distance, multiplied by the near plane, to give the near
- // plane size: 2.2 x (4 / 14) = 1.257
- camera.setViewSize(QSizeF(1.257f, 1.257f));
-
- // as shown in the images, we use a camera at -z instead of the default +z
- // but the center remains the same at 0, 0, 0
- camera.setEye(QVector3D(0, 0, distance));
-
- // if the distance would push the camera eye past the view center
- // move the view center away
- if (distance > 0.0f)
- camera.setCenter(QVector3D(0.0f, 0.0f, distance + 2));
-}
-
-void tst_QGLPainter::isCullable_data()
-{
- QTest::addColumn<float>("angle");
- QTest::addColumn<float>("distance");
- QTest::addColumn<bool>("culled");
- QTest::addColumn<bool>("center_culled");
-
- // Check the cullability of a box at 10 degree increments of rotation.
- // It should be visible between -20 and 20 degrees but otherwise not.
- // Also check the point at the center of the box.
-
- QTest::newRow("culled-neg40") << -40.0f << -8.0f << true << true;
- QTest::newRow("culled-neg30") << -30.0f << -8.0f << true << true;
- QTest::newRow("part-vis-neg20") << -20.0f << -8.0f << false << false;
- QTest::newRow("part-vis-neg10") << -10.0f << -8.0f << false << false;
- QTest::newRow("all-vis-00") << 0.0f << -8.0f << false << false;
- QTest::newRow("part-vis-pos10") << 10.0f << -8.0f << false << false;
- QTest::newRow("part-vis-pos20") << 20.0f << -8.0f << false << false;
- QTest::newRow("culled-pos30") << 30.0f << -8.0f << true << true;
- QTest::newRow("culled-pos40") << 40.0f << -8.0f << true << true;
-
- // Check when the eye is at varying distances from the box, with
- // (in one case with an angle for good measure) so that it needs
- // testing against the near and far planes.
-
- QTest::newRow("culled-eye-z+2") << 0.0f << 2.0f << true << true;
- QTest::newRow("culled-eye-z+0") << 0.0f << 0.0f << true << true;
- QTest::newRow("part-vis-eye-z-2-around-np") << 0.0f << -2.0f << false << true;
- QTest::newRow("part-vis-eye-z-3-around-np") << 0.0f << -3.0f << false << false;
- QTest::newRow("part-vis-eye-z-4-close-np") << 0.0f << -4.0f << false << false;
- QTest::newRow("part-vis-eye-z-14.5") << 0.0f << -14.5f << false << true;
- QTest::newRow("part-vis-eye-z-14-angle-20") << 20.0f << -14.0f << false << false;
- QTest::newRow("culled-eye-z-20") << 0.0f << -20.0f << true << true;
-}
-
-void tst_QGLPainter::isCullable()
-{
- QGLWidget w;
- QGLPainter painter(&w);
- painter.modelViewMatrix().setToIdentity();
-
- QGLCamera camera;
-
- QFETCH(float, angle);
- QFETCH(float, distance);
- QFETCH(bool, culled);
- QFETCH(bool, center_culled);
-
- setupTestCamera(camera, distance);
- if (angle != 0.0f)
- camera.rotateEye(camera.pan(angle));
-
- painter.setCamera(&camera);
-
- QBox3D box(QVector3D(-1, -1, -1), QVector3D(1, 1, 1));
- QCOMPARE(painter.isCullable(box), culled);
- QCOMPARE(painter.isCullable(box.center()), center_culled);
-}
-
-void tst_QGLPainter::isCullableVert_data()
-{
- QTest::addColumn<float>("angle");
- QTest::addColumn<float>("distance");
- QTest::addColumn<bool>("culled");
- QTest::addColumn<bool>("center_culled");
-
- // Check the cullability of a box at 10 degree increments of rotation.
- // It should be visible between -20 and 20 degrees but otherwise not.
- // Also check the point at the center of the box.
-
- QTest::newRow("culled-neg40") << -40.0f << -8.0f << true << true;
- QTest::newRow("culled-neg30") << -30.0f << -8.0f << true << true;
- QTest::newRow("part-vis-neg20") << -20.0f << -8.0f << false << true;
- QTest::newRow("part-vis-neg10") << -10.0f << -8.0f << false << false;
- QTest::newRow("all-vis-00") << 0.0f << -8.0f << false << false;
- QTest::newRow("part-vis-pos10") << 10.0f << -8.0f << false << false;
- QTest::newRow("part-vis-pos20") << 20.0f << -8.0f << false << true;
- QTest::newRow("culled-pos30") << 30.0f << -8.0f << true << true;
- QTest::newRow("culled-pos40") << 40.0f << -8.0f << true << true;
-
- QTest::newRow("culled-eye-z+2") << 0.0f << 2.0f << true << true;
- QTest::newRow("culled-eye-z+0") << 0.0f << 0.0f << true << true;
- QTest::newRow("part-vis-eye-z-2-around-np") << 0.0f << -2.0f << false << true;
- QTest::newRow("part-vis-eye-z-3-around-np") << 0.0f << -3.0f << false << false;
- QTest::newRow("part-vis-eye-z-4-close-np") << 0.0f << -4.0f << false << false;
- QTest::newRow("part-vis-eye-z-14.2") << 0.0f << -14.2f << false << true;
- QTest::newRow("part-vis-eye-z-14-angle-20") << 20.0f << -14.0f << false << true;
- QTest::newRow("culled-eye-z-20") << 0.0f << -20.0f << true << true;
-}
-
-void tst_QGLPainter::isCullableVert()
-{
- //QSKIP("isCullableVert not passing currently", SkipAll);
- // same test as isCullable, except we tilt the camera forward
- // and back instead of rotating it from side to side
- // since the view frustum is typically not square in section
- // as it depends on the surface, this will give different results.
- QGLWidget w;
- QGLPainter painter(&w);
- painter.modelViewMatrix().setToIdentity();
-
- QGLCamera camera;
-
- QFETCH(float, angle);
- QFETCH(float, distance);
- QFETCH(bool, culled);
- QFETCH(bool, center_culled);
-
- setupTestCamera(camera, distance);
- if (angle != 0.0f)
- camera.rotateEye(camera.tilt(angle));
-
- painter.setCamera(&camera);
-
- QBox3D box(QVector3D(-1, -1, -1), QVector3D(1, 1, 1));
- QCOMPARE(painter.isCullable(box), culled);
- QCOMPARE(painter.isCullable(box.center()), center_culled);
-}
-
-void tst_QGLPainter::lights()
-{
- QGLPainter painter(widget);
-
- // Make sure the mainLight() is not present before we start these tests.
- painter.removeLight(0);
-
- QCOMPARE(painter.maximumLightId(), -1);
- QVERIFY(painter.light(0) == 0);
- QVERIFY(painter.lightTransform(0).isIdentity());
- QVERIFY(painter.light(-1) == 0);
- QVERIFY(painter.lightTransform(-1).isIdentity());
-
- QGLLightParameters lparams1;
- QGLLightParameters lparams2;
- QGLLightParameters lparams3;
-
- int lightId1 = painter.addLight(&lparams1);
- QCOMPARE(lightId1, 0);
- QCOMPARE(painter.maximumLightId(), 0);
- QVERIFY(painter.light(lightId1) == &lparams1);
- QVERIFY(painter.lightTransform(lightId1) == painter.modelViewMatrix());
-
- QMatrix4x4 m(painter.modelViewMatrix());
- m.translate(-1, 2, -5);
-
- int lightId2 = painter.addLight(&lparams2, m);
- QCOMPARE(lightId2, 1);
- QCOMPARE(painter.maximumLightId(), 1);
- QVERIFY(painter.light(lightId1) == &lparams1);
- QVERIFY(painter.lightTransform(lightId1) == painter.modelViewMatrix());
- QVERIFY(painter.light(lightId2) == &lparams2);
- QVERIFY(painter.lightTransform(lightId2) == m);
-
- painter.removeLight(lightId1);
- QCOMPARE(painter.maximumLightId(), 1);
- QVERIFY(painter.light(lightId1) == 0);
- QVERIFY(painter.lightTransform(lightId1).isIdentity());
- QVERIFY(painter.light(lightId2) == &lparams2);
- QVERIFY(painter.lightTransform(lightId2) == m);
-
- int lightId3 = painter.addLight(&lparams3);
- QCOMPARE(lightId3, 0);
- QCOMPARE(painter.maximumLightId(), 1);
- QVERIFY(painter.light(lightId3) == &lparams3);
- QVERIFY(painter.lightTransform(lightId3) == painter.modelViewMatrix());
- QVERIFY(painter.light(lightId2) == &lparams2);
- QVERIFY(painter.lightTransform(lightId2) == m);
-
- painter.removeLight(lightId2);
- QCOMPARE(painter.maximumLightId(), 0);
- QVERIFY(painter.light(lightId3) == &lparams3);
- QVERIFY(painter.lightTransform(lightId3) == painter.modelViewMatrix());
- QVERIFY(painter.light(lightId2) == 0);
- QVERIFY(painter.lightTransform(lightId2).isIdentity());
-
- painter.removeLight(lightId3);
- QCOMPARE(painter.maximumLightId(), -1);
- QVERIFY(painter.light(lightId3) == 0);
- QVERIFY(painter.lightTransform(lightId3).isIdentity());
- QVERIFY(painter.light(lightId2) == 0);
- QVERIFY(painter.lightTransform(lightId2).isIdentity());
-
- // Check default construction of the main light.
- const QGLLightParameters *mainLight = painter.mainLight();
- QVERIFY(mainLight != 0);
- QCOMPARE(painter.maximumLightId(), 0);
- QVERIFY(painter.light(0) == mainLight);
- QVERIFY(painter.lightTransform(0).isIdentity());
-}
-
-void tst_QGLPainter::nextPowerOfTwo_data()
-{
- QTest::addColumn<int>("value");
- QTest::addColumn<int>("result");
-
- QTest::newRow("0") << 0 << 0;
- QTest::newRow("1") << 1 << 1;
- QTest::newRow("2") << 2 << 2;
- QTest::newRow("3") << 3 << 4;
- QTest::newRow("4") << 4 << 4;
- QTest::newRow("5") << 5 << 8;
- QTest::newRow("6") << 6 << 8;
- QTest::newRow("7") << 7 << 8;
- QTest::newRow("13") << 13 << 16;
- QTest::newRow("16") << 16 << 16;
- QTest::newRow("23") << 23 << 32;
- QTest::newRow("32") << 32 << 32;
- QTest::newRow("63") << 63 << 64;
- QTest::newRow("64") << 64 << 64;
- QTest::newRow("65") << 65 << 128;
- QTest::newRow("120") << 120 << 128;
- QTest::newRow("128") << 128 << 128;
- QTest::newRow("129") << 129 << 256;
-
- for (int bit = 8; bit <= 30; ++bit) {
- int value = (1 << bit);
- QByteArray str;
- str = QByteArray::number(value);
- QTest::newRow(str.constData()) << (value - 23) << value;
- QTest::newRow(str.constData()) << value << value;
- }
-}
-
-void tst_QGLPainter::nextPowerOfTwo()
-{
- QFETCH(int, value);
- QFETCH(int, result);
-
- QCOMPARE(QGL::nextPowerOfTwo(value), result);
- QCOMPARE(QGL::nextPowerOfTwo(QSize(value, 0)), QSize(result, 0));
- QCOMPARE(QGL::nextPowerOfTwo(QSize(0, value)), QSize(0, result));
-}
-
-QTEST_MAIN(tst_QGLPainter)
-
-#include "tst_qglpainter.moc"
diff --git a/tests/auto/threed/qglpickcolors/qglpickcolors.pro b/tests/auto/threed/qglpickcolors/qglpickcolors.pro
deleted file mode 100644
index 1394e282..00000000
--- a/tests/auto/threed/qglpickcolors/qglpickcolors.pro
+++ /dev/null
@@ -1,14 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on
-
-INCLUDEPATH += ../../../../src/threed/painting
-VPATH += ../../../../src/threed/painting
-
-SOURCES += \
- tst_qglpickcolors.cpp \
- qglpickcolors.cpp
-
-HEADERS += \
- qglpickcolors_p.h
diff --git a/tests/auto/threed/qglpickcolors/tst_qglpickcolors.cpp b/tests/auto/threed/qglpickcolors/tst_qglpickcolors.cpp
deleted file mode 100644
index 795cf8fe..00000000
--- a/tests/auto/threed/qglpickcolors/tst_qglpickcolors.cpp
+++ /dev/null
@@ -1,299 +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 <QtTest/QtTest>
-#include <QtCore/qset.h>
-#include "qglpickcolors_p.h"
-
-class tst_QGLPickColors : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLPickColors() {}
- ~tst_QGLPickColors() {}
-
-private slots:
- void distinctColors();
- void colorSpread();
-
- // Round-trip tests check various kinds of ways in which GPU's
- // may take the incoming RGB888 value for the pick color and turn
- // it into a value in the framebuffer, and then convert that
- // back into an RGB888 value later.
- //
- // For example, converting RGB888 -> RGB565 -> RGB888 will lose some
- // precision. The amount of lost precision will depend upon the
- // specific way in which the GPU does the conversion. The function
- // qt_qgl_normalize_pick_color() corrects for this and must always
- // return to the same value irrespective of how the GPU works.
- void roundTripExact();
- void roundTripTrunc565();
- void roundTripScale565();
- void roundTripDup565();
- void roundTripTrunc555();
- void roundTripScale555();
- void roundTripDup555();
- void roundTripScale444(); // Trunc doesn't work well with 444.
- void roundTripDup444();
-};
-
-// Check that all pick colors are distinct, opaque, and not black.
-void tst_QGLPickColors::distinctColors()
-{
- QSet<QRgb> used;
- int index = 0;
- QRgb rgb;
- while ((rgb = qt_qgl_pick_color(index)) != 0) {
- QVERIFY(!used.contains(rgb));
- used += rgb;
- QVERIFY(qAlpha(rgb) == 255); // Opaque.
- QVERIFY(qRed(rgb) || qGreen(rgb) || qBlue(rgb)); // Not black.
- ++index;
- }
- QCOMPARE(rgb, QRgb(0));
- QCOMPARE(qt_qgl_pick_color(-1), QRgb(0));
- QVERIFY(index >= 1024);
-}
-
-// Check that the colors are well spread out so that accidental
-// mismatches will not occur.
-void tst_QGLPickColors::colorSpread()
-{
- int index1 = 0;
- int index2;
- QRgb rgb1, rgb2;
- while ((rgb1 = qt_qgl_pick_color(index1)) != 0) {
- index2 = qMax(index1 - 50, 0);
- while (index2 < index1) {
- rgb2 = qt_qgl_pick_color(index2);
- int rdiff = qRed(rgb1) - qRed(rgb2);
- int gdiff = qGreen(rgb1) - qGreen(rgb2);
- int bdiff = qBlue(rgb1) - qBlue(rgb2);
- int dist = rdiff * rdiff + gdiff * gdiff + bdiff * bdiff;
- if (dist < 15 * 15) { // FIXME: need more distance.
- qDebug() << index1 << index2 << dist
- << QString::number(rgb1, 16)
- << QString::number(rgb2, 16);
- }
- QVERIFY(dist >= 15 * 15);
- ++index2;
- }
- ++index1;
- }
-}
-
-// Check that round-tripping a color via exact representation works.
-void tst_QGLPickColors::roundTripExact()
-{
- int index = 0;
- QRgb rgb;
- while ((rgb = qt_qgl_pick_color(index++)) != 0)
- QVERIFY(qt_qgl_normalize_pick_color(rgb) == rgb);
-}
-
-// Check round-tripping when RGB888 -> RGB565 uses truncation.
-void tst_QGLPickColors::roundTripTrunc565()
-{
- int index = 0;
- QRgb rgb;
- while ((rgb = qt_qgl_pick_color(index++)) != 0) {
- QRgb truncrgb = qRgb(qRed(rgb) & 0xF8,
- qGreen(rgb) & 0xFC,
- qBlue(rgb) & 0xF8);
-
- QVERIFY(qt_qgl_normalize_pick_color(truncrgb) == rgb);
- }
-}
-
-// Check round-tripping when RGB888 -> RGB565 scales with floating point.
-void tst_QGLPickColors::roundTripScale565()
-{
- int index = 0;
- QRgb rgb;
- while ((rgb = qt_qgl_pick_color(index++)) != 0) {
- int r, g, b;
- r = int(qRed(rgb) * 31.0f / 255.0f);
- g = int(qGreen(rgb) * 63.0f / 255.0f);
- b = int(qBlue(rgb) * 31.0f / 255.0f);
-
- QRgb scalergb = qRgb(r * 255.0f / 31.0f,
- g * 255.0f / 63.0f,
- b * 255.0f / 31.0f);
-
- QVERIFY(qt_qgl_normalize_pick_color(scalergb) == rgb);
-
- // Scale up, but duplicate down.
- QRgb duprgb = qRgb((r << 3) | (r >> 2),
- (g << 2) | (g >> 4),
- (b << 3) | (b >> 2));
-
- QVERIFY(qt_qgl_normalize_pick_color(duprgb) == rgb);
- }
-}
-
-// Check round-tripping when RGB565 -> RGB888 uses bit-duplication.
-void tst_QGLPickColors::roundTripDup565()
-{
- int index = 0;
- QRgb rgb;
- while ((rgb = qt_qgl_pick_color(index++)) != 0) {
- int r, g, b;
- r = qRed(rgb) & 0xF8;
- r = r | (r >> 5);
- g = qGreen(rgb) & 0xFC;
- g = g | (g >> 6);
- b = qBlue(rgb) & 0xF8;
- b = b | (b >> 5);
-
- QRgb duprgb = qRgb(r, g, b);
-
- QVERIFY(qt_qgl_normalize_pick_color(duprgb) == rgb);
- }
-}
-
-// Check round-tripping when RGB888 -> RGB555 uses truncation.
-void tst_QGLPickColors::roundTripTrunc555()
-{
- int index = 0;
- QRgb rgb;
- while ((rgb = qt_qgl_pick_color(index++)) != 0) {
- QRgb truncrgb = qRgb(qRed(rgb) & 0xF8,
- qGreen(rgb) & 0xF8,
- qBlue(rgb) & 0xF8);
-
- QVERIFY(qt_qgl_normalize_pick_color(truncrgb) == rgb);
- }
-}
-
-// Check round-tripping when RGB888 -> RGB555 scales with floating point.
-void tst_QGLPickColors::roundTripScale555()
-{
- int index = 0;
- QRgb rgb;
- while ((rgb = qt_qgl_pick_color(index++)) != 0) {
- int r, g, b;
- r = int(qRed(rgb) * 31.0f / 255.0f);
- g = int(qGreen(rgb) * 31.0f / 255.0f);
- b = int(qBlue(rgb) * 31.0f / 255.0f);
-
- QRgb scalergb = qRgb(r * 255.0f / 31.0f,
- g * 255.0f / 31.0f,
- b * 255.0f / 31.0f);
-
- QVERIFY(qt_qgl_normalize_pick_color(scalergb) == rgb);
-
- // Scale up, but duplicate down.
- QRgb duprgb = qRgb((r << 3) | (r >> 2),
- (g << 3) | (g >> 2),
- (b << 3) | (b >> 2));
-
- QVERIFY(qt_qgl_normalize_pick_color(duprgb) == rgb);
- }
-}
-
-// Check round-tripping when RGB555 -> RGB888 uses bit-duplication.
-void tst_QGLPickColors::roundTripDup555()
-{
- int index = 0;
- QRgb rgb;
- while ((rgb = qt_qgl_pick_color(index++)) != 0) {
- int r, g, b;
- r = qRed(rgb) & 0xF8;
- r = r | (r >> 5);
- g = qGreen(rgb) & 0xF8;
- g = g | (g >> 5);
- b = qBlue(rgb) & 0xF8;
- b = b | (b >> 5);
-
- QRgb duprgb = qRgb(r, g, b);
-
- QVERIFY(qt_qgl_normalize_pick_color(duprgb) == rgb);
- }
-}
-
-// Note: the RGB444 conversion falls apart after 1330 entries
-// in the table. It is no longer possible to distinguish the
-// colors while retaining stability in the face of GPU differences.
-#define RGB_444_LIMIT 1330
-
-// Check round-tripping when RGB888 -> RGB444 scales with floating point.
-void tst_QGLPickColors::roundTripScale444()
-{
- int index = 0;
- QRgb rgb;
- while (index < RGB_444_LIMIT && (rgb = qt_qgl_pick_color(index++)) != 0) {
- int r, g, b;
- r = int(qRed(rgb) * 15.0f / 255.0f);
- g = int(qGreen(rgb) * 15.0f / 255.0f);
- b = int(qBlue(rgb) * 15.0f / 255.0f);
-
- QRgb scalergb = qRgb(r * 255.0f / 15.0f,
- g * 255.0f / 15.0f,
- b * 255.0f / 15.0f);
-
- QVERIFY(qt_qgl_normalize_pick_color(scalergb, true) == rgb);
- }
-}
-
-// Check round-tripping when RGB444 -> RGB888 uses bit-duplication.
-// We assume that the values are scaled up, but duplicated down.
-void tst_QGLPickColors::roundTripDup444()
-{
- int index = 0;
- QRgb rgb;
- while (index < RGB_444_LIMIT && (rgb = qt_qgl_pick_color(index++)) != 0) {
- int r, g, b;
- r = int(qRed(rgb) * 15.0f / 255.0f);
- r = r | (r << 4);
- g = int(qGreen(rgb) * 15.0f / 255.0f);
- g = g | (g << 4);
- b = int(qBlue(rgb) * 15.0f / 255.0f);
- b = b | (b << 4);
-
- QRgb duprgb = qRgb(r, g, b);
-
- QVERIFY(qt_qgl_normalize_pick_color(duprgb, true) == rgb);
- }
-}
-
-QTEST_APPLESS_MAIN(tst_QGLPickColors)
-
-#include "tst_qglpickcolors.moc"
diff --git a/tests/auto/threed/qglrender/qglrender.pro b/tests/auto/threed/qglrender/qglrender.pro
deleted file mode 100644
index 547eff30..00000000
--- a/tests/auto/threed/qglrender/qglrender.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qglrender.cpp
diff --git a/tests/auto/threed/qglrender/tst_qglrender.cpp b/tests/auto/threed/qglrender/tst_qglrender.cpp
deleted file mode 100644
index 150396d5..00000000
--- a/tests/auto/threed/qglrender/tst_qglrender.cpp
+++ /dev/null
@@ -1,259 +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 <QtTest/QtTest>
-
-#include "qglrenderorder.h"
-#include "qglrendersequencer.h"
-#include "qglrenderordercomparator.h"
-#include "qglscenenode.h"
-#include "qglpainter.h"
-#include "qglbuilder.h"
-#include "qglview.h"
-
-class tst_QGLRender : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLRender() {}
- ~tst_QGLRender() {}
-
-private slots:
- void create();
- void values();
- void repo();
- void sequence();
-};
-
-void tst_QGLRender::create()
-{
- QGLSceneNode node;
- QGLSceneNode node2;
- QGLMaterialCollection pal;
- node.setPalette(&pal);
- node2.setPalette(&pal);
-
- QGLRenderState s;
- QGLRenderOrder order(&node, s);
- QGLRenderOrder other(order); // copy constructor
- QCOMPARE(order.node(), &node);
- QCOMPARE(order.node(), other.node());
- QGLRenderOrderComparator cmp;
- QVERIFY(cmp.isEqualTo(order, other)); // operator==
-
- QGLRenderOrder other2(&node2, s);
- QVERIFY(cmp.isEqualTo(other2, order)); // same because nodes have same values
- other2 = order; // operator=
- QVERIFY(cmp.isEqualTo(other2, order)); // same again
-
- QGLRenderState state0;
- QGLRenderOrder other3(&node2, state0);
- QVERIFY(cmp.isEqualTo(other2, other3));
-}
-
-void tst_QGLRender::values()
-{
- QGLSceneNode node; // by default has QGL::FlatColor
- QGLSceneNode node2;
- QGLMaterialCollection pal;
- node.setPalette(&pal);
- node2.setPalette(&pal);
- node2.setEffect(QGL::LitMaterial);
-
- QGLRenderState s;
- QGLRenderOrder order(&node, s);
- QGLRenderOrder other(&node2, s);
- QGLRenderOrderComparator cmp;
- QVERIFY(!cmp.isEqualTo(other, order));
- QVERIFY(cmp.isLessThan(order, other));
-
- QGLRenderState state;
- QGLMaterial *mat = new QGLMaterial;
- mat->setAmbientColor(Qt::blue);
- int ix = pal.addMaterial(mat);
- QGLSceneNode node3;
- node3.setPalette(&pal);
- node3.setMaterialIndex(ix);
- node3.setEffect(QGL::LitMaterial);
- state.updateFrom(&node3);
- QGLRenderOrder other2(&node, state);
- QVERIFY(other2.effectiveHasEffect());
- QCOMPARE(other2.effectiveMaterial(), mat);
- QCOMPARE(other2.effectiveStandardEffect(), QGL::LitMaterial);
- QCOMPARE(other2.effectiveUserEffect(), (QGLAbstractEffect*)0);
- QVERIFY(cmp.isLessThan(order, other2));
- QVERIFY(cmp.isLessThan(other, other2));
-}
-
-void tst_QGLRender::repo()
-{
- QGLSceneNode node; // by default has QGL::FlatColor
- QGLSceneNode node2;
- QGLMaterialCollection pal;
- node.setPalette(&pal);
- node2.setPalette(&pal);
- node2.setEffect(QGL::LitDecalTexture2D);
-
- QGLRenderState s;
- QGLRenderOrder order(&node, s);
- QGLRenderOrder other(&node2, s);
- QGLRenderOrder order2(&node, s);
- QGLRenderOrderComparator cmp;
- QVERIFY(!cmp.isEqualTo(other, order));
- QVERIFY(cmp.isLessThan(order, other));
- QVERIFY(cmp.isEqualTo(order2, order));
- QCOMPARE(order2.node(), order.node());
-}
-
-class TestPainter : public QGLPainter
-{
-public:
- TestPainter(QGLWidget *w) : QGLPainter(w) {}
- void draw(QGL::DrawingMode mode, const QGLIndexBuffer& indices,
- int offset, int count)
- {
- m_starts.append(offset);
- m_counts.append(count);
- QGLPainter::draw(mode, indices, offset, count);
- }
- QList<int> starts() const { return m_starts; }
- QList<int> counts() const { return m_counts; }
-private:
- QList<int> m_starts;
- QList<int> m_counts;
-};
-
-class TestView : public QGLView
-{
-public:
- TestView(QGLSceneNode *node)
- : m_node(node)
- {}
- void paintGL(QGLPainter *painter)
- {
- painter->setEye(QGL::NoEye);
- painter->setCamera(camera());
- m_node->draw(painter);
- }
-private:
- QGLSceneNode *m_node;
-};
-
-void tst_QGLRender::sequence()
-{
- QGLMaterialCollection *palette = new QGLMaterialCollection;
-
- // create a yellow lit material
- QGLMaterial *mat = new QGLMaterial;
- mat->setAmbientColor(Qt::yellow);
- int ix0 = palette->addMaterial(mat);
-
- // create a blue lit material
- mat = new QGLMaterial;
- mat->setAmbientColor(Qt::blue);
- int ix1 = palette->addMaterial(mat);
-
- // create a grey textured material
- int tx0;
- {
- QImage uv(1024, 1024, QImage::Format_ARGB32);
- uv.fill(qRgba(196, 196, 196, 196));
- mat = new QGLMaterial;
- mat->setAmbientColor(Qt::gray);
- QGLTexture2D *tex = new QGLTexture2D;
- tex->setImage(uv);
- mat->setTexture(tex);
- tx0 = palette->addMaterial(mat);
- }
-
- QGLSceneNode *scene = new QGLSceneNode;
- scene->setPalette(palette);
- QGLSceneNode *node = 0;
- QGLSceneNode *prim;
- {
- QGLBuilder builder(palette);
- QVector3D a(-1.0f, -1.0f, 0.0f);
- QVector3D b(1.0f, -1.0f, 0.0f);
- QVector3D c(1.0f, 1.0f, 0.0f);
- QGeometryData p;
- p.appendVertex(a, b, c);
- p.generateTextureCoordinates();
- builder.addTriangles(p);
- prim = builder.currentNode();
- prim->setMaterialIndex(ix0);
- builder.newSection();
- QVector3D d(-1.2f, -1.2f, 0.0f);
- QVector3D e(1.2f, -1.2f, 0.0f);
- QVector3D f(1.2f, 1.2f, 0.0f);
- QVector3D g(-1.2f, 1.2f, 0.0f);
- QGeometryData q;
- q.appendVertex(d, e, f, g);
- q.generateTextureCoordinates();
- builder.addQuads(q);
- prim = builder.currentNode();
- prim->setMaterialIndex(ix1);
- node = builder.finalizedSceneNode();
- }
-
- scene->addNode(node);
- QGLSceneNode *cl = prim->clone(scene);
- cl->setMaterialIndex(tx0);
- cl->setEffect(QGL::LitDecalTexture2D);
-
- TestView widget(scene);
- if (!widget.isValid())
- QSKIP("GL Implementation not valid", SkipSingle);
-
- TestPainter *ptr = new TestPainter(&widget);
-
- widget.paintGL(ptr);
-
- QList<int> starts = ptr->starts();
- QList<int> counts = ptr->counts();
- QCOMPARE(starts.at(0), 0);
- QCOMPARE(counts.at(0), 3);
- QCOMPARE(starts.at(1), 3);
- QCOMPARE(counts.at(1), 6);
-}
-
-QTEST_MAIN(tst_QGLRender)
-
-#include "tst_qglrender.moc"
diff --git a/tests/auto/threed/qglscenenode/qglscenenode.pro b/tests/auto/threed/qglscenenode/qglscenenode.pro
deleted file mode 100644
index 511f83c0..00000000
--- a/tests/auto/threed/qglscenenode/qglscenenode.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-INCLUDEPATH += ../../../shared
-SOURCES += tst_qglscenenode.cpp
diff --git a/tests/auto/threed/qglscenenode/tst_qglscenenode.cpp b/tests/auto/threed/qglscenenode/tst_qglscenenode.cpp
deleted file mode 100644
index f87f77b5..00000000
--- a/tests/auto/threed/qglscenenode/tst_qglscenenode.cpp
+++ /dev/null
@@ -1,751 +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 <QtTest/QtTest>
-#include "qglscenenode.h"
-#include "qglpainter.h"
-#include "qglabstracteffect.h"
-#include "qglpicknode.h"
-#include "qgraphicstransform3d.h"
-#include "qgraphicsscale3d.h"
-#include "qgraphicsrotation3d.h"
-#include "qglbuilder.h"
-
-#include "qtest_helpers.h"
-
-class tst_QGLSceneNode : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLSceneNode() {}
- ~tst_QGLSceneNode() {}
-
-private slots:
- void defaultValues();
- void modify();
- void addNode();
- void removeNode();
- void clone();
- void boundingBox_data();
- void boundingBox();
- void position_QTBUG_17279();
-};
-
-// Check that all properties have their expected defaults.
-void tst_QGLSceneNode::defaultValues()
-{
- QGLSceneNode node;
- QVERIFY(node.options() == QGLSceneNode::NoOptions);
- QVERIFY(node.geometry().isNull());
- QVERIFY(node.boundingBox().isNull());
- QVERIFY(node.localTransform().isIdentity());
-
- QVERIFY(node.position() == QVector3D(0, 0, 0));
- QCOMPARE(node.x(), qreal(0.0f));
- QCOMPARE(node.y(), qreal(0.0f));
- QCOMPARE(node.z(), qreal(0.0f));
-
- QVERIFY(node.transforms().isEmpty());
-
- QVERIFY(node.drawingMode() == QGL::Triangles);
- QVERIFY(node.effect() == QGL::FlatColor);
- QVERIFY(node.userEffect() == 0);
- QVERIFY(!node.hasEffect());
-
- QCOMPARE(node.start(), 0);
- QCOMPARE(node.count(), 0);
-
- QCOMPARE(node.materialIndex(), -1);
- QCOMPARE(node.backMaterialIndex(), -1);
-
- QVERIFY(node.material() == 0);
- QVERIFY(node.backMaterial() == 0);
- QVERIFY(node.palette() == 0);
- QVERIFY(node.pickNode() == 0);
-
- QVERIFY(node.allChildren().isEmpty());
- QVERIFY(node.children().isEmpty());
-}
-
-class TestEffect : public QGLAbstractEffect
-{
-public:
- void setActive(QGLPainter *, bool) {}
- void update(QGLPainter *, QGLPainter::Updates) {}
-};
-
-// Modify properties and check that the modifications propagate.
-void tst_QGLSceneNode::modify()
-{
- QGLSceneNode node;
-
- QSignalSpy updatedSpy(&node, SIGNAL(updated()));
-
- node.setOptions(QGLSceneNode::ViewNormals);
- QCOMPARE(updatedSpy.count(), 1);
- QVERIFY(node.options() == QGLSceneNode::ViewNormals);
-
- QMatrix4x4 m;
- m.translate(-1.0f, 2.5f, 5.0f);
- m.rotate(45.0f, 1.0f, 1.0f, 1.0f);
- m.scale(23.5f);
-
- node.setLocalTransform(m);
- QCOMPARE(updatedSpy.count(), 2);
- QVERIFY(node.localTransform() == m);
-
- node.setPosition(QVector3D(1, -2, 3));
- QCOMPARE(updatedSpy.count(), 3);
- QVERIFY(node.position() == QVector3D(1, -2, 3));
-
- node.setX(-45.0f);
- QCOMPARE(updatedSpy.count(), 4);
- QVERIFY(node.position() == QVector3D(-45.0f, -2, 3));
-
- node.setY(67.0f);
- QCOMPARE(updatedSpy.count(), 5);
- QVERIFY(node.position() == QVector3D(-45.0f, 67.0f, 3));
-
- node.setZ(-23.5f);
- QCOMPARE(updatedSpy.count(), 6);
- QVERIFY(node.position() == QVector3D(-45.0f, 67.0f, -23.5f));
-
- QList<QGraphicsTransform3D *> transforms;
- transforms.append(new QGraphicsScale3D(this));
- transforms.append(new QGraphicsRotation3D(this));
- node.setTransforms(transforms);
- QCOMPARE(updatedSpy.count(), 7);
- QVERIFY(node.transforms() == transforms);
-
- QGraphicsScale3D *scale = new QGraphicsScale3D(this);
- transforms.append(scale);
- node.addTransform(scale);
- QCOMPARE(updatedSpy.count(), 8);
- QVERIFY(node.transforms() == transforms);
-
- node.setDrawingMode(QGL::Points);
- QCOMPARE(updatedSpy.count(), 9);
- QVERIFY(node.drawingMode() == QGL::Points);
-
- node.setEffect(QGL::LitMaterial);
- QCOMPARE(updatedSpy.count(), 10);
- QVERIFY(node.effect() == QGL::LitMaterial);
- QVERIFY(node.hasEffect());
-
- node.setEffectEnabled(false);
- QCOMPARE(updatedSpy.count(), 11);
- QVERIFY(node.effect() == QGL::LitMaterial);
- QVERIFY(!node.hasEffect());
-
- TestEffect userEffect;
- node.setUserEffect(&userEffect);
- QCOMPARE(updatedSpy.count(), 12);
- QVERIFY(node.effect() == QGL::LitMaterial);
- QVERIFY(node.userEffect() == &userEffect);
- QVERIFY(node.hasEffect());
-
- node.setMaterialIndex(3);
- QCOMPARE(updatedSpy.count(), 13);
- QCOMPARE(node.materialIndex(), 3);
- QVERIFY(node.material() == 0); // material index is out of range
-
- node.setBackMaterialIndex(5);
- QCOMPARE(updatedSpy.count(), 14);
- QCOMPARE(node.backMaterialIndex(), 5);
- QVERIFY(node.backMaterial() == 0); // material index is out of range
-
- QVERIFY(node.palette() == 0);
-
- QGLMaterial *mat1 = new QGLMaterial();
- node.setMaterial(mat1);
- QCOMPARE(updatedSpy.count(), 15);
- QCOMPARE(node.materialIndex(), 0);
- QCOMPARE(node.backMaterialIndex(), 5);
- QVERIFY(node.material() == mat1);
- QVERIFY(node.backMaterial() == 0);
- QVERIFY(node.palette() != 0);
-
- QGLMaterial *mat2 = new QGLMaterial();
- node.setBackMaterial(mat2);
- QCOMPARE(updatedSpy.count(), 16);
- QCOMPARE(node.materialIndex(), 0);
- QCOMPARE(node.backMaterialIndex(), 1);
- QVERIFY(node.material() == mat1);
- QVERIFY(node.backMaterial() == mat2);
-
- QGLMaterial *mat3 = new QGLMaterial();
- node.setMaterial(mat3);
- QCOMPARE(updatedSpy.count(), 17);
- QCOMPARE(node.materialIndex(), 2);
- QCOMPARE(node.backMaterialIndex(), 1);
- QVERIFY(node.material() == mat3);
- QVERIFY(node.backMaterial() == mat2);
-
- node.setMaterial(mat1);
- QCOMPARE(updatedSpy.count(), 18);
- QCOMPARE(node.materialIndex(), 0);
- QCOMPARE(node.backMaterialIndex(), 1);
- QVERIFY(node.material() == mat1);
- QVERIFY(node.backMaterial() == mat2);
-
- QVERIFY(node.palette()->material(0) == mat1);
- QVERIFY(node.palette()->material(1) == mat2);
- QVERIFY(node.palette()->material(2) == mat3);
- QCOMPARE(node.palette()->size(), 3);
-
- QGLPickNode pick;
- QVERIFY(pick.target() == 0);
- QCOMPARE(pick.id(), -1);
- node.setPickNode(&pick);
- QVERIFY(node.pickNode() == &pick);
- QVERIFY(pick.target() == &node);
- QCOMPARE(pick.id(), -1);
- pick.setId(4);
- QCOMPARE(pick.id(), 4);
-
- // One last check to make sure there are no leaks between properties.
- // e.g. the position actually changing the rotation, etc.
- QVERIFY(node.options() == QGLSceneNode::ViewNormals);
- QVERIFY(node.localTransform() == m);
- QVERIFY(node.position() == QVector3D(-45.0f, 67.0f, -23.5f));
- QVERIFY(node.transforms() == transforms);
- QVERIFY(node.drawingMode() == QGL::Points);
- QVERIFY(node.effect() == QGL::LitMaterial);
- QVERIFY(node.userEffect() == &userEffect);
- QVERIFY(node.hasEffect());
- QCOMPARE(node.materialIndex(), 0);
- QCOMPARE(node.backMaterialIndex(), 1);
- QVERIFY(node.pickNode() == &pick);
-}
-
-// Add nodes to build a scene graph.
-void tst_QGLSceneNode::addNode()
-{
- QGLSceneNode *node1 = new QGLSceneNode();
-
- // Add a node via the constructor.
- QGLSceneNode *node2 = new QGLSceneNode(node1);
- QVERIFY(node2->parent() == node1);
- QCOMPARE(node1->children().count(), 1);
- QVERIFY(node1->children()[0] == node2);
-
- // Add a node explicitly, not parented into the graph yet.
- // Because node3's parent is null, it will be parented in.
- QGLSceneNode *node3 = new QGLSceneNode();
- node1->addNode(node3);
- QVERIFY(node3->parent() == node1);
- QCOMPARE(node1->children().count(), 2);
- QVERIFY(node1->children()[0] == node2);
- QVERIFY(node1->children()[1] == node3);
-
- // Add a node explicily that is parented elsewhere. Because
- // node4's parent is not null, it will *not* be parented in.
- QGLSceneNode *node4 = new QGLSceneNode(this);
- node1->addNode(node4);
- QVERIFY(node4->parent() == this);
- QCOMPARE(node1->children().count(), 3);
- QVERIFY(node1->children()[0] == node2);
- QVERIFY(node1->children()[1] == node3);
- QVERIFY(node1->children()[2] == node4);
-
- // Try adding node4 again (should do nothing).
- node1->addNode(node4);
- QVERIFY(node4->parent() == this);
- QCOMPARE(node1->children().count(), 3);
- QVERIFY(node1->children()[0] == node2);
- QVERIFY(node1->children()[1] == node3);
- QVERIFY(node1->children()[2] == node4);
-
- // Add a null child (should do nothing).
- node1->addNode(0);
- QCOMPARE(node1->children().count(), 3);
- QVERIFY(node1->children()[0] == node2);
- QVERIFY(node1->children()[1] == node3);
- QVERIFY(node1->children()[2] == node4);
-
- // Add node3 under node2 as well so that it has multiple parents.
- node2->addNode(node3);
- QVERIFY(node3->parent() == node1); // parent is unchanged
- QCOMPARE(node1->children().count(), 3);
- QVERIFY(node1->children()[0] == node2);
- QVERIFY(node1->children()[1] == node3);
- QVERIFY(node1->children()[2] == node4);
- QCOMPARE(node2->children().count(), 1);
- QVERIFY(node2->children()[0] == node3);
-
- // Recursively fetch all children.
- QList<QGLSceneNode *> children = node1->allChildren();
- QCOMPARE(children.count(), 3);
- QVERIFY(children[0] == node2);
- QVERIFY(children[1] == node3);
- QVERIFY(children[2] == node4);
- children = node2->allChildren();
- QCOMPARE(children.count(), 1);
- QVERIFY(children[0] == node3);
- QVERIFY(node3->allChildren().isEmpty());
- QVERIFY(node4->allChildren().isEmpty());
-
- // Delete the top node and ensure that the right objects are destroyed.
- QSignalSpy node1Spy(node1, SIGNAL(destroyed()));
- QSignalSpy node2Spy(node2, SIGNAL(destroyed()));
- QSignalSpy node3Spy(node3, SIGNAL(destroyed()));
- QSignalSpy node4Spy(node4, SIGNAL(destroyed()));
- delete node1;
- QCOMPARE(node1Spy.count(), 1);
- QCOMPARE(node2Spy.count(), 1);
- QCOMPARE(node3Spy.count(), 1);
- QCOMPARE(node4Spy.count(), 0);
-
- // Clean up the separate node.
- delete node4;
- QCOMPARE(node4Spy.count(), 1);
-}
-
-// Remove nodes from an existing scene graph.
-void tst_QGLSceneNode::removeNode()
-{
- QGLSceneNode *node1 = new QGLSceneNode();
- QGLSceneNode *node2 = new QGLSceneNode();
- QGLSceneNode *node3 = new QGLSceneNode();
- QGLSceneNode *node4 = new QGLSceneNode();
- QGLSceneNode *node5 = new QGLSceneNode(this);
-
- node1->addNode(node2);
- node1->addNode(node3);
- node1->addNode(node4);
- node2->addNode(node3);
- node2->addNode(node5);
-
- QSignalSpy node1Spy(node1, SIGNAL(destroyed()));
- QSignalSpy node2Spy(node2, SIGNAL(destroyed()));
- QSignalSpy node3Spy(node3, SIGNAL(destroyed()));
- QSignalSpy node4Spy(node4, SIGNAL(destroyed()));
- QSignalSpy node5Spy(node5, SIGNAL(destroyed()));
-
- // Removing a node will set its parent pointer back to null
- // if it was removed from its last parent.
- QVERIFY(node4->parent() == node1);
- node1->removeNode(node4);
- QVERIFY(node4->parent() == 0);
-
- // The node should still exist, just detached.
- QCOMPARE(node4Spy.count(), 0);
- delete node4;
- QCOMPARE(node4Spy.count(), 1);
-
- // Remove node3, which should transfer ownership.
- QVERIFY(node3->parent() == node1);
- node1->removeNode(node3);
- QVERIFY(node3->parent() == node2);
-
- // Add node3 back, and check non-transfer of ownership.
- node1->addNode(node3);
- QVERIFY(node3->parent() == node2);
- node1->removeNode(node3);
- QVERIFY(node3->parent() == node2);
-
- // Remove a node that wasn't parented to the scene graph.
- node2->removeNode(node5);
- QVERIFY(node5->parent() == this);
-
- // Clean up the rest of the graph.
- QCOMPARE(node1Spy.count(), 0);
- QCOMPARE(node2Spy.count(), 0);
- QCOMPARE(node3Spy.count(), 0);
- QCOMPARE(node4Spy.count(), 1);
- QCOMPARE(node5Spy.count(), 0);
- delete node1;
- QCOMPARE(node1Spy.count(), 1);
- QCOMPARE(node2Spy.count(), 1);
- QCOMPARE(node3Spy.count(), 1);
- QCOMPARE(node4Spy.count(), 1);
- QCOMPARE(node5Spy.count(), 0);
- delete node5;
- QCOMPARE(node5Spy.count(), 1);
-}
-
-static bool sameTransforms(const QList<QGraphicsTransform3D *> &transforms1,
- const QList<QGraphicsTransform3D *> &transforms2)
-{
- if (transforms1.size() != transforms2.size())
- return false;
- for (int index = 0; index < transforms1.size(); ++index) {
- // We only check the meta object at the moment, and assume
- // that the clone() worked properly.
- if (transforms1.at(index)->metaObject() !=
- transforms2.at(index)->metaObject())
- return false;
- }
- return true;
-}
-
-void tst_QGLSceneNode::clone()
-{
- QGLSceneNode nodeParent;
- QGLSceneNode node1(&nodeParent);
-
- QGLSceneNode *node2 = node1.clone();
- QVERIFY(node2 != 0 && node2 != &node1);
- QVERIFY(node2->parent() == &nodeParent);
- QVERIFY(node2->options() == node1.options());
- QVERIFY(node2->geometry().isEmpty());
- QVERIFY(node2->localTransform().isIdentity());
- QVERIFY(node2->position() == QVector3D(0, 0, 0));
- QVERIFY(node2->transforms().isEmpty());
- QVERIFY(node2->drawingMode() == QGL::Triangles);
- QVERIFY(node2->effect() == QGL::FlatColor);
- QVERIFY(!node2->userEffect());
- QVERIFY(!node2->hasEffect());
- QCOMPARE(node2->start(), 0);
- QCOMPARE(node2->count(), 0);
- QCOMPARE(node2->materialIndex(), -1);
- QCOMPARE(node2->backMaterialIndex(), -1);
- QVERIFY(!node2->palette());
- QVERIFY(!node2->pickNode());
- QVERIFY(node2->children().isEmpty());
- delete node2;
-
- QGeometryData data1;
- data1.appendVertex(QVector3D(1, -2, 3));
- QMatrix4x4 m;
- m.translate(-1.0f, 2.5f, 5.0f);
- m.rotate(45.0f, 1.0f, 1.0f, 1.0f);
- m.scale(23.5f);
- TestEffect userEffect;
- QGLPickNode pick;
- QList<QGraphicsTransform3D *> transforms;
- transforms.append(new QGraphicsScale3D(this));
- transforms.append(new QGraphicsRotation3D(this));
-
- node1.setOptions(QGLSceneNode::ViewNormals);
- node1.setGeometry(data1);
- node1.setLocalTransform(m);
- node1.setPosition(QVector3D(1, -2, 3));
- node1.setTransforms(transforms);
- node1.setDrawingMode(QGL::Points);
- node1.setEffect(QGL::LitMaterial);
- node1.setUserEffect(&userEffect);
- node1.setStart(10);
- node1.setCount(20);
- QGLMaterial *mat1 = new QGLMaterial();
- QGLMaterial *mat2 = new QGLMaterial();
- node1.setMaterial(mat1);
- node1.setBackMaterial(mat2);
- node1.setPickNode(&pick);
- QGLSceneNode *node3 = new QGLSceneNode();
- QGLSceneNode *node4 = new QGLSceneNode();
- node1.addNode(node3);
- node1.addNode(node4);
-
- // Clone onto the same parent.
- node2 = node1.clone();
- QVERIFY(node2 != 0 && node2 != &node1);
- QVERIFY(node2->parent() == &nodeParent);
- QVERIFY(node2->options() == node1.options());
- QCOMPARE(node2->geometry().count(), 1);
- QVERIFY(node2->localTransform() == m);
- QVERIFY(node2->position() == QVector3D(1, -2, 3));
- QVERIFY(sameTransforms(node2->transforms(), transforms));
- QVERIFY(node2->drawingMode() == QGL::Points);
- QVERIFY(node2->effect() == QGL::LitMaterial);
- QVERIFY(node2->userEffect() == &userEffect);
- QVERIFY(node2->hasEffect());
- QCOMPARE(node2->start(), 10);
- QCOMPARE(node2->count(), 20);
- QCOMPARE(node2->materialIndex(), 0);
- QCOMPARE(node2->backMaterialIndex(), 1);
- QVERIFY(node2->material() == mat1);
- QVERIFY(node2->backMaterial() == mat2);
- QVERIFY(node2->palette() != 0);
- QVERIFY(node2->palette() == node1.palette());
- QVERIFY(!node2->pickNode()); // Pick node should not be cloned
- QCOMPARE(node2->children().count(), 2);
- QVERIFY(node2->children()[0] == node3);
- QVERIFY(node2->children()[1] == node4);
- delete node2;
-
- // Clone onto a different parent.
- QGLSceneNode node2Parent;
- node2 = node1.clone(&node2Parent);
- QVERIFY(node2->parent() == &node2Parent);
- QCOMPARE(node2Parent.children().count(), 1);
- QVERIFY(node2Parent.children()[0] == node2);
- delete node2;
-}
-
-void tst_QGLSceneNode::boundingBox_data()
-{
- QTest::addColumn<QVector3D>("bottomLeftFront");
- QTest::addColumn<QVector3D>("bottomRightFront");
- QTest::addColumn<QVector3D>("topRightFront");
- QTest::addColumn<QVector3D>("topLeftFront");
- QTest::addColumn<QVector3D>("scale");
- QTest::addColumn<QVector3D>("translation");
- QTest::addColumn<QVector3D>("rotation");
- QTest::addColumn<QVector3D>("boxMin");
- QTest::addColumn<QVector3D>("boxMax");
-
- QTest::newRow("cube-2x2x2-at-origin-no-xform")
- << QVector3D(-1, -1, -1)
- << QVector3D(1, -1, -1)
- << QVector3D(1, 1, -1)
- << QVector3D(-1, 1, -1)
- << QVector3D(0, 0, 0)
- << QVector3D(0, 0, 0)
- << QVector3D(0, 0, 0)
- << QVector3D(-1, -1, -1)
- << QVector3D(1, 1, 1);
-
- QTest::newRow("cube-2x2x2-offset-no-xform")
- << QVector3D(3, -1, -1)
- << QVector3D(5, -1, -1)
- << QVector3D(5, 1, -1)
- << QVector3D(3, 1, -1)
- << QVector3D(0, 0, 0)
- << QVector3D(0, 0, 0)
- << QVector3D(0, 0, 0)
- << QVector3D(3, -1, -1)
- << QVector3D(5, 1, 1);
-
- QTest::newRow("cube-2x2x2-at-origin-positioned")
- << QVector3D(-1, -1, -1)
- << QVector3D(1, -1, -1)
- << QVector3D(1, 1, -1)
- << QVector3D(-1, 1, -1)
- << QVector3D(0, 0, 0)
- << QVector3D(-4, -4, -4)
- << QVector3D(0, 0, 0)
- << QVector3D(-5, -5, -5)
- << QVector3D(-3, -3, -3);
-
- QTest::newRow("cube-2x2x2-offset-positioned")
- << QVector3D(3, -1, -1)
- << QVector3D(5, -1, -1)
- << QVector3D(5, 1, -1)
- << QVector3D(3, 1, -1)
- << QVector3D(0, 0, 0)
- << QVector3D(-4, -4, -4)
- << QVector3D(0, 0, 0)
- << QVector3D(-1, -5, -5)
- << QVector3D(1, -3, -3);
-
- QTest::newRow("cube-2x2x2-at-origin-positioned-scaled")
- << QVector3D(-1, -1, -1)
- << QVector3D(1, -1, -1)
- << QVector3D(1, 1, -1)
- << QVector3D(-1, 1, -1)
- << QVector3D(4, 4, 4)
- << QVector3D(-4, -4, -4)
- << QVector3D(0, 0, 0)
- << QVector3D(-20, -20, -20)
- << QVector3D(-12, -12, -12);
-
- QTest::newRow("cube-2x2x2-offset-positioned-scaled-rotated")
- << QVector3D(3, -1, -1)
- << QVector3D(5, -1, -1)
- << QVector3D(5, 1, -1)
- << QVector3D(3, 1, -1)
- << QVector3D(4, 4, 4)
- << QVector3D(-4, -4, -4)
- << QVector3D(0, 0, 45)
- << QVector3D(-4, -20, -20)
- << QVector3D(4, -12, -12);
-}
-
-void tst_QGLSceneNode::boundingBox()
-{
- QFETCH(QVector3D, bottomLeftFront);
- QFETCH(QVector3D, bottomRightFront);
- QFETCH(QVector3D, topRightFront);
- QFETCH(QVector3D, topLeftFront);
- QFETCH(QVector3D, scale);
- QFETCH(QVector3D, translation);
- QFETCH(QVector3D, rotation);
- QFETCH(QVector3D, boxMin);
- QFETCH(QVector3D, boxMax);
-
- QBox3D expBox(boxMin, boxMax);
- QGLSceneNode *node = new QGLSceneNode;
- node->setObjectName(QLatin1String("Root node"));
- QGLSceneNode *geoNode = 0;
- QGeometryData data;
- QGLBuilder builder;
-
- data.appendVertex(bottomLeftFront, bottomRightFront, topRightFront, topLeftFront);
- builder.addQuads(data); // top of cube
- builder.addQuadsInterleaved(data, data.translated(QVector3D(0, 0, 2))); // sides of cube
- builder.addQuads(data.reversed()); // bottom of cube
-
- geoNode = builder.finalizedSceneNode();
- geoNode->setObjectName("Geometry node");
- node->addNode(geoNode);
-
- if (!scale.isNull())
- {
- QMatrix4x4 m = node->localTransform();
- m.scale(scale);
- node->setLocalTransform(m);
- }
-
- if (!translation.isNull())
- {
- QMatrix4x4 m = node->localTransform();
- m.translate(translation);
- node->setLocalTransform(m);
- }
-
- if (!rotation.isNull())
- {
- QMatrix4x4 m = node->localTransform();
- if (qIsNull(rotation.x()))
- m.rotate(rotation.x(), 1.0, 0.0, 0.0);
- if (qIsNull(rotation.y()))
- m.rotate(rotation.y(), 0.0, 1.0, 0.0);
- if (qIsNull(rotation.z()))
- m.rotate(rotation.z(), 0.0, 0.0, 1.0);
- node->setLocalTransform(m);
- }
-
- QBox3D gotBox = node->boundingBox();
- QCOMPARE(gotBox.minimum(), expBox.minimum());
- QCOMPARE(gotBox.maximum(), expBox.maximum());
-
-
- // now clear out the root nodes transform and apply the same transform
- // to the child node - should be exactly the same
-
- QMatrix4x4 saveMat = node->localTransform();
- node->setLocalTransform(QMatrix4x4()); // set back to identity
- geoNode->setLocalTransform(saveMat);
-
- gotBox = node->boundingBox();
- QCOMPARE(gotBox.minimum(), expBox.minimum());
- QCOMPARE(gotBox.maximum(), expBox.maximum());
-
- delete node;
-}
-
-class TestSceneNode : public QGLSceneNode
-{
-public:
- QMatrix4x4 resultingModelView;
- QMatrix4x4 transformMatrix;
-
- TestSceneNode()
- : QGLSceneNode()
- {
- //
- }
-
-protected:
- virtual void drawGeometry(QGLPainter *painter)
- {
- resultingModelView = painter->modelViewMatrix().top();
-
- // basically reimplement the private function "transform()" here to get the value of the transforms
- QMatrix4x4 m;
- if (!position().isNull())
- m.translate(position());
- if (!localTransform().isIdentity())
- m *= localTransform();
- QList<QGraphicsTransform3D *> tx = transforms();
- for (int index = tx.size() - 1; index >= 0; --index)
- tx.at(index)->applyTo(&m);
-
- transformMatrix = m;
- }
-
-};
-
-void tst_QGLSceneNode::position_QTBUG_17279()
-{
- QGeometryData geom;
- geom.appendVertex(QVector3D(0, 0, 0),
- QVector3D(1.414, 1.414, 0),
- QVector3D(2, 0, 0));
- TestSceneNode *node = new TestSceneNode;
-
- QVERIFY(node->resultingModelView.isIdentity());
- QVERIFY(node->transformMatrix.isIdentity());
-
- node->setGeometry(geom);
- node->setCount(3);
- node->setPosition(QVector3D(0.f, 0.f, -5.f));
-
- QVERIFY(node->localTransform().isIdentity());
- QCOMPARE(node->position().z(), -5.0);
-
- QGLWidget w;
- QGLPainter p(&w);
- QGLCamera cam;
- p.setCamera(&cam);
-
- QMatrix4x4 m = p.modelViewMatrix().top();
-
- node->draw(&p);
-
- QVERIFY(m == p.modelViewMatrix().top());
-
- QCOMPARE(node->resultingModelView(2, 3), -15.0);
- QCOMPARE(node->transformMatrix(2, 3), -5.0);
-
- QGeometryData geom2;
- geom2.appendVertex(QVector3D(0, 0, 0),
- QVector3D(-1.414, 1.414, 0),
- QVector3D(-2, 0, 0));
- TestSceneNode *node2 = new TestSceneNode;
- node2->setGeometry(geom2);
- node2->setCount(3);
- node2->setPosition(QVector3D(0.f, -1.f, -5.f));
-
- node2->draw(&p);
-
- QVERIFY(m == p.modelViewMatrix().top());
-
- QCOMPARE(node2->resultingModelView(1, 3), -1.0);
- QCOMPARE(node2->transformMatrix(1, 3), -1.0);
- QCOMPARE(node2->resultingModelView(2, 3), -15.0);
- QCOMPARE(node2->transformMatrix(2, 3), -5.0);
-}
-
-QTEST_MAIN(tst_QGLSceneNode)
-
-#include "tst_qglscenenode.moc"
diff --git a/tests/auto/threed/qglsection/qglsection.pro b/tests/auto/threed/qglsection/qglsection.pro
deleted file mode 100644
index 37f1a3c1..00000000
--- a/tests/auto/threed/qglsection/qglsection.pro
+++ /dev/null
@@ -1,8 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-INCLUDEPATH += ../../../shared
-SOURCES += tst_qglsection.cpp
-INCLUDEPATH += ../../../../src/threed/geometry
diff --git a/tests/auto/threed/qglsection/tst_qglsection.cpp b/tests/auto/threed/qglsection/tst_qglsection.cpp
deleted file mode 100644
index 726a995b..00000000
--- a/tests/auto/threed/qglsection/tst_qglsection.cpp
+++ /dev/null
@@ -1,674 +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 <QtTest/QtTest>
-#include "qglsection_p.h"
-#include "qglbuilder.h"
-#include "qgeometrydata.h"
-#include "qtest_helpers.h"
-#include "qvector3darray.h"
-
-class tst_QGLSection : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLSection() {}
- ~tst_QGLSection() {}
- void testSmooth(QGLSection *sec, QGLBuilder *builder);
- void testFaceted(QGLSection *sec, QGLBuilder *builder);
-
-private slots:
- void create();
- void modify();
- void append();
- void appendSmooth();
- void appendSmoothMap();
- void appendFaceted();
- void appendFacetedMap();
- void accumNormals();
- void normalizedNormals();
- void appendTexCoord();
- void appendColor();
- void accessors();
-};
-
-// Indices in a QGLIndexArray are int on desktop, ushort on OpenGL/ES.
-// This macro works around the discrepancy to avoid confusing QCOMPARE.
-#define QCOMPARE_INDEX(x,y) QCOMPARE(int(x), int(y))
-
-class QGLSectionTest : public QGLSection
-{
-public:
- QGLSectionTest(QGLBuilder *builder, QGL::Smoothing s = QGL::Smooth)
- : QGLSection(builder, s) {}
-
- void appendSmooth(const QLogicalVertex &vertex)
- {
- QGLSection::appendSmooth(vertex);
- }
-
- void appendFaceted(const QLogicalVertex &vertex)
- {
- QGLSection::appendFaceted(vertex);
- }
-
- void append(const QLogicalVertex &vertex)
- {
- QGLSection::append(vertex);
- }
-};
-
-class TestBuilder : public QGLBuilder
-{
-public:
- QGLSection *currentSection() { return QGLBuilder::currentSection(); }
- QList<QGLSection*> sections() { return QGLBuilder::sections(); }
-};
-
-static void addGeometry(TestBuilder &builder)
-{
- QVector3D va(-1.0f, -1.0f, 0.0f);
- QVector3D vb(1.0f, -1.0f, 0.0f);
- QVector3D vc(1.0f, 1.0f, 0.0f);
- QGeometryData p;
- p.appendVertex(va, vb, vc);
- builder.addTriangles(p);
-}
-
-void tst_QGLSection::create()
-{
- // Test that a newly created object has the correct defaults.
- TestBuilder builder;
- builder.newSection();
- QGLSection *section = builder.currentSection();
- QVERIFY(section->hasField(QGL::Position)); // need this initially now
- QCOMPARE(section->fields(), (quint32)1);
- QCOMPARE(section->smoothing(), QGL::Smooth);
- QCOMPARE(section->count(), 0);
- QCOMPARE(section->boundingBox(), QBox3D());
- QCOMPARE(section->mapThreshold(), 5);
-
- // suppress warning
- addGeometry(builder);
- builder.finalizedSceneNode();
-}
-
-void tst_QGLSection::modify()
-{
- TestBuilder builder;
- builder.newSection();
- QGLSection *section = builder.currentSection();
-
- QVector3D va(-1.0f, -1.0f, 0.0f);
- QVector3D vb(1.0f, -1.0f, 0.0f);
- QVector3D vc(1.0f, 1.0f, 0.0f);
- QVector3D n(0.0f, 0.0f, 1.0f);
- QGeometryData p;
- p.appendVertex(va, vb, vc);
- p.appendNormal(n, n, n);
- section->setMapThreshold(30);
- QCOMPARE(section->mapThreshold(), 30);
- builder.addTriangles(p);
- QCOMPARE(section->count(), 3);
- builder.newSection();
- QGLSection *section2 = builder.currentSection();
- builder.addTriangles(p);
- QCOMPARE(section2->count(), 3);
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLSection::append()
-{
- TestBuilder builder;
- builder.newSection();
- QGLSection *section = builder.currentSection();
-
- QVector3D testVertex(1.234f, 2.345f, 3.456f);
- QVector3D testNormal(1.0f, 0.0f, 0.0f);
- QLogicalVertex vx(testVertex, testNormal);
- section->append(vx);
- QCOMPARE(section->vertices().count(), 1);
- QCOMPARE(section->vertices().at(0), testVertex);
- QCOMPARE(section->normals().count(), 1);
- QCOMPARE(section->normals().at(0), testNormal);
- QCOMPARE(section->indices().size(), 1);
- QCOMPARE(section->texCoords().count(), 0);
- QCOMPARE(section->colors().count(), 0);
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLSection::appendSmooth()
-{
- TestBuilder builder;
- QGLSectionTest *section = new QGLSectionTest(&builder);
- testSmooth(section, &builder);
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLSection::appendSmoothMap()
-{
- TestBuilder builder;
- QGLSectionTest *section = new QGLSectionTest(&builder);
- int t = section->mapThreshold();
- QVector3D testVertex(-12.34f, -23.45f, -34.56f);
- QVector3D incrVector(0.02, 0.02, 0.02);
- QVector3D testNormal(1.0f, 0.0f, 0.0f);
- for (int i = 0; i < (t - 2); ++i)
- {
- section->appendSmooth(QLogicalVertex(testVertex, testNormal));
- testVertex += incrVector;
- }
- testSmooth(section, &builder);
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLSection::testSmooth(QGLSection *section, QGLBuilder *builder)
-{
- int poffset = section->count(QGL::Position);
- int noffset = section->count(QGL::Normal);
-
- // append a vertex - check it appears in the data along with its normal
- QVector3D testVertex(1.234f, 2.345f, 3.456f);
- QVector3D testNormal(4.321f, 5.432f, 6.543f);
- section->appendSmooth(QLogicalVertex(testVertex, testNormal));
- QCOMPARE(section->vertices().count(), poffset + 1);
- QCOMPARE(section->vertices().at(poffset + 0), testVertex);
- QCOMPARE(section->normals().count(), noffset + 1);
- QCOMPARE(section->normals().at(noffset + 0), testNormal);
- QCOMPARE(section->indices().size(), poffset + 1);
- QCOMPARE_INDEX(section->indices()[poffset + 0], poffset + 0);
-
- // append a vertex equal to one already appended - check it was coalesced
- QVector3D testNormal2(0.0f, 0.0f, 1.0f);
- QVector3D result = testNormal + testNormal2; // QVector3D(0.0f, 0.0f, 7.543f);
- section->appendSmooth(QLogicalVertex(testVertex, testNormal2));
- QCOMPARE(section->vertices().count(), poffset + 1);
- QCOMPARE(section->vertices().at(poffset + 0), testVertex);
- QCOMPARE(section->normals().count(), noffset + 1);
- QCOMPARE(section->normals().at(noffset + 0), result);
- QCOMPARE(section->indices().size(), poffset + 2);
- QCOMPARE_INDEX(section->indices()[poffset + 1], poffset + 0);
-
- // append a new different vertex - check it is not coalesced
- QVector3D testVertex2(-1.234f, -2.345f, -3.456f);
- QVector3D testNormal3(-4.321f, -5.432f, -6.543f);
- section->appendSmooth(QLogicalVertex(testVertex2, testNormal3));
- QCOMPARE(section->vertices().count(), poffset + 2);
- QCOMPARE(section->vertices().at(poffset + 1), testVertex2);
- QCOMPARE(section->normals().count(), noffset + 2);
- QCOMPARE(section->normals().at(noffset + 1), testNormal3);
- QCOMPARE(section->indices().size(), poffset + 3);
- QCOMPARE_INDEX(section->indices()[poffset + 2], poffset + 1);
-
- // append a vertex equal to one already appended, but inside a new section - check its not coalesced
- section = new QGLSectionTest(builder);
- section->appendSmooth(QLogicalVertex(testVertex2, testNormal3));
- QCOMPARE(section->vertices().count(), 1);
- QCOMPARE(section->vertices().at(0), testVertex2);
- QCOMPARE(section->normals().count(), 1);
- QCOMPARE(section->normals().at(0), testNormal3);
- QCOMPARE(section->indices().size(), 1);
- QCOMPARE_INDEX(section->indices()[0], 0);
-}
-
-void tst_QGLSection::appendFaceted()
-{
- TestBuilder builder;
- QGLSectionTest *section = new QGLSectionTest(&builder);
- // test the part where its only using the QArray
- testFaceted(section, &builder);
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLSection::appendFacetedMap()
-{
- TestBuilder builder;
- QGLSectionTest *section = new QGLSectionTest(&builder);
- // now create a new section and fill to just below the threshold for QMap
- int t = section->mapThreshold();
- QVector3D testVertex(-12.34f, -23.45f, -34.56f);
- QVector3D incrVector(0.02, 0.02, 0.02);
- QVector3D testNormal(1.0f, 0.0f, 0.0f);
- for (int i = 0; i < (t - 2); ++i)
- {
- section->appendSmooth(QLogicalVertex(testVertex, testNormal));
- testVertex += incrVector;
- }
- testFaceted(section, &builder);
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLSection::accumNormals()
-{
- /*
- This mesh is a cap that could be the top of a sphere - its a central
- quad in the z = 1 plane, with x = 1, y = 1 as the bottom-left corner;
- with four more quads above, below, to the left and to the right, as
- viewed looking down the -ve z axis (plan view). The four quads around
- the central one join one one edge (in the z = 1 plane) and on the opp.
- edge slope down to the z = 0 plane. The four corners are filled in
- with triangles, so that the whole figure looks like an octagon in plan.
-
- plan view - x/y plane:
- ^ ----------
- | / | | \
- y / | | \
- /___|_____|____\
- | | | |
- | | | |
- |____|_____|_____|
- \ |* | /
- \ | | /
- \ | | /
- ---------- --> x
-
- side view - x/z plane:
- ________ z = 1
- / |* | \
- / | | \
- / | | \
- ----------------- z = 0
-
- The normals smoothing should make this as "round" as possible.
-
- Each quad of course, is actually divided from bottom-left to top-right
- into two triangles (not shown in the ascii art for clarity). The total
- number of triangles in the rendered result should be 14.
-
- At the vertex marked with the asterisk - #3 in the data below - there
- are 5 triangular faces contributing normals to the smoothed sum. The
- quad on the top has two co-planar triangles, and _each_ of those has
- a normal equal to (0, 0, 1) - only one of these should be summed.
- The other triangles are 1/2 of the two neighbouring quads - one has a
- normal of (-1, 0, 1) the other (0, -1, 1) - and the corner triangle
- which has a normal of (-1, -1, 1).
-
- The normalized sum of these is roughly (-0.4, -0.4, 0.8).
-
- If the normal from the extra triangle is erroneously included then
- the normalized sum is roughly (-0.35, -0.35, 0.87).
-
- The resulting normal is pulled more in the z-direction.
-
- In general if a a flat plane is broken up into a large number of
- triangles, they can bias the normal calculation. In a model often
- this can occur where triangulation algorithms produce degenerate
- solutions with many triangles converging on a point.
-
- This test is to cover this problem.
- */
- TestBuilder builder;
- builder.newSection(QGL::Smooth); // default - but making the point
- //QGLSection *section = builder.currentSection();
- QGLSceneNode *node = builder.currentNode();
- static float data[12*3] = {
- 1.0f, 0.0f, 0.0f,
- 2.0f, 0.0f, 0.0f,
- 0.0f, 1.0f, 0.0f,
- 1.0f, 1.0f, 1.0f,
- 2.0f, 1.0f, 1.0f,
- 3.0f, 1.0f, 0.0f,
- 0.0f, 2.0f, 0.0f,
- 1.0f, 2.0f, 1.0f,
- 2.0f, 2.0f, 1.0f,
- 3.0f, 2.0f, 0.0f,
- 1.0f, 3.0f, 0.0f,
- 2.0f, 3.0f, 0.0f
- };
- QVector3DArray v = QVector3DArray::fromRawData((const QVector3D *)data, 12);
- QGeometryData quads;
- quads.appendVertex(v[0], v[1], v[4], v[3]); // 0
- quads.appendVertex(v[2], v[3], v[7], v[6]); // 1
- quads.appendVertex(v[3], v[4], v[8], v[7]); // 2
- quads.appendVertex(v[4], v[5], v[9], v[8]); // 3
- quads.appendVertex(v[7], v[8], v[11], v[10]); // 4
- builder.addQuads(quads);
- QGeometryData triangles;
- triangles.appendVertex(v[0], v[3], v[2]); // 5
- triangles.appendVertex(v[1], v[5], v[4]); // 6
- triangles.appendVertex(v[6], v[7], v[10]); // 7
- triangles.appendVertex(v[8], v[9], v[11]); // 8
- builder.addTriangles(triangles);
- builder.finalizedSceneNode();
-
- // There are 9 faces as shown above - here are their normals
- QVector3DArray face_norms;
- face_norms.extend(9);
- face_norms[0] = QVector3D(0, -1, 1);
- face_norms[1] = QVector3D(-1, 0, 1);
- face_norms[2] = QVector3D(0, 0, 1);
- face_norms[3] = QVector3D(1, 0, 1);
- face_norms[4] = QVector3D(0, 1, 1);
- face_norms[5] = QVector3D(-1, -1, 1);
- face_norms[6] = QVector3D(1, -1, 1);
- face_norms[7] = QVector3D(-1, 1, 1);
- face_norms[8] = QVector3D(1, 1, 1);
- //for (int i = 0; i < 9; ++i)
- // face_norms[i].normalize();
-
- QVector3DArray expected;
- expected.extend(12);
- expected[0] = face_norms[0] + face_norms[5];
- expected[1] = face_norms[0] + face_norms[6];
- expected[4] = face_norms[1] + face_norms[5];
- expected[3] = face_norms[0] + face_norms[1] + face_norms[2] + face_norms[5];
- expected[2] = face_norms[0] + face_norms[2] + face_norms[3] + face_norms[6];
- expected[8] = face_norms[3] + face_norms[6];
- expected[6] = face_norms[1] + face_norms[7];
- expected[5] = face_norms[1] + face_norms[2] + face_norms[4] + face_norms[7];
- expected[7] = face_norms[2] + face_norms[3] + face_norms[4] + face_norms[8];
- expected[9] = face_norms[3] + face_norms[8];
- expected[11] = face_norms[4] + face_norms[7];
- expected[10] = face_norms[4] + face_norms[8];
- for (int i = 0; i < 12; ++i)
- expected[i].normalize();
-
- QGeometryData res = node->geometry();
- QCOMPARE(res.count(QGL::Position), 12);
- QCOMPARE(res.count(QGL::Normal), 12);
- QCOMPARE(res.indexCount(), 14 * 3);
- QCOMPARE(res.vertexAt(0), v[0]);
- QCOMPARE(res.vertexAt(4), v[2]);
- QCOMPARE(res.vertexAt(7), v[8]);
- QCOMPARE(res.vertexAt(11), v[10]);
- QCOMPARE(res.normalAt(0), expected.at(0));
- QCOMPARE(res.normalAt(1), expected.at(1));
- QCOMPARE(res.normalAt(2), expected.at(2));
- QCOMPARE(res.normalAt(3), expected.at(3));
- QCOMPARE(res.normalAt(4), expected.at(4));
- QCOMPARE(res.normalAt(5), expected.at(5));
- QCOMPARE(res.normalAt(6), expected.at(6));
- QCOMPARE(res.normalAt(7), expected.at(7));
- QCOMPARE(res.normalAt(8), expected.at(8));
- QCOMPARE(res.normalAt(9), expected.at(9));
- QCOMPARE(res.normalAt(10), expected.at(10));
- QCOMPARE(res.normalAt(11), expected.at(11));
-}
-
-void tst_QGLSection::normalizedNormals()
-{
- const qreal qRadius = 1.0f;
- const qreal qHeight = 0.6f;
- const qreal qThickness = 0.4f;
- const int qNumSlices = 16;
-
- TestBuilder builder;
- builder.newSection(QGL::Smooth); // default - but making the point
- //QGLSection *section = builder.currentSection();
- QGLSceneNode *node = builder.currentNode();
-
- // draw two 90 degree arcs, qThickness apart radially, and qHeight apart
- // in the z dimension. the points on the two arcs are joined into quads
- // but all the points on the high arc are joined to one single point in
- // the same z plane.
- QVector3D ap(qRadius, 0.0f, 0.0f);
- QVector3D bp(qRadius + qThickness, 0.0f, qHeight);
- QVector3D anc(qRadius * 2.0f, qRadius *2.0f, qHeight);
- for (int slice = 1; slice < qNumSlices; ++slice)
- {
- const qreal pi2 = 2.0 * M_PI;
- qreal angle = (slice * pi2) / (4 * qNumSlices);
- qreal cs = qCos(angle);
- qreal sn = qSin(angle);
- QVector3D a(cs * qRadius, sn * qRadius, 0.0f);
- QVector3D b(cs * (qRadius + qThickness), sn * (qRadius + qThickness), qHeight);
- QGeometryData quad;
- quad.appendVertex(ap, bp, b, a);
- builder.addQuads(quad);
- QGeometryData tri;
- tri.appendVertex(b, bp, anc);
- builder.addTriangles(tri);
- ap = a;
- bp = b;
- }
- builder.finalizedSceneNode();
- QGeometryData data = node->geometry();
- QVERIFY(!data.isNull());
- QCOMPARE(data.count(QGL::Position), 33);
-}
-
-void tst_QGLSection::testFaceted(QGLSection *section, QGLBuilder *builder)
-{
- int poffset = section->count(QGL::Position);
- int noffset = section->count(QGL::Normal);
-
- // append a vertex - check it appears in the data along with its normal
- QVector3D testVertex(1.234f, 2.345f, 3.456f);
- QVector3D testNormal(4.321f, 5.432f, 6.543f);
- section->appendFaceted(QLogicalVertex(testVertex, testNormal));
- QCOMPARE(section->vertices().count(), poffset + 1);
- QCOMPARE(section->vertices().at(poffset + 0), testVertex);
- QCOMPARE(section->normals().count(), noffset + 1);
- QCOMPARE(section->normals().at(noffset + 0), testNormal);
- QCOMPARE(section->indices().size(), poffset + 1);
- QCOMPARE_INDEX(section->indices()[poffset + 0], poffset + 0);
-
- // append a vertex equal to one already appended, but with different normal - check it was NOT coalesced
- QVector3D testNormal2(0.0f, 0.0f, 1.0f);
- section->appendFaceted(QLogicalVertex(testVertex, testNormal2));
- QCOMPARE(section->vertices().count(), poffset + 2);
- QCOMPARE(section->vertices().at(poffset + 1), testVertex);
- QCOMPARE(section->normals().count(), noffset + 2);
- QCOMPARE(section->normals().at(noffset + 1), testNormal2);
- QCOMPARE(section->indices().size(), poffset + 2);
- QCOMPARE_INDEX(section->indices()[poffset + 1], poffset + 1);
-
- // append a vertex equal to one already appended, but with same normal - check it WAS coalesced
- section->appendFaceted(QLogicalVertex(testVertex, testNormal2));
- QCOMPARE(section->vertices().count(), poffset + 2);
- QCOMPARE(section->vertices().at(poffset + 1), testVertex);
- QCOMPARE(section->normals().count(), noffset + 2);
- QCOMPARE(section->normals().at(noffset + 1), testNormal2);
- QCOMPARE(section->indices().size(), poffset + 3);
- QCOMPARE_INDEX(section->indices()[poffset + 2], poffset + 1);
-
- // append a vertex equal to one already appended, with same normal, BUT in a new section - check it was NOT coalesced
- section = new QGLSectionTest(builder);
- section->appendFaceted(QLogicalVertex(testVertex, testNormal2));
- QCOMPARE(section->vertices().count(), 1);
- QCOMPARE(section->vertices().at(0), testVertex);
- QCOMPARE(section->normals().count(), 1);
- QCOMPARE(section->normals().at(0), testNormal2);
- QCOMPARE(section->indices().size(), 1);
- QCOMPARE_INDEX(section->indices()[0], 0);
-}
-
-void tst_QGLSection::appendTexCoord()
-{
- TestBuilder builder;
- QGLSectionTest *section = new QGLSectionTest(&builder);
-
- // note that the tests above do the case of texCoord, InvalidTexCoord
-
- // append a texture - check it appears in the data at the correct index
- QVector3D testVertex(1.234f, 2.345f, 3.456f);
- QVector3D testNormal(4.321f, 5.432f, 6.543f);
- QVector2D testTexCoord(0.0f, 0.0f);
- section->appendSmooth(QLogicalVertex(testVertex, testNormal, testTexCoord));
- QCOMPARE(section->vertices().count(), 1);
- QCOMPARE(section->vertices().at(0), testVertex);
- QCOMPARE(section->normals().count(), 1);
- QCOMPARE(section->normals().at(0), testNormal);
- QCOMPARE(section->texCoords().count(), 1);
- QCOMPARE(section->texCoords().at(0), testTexCoord);
- QCOMPARE(section->indices().size(), 1);
- QCOMPARE_INDEX(section->indices()[0], 0);
-
- // append same texture - will coalesce and index the vert
- section->appendSmooth(QLogicalVertex(testVertex, testNormal, testTexCoord));
- QCOMPARE(section->vertices().count(), 1);
- QCOMPARE(section->vertices().at(0), testVertex);
- QCOMPARE(section->normals().count(), 1);
- QCOMPARE(section->normals().at(0), testNormal);
- QCOMPARE(section->texCoords().count(), 1);
- QCOMPARE(section->texCoords().at(0), testTexCoord);
- QCOMPARE(section->indices().size(), 2);
- QCOMPARE_INDEX(section->indices()[1], 0);
-
- // new vertex created to carry the updated texture coord, even though
- // the normal and vertex are the same and thus the logical vert would
- // otherwise coalesced - the new vert is a copy (same vert and normal)
- QVector2D testTexCoord2(1.0, 1.0);
- section->appendSmooth(QLogicalVertex(testVertex, testNormal, testTexCoord2));
- QCOMPARE(section->vertices().count(), 2);
- QCOMPARE(section->vertices().at(1), testVertex);
- QCOMPARE(section->normals().count(), 2);
- QCOMPARE(section->normals().at(1), testNormal);
- QCOMPARE(section->texCoords().count(), 2);
- QCOMPARE(section->texCoords().at(1), testTexCoord2);
- QCOMPARE(section->indices().size(), 3);
- QCOMPARE_INDEX(section->indices()[2], 1);
-
- section = new QGLSectionTest(&builder);
-
- // append a faceted vertex with a tex coord check it appears in the data
- // in a new section now, so the same vert and normal wont be coalesced
- section->appendFaceted(QLogicalVertex(testVertex, testNormal, testTexCoord));
- QCOMPARE(section->vertices().count(), 1);
- QCOMPARE(section->vertices().at(0), testVertex);
- QCOMPARE(section->normals().count(), 1);
- QCOMPARE(section->normals().at(0), testNormal);
- QCOMPARE(section->texCoords().count(), 1);
- QCOMPARE(section->texCoords().at(0), testTexCoord);
- QCOMPARE(section->indices().size(), 1);
- QCOMPARE_INDEX(section->indices()[0], 0);
-
- // append a vertex & normal equal to one already appended, but with different tex coord
- // check it was NOT coalesced, dup vert created
- section->appendFaceted(QLogicalVertex(testVertex, testNormal, testTexCoord2));
- QCOMPARE(section->vertices().count(), 2);
- QCOMPARE(section->vertices().at(1), testVertex);
- QCOMPARE(section->normals().count(), 2);
- QCOMPARE(section->normals().at(1), testNormal);
- QCOMPARE(section->texCoords().count(), 2);
- QCOMPARE(section->texCoords().at(1), testTexCoord2);
- QCOMPARE(section->indices().size(), 2);
- QCOMPARE_INDEX(section->indices()[1], 1);
-
- // append a vertex equal to first one appended above, with same normal, and
- // same texture - check it WAS coalesced to index 0
- section->appendFaceted(QLogicalVertex(testVertex, testNormal, testTexCoord));
- QCOMPARE(section->vertices().count(), 2);
- QCOMPARE(section->vertices().at(1), testVertex);
- QCOMPARE(section->normals().count(), 2);
- QCOMPARE(section->normals().at(1), testNormal);
- QCOMPARE(section->texCoords().count(), 2);
- QCOMPARE(section->texCoords().at(1), testTexCoord2);
- QCOMPARE(section->indices().size(), 3);
- QCOMPARE_INDEX(section->indices()[2], 0);
-
- QVERIFY(section->hasField(QGL::Normal));
- QVERIFY(section->hasField(QGL::TextureCoord0));
- QVERIFY(!section->hasField(QGL::Color));
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLSection::appendColor()
-{
- TestBuilder builder;
- QGLSectionTest *section = new QGLSectionTest(&builder);
-
- QColor4ub color(32, 64, 128, 255);
- QVector3D testVertex(1.234f, 2.345f, 3.456f);
- section->append(QLogicalVertex(testVertex, color));
- QCOMPARE(section->vertices().count(), 1);
- QCOMPARE(section->vertices().at(0), testVertex);
- QCOMPARE(section->colors().count(), 1);
- QCOMPARE(section->colors().at(0), color);
-
- QVERIFY(section->hasField(QGL::Color));
- QVERIFY(!section->hasField(QGL::TextureCoord0));
- QVERIFY(!section->hasField(QGL::Normal));
-
- section = new QGLSectionTest(&builder);
-
- QVector2D testTexCoord(0.0f, 0.0f);
- QLogicalVertex lv;
- lv.setVertex(testVertex);
- lv.setColor(color);
- lv.setTexCoord(testTexCoord);
- section->append(lv);
- QCOMPARE(section->vertices().count(), 1);
- QCOMPARE(section->vertices().at(0), testVertex);
- QCOMPARE(section->colors().count(), 1);
- QCOMPARE(section->colors().at(0), color);
- QCOMPARE(section->texCoords().count(), 1);
- QCOMPARE(section->texCoords().at(0), testTexCoord);
-
- QVERIFY(section->hasField(QGL::Color));
- QVERIFY(section->hasField(QGL::TextureCoord0));
- QVERIFY(!section->hasField(QGL::Normal));
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-void tst_QGLSection::accessors()
-{
- TestBuilder builder;
- QGLSectionTest *section = new QGLSectionTest(&builder);
-
- QCOMPARE(section->smoothing(), QGL::Smooth);
-
- QGLSectionTest *section2 = new QGLSectionTest(&builder, QGL::Faceted);
- QCOMPARE(section2->smoothing(), QGL::Faceted);
-
- // suppress warning
- builder.finalizedSceneNode();
-}
-
-QTEST_APPLESS_MAIN(tst_QGLSection)
-
-#include "tst_qglsection.moc"
diff --git a/tests/auto/threed/qglsharedresource/qglsharedresource.pro b/tests/auto/threed/qglsharedresource/qglsharedresource.pro
deleted file mode 100644
index e551288c..00000000
--- a/tests/auto/threed/qglsharedresource/qglsharedresource.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-INCLUDEPATH += ../../../../src/threed/textures
-VPATH += ../../../../src/threed/textures
-
-HEADERS += qglsharedresource_p.h
-SOURCES += tst_qglsharedresource.cpp qglsharedresource.cpp
diff --git a/tests/auto/threed/qglsharedresource/tst_qglsharedresource.cpp b/tests/auto/threed/qglsharedresource/tst_qglsharedresource.cpp
deleted file mode 100644
index b889d550..00000000
--- a/tests/auto/threed/qglsharedresource/tst_qglsharedresource.cpp
+++ /dev/null
@@ -1,158 +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 <QtTest/QtTest>
-#include "qglsharedresource_p.h"
-
-class tst_QGLSharedResource : public QObject
-{
-Q_OBJECT
-
-public:
- tst_QGLSharedResource() {}
- ~tst_QGLSharedResource() {}
-
-private slots:
- void resourceSharing();
-};
-
-static int dummyDestroyCount = 0;
-
-static void destroyDummyResource(GLuint id)
-{
- QVERIFY(id != 0);
- QVERIFY(QGLContext::currentContext() != 0);
- ++dummyDestroyCount;
-}
-
-void tst_QGLSharedResource::resourceSharing()
-{
- dummyDestroyCount = 0;
-
- // Create a context.
- QGLWidget *glw1 = new QGLWidget();
- glw1->makeCurrent();
-
- // Nothing should be sharing with glw1's context yet.
- QVERIFY(!glw1->isSharing());
-
- // Create a guard for the first context.
- QGLSharedResource guard(destroyDummyResource);
- QVERIFY(guard.context() == 0);
- QVERIFY(guard.id() == 0);
- guard.attach(glw1->context(), 3);
- QVERIFY(guard.context() == glw1->context());
- QVERIFY(guard.id() == 3);
-
- // Create another context that shares with the first.
- QVERIFY(!glw1->isSharing());
- QGLWidget *glw2 = new QGLWidget(0, glw1);
- if (!glw2->isSharing()) {
- delete glw2;
- delete glw1;
- QSKIP("Context sharing is not supported", SkipSingle);
- }
- QVERIFY(glw1->isSharing());
- QVERIFY(glw1->context() != glw2->context());
-
- // Guard should still be the same.
- QVERIFY(guard.context() == glw1->context());
- QVERIFY(guard.id() == 3);
-
- // Create some guards and then destroy them while the context is active.
- {
- QGLSharedResource guard2(destroyDummyResource);
- guard2.attach(glw1->context(), 4);
- QVERIFY(guard2.context() == glw1->context());
- QVERIFY(guard2.id() == 4);
- }
- QCOMPARE(dummyDestroyCount, 1);
- QGLSharedResource guard3(destroyDummyResource);
- guard3.attach(glw1->context(), 6);
- QVERIFY(guard3.context() == glw1->context());
- QVERIFY(guard3.id() == 6);
- guard3.destroy();
- QVERIFY(guard3.context() == 0);
- QVERIFY(guard3.id() == 0);
- QCOMPARE(dummyDestroyCount, 2);
-
- // Create a third context, not sharing with the others.
- QGLWidget *glw3 = new QGLWidget();
- QVERIFY(!glw3->isSharing());
-
- // Create a guard on the standalone context.
- QGLSharedResource guard4(destroyDummyResource);
- guard4.attach(glw3->context(), 5);
- QVERIFY(guard4.context() == glw3->context());
- QVERIFY(guard4.id() == 5);
-
- // Shared guard should still be the same.
- QVERIFY(guard.context() == glw1->context());
- QVERIFY(guard.id() == 3);
-
- // Delete the first context.
- delete glw1;
-
- // The second context should no longer register as sharing.
- QVERIFY(!glw2->isSharing());
-
- // Shared guard should now be the second context, with the id the same.
- QVERIFY(guard.context() == glw2->context());
- QVERIFY(guard.id() == 3);
- QVERIFY(guard4.context() == glw3->context());
- QVERIFY(guard4.id() == 5);
-
- // Clean up the other contexts.
- delete glw2;
- delete glw3;
-
- // Guards should now be null and the id zero, but no extra calls to
- // the dummy destroy function.
- QVERIFY(guard.context() == 0);
- QVERIFY(guard.id() == 0);
- QVERIFY(guard4.context() == 0);
- QVERIFY(guard4.id() == 0);
- QCOMPARE(dummyDestroyCount, 2);
-}
-
-QTEST_MAIN(tst_QGLSharedResource)
-
-#include "tst_qglsharedresource.moc"
diff --git a/tests/auto/threed/qglsphere/qglsphere.pro b/tests/auto/threed/qglsphere/qglsphere.pro
deleted file mode 100644
index d30ed784..00000000
--- a/tests/auto/threed/qglsphere/qglsphere.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-INCLUDEPATH += ../../../shared
-SOURCES += tst_qglsphere.cpp
diff --git a/tests/auto/threed/qglsphere/tst_qglsphere.cpp b/tests/auto/threed/qglsphere/tst_qglsphere.cpp
deleted file mode 100644
index 7aaaa3fe..00000000
--- a/tests/auto/threed/qglsphere/tst_qglsphere.cpp
+++ /dev/null
@@ -1,125 +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 <QtTest/QtTest>
-
-#include "qglsphere.h"
-#include "qglbuilder.h"
-
-class tst_QGLSphere : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLSphere() {}
- ~tst_QGLSphere() {}
-
-private slots:
- void create();
- void modify();
- void build();
-
-private:
- bool validateSphere(QGLSceneNode *node, qreal size);
-};
-
-void tst_QGLSphere::create()
-{
- QGLSphere sphere1;
- QCOMPARE(sphere1.diameter(), qreal(1.0f));
- QCOMPARE(sphere1.subdivisionDepth(), 5);
-
- QGLSphere sphere2(27.5f);
- QCOMPARE(sphere2.diameter(), qreal(27.5f));
- QCOMPARE(sphere2.subdivisionDepth(), 5);
-
- QGLSphere sphere3(20.5f, 4);
- QCOMPARE(sphere3.diameter(), qreal(20.5f));
- QCOMPARE(sphere3.subdivisionDepth(), 4);
-}
-
-void tst_QGLSphere::modify()
-{
- QGLSphere sphere1;
- sphere1.setDiameter(5.0f);
- sphere1.setSubdivisionDepth(4);
- QCOMPARE(sphere1.diameter(), qreal(5.0f));
- QCOMPARE(sphere1.subdivisionDepth(), 4);
-}
-
-// Validates the geometry in a sphere node to check that all vertices
-// are on the surface of a sphere of diameter "size" and all normals
-// are of length 1 and point directly out from the center.
-bool tst_QGLSphere::validateSphere(QGLSceneNode *node, qreal size)
-{
- QGeometryData data = node->geometry();
- int start = node->start();
- int count = node->count();
- if (count <= 0)
- return false;
- QGL::IndexArray indices = data.indices();
- for (int index = 0; index < count; ++index) {
- QVector3D v = data.vertexAt(indices.at(index + start));
- QVector3D n = data.normalAt(indices.at(index + start));
- if (qAbs(n.length() - 1.0f) >= 0.0001)
- return false;
- QVector3D v2 = n * size / 2.0f;
- if (qAbs(v.x() - v2.x()) >= 0.0001 ||
- qAbs(v.y() - v2.y()) >= 0.0001 ||
- qAbs(v.z() - v2.z()) >= 0.0001)
- return false;
- }
- return true;
-}
-
-void tst_QGLSphere::build()
-{
- QGLBuilder builder;
- builder.newSection(QGL::Faceted);
- QGLSceneNode *node1 = builder.newNode();
- builder << QGLSphere(5.0f, 5);
- QGLSceneNode *root = builder.finalizedSceneNode();
- QVERIFY(validateSphere(node1, 5.0f));
- delete root;
-}
-
-QTEST_APPLESS_MAIN(tst_QGLSphere)
-
-#include "tst_qglsphere.moc"
diff --git a/tests/auto/threed/qglvertexbundle/qglvertexbundle.pro b/tests/auto/threed/qglvertexbundle/qglvertexbundle.pro
deleted file mode 100644
index 89cf0f17..00000000
--- a/tests/auto/threed/qglvertexbundle/qglvertexbundle.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qglvertexbundle.cpp
diff --git a/tests/auto/threed/qglvertexbundle/tst_qglvertexbundle.cpp b/tests/auto/threed/qglvertexbundle/tst_qglvertexbundle.cpp
deleted file mode 100644
index 07965914..00000000
--- a/tests/auto/threed/qglvertexbundle/tst_qglvertexbundle.cpp
+++ /dev/null
@@ -1,282 +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 <QtTest/QtTest>
-#include <QtOpenGL/qgl.h>
-#include "qglvertexbundle.h"
-#include "qvector2darray.h"
-#include "qvector3darray.h"
-#include "qvector4darray.h"
-#include "qcolor4ub.h"
-
-class tst_QGLVertexBundle : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLVertexBundle() {}
- ~tst_QGLVertexBundle() {}
-
-private slots:
- void interleaved();
- void singleAttribute();
- void large();
- void otherAttributes();
-};
-
-void tst_QGLVertexBundle::interleaved()
-{
- // Interleave 4 positions and texture co-ordinates, which will
- // result in the numbers 1..20 ending up in the GL server's buffer.
- QVector3DArray positions;
- positions.append(1.0f, 2.0f, 3.0f);
- positions.append(6.0f, 7.0f, 8.0f);
- positions.append(11.0f, 12.0f, 13.0f);
- positions.append(16.0f, 17.0f, 18.0f);
-
- QVector2DArray texCoords;
- texCoords.append(4.0f, 5.0f);
- texCoords.append(9.0f, 10.0f);
- texCoords.append(14.0f, 15.0f);
- texCoords.append(19.0f, 20.0f);
-
- QGLVertexBundle bundle;
-
- // Cannot upload an empty bundle.
- QVERIFY(!bundle.upload());
-
- QVERIFY(bundle.attributes().isEmpty());
-
- bundle.addAttribute(QGL::Position, positions);
- bundle.addAttribute(QGL::TextureCoord0, texCoords);
-
- QGLAttributeSet set = bundle.attributes();
- QVERIFY(set.contains(QGL::Position));
- QVERIFY(set.contains(QGL::TextureCoord0));
- QVERIFY(!set.contains(QGL::TextureCoord1));
-
- QVERIFY(!bundle.isUploaded());
- QCOMPARE(bundle.vertexCount(), 4);
-
- // Create a context to upload into. We populate the QGLVertexBundle
- // with data before doing this to ensure that the client-side part of
- // the buffers can be created at application startup time before an
- // actual OpenGL context exists.
- QGLWidget glw;
- glw.makeCurrent();
-
- // Upload the bundle and bail out if we couldn't upload it
- // (i.e. vertex buffers are not supported in the GL server).
- if (!bundle.upload()) {
- QVERIFY(!bundle.isUploaded());
- return;
- }
- QVERIFY(bundle.isUploaded());
-
- // Uploading again should do nothing - just succeed.
- QVERIFY(bundle.upload());
-
- // Verify the contents of the buffer in the GL server if we can map it.
- QVERIFY(bundle.bind());
- QCOMPARE(bundle.buffer().size(), int(sizeof(float) * 20));
- float *mapped = reinterpret_cast<float *>
- (bundle.buffer().map(QGLBuffer::ReadOnly));
- if (mapped) {
- for (int index = 0; index < 20; ++index)
- QCOMPARE(mapped[index], float(index + 1));
- }
- bundle.release();
-
- // Make copies of the bundle, to test ref-counting.
- QGLVertexBundle bundle2(bundle);
- QGLVertexBundle bundle3;
- QCOMPARE(bundle2.buffer().bufferId(), bundle.buffer().bufferId());
- QVERIFY(!bundle3.buffer().bufferId());
- bundle3 = bundle;
- QCOMPARE(bundle3.buffer().bufferId(), bundle.buffer().bufferId());
-}
-
-// Single attribute uploads take a quicker path, which this function tests.
-void tst_QGLVertexBundle::singleAttribute()
-{
- QVector3DArray positions;
- positions.append(1.0f, 2.0f, 3.0f);
- positions.append(4.0f, 5.0f, 6.0f);
- positions.append(7.0f, 8.0f, 9.0f);
- positions.append(10.0f, 11.0f, 12.0f);
-
- QGLVertexBundle bundle;
- bundle.addAttribute(QGL::Position, positions);
-
- QVERIFY(!bundle.isUploaded());
- QCOMPARE(bundle.vertexCount(), 4);
-
- QGLWidget glw;
- glw.makeCurrent();
-
- if (!bundle.upload()) {
- QVERIFY(!bundle.isUploaded());
- return;
- }
- QVERIFY(bundle.isUploaded());
-
- QVERIFY(bundle.bind());
- QCOMPARE(bundle.buffer().size(), int(sizeof(float) * 12));
- float *mapped = reinterpret_cast<float *>
- (bundle.buffer().map(QGLBuffer::ReadOnly));
- if (mapped) {
- for (int index = 0; index < 12; ++index)
- QCOMPARE(mapped[index], float(index + 1));
- }
- bundle.release();
-}
-
-void tst_QGLVertexBundle::large()
-{
- QVector3DArray positions;
- QVector2DArray texCoords;
- for (int index = 0; index < 2048; ++index) {
- positions.append(index * 5, index * 5 + 1, index * 5 + 2);
- texCoords.append(index * 5 + 3, index * 5 + 4);
- }
- QGLWidget glw;
- glw.makeCurrent();
- QGLVertexBundle bundle;
- bundle.addAttribute(QGL::Position, positions);
- bundle.addAttribute(QGL::TextureCoord0, texCoords);
- if (!bundle.upload()) {
- QVERIFY(!bundle.isUploaded());
- return;
- }
- QCOMPARE(bundle.vertexCount(), 2048);
- QVERIFY(bundle.bind());
- QCOMPARE(bundle.buffer().size(), int(sizeof(float) * 2048 * 5));
- float *mapped = reinterpret_cast<float *>
- (bundle.buffer().map(QGLBuffer::ReadOnly));
- if (mapped) {
- for (int index = 0; index < 2048 * 5; ++index)
- QCOMPARE(mapped[index], float(index));
- }
- bundle.release();
-}
-
-void tst_QGLVertexBundle::otherAttributes()
-{
- QVector4DArray positions;
- positions.append(1.0f, 2.0f, 3.0f, 4.0f);
- positions.append(6.0f, 7.0f, 8.0f, 9.0f);
- positions.append(11.0f, 12.0f, 13.0f, 14.0f);
- positions.append(16.0f, 17.0f, 18.0f, 19.0f);
-
- QArray<float> texCoords;
- texCoords.append(5.0f);
- texCoords.append(10.0f);
- texCoords.append(15.0f);
- texCoords.append(20.0f);
-
- QGLWidget glw;
- glw.makeCurrent();
-
- QGLVertexBundle bundle;
- bundle.addAttribute(QGL::Position, positions);
- bundle.addAttribute(QGL::TextureCoord0, texCoords);
- if (!bundle.upload()) {
- QVERIFY(!bundle.isUploaded());
- return;
- }
- QCOMPARE(bundle.vertexCount(), 4);
- QVERIFY(bundle.bind());
- QCOMPARE(bundle.buffer().size(), int(sizeof(float) * 20));
- float *mapped = reinterpret_cast<float *>
- (bundle.buffer().map(QGLBuffer::ReadOnly));
- if (mapped) {
- for (int index = 0; index < 20; ++index)
- QCOMPARE(mapped[index], float(index + 1));
- }
- bundle.release();
-
- bundle = QGLVertexBundle();
- QVERIFY(!bundle.isUploaded());
-
- QArray<QColor4ub> colors;
- for (int index = 0; index < 64; ++index) {
- colors.append(QColor4ub(index * 4, index * 4 + 1,
- index * 4 + 2, index * 4 + 3));
- }
- bundle.addAttribute(QGL::Color, colors);
- if (!bundle.upload()) {
- QVERIFY(!bundle.isUploaded());
- return;
- }
- QCOMPARE(bundle.vertexCount(), 64);
- QVERIFY(bundle.bind());
- QCOMPARE(bundle.buffer().size(), int(sizeof(uchar) * 256));
- uchar *mapuchar = reinterpret_cast<uchar *>
- (bundle.buffer().map(QGLBuffer::ReadOnly));
- if (mapuchar) {
- for (int index = 0; index < 256; ++index)
- QCOMPARE(mapuchar[index], uchar(index));
- }
- bundle.release();
-
- bundle = QGLVertexBundle();
- QVERIFY(!bundle.isUploaded());
-
- QCustomDataArray custom(texCoords);
- bundle.addAttribute(QGL::TextureCoord1, custom);
- if (!bundle.upload()) {
- QVERIFY(!bundle.isUploaded());
- return;
- }
- QCOMPARE(bundle.vertexCount(), 4);
- QVERIFY(bundle.bind());
- QCOMPARE(bundle.buffer().size(), int(sizeof(float) * 4));
- mapped = reinterpret_cast<float *>
- (bundle.buffer().map(QGLBuffer::ReadOnly));
- if (mapped) {
- for (int index = 0; index < 4; ++index)
- QCOMPARE(mapped[index], float((index + 1) * 5));
- }
- bundle.release();
-}
-
-QTEST_MAIN(tst_QGLVertexBundle)
-
-#include "tst_qglvertexbundle.moc"
diff --git a/tests/auto/threed/qgraphicstransform3d/qgraphicstransform3d.pro b/tests/auto/threed/qgraphicstransform3d/qgraphicstransform3d.pro
deleted file mode 100644
index 4cc0791c..00000000
--- a/tests/auto/threed/qgraphicstransform3d/qgraphicstransform3d.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qgraphicstransform3d.cpp
diff --git a/tests/auto/threed/qgraphicstransform3d/tst_qgraphicstransform3d.cpp b/tests/auto/threed/qgraphicstransform3d/tst_qgraphicstransform3d.cpp
deleted file mode 100644
index 2f42a202..00000000
--- a/tests/auto/threed/qgraphicstransform3d/tst_qgraphicstransform3d.cpp
+++ /dev/null
@@ -1,280 +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 <QtTest/QtTest>
-#include "qgraphicsrotation3d.h"
-#include "qgraphicsscale3d.h"
-#include "qgraphicstranslation3d.h"
-#include "qgraphicsbillboardtransform.h"
-
-class tst_QGraphicsTransform3D : public QObject
-{
- Q_OBJECT
-public:
- tst_QGraphicsTransform3D() {}
- ~tst_QGraphicsTransform3D() {}
-
-private slots:
- void rotation3D();
- void scale3D();
- void translation3D();
- void billboard();
-};
-
-static bool isSameMatrix(const QMatrix4x4 &m1, const QMatrix4x4 &m2)
-{
- for (int row = 0; row < 4; ++row) {
- for (int col = 0; col < 4; ++col) {
- if (!qFuzzyIsNull(float(m1(row, col) - m2(row, col))))
- return false;
- }
- }
- return true;
-}
-
-void tst_QGraphicsTransform3D::rotation3D()
-{
- QGraphicsRotation3D rot1;
- QVERIFY(rot1.origin() == QVector3D(0, 0, 0));
- QVERIFY(rot1.axis() == QVector3D(0, 0, 1));
- QCOMPARE(rot1.angle(), qreal(0.0f));
-
- QSignalSpy spy1(&rot1, SIGNAL(originChanged()));
- QSignalSpy spy2(&rot1, SIGNAL(axisChanged()));
- QSignalSpy spy3(&rot1, SIGNAL(angleChanged()));
- QSignalSpy spy4(&rot1, SIGNAL(transformChanged()));
-
- rot1.setOrigin(QVector3D(1, 2, 3));
- rot1.setAxis(QVector3D(4, -5, 6));
- rot1.setAngle(45.0f);
- QVERIFY(rot1.origin() == QVector3D(1, 2, 3));
- QVERIFY(rot1.axis() == QVector3D(4, -5, 6));
- QCOMPARE(rot1.angle(), qreal(45.0f));
-
- QCOMPARE(spy1.size(), 1);
- QCOMPARE(spy2.size(), 1);
- QCOMPARE(spy3.size(), 1);
- QCOMPARE(spy4.size(), 3);
-
- // Change to same values should not result in any extra signals.
- rot1.setOrigin(QVector3D(1, 2, 3));
- rot1.setAxis(QVector3D(4, -5, 6));
- rot1.setAngle(45.0f);
- QCOMPARE(spy1.size(), 1);
- QCOMPARE(spy2.size(), 1);
- QCOMPARE(spy3.size(), 1);
- QCOMPARE(spy4.size(), 3);
-
- QMatrix4x4 m1;
- rot1.applyTo(&m1);
-
- QMatrix4x4 m2;
- m2.translate(1, 2, 3);
- m2.rotate(45.0f, QVector3D(4, -5, 6));
- m2.translate(-1, -2, -3);
- QVERIFY(isSameMatrix(m1, m2));
-
- QGraphicsRotation3D *rot2 = qobject_cast<QGraphicsRotation3D *>
- (rot1.clone(this));
- QVERIFY(rot2 != 0);
- QVERIFY(rot2 != &rot1);
- QVERIFY(rot2->parent() == this);
- QVERIFY(rot2->origin() == rot1.origin());
- QVERIFY(rot2->axis() == rot1.axis());
- QVERIFY(rot2->angle() == rot1.angle());
- delete rot2;
-}
-
-void tst_QGraphicsTransform3D::scale3D()
-{
- QGraphicsScale3D scale1;
- QVERIFY(scale1.origin() == QVector3D(0, 0, 0));
- QVERIFY(scale1.scale() == QVector3D(1, 1, 1));
-
- QSignalSpy spy1(&scale1, SIGNAL(originChanged()));
- QSignalSpy spy2(&scale1, SIGNAL(scaleChanged()));
- QSignalSpy spy3(&scale1, SIGNAL(transformChanged()));
-
- scale1.setOrigin(QVector3D(1, 2, 3));
- scale1.setScale(QVector3D(4, -6, 0.5f));
- QVERIFY(scale1.origin() == QVector3D(1, 2, 3));
- QVERIFY(scale1.scale() == QVector3D(4, -6, 0.5f));
-
- QCOMPARE(spy1.size(), 1);
- QCOMPARE(spy2.size(), 1);
- QCOMPARE(spy3.size(), 2);
-
- // Change to same values should not result in any extra signals.
- scale1.setOrigin(QVector3D(1, 2, 3));
- scale1.setScale(QVector3D(4, -6, 0.5f));
- QCOMPARE(spy1.size(), 1);
- QCOMPARE(spy2.size(), 1);
- QCOMPARE(spy3.size(), 2);
-
- QMatrix4x4 m1;
- scale1.applyTo(&m1);
-
- QMatrix4x4 m2;
- m2.translate(1, 2, 3);
- m2.scale(QVector3D(4, -6, 0.5f));
- m2.translate(-1, -2, -3);
- QVERIFY(isSameMatrix(m1, m2));
-
- scale1.setScale(QVector3D(20, -4, 42));
- QCOMPARE(spy2.size(), 2);
- QCOMPARE(spy3.size(), 3);
-
- QVERIFY(scale1.scale() == QVector3D(20, -4, 42));
-
- QVERIFY(scale1.origin() == QVector3D(1, 2, 3));
- QCOMPARE(spy1.size(), 1);
-
- QGraphicsScale3D *scale2 = qobject_cast<QGraphicsScale3D *>
- (scale1.clone(this));
- QVERIFY(scale2 != 0);
- QVERIFY(scale2 != &scale1);
- QVERIFY(scale2->parent() == this);
- QVERIFY(scale2->origin() == scale1.origin());
- QVERIFY(scale2->scale() == scale1.scale());
- delete scale2;
-}
-
-void tst_QGraphicsTransform3D::translation3D()
-{
- QGraphicsTranslation3D translate1;
- QVERIFY(translate1.translate() == QVector3D(0, 0, 0));
- QCOMPARE(translate1.progress(), qreal(1.0f));
-
- QSignalSpy spy1(&translate1, SIGNAL(translateChanged()));
- QSignalSpy spy2(&translate1, SIGNAL(progressChanged()));
- QSignalSpy spy3(&translate1, SIGNAL(transformChanged()));
-
- translate1.setTranslate(QVector3D(4, -6, 0.5f));
- translate1.setProgress(2.0f);
- QVERIFY(translate1.translate() == QVector3D(4, -6, 0.5f));
- QCOMPARE(translate1.progress(), qreal(2.0f));
-
- QCOMPARE(spy1.size(), 1);
- QCOMPARE(spy2.size(), 1);
- QCOMPARE(spy3.size(), 2);
-
- // Change to same values should not result in any extra signals.
- translate1.setTranslate(QVector3D(4, -6, 0.5f));
- translate1.setProgress(2.0f);
- QCOMPARE(spy1.size(), 1);
- QCOMPARE(spy2.size(), 1);
- QCOMPARE(spy3.size(), 2);
-
- QMatrix4x4 m1;
- translate1.applyTo(&m1);
-
- QMatrix4x4 m2;
- m2.translate(QVector3D(8, -12, 1));
- QVERIFY(isSameMatrix(m1, m2));
-
- QGraphicsTranslation3D *translate2 = qobject_cast<QGraphicsTranslation3D *>
- (translate1.clone(this));
- QVERIFY(translate2 != 0);
- QVERIFY(translate2 != &translate1);
- QVERIFY(translate2->parent() == this);
- QVERIFY(translate2->translate() == translate1.translate());
- QVERIFY(translate2->progress() == translate1.progress());
- delete translate2;
-}
-
-void tst_QGraphicsTransform3D::billboard()
-{
- QGraphicsBillboardTransform billboard1;
- QVERIFY(!billboard1.preserveUpVector());
-
- QSignalSpy spy1(&billboard1, SIGNAL(preserveUpVectorChanged()));
- QSignalSpy spy2(&billboard1, SIGNAL(transformChanged()));
-
- billboard1.setPreserveUpVector(true);
- QVERIFY(billboard1.preserveUpVector());
-
- QCOMPARE(spy1.size(), 1);
- QCOMPARE(spy2.size(), 1);
-
- // Change to same value should not result in any extra signals.
- billboard1.setPreserveUpVector(true);
- QCOMPARE(spy1.size(), 1);
- QCOMPARE(spy2.size(), 1);
-
- QMatrix4x4 m1;
- billboard1.applyTo(&m1);
- QVERIFY(m1.isIdentity());
-
- QMatrix4x4 m2(2.0f, 3.0f, 4.0f, 5.0f,
- 6.0f, 7.0f, 8.0f, 9.0f,
- 10.0f, 11.0f, 12.0f, 13.0f,
- 14.0f, 15.0f, 16.0f, 17.0f);
- QMatrix4x4 m3(1.0f, 0.0f, 0.0f, 5.0f,
- 0.0f, 1.0f, 0.0f, 9.0f,
- 0.0f, 0.0f, 1.0f, 13.0f,
- 14.0f, 15.0f, 16.0f, 17.0f);
- QMatrix4x4 m4(1.0f, 3.0f, 0.0f, 5.0f,
- 0.0f, 7.0f, 0.0f, 9.0f,
- 0.0f, 11.0f, 1.0f, 13.0f,
- 14.0f, 15.0f, 16.0f, 17.0f);
-
- QMatrix4x4 m5(m2);
- billboard1.setPreserveUpVector(false);
- billboard1.applyTo(&m5);
- QVERIFY(m5 == m3);
-
- QMatrix4x4 m6(m2);
- billboard1.setPreserveUpVector(true);
- billboard1.applyTo(&m6);
- QVERIFY(m6 == m4);
-
- QGraphicsBillboardTransform *billboard2 = qobject_cast<QGraphicsBillboardTransform *>
- (billboard1.clone(this));
- QVERIFY(billboard2 != 0);
- QVERIFY(billboard2 != &billboard1);
- QVERIFY(billboard2->parent() == this);
- QVERIFY(billboard2->preserveUpVector() == billboard1.preserveUpVector());
- delete billboard2;
-}
-
-QTEST_APPLESS_MAIN(tst_QGraphicsTransform3D)
-
-#include "tst_qgraphicstransform3d.moc"
diff --git a/tests/auto/threed/qopenglfunctions/qopenglfunctions.pro b/tests/auto/threed/qopenglfunctions/qopenglfunctions.pro
deleted file mode 100644
index c830ff37..00000000
--- a/tests/auto/threed/qopenglfunctions/qopenglfunctions.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qopenglfunctions.cpp
diff --git a/tests/auto/threed/qopenglfunctions/tst_qopenglfunctions.cpp b/tests/auto/threed/qopenglfunctions/tst_qopenglfunctions.cpp
deleted file mode 100644
index 0ef53909..00000000
--- a/tests/auto/threed/qopenglfunctions/tst_qopenglfunctions.cpp
+++ /dev/null
@@ -1,245 +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 <QtTest/QtTest>
-#include "qopenglfunctions.h"
-
-class tst_QOpenGLFunctions : public QObject
-{
- Q_OBJECT
-public:
- tst_QOpenGLFunctions() {}
- ~tst_QOpenGLFunctions() {}
-
-private slots:
- void features();
- void multitexture();
- void blendColor();
-
-private:
- static bool hasExtension(const char *name);
-};
-
-bool tst_QOpenGLFunctions::hasExtension(const char *name)
-{
- QString extensions =
- QString::fromLatin1
- (reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS)));
- return extensions.split(QLatin1Char(' ')).contains
- (QString::fromLatin1(name));
-}
-
-// Check that the reported features are consistent with the platform.
-void tst_QOpenGLFunctions::features()
-{
- // Before being associated with a context, there should be
- // no features enabled.
- QOpenGLFunctions funcs;
- QVERIFY(!funcs.openGLFeatures());
- QVERIFY(!funcs.hasOpenGLFeature(QOpenGLFunctions::Multitexture));
- QVERIFY(!funcs.hasOpenGLFeature(QOpenGLFunctions::Shaders));
- QVERIFY(!funcs.hasOpenGLFeature(QOpenGLFunctions::Buffers));
- QVERIFY(!funcs.hasOpenGLFeature(QOpenGLFunctions::Framebuffers));
- QVERIFY(!funcs.hasOpenGLFeature(QOpenGLFunctions::BlendColor));
- QVERIFY(!funcs.hasOpenGLFeature(QOpenGLFunctions::BlendEquation));
- QVERIFY(!funcs.hasOpenGLFeature(QOpenGLFunctions::BlendEquationSeparate));
- QVERIFY(!funcs.hasOpenGLFeature(QOpenGLFunctions::BlendFuncSeparate));
- QVERIFY(!funcs.hasOpenGLFeature(QOpenGLFunctions::BlendSubtract));
- QVERIFY(!funcs.hasOpenGLFeature(QOpenGLFunctions::CompressedTextures));
- QVERIFY(!funcs.hasOpenGLFeature(QOpenGLFunctions::Multisample));
- QVERIFY(!funcs.hasOpenGLFeature(QOpenGLFunctions::StencilSeparate));
- QVERIFY(!funcs.hasOpenGLFeature(QOpenGLFunctions::NPOTTextures));
-
- // Make a context current.
- QGLWidget glw;
- if (!glw.isValid())
- QSKIP("GL Implementation not valid", SkipSingle);
-
- glw.makeCurrent();
- funcs.initializeGLFunctions();
-
- // Validate the features against what we expect for this platform.
-#if defined(QT_OPENGL_ES_2)
- QOpenGLFunctions::OpenGLFeatures allFeatures =
- (QOpenGLFunctions::Multitexture |
- QOpenGLFunctions::Shaders |
- QOpenGLFunctions::Buffers |
- QOpenGLFunctions::Framebuffers |
- QOpenGLFunctions::BlendColor |
- QOpenGLFunctions::BlendEquation |
- QOpenGLFunctions::BlendEquationSeparate |
- QOpenGLFunctions::BlendFuncSeparate |
- QOpenGLFunctions::BlendSubtract |
- QOpenGLFunctions::CompressedTextures |
- QOpenGLFunctions::Multisample |
- QOpenGLFunctions::StencilSeparate |
- QOpenGLFunctions::NPOTTextures);
- QVERIFY((funcs.openGLFeatures() & allFeatures) == allFeatures);
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::Multitexture));
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::Shaders));
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::Buffers));
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::Framebuffers));
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::BlendColor));
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::BlendEquation));
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::BlendEquationSeparate));
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::BlendFuncSeparate));
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::BlendSubtract));
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::CompressedTextures));
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::Multisample));
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::StencilSeparate));
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::NPOTTextures));
-#elif defined(QT_OPENGL_ES)
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::Multitexture));
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::Buffers));
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::CompressedTextures));
- QVERIFY(funcs.hasOpenGLFeature(QOpenGLFunctions::Multisample));
-
- QVERIFY(!funcs.hasOpenGLFeature(QOpenGLFunctions::Shaders));
- QVERIFY(!funcs.hasOpenGLFeature(QOpenGLFunctions::BlendColor));
- QVERIFY(!funcs.hasOpenGLFeature(QOpenGLFunctions::StencilSeparate));
-
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::Framebuffers),
- hasExtension("GL_OES_framebuffer_object"));
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::BlendEquationSeparate),
- hasExtension("GL_OES_blend_equation_separate"));
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::BlendFuncSeparate),
- hasExtension("GL_OES_blend_func_separate"));
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::BlendSubtract),
- hasExtension("GL_OES_blend_subtract"));
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::NPOTTextures),
- hasExtension("GL_OES_texture_npot"));
-#else
- // We check for both the extension name and the minimum OpenGL version
- // for the feature. This will help us catch situations where a platform
- // doesn't list an extension by name but does have the feature by virtue
- // of its version number.
- QGLFormat::OpenGLVersionFlags versions = QGLFormat::openGLVersionFlags();
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::Multitexture),
- hasExtension("GL_ARB_multitexture") ||
- (versions & QGLFormat::OpenGL_Version_1_3) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::Shaders),
- hasExtension("GL_ARB_shader_objects") ||
- (versions & QGLFormat::OpenGL_Version_2_0) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::Buffers),
- (versions & QGLFormat::OpenGL_Version_1_5) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::Framebuffers),
- hasExtension("GL_EXT_framebuffer_object") ||
- hasExtension("GL_ARB_framebuffer_object"));
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::BlendColor),
- hasExtension("GL_EXT_blend_color") ||
- (versions & QGLFormat::OpenGL_Version_1_2) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::BlendEquation),
- (versions & QGLFormat::OpenGL_Version_1_2) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::BlendEquationSeparate),
- hasExtension("GL_EXT_blend_equation_separate") ||
- (versions & QGLFormat::OpenGL_Version_2_0) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::BlendFuncSeparate),
- hasExtension("GL_EXT_blend_func_separate") ||
- (versions & QGLFormat::OpenGL_Version_1_4) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::BlendSubtract),
- hasExtension("GL_EXT_blend_subtract"));
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::CompressedTextures),
- hasExtension("GL_ARB_texture_compression") ||
- (versions & QGLFormat::OpenGL_Version_1_3) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::Multisample),
- hasExtension("GL_ARB_multisample") ||
- (versions & QGLFormat::OpenGL_Version_1_3) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::StencilSeparate),
- (versions & QGLFormat::OpenGL_Version_2_0) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QOpenGLFunctions::NPOTTextures),
- hasExtension("GL_ARB_texture_non_power_of_two") ||
- (versions & QGLFormat::OpenGL_Version_2_0) != 0);
-#endif
-}
-
-// Verify that the multitexture functions appear to resolve and work.
-void tst_QOpenGLFunctions::multitexture()
-{
- QOpenGLFunctions funcs;
- QGLWidget glw;
- if (!glw.isValid())
- QSKIP("GL Implementation not valid", SkipSingle);
- glw.makeCurrent();
- funcs.initializeGLFunctions();
-
- if (!funcs.hasOpenGLFeature(QOpenGLFunctions::Multitexture))
- QSKIP("Multitexture functions are not supported", SkipSingle);
-
- funcs.glActiveTexture(GL_TEXTURE1);
-
- GLint active = 0;
- glGetIntegerv(GL_ACTIVE_TEXTURE, &active);
- QVERIFY(active == GL_TEXTURE1);
-
- funcs.glActiveTexture(GL_TEXTURE0);
-
- active = 0;
- glGetIntegerv(GL_ACTIVE_TEXTURE, &active);
- QVERIFY(active == GL_TEXTURE0);
-}
-
-// Verify that the glBlendColor() function appears to resolve and work.
-void tst_QOpenGLFunctions::blendColor()
-{
- QOpenGLFunctions funcs;
- QGLWidget glw;
- if (!glw.isValid())
- QSKIP("GL Implementation not valid", SkipSingle);
- glw.makeCurrent();
- funcs.initializeGLFunctions();
-
- if (!funcs.hasOpenGLFeature(QOpenGLFunctions::BlendColor))
- QSKIP("glBlendColor() is not supported", SkipSingle);
-
- funcs.glBlendColor(0.0f, 1.0f, 0.0f, 1.0f);
-
- GLfloat colors[4] = {0.5f, 0.5f, 0.5f, 0.5f};
- glGetFloatv(GL_BLEND_COLOR, colors);
-
- QCOMPARE(colors[0], 0.0f);
- QCOMPARE(colors[1], 1.0f);
- QCOMPARE(colors[2], 0.0f);
- QCOMPARE(colors[3], 1.0f);
-}
-
-QTEST_MAIN(tst_QOpenGLFunctions)
-
-#include "tst_qopenglfunctions.moc"
diff --git a/tests/auto/threed/qplane3d/qplane3d.pro b/tests/auto/threed/qplane3d/qplane3d.pro
deleted file mode 100644
index 008251ec..00000000
--- a/tests/auto/threed/qplane3d/qplane3d.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qplane3d.cpp
diff --git a/tests/auto/threed/qplane3d/tst_qplane3d.cpp b/tests/auto/threed/qplane3d/tst_qplane3d.cpp
deleted file mode 100644
index 17f14164..00000000
--- a/tests/auto/threed/qplane3d/tst_qplane3d.cpp
+++ /dev/null
@@ -1,450 +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 <QtTest/QtTest>
-
-#include "qplane3d.h"
-#include "qray3d.h"
-
-class tst_QPlane3D : public QObject
-{
- Q_OBJECT
-public:
- tst_QPlane3D() {}
- ~tst_QPlane3D() {}
-
-private slots:
- void create_data();
- void create();
- void intersection_data();
- void intersection();
- void noIntersection_data();
- void noIntersection();
- void contains_data();
- void contains();
- void distanceTo_data();
- void distanceTo();
- void compare();
- void transform_data();
- void transform();
- void dataStream();
- void properties();
- void metaTypes();
-};
-
-// since all calculations involved QVector3D are producing values with only
-// float precision those calculations can at best be float precision
-// if you assign the results of the calculation to a qreal then qFuzzyCompare
-// will quite happily use a much higher standard of precision than it is
-// possible to acheive - hence redefine it here to always use the float
-// Also while on the job fix the problem where a compared value happens
-// to be zero (and you cannot always predict this, and should not predict it
-// since then you produce self-fulling prophecies instead of tests).
-// In that case qFuzzyCompare has a completely strict criterion since
-// it finds the "fudge factor" by multiplying by zero...
-static inline bool fuzzyCompare(qreal p1, qreal p2)
-{
- float fac = qMin(qAbs(p1), qAbs(p2));
- return (qAbs(p1 - p2) <= (qIsNull(fac) ? 0.00001f : 0.00001f * fac));
-}
-
-static inline bool fuzzyCompare(const QVector3D &lhs, const QVector3D &rhs)
-{
- if (fuzzyCompare(lhs.x(), rhs.x()) &&
- fuzzyCompare(lhs.y(), rhs.y()) &&
- fuzzyCompare(lhs.z(), rhs.z()))
- return true;
-#ifndef QT_NO_DEBUG_STREAM
- qWarning() << "actual:" << lhs;
- qWarning() << "expected:" << rhs;
-#endif
- return false;
-}
-
-static inline bool fuzzyIsNull(const QVector3D &v)
-{
- return fuzzyCompare(v.x(), 0.0f) &&
- fuzzyCompare(v.y(), 0.0f) &&
- fuzzyCompare(v.z(), 0.0f);
-}
-
-void tst_QPlane3D::create_data()
-{
- QTest::addColumn<QVector3D>("point");
- QTest::addColumn<QVector3D>("normal");
-
- // normalized vectors for the normals.
- QTest::newRow("line on x-axis from origin")
- << QVector3D()
- << QVector3D(1.0f, 0.0f, 0.0f);
-
- QTest::newRow("line paralell -z-axis from 3,3,3")
- << QVector3D(3.0f, 3.0f, 3.0f)
- << QVector3D(0.0f, 0.0f, -1.0f);
-
- QTest::newRow("vertical line (paralell to y-axis)")
- << QVector3D(0.5f, 0.0f, 0.5f)
- << QVector3D(0.0f, 1.0f, 0.0f);
-
- QTest::newRow("equidistant from all 3 axes")
- << QVector3D(0.5f, 0.0f, 0.5f)
- << QVector3D(0.57735026919f, 0.57735026919f, 0.57735026919f);
-
- // Unnormalized vectors for the normals.
- QTest::newRow("line on x-axis from origin")
- << QVector3D()
- << QVector3D(2.0f, 0.0f, 0.0f);
-
- QTest::newRow("line paralell -z-axis from 3,3,3")
- << QVector3D(3.0f, 3.0f, 3.0f)
- << QVector3D(0.0f, 0.0f, -0.7f);
-
- QTest::newRow("vertical line (paralell to y-axis)")
- << QVector3D(0.5f, 0.0f, 0.5f)
- << QVector3D(0.0f, 5.3f, 0.0f);
-
- QTest::newRow("equidistant from all 3 axes")
- << QVector3D(0.5f, 0.0f, 0.5f)
- << QVector3D(1.0f, 1.0f, 1.0f);
-
- QTest::newRow("negative direction")
- << QVector3D(-3.0f, -3.0f, -3.0f)
- << QVector3D(-1.2f, -1.8f, -2.4f);
-}
-
-void tst_QPlane3D::create()
-{
- QFETCH(QVector3D, point);
- QFETCH(QVector3D, normal);
- QPlane3D plane(point, normal);
- QVERIFY(fuzzyCompare(plane.normal(), normal));
- QVERIFY(fuzzyCompare(plane.origin(), point));
-
- QPlane3D plane2;
- QVERIFY(plane2.origin() == QVector3D(0, 0, 0));
- QVERIFY(plane2.normal() == QVector3D(1, 0, 0));
- plane2.setOrigin(point);
- plane2.setNormal(normal);
- QVERIFY(fuzzyCompare(plane2.normal(), normal));
- QVERIFY(fuzzyCompare(plane2.origin(), point));
-}
-
-void tst_QPlane3D::intersection_data()
-{
- // Line
- QTest::addColumn<QVector3D>("point1");
- QTest::addColumn<QVector3D>("direction");
-
- // Plane
- QTest::addColumn<QVector3D>("point2");
- QTest::addColumn<QVector3D>("normal");
-
- // Resulting intersection
- QTest::addColumn<QVector3D>("intersection");
-
- // These direction vectors will get normalized
- QTest::newRow("line on x-axis, plane in z-y")
- << QVector3D()
- << QVector3D(2.0f, 0.0f, 0.0f)
- << QVector3D(4.0f, 1.0f, 1.0f)
- << QVector3D(1.0f, 0.0f, 0.0f)
- << QVector3D(4.0f, 0.0f, 0.0f);
-
- QTest::newRow("line -z-axis, plane in x-y")
- << QVector3D(3.0f, 3.0f, 3.0f)
- << QVector3D(0.0f, 0.0f, -0.7f)
- << QVector3D(1.0f, 1.0f, -2.4f)
- << QVector3D(0.0f, 0.0f, -1.0f)
- << QVector3D(3.0f, 3.0f, -2.4f);
-
- QTest::newRow("line y-axis, plane in x-z")
- << QVector3D(0.5f, 0.0f, 0.5f)
- << QVector3D(0.0f, 5.3f, 0.0f)
- << QVector3D(1.5f, 0.6f, 1.5f)
- << QVector3D(0.0f, -7.2f, 0.0f)
- << QVector3D(0.5f, 0.6f, 0.5f);
-
- QTest::newRow("line equidistant from axes, plane in y-z")
- << QVector3D(0.5f, 0.0f, 0.5f)
- << QVector3D(1.0f, 1.0f, 1.0f)
- << QVector3D(5.0f, 3.0f, 3.0f)
- << QVector3D(1.0f, 1.0f, 1.0f)
- << QVector3D(3.8333332539f, 3.3333332539f, 3.8333332539f);
-
- QTest::newRow("negative direction")
- << QVector3D(-3.0f, -3.0f, -3.0f)
- << QVector3D(-1.2f, -1.8f, -2.4f)
- << QVector3D(5.0f, 3.0f, 3.0f)
- << QVector3D(1.0f, 1.0f, 1.0f)
- << QVector3D( 1.4444446564f, 3.6666665077f, 5.8888893127f);
-}
-
-void tst_QPlane3D::intersection()
-{
- QFETCH(QVector3D, point1);
- QFETCH(QVector3D, direction);
- QFETCH(QVector3D, point2);
- QFETCH(QVector3D, normal);
- QFETCH(QVector3D, intersection);
-
- QRay3D line(point1, direction);
- QPlane3D plane(point2, normal);
-
- qreal t = plane.intersection(line);
- QVERIFY(!qIsNaN(t));
- QVERIFY(fuzzyCompare(line.point(t), intersection));
- QVERIFY(plane.intersects(line));
-}
-
-void tst_QPlane3D::noIntersection_data()
-{
- QTest::addColumn<QVector3D>("point1");
- QTest::addColumn<QVector3D>("normal");
- QTest::addColumn<QVector3D>("point2");
- QTest::addColumn<QVector3D>("direction");
- QTest::addColumn<QVector3D>("intersection");
-
- // These direction vectors will get normalized
- QTest::newRow("line on x-axis, plane in z-x")
- << QVector3D()
- << QVector3D(2.0f, 0.0f, 0.0f)
- << QVector3D(4.0f, 1.0f, 1.0f)
- << QVector3D(0.0f, 1.0f, 0.0f);
-
- QTest::newRow("line -z-axis, lies on plane in z-x")
- << QVector3D(3.0f, 3.0f, 3.0f)
- << QVector3D(0.0f, 0.0f, -0.7f)
- << QVector3D(1.0f, 3.0f, 1.0f)
- << QVector3D(0.0f, -0.7f, 0.0f);
-
- QTest::newRow("line on an angle, never meets plane on angle")
- << QVector3D(3.0f, 3.0f, 3.0f)
- << QVector3D(0.1f, 0.0f, 0.0f)
- << QVector3D(1.0f, 1.0f, 3.0f)
- << QVector3D(0.0f, 1.0f, 0.0f);
-}
-
-void tst_QPlane3D::noIntersection()
-{
- QFETCH(QVector3D, point1);
- QFETCH(QVector3D, direction);
- QFETCH(QVector3D, point2);
- QFETCH(QVector3D, normal);
-
- QPlane3D plane(point1, normal);
- QRay3D line(point2, direction);
-
- qreal t = plane.intersection(line);
- QVERIFY(qIsNaN(t));
- QVERIFY(!plane.intersects(line));
-}
-
-// Find a vector that lies perpendicular to the normal, and in the plane.
-static QVector3D vectorInPlane(const QPlane3D &plane)
-{
- QVector3D v = QVector3D::crossProduct(plane.normal(), QVector3D(1, 0, 0));
- if (fuzzyIsNull(v))
- v = QVector3D::crossProduct(plane.normal(), QVector3D(0, 1, 0));
- if (fuzzyIsNull(v))
- v = QVector3D::crossProduct(plane.normal(), QVector3D(0, 0, 1));
- v = QVector3D::dotProduct(v, plane.normal()) * plane.normal() /
- plane.normal().lengthSquared();
- Q_ASSERT(fuzzyCompare(QVector3D::dotProduct(v, plane.normal()), 0.0f));
- return v;
-}
-
-void tst_QPlane3D::contains_data()
-{
- create_data();
-}
-
-void tst_QPlane3D::contains()
-{
- QFETCH(QVector3D, point);
- QFETCH(QVector3D, normal);
- QPlane3D plane(point, normal);
-
- QVERIFY(plane.contains(point));
- QVERIFY(!plane.contains(point + normal));
- QVERIFY(!plane.contains(point - normal));
-
- QVector3D v = vectorInPlane(plane);
- QVERIFY(plane.contains(QRay3D(point, v)));
- QVERIFY(plane.contains(QRay3D(point - v, v)));
- QVERIFY(!plane.contains(QRay3D(point + normal, v)));
- QVERIFY(!plane.contains(QRay3D(point, normal)));
-}
-
-void tst_QPlane3D::distanceTo_data()
-{
- create_data();
-}
-
-void tst_QPlane3D::distanceTo()
-{
- QFETCH(QVector3D, point);
- QFETCH(QVector3D, normal);
- QPlane3D plane(point, normal);
-
- QVERIFY(fuzzyCompare(plane.distanceTo(point), 0.0f));
- QVERIFY(fuzzyCompare(plane.distanceTo(point + normal), normal.length()));
- QVERIFY(fuzzyCompare(plane.distanceTo(point - normal), -normal.length()));
-
- QVector3D v = vectorInPlane(plane);
- QVERIFY(fuzzyCompare(plane.distanceTo(point + v), 0.0f));
- QVERIFY(fuzzyCompare(plane.distanceTo(point + normal + v), normal.length()));
- QVERIFY(fuzzyCompare(plane.distanceTo(point - normal + v), -normal.length()));
-}
-
-void tst_QPlane3D::compare()
-{
- QPlane3D plane1(QVector3D(10, 20, 30), QVector3D(-1, 2, 4));
- QPlane3D plane2(QVector3D(10, 20, 30), QVector3D(1, -2, -4));
- QPlane3D plane3(QVector3D(0, 20, 30), QVector3D(-1, 2, 4));
- QVERIFY(plane1 == plane1);
- QVERIFY(!(plane1 != plane1));
- QVERIFY(qFuzzyCompare(plane1, plane1));
- QVERIFY(plane1 != plane2);
- QVERIFY(!(plane1 == plane2));
- QVERIFY(!qFuzzyCompare(plane1, plane2));
- QVERIFY(plane1 != plane3);
- QVERIFY(!(plane1 == plane3));
- QVERIFY(!qFuzzyCompare(plane1, plane3));
-}
-
-void tst_QPlane3D::transform_data()
-{
- create_data();
-}
-
-void tst_QPlane3D::transform()
-{
- QFETCH(QVector3D, point);
- QFETCH(QVector3D, normal);
-
- QMatrix4x4 m;
- m.translate(-1.0f, 2.5f, 5.0f);
- m.rotate(45.0f, 1.0f, 1.0f, 1.0f);
- m.scale(23.5f);
-
- QPlane3D plane1(point, normal);
- QPlane3D plane2(plane1);
- QPlane3D plane3;
-
- plane1.transform(m);
- plane3 = plane2.transformed(m);
-
- QVERIFY(fuzzyCompare(plane1.origin(), plane3.origin()));
- QVERIFY(fuzzyCompare(plane1.normal(), plane3.normal()));
-
- QVERIFY(fuzzyCompare(plane1.origin(), m * point));
- QVERIFY(fuzzyCompare(plane1.normal(), m.mapVector(normal)));
-}
-
-void tst_QPlane3D::dataStream()
-{
-#ifndef QT_NO_DATASTREAM
- QPlane3D plane(QVector3D(1.0f, 2.0f, 3.0f),
- QVector3D(4.0f, 5.0f, 6.0f));
-
- QByteArray data;
- {
- QDataStream stream(&data, QIODevice::WriteOnly);
- stream << plane;
- }
-
- QPlane3D plane2;
- {
- QDataStream stream2(data);
- stream2 >> plane2;
- }
-
- QVERIFY(plane == plane2);
-#endif
-}
-
-class tst_QPlane3DProperties : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QPlane3D plane READ plane WRITE setPlane)
-public:
- tst_QPlane3DProperties(QObject *parent = 0) : QObject(parent) {}
-
- QPlane3D plane() const { return p; }
- void setPlane(const QPlane3D& value) { p = value; }
-
-private:
- QPlane3D p;
-};
-
-// Test getting and setting properties via the metaobject system.
-void tst_QPlane3D::properties()
-{
- tst_QPlane3DProperties obj;
-
- qRegisterMetaType<QPlane3D>();
-
- obj.setPlane(QPlane3D(QVector3D(1, 2, 3), QVector3D(4, 5, 6)));
-
- QPlane3D p = qVariantValue<QPlane3D>(obj.property("plane"));
- QCOMPARE(p.origin(), QVector3D(1, 2, 3));
- QCOMPARE(p.normal(), QVector3D(4, 5, 6));
-
- obj.setProperty("plane",
- qVariantFromValue
- (QPlane3D(QVector3D(-1, -2, -3), QVector3D(-4, -5, -6))));
-
- p = qVariantValue<QPlane3D>(obj.property("plane"));
- QCOMPARE(p.origin(), QVector3D(-1, -2, -3));
- QCOMPARE(p.normal(), QVector3D(-4, -5, -6));
-}
-
-void tst_QPlane3D::metaTypes()
-{
- int id = qMetaTypeId<QPlane3D>();
- QVERIFY(QMetaType::type("QPlane3D") == id);
- QCOMPARE(QByteArray(QMetaType::typeName(id)), QByteArray("QPlane3D"));
- QVERIFY(QMetaType::isRegistered(id));
-}
-
-QTEST_APPLESS_MAIN(tst_QPlane3D)
-
-#include "tst_qplane3d.moc"
diff --git a/tests/auto/threed/qray3d/qray3d.pro b/tests/auto/threed/qray3d/qray3d.pro
deleted file mode 100644
index ba7deee4..00000000
--- a/tests/auto/threed/qray3d/qray3d.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE = app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-SOURCES += tst_qray3d.cpp
diff --git a/tests/auto/threed/qray3d/tst_qray3d.cpp b/tests/auto/threed/qray3d/tst_qray3d.cpp
deleted file mode 100644
index 97263c99..00000000
--- a/tests/auto/threed/qray3d/tst_qray3d.cpp
+++ /dev/null
@@ -1,540 +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 <QtTest/QtTest>
-#include "qray3d.h"
-#include "../../../shared/qtest_helpers.h"
-
-class tst_QRay3D : public QObject
-{
- Q_OBJECT
-public:
- tst_QRay3D() {}
- ~tst_QRay3D() {}
-
-private slots:
- void create_data();
- void create();
- void projection_data();
- void projection();
- void point_data();
- void point();
- void contains_point_data();
- void contains_point();
- void contains_ray_data();
- void contains_ray();
- void distanceTo_data();
- void distanceTo();
- void compare();
- void dataStream();
- void transform_data();
- void transform();
- void properties();
- void metaTypes();
-};
-
-// since all calculations involved QVector3D are producing values with only
-// float precision those calculations can at best be float precision
-// if you assign the results of the calculation to a qreal then qFuzzyCompare
-// will quite happily use a much higher standard of precision than it is
-// possible to acheive - hence redefine it here to always use the float
-// Also while on the job fix the problem where a compared value happens
-// to be zero (and you cannot always predict this, and should not predict it
-// since then you produce self-fulling prophecies instead of tests).
-// In that case qFuzzyCompare has a completely strict criterion since
-// it finds the "fudge factor" by multiplying by zero...
-static inline bool fuzzyCompare(qreal p1, qreal p2)
-{
- float fac = qMin(qAbs(p1), qAbs(p2));
- return (qAbs(p1 - p2) <= (qIsNull(fac) ? 0.00001f : 0.00001f * fac));
-}
-
-static inline bool fuzzyCompare(const QVector3D &lhs, const QVector3D &rhs)
-{
- if (fuzzyCompare(lhs.x(), rhs.x()) &&
- fuzzyCompare(lhs.y(), rhs.y()) &&
- fuzzyCompare(lhs.z(), rhs.z()))
- return true;
-#ifndef QT_NO_DEBUG_STREAM
- qWarning() << "actual:" << lhs;
- qWarning() << "expected:" << rhs;
-#endif
- return false;
-}
-
-void tst_QRay3D::create_data()
-{
- QTest::addColumn<QVector3D>("point");
- QTest::addColumn<QVector3D>("direction");
-
- // normalized direction vectors
- QTest::newRow("line on x-axis from origin")
- << QVector3D()
- << QVector3D(1.0f, 0.0f, 0.0f);
-
- QTest::newRow("line parallel -z-axis from 3,3,3")
- << QVector3D(3.0f, 3.0f, 3.0f)
- << QVector3D(0.0f, 0.0f, -1.0f);
-
- QTest::newRow("vertical line (parallel to y-axis)")
- << QVector3D(0.5f, 0.0f, 0.5f)
- << QVector3D(0.0f, 1.0f, 0.0f);
-
- QTest::newRow("equidistant from all 3 axes")
- << QVector3D(0.5f, 0.0f, 0.5f)
- << QVector3D(0.57735026919f, 0.57735026919f, 0.57735026919f);
-
- // non-normalized direction vectors
- QTest::newRow("line on x-axis from origin - B")
- << QVector3D()
- << QVector3D(2.0f, 0.0f, 0.0f);
-
- QTest::newRow("line parallel -z-axis from 3,3,3 - B")
- << QVector3D(3.0f, 3.0f, 3.0f)
- << QVector3D(0.0f, 0.0f, -0.7f);
-
- QTest::newRow("vertical line (parallel to y-axis) - B")
- << QVector3D(0.5f, 0.0f, 0.5f)
- << QVector3D(0.0f, 5.3f, 0.0f);
-
- QTest::newRow("equidistant from all 3 axes - B")
- << QVector3D(0.5f, 0.0f, 0.5f)
- << QVector3D(1.0f, 1.0f, 1.0f);
-
- QTest::newRow("negative direction")
- << QVector3D(-3.0f, -3.0f, -3.0f)
- << QVector3D(-1.2f, -1.8f, -2.4f);
-}
-
-void tst_QRay3D::create()
-{
- QFETCH(QVector3D, point);
- QFETCH(QVector3D, direction);
- QRay3D ray(point, direction);
- QVERIFY(fuzzyCompare(ray.direction(), direction));
- QVERIFY(fuzzyCompare(ray.origin(), point));
-
- QRay3D ray2;
- QCOMPARE(ray2.origin(), QVector3D(0, 0, 0));
- QCOMPARE(ray2.direction(), QVector3D(1, 0, 0));
- ray2.setOrigin(point);
- ray2.setDirection(direction);
- QVERIFY(fuzzyCompare(ray.direction(), direction));
- QVERIFY(fuzzyCompare(ray.origin(), point));
-}
-
-void tst_QRay3D::projection_data()
-{
- QTest::addColumn<QVector3D>("point");
- QTest::addColumn<QVector3D>("direction");
- QTest::addColumn<QVector3D>("vector");
- QTest::addColumn<QVector3D>("expected");
-
- QTest::newRow("line on x-axis from origin")
- << QVector3D()
- << QVector3D(2.0f, 0.0f, 0.0f)
- << QVector3D(0.6f, 0.0f, 0.0f)
- << QVector3D(0.6f, 0.0f, 0.0f);
-
- QTest::newRow("line parallel -z-axis from 3,3,3")
- << QVector3D(3.0f, 3.0f, 3.0f)
- << QVector3D(0.0f, 0.0f, -0.7f)
- << QVector3D(3.0f, 3.0f, 2.4f)
- << QVector3D(0.0f, 0.0f, 2.4f);
-
- QTest::newRow("vertical line (parallel to y-axis)")
- << QVector3D(0.5f, 0.0f, 0.5f)
- << QVector3D(0.0f, 5.3f, 0.0f)
- << QVector3D(0.5f, 0.6f, 0.5f)
- << QVector3D(0.0f, 0.6f, 0.0f);
-
- QTest::newRow("equidistant from all 3 axes, project y-axis (with some z & x)")
- << QVector3D(0.5f, 0.0f, 0.5f)
- << QVector3D(1.0f, 1.0f, 1.0f)
- << QVector3D(0.5f, 5.0f, 0.5f)
- << QVector3D(2.0f, 2.0f, 2.0f);
-
- QTest::newRow("negative direction line, project +ve y-axis (with some z & x)")
- << QVector3D(-3.0f, -3.0f, -3.0f)
- << QVector3D(-1.2f, -1.8f, -2.4f)
- << QVector3D(0.5f, 5.0f, 0.5f)
- << QVector3D(1.241379261016846f, 1.862068772315979f, 2.48275852203369f);
-}
-
-void tst_QRay3D::projection()
-{
- QFETCH(QVector3D, point);
- QFETCH(QVector3D, direction);
- QFETCH(QVector3D, vector);
- QFETCH(QVector3D, expected);
- QRay3D line(point, direction);
- QVector3D result = line.project(vector);
- QVERIFY(fuzzyCompare(result, expected));
-}
-
-void tst_QRay3D::point_data()
-{
- QTest::addColumn<QVector3D>("point");
- QTest::addColumn<QVector3D>("direction");
- QTest::addColumn<QVector3D>("point_on_line_pos_0_6");
- QTest::addColumn<QVector3D>("point_on_line_neg_7_2");
-
- QTest::newRow("line on x-axis from origin")
- << QVector3D()
- << QVector3D(2.0f, 0.0f, 0.0f)
- << QVector3D(1.2f, 0.0f, 0.0f)
- << QVector3D(-14.4f, 0.0f, 0.0f);
-
- QTest::newRow("line parallel -z-axis from 3,3,3")
- << QVector3D(3.0f, 3.0f, 3.0f)
- << QVector3D(0.0f, 0.0f, -0.7f)
- << QVector3D(3.0f, 3.0f, 2.58f)
- << QVector3D(3.0f, 3.0f, 8.04f);
-
- QTest::newRow("vertical line (parallel to y-axis)")
- << QVector3D(0.5f, 0.0f, 0.5f)
- << QVector3D(0.0f, 5.3f, 0.0f)
- << QVector3D(0.5f, 3.18f, 0.5f)
- << QVector3D(0.5f, -38.16f, 0.5f);
-
- QTest::newRow("equidistant from all 3 axes")
- << QVector3D(0.5f, 0.0f, 0.5f)
- << QVector3D(1.0f, 1.0f, 1.0f)
- << QVector3D(1.1f, 0.6f, 1.1f)
- << QVector3D(-6.7f, -7.2f, -6.7f);
-
- QTest::newRow("negative direction")
- << QVector3D(-3.0f, -3.0f, -3.0f)
- << QVector3D(-1.2f, -1.8f, -2.4f)
- << QVector3D(-3.72f, -4.08f, -4.44f)
- << QVector3D(5.64f, 9.96f, 14.28f);
-}
-
-void tst_QRay3D::point()
-{
- QFETCH(QVector3D, point);
- QFETCH(QVector3D, direction);
- QFETCH(QVector3D, point_on_line_pos_0_6);
- QFETCH(QVector3D, point_on_line_neg_7_2);
- QRay3D line(point, direction);
- QVERIFY(fuzzyCompare(line.point(0.6), point_on_line_pos_0_6));
- QVERIFY(fuzzyCompare(line.point(-7.2), point_on_line_neg_7_2));
- QVERIFY(fuzzyCompare(line.fromPoint(point_on_line_pos_0_6), 0.6));
- QVERIFY(fuzzyCompare(line.fromPoint(point_on_line_neg_7_2), -7.2));
-}
-
-void tst_QRay3D::contains_point_data()
-{
- QTest::addColumn<QVector3D>("origin");
- QTest::addColumn<QVector3D>("direction");
- QTest::addColumn<QVector3D>("point");
- QTest::addColumn<bool>("contains");
-
- QTest::newRow("bogus this line with null direction")
- << QVector3D(1.0, 3.0, 3.0)
- << QVector3D(0.0, 0.0, 0.0)
- << QVector3D(1.0, 2.0, 4.0)
- << false;
-
- QTest::newRow("point at the origin")
- << QVector3D(0.0, 0.0, 0.0)
- << QVector3D(1.0, 3.0, 3.0)
- << QVector3D(0.0, 0.0, 0.0)
- << true;
-
- QTest::newRow("close to the origin")
- << QVector3D(1.0, 1.0, 1.0)
- << QVector3D(1.0, 3.0, 3.0)
- << QVector3D(1.0005, 1.0005, 1.0)
- << false;
-
- QTest::newRow("45 line line in plane x=1")
- << QVector3D(1.0, 3.0, 3.0)
- << QVector3D(0.0, -1.0, -1.0)
- << QVector3D(1.0, 4.0, 4.0)
- << true;
- {
- // This is to prove that the constructed approach give the
- // same results
- QVector3D p(1.0, 3.0, 3.0);
- QVector3D v(0.0, -1.0, -1.0);
-
- QTest::newRow("constructed 45 line line in plane x=1")
- << p
- << v
- << p + v
- << true;
- }
-
- QTest::newRow("intersection with negative s in plane z=-1")
- << QVector3D(1.0f, 2.0f, -1.0f)
- << QVector3D(1.0f, 1.0f, 0.0f)
- << QVector3D(2.0f, 1.0f, 0.0f)
- << false;
-
- QTest::newRow("45 angled line")
- << QVector3D(3.0f, 0.0f, -1.0f)
- << QVector3D(1.0f, -1.0f, 1.0f)
- << QVector3D(6.0f, -3.0f, 2.0f)
- << true;
-
- {
- QVector3D p(-10.0, 3.0, 3.0);
- QVector3D v(0.0, 20.0, -1.0);
- QTest::newRow("constructed vector close to axis")
- << p
- << v
- << p + v * 3.0
- << true;
- }
-
- {
- QVector3D p(1.0, 3.0, 3.0);
- QVector3D v(40.0, 500.0, -1.0);
- QTest::newRow("constructed larger values close to axis")
- << p
- << v
- << p + v
- << true;
- }
-}
-
-void tst_QRay3D::contains_point()
-{
- QFETCH(QVector3D, origin);
- QFETCH(QVector3D, direction);
- QFETCH(QVector3D, point);
- QFETCH(bool, contains);
-
- QRay3D line(origin, direction);
- QCOMPARE(line.contains(point), contains);
-}
-
-void tst_QRay3D::contains_ray_data()
-{
- contains_point_data();
-}
-
-void tst_QRay3D::contains_ray()
-{
- QFETCH(QVector3D, origin);
- QFETCH(QVector3D, direction);
- QFETCH(QVector3D, point);
- QFETCH(bool, contains);
-
- QRay3D line(origin, direction);
- if (contains) {
- QRay3D line2(point, direction);
- QVERIFY(line.contains(line2));
- QVERIFY(line2.contains(line));
-
- // Reversed direction is also contained.
- QRay3D line3(point, -direction);
- QVERIFY(line.contains(line2));
- QVERIFY(line2.contains(line));
-
- // Different direction.
- QRay3D line4(point, QVector3D(direction.y(), direction.x(), direction.z()));
- QVERIFY(!line.contains(line4));
- QVERIFY(!line4.contains(line));
- } else {
- QRay3D line2(point, direction);
- QVERIFY(!line.contains(line2));
- QVERIFY(!line2.contains(line));
- }
-}
-
-void tst_QRay3D::distanceTo_data()
-{
- QTest::addColumn<QVector3D>("origin");
- QTest::addColumn<QVector3D>("direction");
- QTest::addColumn<QVector3D>("point");
- QTest::addColumn<qreal>("distance");
-
- QTest::newRow("axis-x")
- << QVector3D(6.0f, 0.0f, 0.0f)
- << QVector3D(1.0f, 0.0f, 0.0f)
- << QVector3D(0.0f, 0.0f, 0.0f)
- << qreal(0.0f);
-
- QTest::newRow("axis-x to 1")
- << QVector3D(6.0f, 0.0f, 0.0f)
- << QVector3D(1.0f, 0.0f, 0.0f)
- << QVector3D(0.0f, 1.0f, 0.0f)
- << qreal(1.0f);
-
- QTest::newRow("neg-axis-y")
- << QVector3D(0.0f, 6.0f, 0.0f)
- << QVector3D(0.0f, -1.5f, 0.0f)
- << QVector3D(0.0f, 100.0f, 0.0f)
- << qreal(0.0f);
-
- QTest::newRow("neg-axis-y to 2")
- << QVector3D(0.0f, 6.0f, 0.0f)
- << QVector3D(0.0f, -1.5f, 0.0f)
- << QVector3D(2.0f, 0.0f, 0.0f)
- << qreal(2.0f);
-}
-
-void tst_QRay3D::distanceTo()
-{
- QFETCH(QVector3D, origin);
- QFETCH(QVector3D, direction);
- QFETCH(QVector3D, point);
- QFETCH(qreal, distance);
-
- QRay3D line(origin, direction);
- QCOMPARE(line.distanceTo(point), distance);
-}
-
-void tst_QRay3D::compare()
-{
- QRay3D ray1(QVector3D(10, 20, 30), QVector3D(-3, -4, -5));
- QRay3D ray2(QVector3D(10, 20, 30), QVector3D(1.5f, 2.0f, 2.5f));
- QRay3D ray3(QVector3D(0, 20, 30), QVector3D(-3, -4, -5));
- QVERIFY(ray1 == ray1);
- QVERIFY(!(ray1 != ray1));
- QVERIFY(qFuzzyCompare(ray1, ray1));
- QVERIFY(ray1 != ray2);
- QVERIFY(!(ray1 == ray2));
- QVERIFY(!qFuzzyCompare(ray1, ray2));
- QVERIFY(ray1 != ray3);
- QVERIFY(!(ray1 == ray3));
- QVERIFY(!qFuzzyCompare(ray1, ray3));
-}
-
-void tst_QRay3D::dataStream()
-{
-#ifndef QT_NO_DATASTREAM
- QRay3D ray(QVector3D(1.0f, 2.0f, 3.0f), QVector3D(4.0f, 5.0f, 6.0f));
-
- QByteArray data;
- {
- QDataStream stream(&data, QIODevice::WriteOnly);
- stream << ray;
- }
-
- QRay3D ray2;
- {
- QDataStream stream2(data);
- stream2 >> ray2;
- }
-
- QVERIFY(ray == ray2);
-#endif
-}
-
-void tst_QRay3D::transform_data()
-{
- create_data();
-}
-
-void tst_QRay3D::transform()
-{
- QFETCH(QVector3D, point);
- QFETCH(QVector3D, direction);
-
- QMatrix4x4 m;
- m.translate(-1.0f, 2.5f, 5.0f);
- m.rotate(45.0f, 1.0f, 1.0f, 1.0f);
- m.scale(23.5f);
-
- QRay3D ray1(point, direction);
- QRay3D ray2(ray1);
- QRay3D ray3;
-
- ray1.transform(m);
- ray3 = ray2.transformed(m);
-
- QCOMPARE(ray1.origin(), ray3.origin());
- QCOMPARE(ray1.direction(), ray3.direction());
-
- QCOMPARE(ray1.origin(), m * point);
- QCOMPARE(ray1.direction(), m.mapVector(direction));
-}
-
-class tst_QRay3DProperties : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QRay3D ray READ ray WRITE setRay)
-public:
- tst_QRay3DProperties(QObject *parent = 0) : QObject(parent) {}
-
- QRay3D ray() const { return r; }
- void setRay(const QRay3D& value) { r = value; }
-
-private:
- QRay3D r;
-};
-
-// Test getting and setting properties via the metaobject system.
-void tst_QRay3D::properties()
-{
- tst_QRay3DProperties obj;
-
- qRegisterMetaType<QRay3D>();
-
- obj.setRay(QRay3D(QVector3D(1, 2, 3), QVector3D(4, 5, 6)));
-
- QRay3D r = qVariantValue<QRay3D>(obj.property("ray"));
- QCOMPARE(r.origin(), QVector3D(1, 2, 3));
- QCOMPARE(r.direction(), QVector3D(4, 5, 6));
-
- obj.setProperty("ray",
- qVariantFromValue
- (QRay3D(QVector3D(-1, -2, -3), QVector3D(-4, -5, -6))));
-
- r = qVariantValue<QRay3D>(obj.property("ray"));
- QCOMPARE(r.origin(), QVector3D(-1, -2, -3));
- QCOMPARE(r.direction(), QVector3D(-4, -5, -6));
-}
-
-void tst_QRay3D::metaTypes()
-{
- int id = qMetaTypeId<QRay3D>();
- QVERIFY(QMetaType::type("QRay3D") == id);
- QCOMPARE(QByteArray(QMetaType::typeName(id)), QByteArray("QRay3D"));
- QVERIFY(QMetaType::isRegistered(id));
-}
-
-QTEST_APPLESS_MAIN(tst_QRay3D)
-
-#include "tst_qray3d.moc"
diff --git a/tests/auto/threed/qsphere3d/qsphere3d.pro b/tests/auto/threed/qsphere3d/qsphere3d.pro
deleted file mode 100644
index d758dcf1..00000000
--- a/tests/auto/threed/qsphere3d/qsphere3d.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-SOURCES += tst_qsphere3d.cpp
diff --git a/tests/auto/threed/qsphere3d/tst_qsphere3d.cpp b/tests/auto/threed/qsphere3d/tst_qsphere3d.cpp
deleted file mode 100644
index 1cea5449..00000000
--- a/tests/auto/threed/qsphere3d/tst_qsphere3d.cpp
+++ /dev/null
@@ -1,238 +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 <QtTest/QtTest>
-#include "qsphere3d.h"
-#include <QtGui/qmatrix4x4.h>
-
-class tst_QSphere3D : public QObject
-{
- Q_OBJECT
-public:
- tst_QSphere3D() {}
- ~tst_QSphere3D() {}
-
-private slots:
- void create();
- void contains_data();
- void contains();
- void compare();
- void dataStream();
- void transform();
- void properties();
- void metaTypes();
-};
-
-void tst_QSphere3D::create()
-{
- QSphere3D sphere1;
- QCOMPARE(sphere1.center(), QVector3D(0, 0, 0));
- QCOMPARE(sphere1.radius(), qreal(1.0f));
-
- QSphere3D sphere2(QVector3D(1.0, 2.5f, -4.0f), 5.25f);
- QCOMPARE(sphere2.center(), QVector3D(1.0f, 2.5f, -4.0f));
- QCOMPARE(sphere2.radius(), qreal(5.25f));
-
- sphere2.setCenter(QVector3D(-1.0, -2.5f, 4.0f));
- sphere2.setRadius(10.0f);
- QCOMPARE(sphere2.center(), QVector3D(-1.0f, -2.5f, 4.0f));
- QCOMPARE(sphere2.radius(), qreal(10.0f));
-}
-
-void tst_QSphere3D::contains_data()
-{
- QTest::addColumn<QVector3D>("center");
- QTest::addColumn<qreal>("radius");
- QTest::addColumn<QVector3D>("point");
- QTest::addColumn<bool>("contained");
-
- QTest::newRow("origin-inside")
- << QVector3D(0, 0, 0) << qreal(0)
- << QVector3D(0, 0, 0) << true;
- QTest::newRow("origin-outside")
- << QVector3D(0, 0, 0) << qreal(0)
- << QVector3D(0, 0.25f, 0) << false;
-
- QTest::newRow("general-inside")
- << QVector3D(1, 2, 3) << qreal(5)
- << QVector3D(1, 2, 3) << true;
-
- QTest::newRow("general-edge-x")
- << QVector3D(1, 2, 3) << qreal(5)
- << QVector3D(6, 2, 3) << true;
- QTest::newRow("general-edge-y")
- << QVector3D(1, 2, 3) << qreal(5)
- << QVector3D(1, -3, 3) << true;
- QTest::newRow("general-edge-z")
- << QVector3D(1, 2, 3) << qreal(5)
- << QVector3D(1, 2, 8) << true;
-
- QTest::newRow("general-outside-x")
- << QVector3D(1, 2, 3) << qreal(5)
- << QVector3D(6.25f, 2, 3) << false;
- QTest::newRow("general-outside-y")
- << QVector3D(1, 2, 3) << qreal(5)
- << QVector3D(1, -3.5f, 3) << false;
- QTest::newRow("general-outside-z")
- << QVector3D(1, 2, 3) << qreal(5)
- << QVector3D(1, 2, 8.25f) << false;
-}
-
-void tst_QSphere3D::contains()
-{
- QFETCH(QVector3D, center);
- QFETCH(qreal, radius);
- QFETCH(QVector3D, point);
- QFETCH(bool, contained);
-
- QSphere3D sphere(center, radius);
- QCOMPARE(sphere.contains(point), contained);
-}
-
-void tst_QSphere3D::compare()
-{
- QSphere3D sphere1(QVector3D(10, 20, 30), 5.25f);
- QSphere3D sphere2(QVector3D(10, 20, 30), 1.0f);
- QSphere3D sphere3(QVector3D(0, 20, 30), 5.25f);
- QVERIFY(sphere1 == sphere1);
- QVERIFY(!(sphere1 != sphere1));
- QVERIFY(qFuzzyCompare(sphere1, sphere1));
- QVERIFY(sphere1 != sphere2);
- QVERIFY(!(sphere1 == sphere2));
- QVERIFY(!qFuzzyCompare(sphere1, sphere2));
- QVERIFY(sphere1 != sphere3);
- QVERIFY(!(sphere1 == sphere3));
- QVERIFY(!qFuzzyCompare(sphere1, sphere3));
-}
-
-void tst_QSphere3D::dataStream()
-{
-#ifndef QT_NO_DATASTREAM
- QSphere3D sphere(QVector3D(1.0f, 2.0f, 3.0f), 4.0f);
-
- QByteArray data;
- {
- QDataStream stream(&data, QIODevice::WriteOnly);
- stream << sphere;
- }
-
- QSphere3D sphere2;
- {
- QDataStream stream2(data);
- stream2 >> sphere2;
- }
-
- QVERIFY(sphere == sphere2);
-#endif
-}
-
-void tst_QSphere3D::transform()
-{
- QVector3D center(1, 2, 3);
- qreal radius = 5.25f;
-
- QMatrix4x4 m;
- m.translate(-1.0f, 2.5f, 5.0f);
- m.rotate(45.0f, 1.0f, 1.0f, 1.0f);
- m.scale(23.5f);
-
- QSphere3D sphere1(center, radius);
- QSphere3D sphere2(sphere1);
- QSphere3D sphere3;
-
- sphere1.transform(m);
- sphere3 = sphere2.transformed(m);
-
- QCOMPARE(sphere1.center(), sphere3.center());
- QCOMPARE(sphere1.radius(), sphere3.radius());
-
- qreal tradius = m.mapVector(QVector3D(0, radius, 0)).length();
-
- QCOMPARE(sphere1.center(), m * center);
- QCOMPARE(float(sphere1.radius()), float(tradius));
-}
-
-class tst_QSphere3DProperties : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QSphere3D sphere READ sphere WRITE setSphere)
-public:
- tst_QSphere3DProperties(QObject *parent = 0) : QObject(parent) {}
-
- QSphere3D sphere() const { return s; }
- void setSphere(const QSphere3D& value) { s = value; }
-
-private:
- QSphere3D s;
-};
-
-// Test getting and setting properties via the metaobject system.
-void tst_QSphere3D::properties()
-{
- tst_QSphere3DProperties obj;
-
- qRegisterMetaType<QSphere3D>();
-
- obj.setSphere(QSphere3D(QVector3D(1, 2, 3), 4));
-
- QSphere3D s = qVariantValue<QSphere3D>(obj.property("sphere"));
- QCOMPARE(s.center(), QVector3D(1, 2, 3));
- QCOMPARE(s.radius(), qreal(4.0f));
-
- obj.setProperty("sphere",
- qVariantFromValue(QSphere3D(QVector3D(-1, -2, -3), -4)));
-
- s = qVariantValue<QSphere3D>(obj.property("sphere"));
- QCOMPARE(s.center(), QVector3D(-1, -2, -3));
- QCOMPARE(s.radius(), qreal(-4.0f));
-}
-
-void tst_QSphere3D::metaTypes()
-{
- int id = qMetaTypeId<QSphere3D>();
- QVERIFY(QMetaType::type("QSphere3D") == id);
- QCOMPARE(QByteArray(QMetaType::typeName(id)), QByteArray("QSphere3D"));
- QVERIFY(QMetaType::isRegistered(id));
-}
-
-QTEST_APPLESS_MAIN(tst_QSphere3D)
-
-#include "tst_qsphere3d.moc"
diff --git a/tests/auto/threed/qstereoimage/qstereoimage.pro b/tests/auto/threed/qstereoimage/qstereoimage.pro
deleted file mode 100644
index 6691805d..00000000
--- a/tests/auto/threed/qstereoimage/qstereoimage.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on
-
-INCLUDEPATH += ../../../../examples/stereophoto
-VPATH += ../../../../examples/stereophoto
-
-HEADERS += qstereoimage.h
-SOURCES += tst_qstereoimage.cpp qstereoimage.cpp
diff --git a/tests/auto/threed/qstereoimage/tst_qstereoimage.cpp b/tests/auto/threed/qstereoimage/tst_qstereoimage.cpp
deleted file mode 100644
index 72281296..00000000
--- a/tests/auto/threed/qstereoimage/tst_qstereoimage.cpp
+++ /dev/null
@@ -1,428 +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 <QtTest/QtTest>
-#include "qstereoimage.h"
-#include <QtGui/qpainter.h>
-
-class tst_QStereoImage : public QObject
-{
- Q_OBJECT
-public:
- tst_QStereoImage() {}
- ~tst_QStereoImage() {}
-
-private slots:
- void separateNonEqual_data();
- void separateNonEqual();
- void createAndConvert_data();
- void createAndConvert();
- void painting_data();
- void painting();
-
-private:
- static QImage generateImage
- (int width, int height, const QColor &color,
- QImage::Format format = QImage::Format_RGB32);
- static QImage generateStereoPair
- (int width, int height, const QColor &lcolor, const QColor &rcolor,
- QStereoImage::Layout layout = QStereoImage::LeftRight,
- QImage::Format format = QImage::Format_RGB32);
-};
-
-QImage tst_QStereoImage::generateImage
- (int width, int height, const QColor &color, QImage::Format format)
-{
- QImage image(width, height, format);
- image.fill(color.rgba());
- return image;
-}
-
-QImage tst_QStereoImage::generateStereoPair
- (int width, int height, const QColor &lcolor, const QColor &rcolor,
- QStereoImage::Layout layout, QImage::Format format)
-{
- QImage image;
- QPoint left, right;
-
- switch (layout) {
- default:
- case QStereoImage::LeftRight:
- image = QImage(width * 2, height, format);
- left = QPoint(0, 0);
- right = QPoint(width, 0);
- break;
-
- case QStereoImage::RightLeft:
- image = QImage(width * 2, height, format);
- left = QPoint(width, 0);
- right = QPoint(0, 0);
- break;
-
- case QStereoImage::TopBottom:
- image = QImage(width, height * 2, format);
- left = QPoint(0, 0);
- right = QPoint(0, height);
- break;
-
- case QStereoImage::BottomTop:
- image = QImage(width, height * 2, format);
- left = QPoint(0, height);
- right = QPoint(0, 0);
- break;
- }
-
- uint lpixel = lcolor.rgba();
- uint rpixel = rcolor.rgba();
- for (int y = 0; y < height; ++y) {
- for (int x = 0; x < width; ++x) {
- image.setPixel(x + left.x(), y + left.y(), lpixel);
- image.setPixel(x + right.x(), y + right.y(), rpixel);
- }
- }
-
- return image;
-}
-
-// Test creation of a separate image with non-equal sizes for left
-// and right images, and check that conversions do what we expect.
-void tst_QStereoImage::separateNonEqual_data()
-{
- QTest::addColumn<int>("toLayout");
-
- QTest::newRow("Separate -> LeftRight")
- << int(QStereoImage::LeftRight);
- QTest::newRow("Separate -> RightLeft")
- << int(QStereoImage::RightLeft);
- QTest::newRow("Separate -> TopBottom")
- << int(QStereoImage::TopBottom);
- QTest::newRow("Separate -> BottomTop")
- << int(QStereoImage::BottomTop);
-}
-void tst_QStereoImage::separateNonEqual()
-{
- QFETCH(int, toLayout);
-
- QStereoImage::Layout to = QStereoImage::Layout(toLayout);
-
- QStereoImage image1;
- QVERIFY(image1.isNull());
- QCOMPARE(image1.size(), QSize(0, 0));
- QCOMPARE(image1.width(), 0);
- QCOMPARE(image1.height(), 0);
- QVERIFY(image1.layout() == QStereoImage::Separate);
-
- QImage left(generateImage(120, 100, Qt::red));
- QImage right(generateImage(125, 90, Qt::blue));
-
- image1.setLeftImage(left);
-
- QVERIFY(!image1.isNull());
- QCOMPARE(image1.size(), QSize(120, 100));
- QCOMPARE(image1.width(), 120);
- QCOMPARE(image1.height(), 100);
- QVERIFY(image1.layout() == QStereoImage::Separate);
- QCOMPARE(image1.leftImage(), left);
- QVERIFY(image1.rightImage().isNull());
- QVERIFY(image1.wholeImage().isNull());
-
- QStereoImage image2(image1);
-
- image1.setRightImage(right);
-
- QVERIFY(!image1.isNull());
- QCOMPARE(image1.size(), QSize(125, 100)); // Expands to max(left,right).
- QCOMPARE(image1.width(), 125);
- QCOMPARE(image1.height(), 100);
- QVERIFY(image1.layout() == QStereoImage::Separate);
- QCOMPARE(image1.leftImage(), left);
- QCOMPARE(image1.rightImage(), right);
- QVERIFY(image1.wholeImage().isNull());
-
- QVERIFY(!image2.isNull());
- QCOMPARE(image2.size(), QSize(120, 100));
- QCOMPARE(image2.width(), 120);
- QCOMPARE(image2.height(), 100);
- QVERIFY(image2.layout() == QStereoImage::Separate);
- QCOMPARE(image2.leftImage(), left);
- QVERIFY(image2.rightImage().isNull());
- QVERIFY(image2.wholeImage().isNull());
-
- QImage wholeTo(generateStereoPair(125, 100, Qt::red, Qt::blue, to));
-
- image1.setLayout(to);
- QVERIFY(!image1.isNull());
- QCOMPARE(image1.size(), QSize(125, 100));
- QCOMPARE(image1.width(), 125);
- QCOMPARE(image1.height(), 100);
- QVERIFY(image1.layout() == to);
- QCOMPARE(image1.leftImage().size(), QSize(125, 100));
- QCOMPARE(image1.leftImage().copy(0, 0, 120, 100), left);
- QCOMPARE(image1.rightImage().size(), QSize(125, 100));
- QCOMPARE(image1.rightImage().copy(0, 0, 125, 90), right);
- QCOMPARE(image1.wholeImage().size(), wholeTo.size());
-}
-
-// Test creating stereo images in various formats and converting
-// them to all other possible formats.
-void tst_QStereoImage::createAndConvert_data()
-{
- QTest::addColumn<int>("fromLayout");
- QTest::addColumn<int>("toLayout");
-
- // Foo -> Separate is handled in createAndConvert() below, so we
- // don't need to explicitly list it here.
-
- QTest::newRow("Separate -> LeftRight")
- << int(QStereoImage::Separate)
- << int(QStereoImage::LeftRight);
- QTest::newRow("Separate -> RightLeft")
- << int(QStereoImage::Separate)
- << int(QStereoImage::RightLeft);
- QTest::newRow("Separate -> TopBottom")
- << int(QStereoImage::Separate)
- << int(QStereoImage::TopBottom);
- QTest::newRow("Separate -> BottomTop")
- << int(QStereoImage::Separate)
- << int(QStereoImage::BottomTop);
-
- QTest::newRow("LeftRight -> LeftRight")
- << int(QStereoImage::LeftRight)
- << int(QStereoImage::LeftRight);
- QTest::newRow("LeftRight -> RightLeft")
- << int(QStereoImage::LeftRight)
- << int(QStereoImage::RightLeft);
- QTest::newRow("LeftRight -> TopBottom")
- << int(QStereoImage::LeftRight)
- << int(QStereoImage::TopBottom);
- QTest::newRow("LeftRight -> BottomTop")
- << int(QStereoImage::LeftRight)
- << int(QStereoImage::BottomTop);
-
- QTest::newRow("RightLeft -> LeftRight")
- << int(QStereoImage::RightLeft)
- << int(QStereoImage::LeftRight);
- QTest::newRow("RightLeft -> RightLeft")
- << int(QStereoImage::RightLeft)
- << int(QStereoImage::RightLeft);
- QTest::newRow("RightLeft -> TopBottom")
- << int(QStereoImage::RightLeft)
- << int(QStereoImage::TopBottom);
- QTest::newRow("RightLeft -> BottomTop")
- << int(QStereoImage::RightLeft)
- << int(QStereoImage::BottomTop);
-
- QTest::newRow("TopBottom -> LeftRight")
- << int(QStereoImage::TopBottom)
- << int(QStereoImage::LeftRight);
- QTest::newRow("TopBottom -> RightLeft")
- << int(QStereoImage::TopBottom)
- << int(QStereoImage::RightLeft);
- QTest::newRow("TopBottom -> TopBottom")
- << int(QStereoImage::TopBottom)
- << int(QStereoImage::TopBottom);
- QTest::newRow("TopBottom -> BottomTop")
- << int(QStereoImage::TopBottom)
- << int(QStereoImage::BottomTop);
-
- QTest::newRow("BottomTop -> LeftRight")
- << int(QStereoImage::BottomTop)
- << int(QStereoImage::LeftRight);
- QTest::newRow("BottomTop -> RightLeft")
- << int(QStereoImage::BottomTop)
- << int(QStereoImage::RightLeft);
- QTest::newRow("BottomTop -> TopBottom")
- << int(QStereoImage::BottomTop)
- << int(QStereoImage::TopBottom);
- QTest::newRow("BottomTop -> BottomTop")
- << int(QStereoImage::BottomTop)
- << int(QStereoImage::BottomTop);
-}
-
-void tst_QStereoImage::createAndConvert()
-{
- QFETCH(int, fromLayout);
- QFETCH(int, toLayout);
-
- QStereoImage::Layout from = QStereoImage::Layout(fromLayout);
- QStereoImage::Layout to = QStereoImage::Layout(toLayout);
-
- QStereoImage image2;
-
- QStereoImage image1(QSize(120, 100), QImage::Format_RGB32, from);
- QVERIFY(!image1.isNull());
- QCOMPARE(image1.size(), QSize(120, 100));
- QCOMPARE(image1.width(), 120);
- QCOMPARE(image1.height(), 100);
- QVERIFY(image1.layout() == from);
- QCOMPARE(image1.leftImage().size(), QSize(120, 100));
- QCOMPARE(image1.rightImage().size(), QSize(120, 100));
- if (from == QStereoImage::Separate)
- QVERIFY(image1.wholeImage().isNull());
- else if (from == QStereoImage::LeftRight || from == QStereoImage::RightLeft)
- QCOMPARE(image1.wholeImage().size(), QSize(240, 100));
- else
- QCOMPARE(image1.wholeImage().size(), QSize(120, 200));
-
- QImage left(generateImage(120, 100, Qt::red));
- QImage right(generateImage(120, 100, Qt::blue));
- QImage whole(generateStereoPair(120, 100, Qt::red, Qt::blue, from));
- QImage wholeTo(generateStereoPair(120, 100, Qt::red, Qt::blue, to));
-
- image1.setLeftImage(left);
- image1.setRightImage(right);
-
- QCOMPARE(image1.leftImage(), left);
- QCOMPARE(image1.rightImage(), right);
- if (from == QStereoImage::Separate)
- QVERIFY(image1.wholeImage().isNull());
- else
- QCOMPARE(image1.wholeImage(), whole);
-
- image2 = image1;
-
- // Check separate conversion, which will also test copy-on-write.
- image1.setLayout(QStereoImage::Separate);
-
- QCOMPARE(image1.leftImage(), left);
- QCOMPARE(image1.rightImage(), right);
- QVERIFY(image1.wholeImage().isNull());
- QVERIFY(!image1.isNull());
- QCOMPARE(image1.size(), QSize(120, 100));
- QCOMPARE(image1.width(), 120);
- QCOMPARE(image1.height(), 100);
- QVERIFY(image1.layout() == QStereoImage::Separate);
-
- QVERIFY(image2.layout() == from);
-
- image2.setLayout(to);
- QVERIFY(!image2.isNull());
- QCOMPARE(image2.size(), QSize(120, 100));
- QCOMPARE(image2.width(), 120);
- QCOMPARE(image2.height(), 100);
- QVERIFY(image2.layout() == to);
- QCOMPARE(image2.leftImage(), left);
- QCOMPARE(image2.rightImage(), right);
- QCOMPARE(image2.wholeImage(), wholeTo);
-
- // Test creation with width and height instead of QSize.
- QStereoImage image3(120, 100, QImage::Format_RGB32, from);
- QVERIFY(!image3.isNull());
- QCOMPARE(image3.size(), QSize(120, 100));
- QCOMPARE(image3.width(), 120);
- QCOMPARE(image3.height(), 100);
- QVERIFY(image3.layout() == from);
- image3.setLeftImage(left);
- image3.setRightImage(right);
- QCOMPARE(image3.leftImage(), left);
- QCOMPARE(image3.rightImage(), right);
- if (from == QStereoImage::Separate)
- QVERIFY(image3.wholeImage().isNull());
- else
- QCOMPARE(image3.wholeImage(), whole);
-}
-
-// Test painting into the two halves of a stereo image.
-void tst_QStereoImage::painting_data()
-{
- QTest::addColumn<int>("layoutValue");
-
- QTest::newRow("Separate")
- << int(QStereoImage::Separate);
- QTest::newRow("LeftRight")
- << int(QStereoImage::LeftRight);
- QTest::newRow("RightLeft")
- << int(QStereoImage::RightLeft);
- QTest::newRow("TopBottom")
- << int(QStereoImage::TopBottom);
- QTest::newRow("BottomTop")
- << int(QStereoImage::BottomTop);
-}
-void tst_QStereoImage::painting()
-{
- QFETCH(int, layoutValue);
-
- QStereoImage::Layout layout = QStereoImage::Layout(layoutValue);
-
- QStereoImage image1(QSize(120, 100), QImage::Format_ARGB32, layout);
- QVERIFY(image1.layout() == layout);
-
- QImage left(generateImage(120, 100, Qt::red, QImage::Format_ARGB32));
- QImage right(generateImage(120, 100, Qt::blue, QImage::Format_ARGB32));
- QImage leftTo(generateImage(120, 100, Qt::green, QImage::Format_ARGB32));
- QImage rightTo(generateImage(120, 100, Qt::yellow, QImage::Format_ARGB32));
-
- image1.setLeftImage(left);
- image1.setRightImage(right);
-
- // Fill a rectangle that is partially out of bounds to check
- // that painting is actually being constrained by a clip region.
- QPainter leftPainter;
- image1.beginPaintingLeft(&leftPainter);
- leftPainter.fillRect(-10, -10, 600, 300, Qt::green);
- leftPainter.end();
-
- QCOMPARE(image1.leftImage(), leftTo);
- QCOMPARE(image1.rightImage(), right);
-
- QPainter rightPainter;
- image1.beginPaintingRight(&rightPainter);
- rightPainter.fillRect(-10, -10, 600, 300, Qt::yellow);
- rightPainter.end();
-
- QCOMPARE(image1.leftImage(), leftTo);
- QCOMPARE(image1.rightImage(), rightTo);
-
- // Draw the left and right halves into a different painter.
- QImage whole(generateStereoPair(120, 100, Qt::green, Qt::yellow,
- QStereoImage::LeftRight,
- QImage::Format_ARGB32));
- QImage image2(240, 100, QImage::Format_ARGB32);
- QPainter painter(&image2);
- image1.drawLeft(&painter, QRectF(0, 0, 120, 100));
- image1.drawRight(&painter, QRectF(120, 0, 120, 100));
- painter.end();
- QCOMPARE(image2, whole);
-}
-
-QTEST_APPLESS_MAIN(tst_QStereoImage)
-
-#include "tst_qstereoimage.moc"
diff --git a/tests/auto/threed/qtriangle3d/qtriangle3d.pro b/tests/auto/threed/qtriangle3d/qtriangle3d.pro
deleted file mode 100644
index 06997373..00000000
--- a/tests/auto/threed/qtriangle3d/qtriangle3d.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qtriangle3d.cpp
diff --git a/tests/auto/threed/qtriangle3d/tst_qtriangle3d.cpp b/tests/auto/threed/qtriangle3d/tst_qtriangle3d.cpp
deleted file mode 100644
index e9df6abe..00000000
--- a/tests/auto/threed/qtriangle3d/tst_qtriangle3d.cpp
+++ /dev/null
@@ -1,714 +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 <QtTest/QtTest>
-#include "qtriangle3d.h"
-#include "qplane3d.h"
-
-class tst_QTriangle3D : public QObject
-{
- Q_OBJECT
-public:
- tst_QTriangle3D() {}
- ~tst_QTriangle3D() {}
-
-private slots:
- void defaultTriangle();
-
- void create_data();
- void create();
-
- void contains_data();
- void contains();
-
- void intersect_data();
- void intersect();
-
- void uv_data();
- void uv();
-
- void transform_data();
- void transform();
-
- void compare();
-
- void dataStream();
-
- void properties();
- void metaTypes();
-};
-
-void tst_QTriangle3D::defaultTriangle()
-{
- QTriangle3D triangle;
- QCOMPARE(triangle.p(), QVector3D(0.0f, 0.0f, 0.0f));
- QCOMPARE(triangle.q(), QVector3D(1.0f, 0.0f, 0.0f));
- QCOMPARE(triangle.r(), QVector3D(0.0f, 1.0f, 0.0f));
-}
-
-void tst_QTriangle3D::create_data()
-{
- QTest::addColumn<QVector3D>("p");
- QTest::addColumn<QVector3D>("q");
- QTest::addColumn<QVector3D>("r");
- QTest::addColumn<bool>("isDegenerate");
- QTest::addColumn<QPlane3D>("plane");
- QTest::addColumn<QVector3D>("centroid");
-
- QTest::newRow("minimal at null")
- << QVector3D(0.0f, 0.0f, 0.0f) // p
- << QVector3D(0.0f, 0.0f, 0.0f) // q
- << QVector3D(0.0f, 0.0f, 0.0f) // r
- << true // degenerate
- << QPlane3D() // plane (degenerate, meaning meaningless)
- << QVector3D(0.0f, 0.0f, 0.0f);
- QTest::newRow("minimal at offset")
- << QVector3D(2.0f, 2.0f, 2.0f) // p
- << QVector3D(2.0f, 2.0f, 2.0f) // q
- << QVector3D(2.0f, 2.0f, 2.0f) // r
- << true // degenerate
- << QPlane3D() // plane (degenerate, meaning meaningless)
- << QVector3D(2.0f, 2.0f, 2.0f); // centroid
- QTest::newRow("line from 0(p) [a]")
- << QVector3D(0.0f, 0.0f, 0.0f) // p
- << QVector3D(0.0f, 0.0f, 0.5f) // q
- << QVector3D(0.0f, 0.0f, 2.0f) // r
- << true // degenerate
- << QPlane3D() // plane (degenerate, meaning meaningless)
- << QVector3D(0.0f, 0.0f, 2.5f/3.0f); // centroid
- QTest::newRow("line from 0(p) [b]")
- << QVector3D(0.0f, 0.0f, 0.0f) // p
- << QVector3D(0.0f, 0.0f, 1.0f) // q
- << QVector3D(0.0f, 0.0f, 2.0f) // r
- << true // degenerate
- << QPlane3D() // plane (degenerate, meaning meaningless)
- << QVector3D(0.0f, 0.0f, 1.0f); // centroid
- QTest::newRow("line from 0(p) [c]")
- << QVector3D(0.0f, 0.0f, 0.0f) // p
- << QVector3D(0.0f, 0.0f, 1.5f) // q
- << QVector3D(0.0f, 0.0f, 2.0f) // r
- << true // degenerate
- << QPlane3D() // plane (degenerate, meaning meaningless)
- << QVector3D(0.0f, 0.0f, 3.5f/3.0f); // centroid
- QTest::newRow("line from 0(q) [a]")
- << QVector3D(0.0f, 0.0f, 0.5f) // p
- << QVector3D(0.0f, 0.0f, 0.0f) // q
- << QVector3D(0.0f, 0.0f, 2.0f) // r
- << true // degenerate
- << QPlane3D() // plane (degenerate, meaning meaningless)
- << QVector3D(0.0f, 0.0f, 2.5f/3.0f); // centroid
- QTest::newRow("line from 0(q) [b]")
- << QVector3D(0.0f, 0.0f, 1.0f) // p
- << QVector3D(0.0f, 0.0f, 0.0f) // q
- << QVector3D(0.0f, 0.0f, 2.0f) // r
- << true // degenerate
- << QPlane3D() // plane (degenerate, meaning meaningless)
- << QVector3D(0.0f, 0.0f, 1.0f); // centroid
- QTest::newRow("line from 0(q) [c]")
- << QVector3D(0.0f, 0.0f, 1.5f) // p
- << QVector3D(0.0f, 0.0f, 0.0f) // q
- << QVector3D(0.0f, 0.0f, 2.0f) // r
- << true // degenerate
- << QPlane3D() // plane (degenerate, meaning meaningless)
- << QVector3D(0.0f, 0.0f, 3.5f/3.0f); // centroid
- QTest::newRow("line from 0(r) [a]")
- << QVector3D(0.0f, 0.0f, 0.5f) // p
- << QVector3D(0.0f, 0.0f, 2.0f) // q
- << QVector3D(0.0f, 0.0f, 0.0f) // r
- << true // degenerate
- << QPlane3D() // plane (degenerate, meaning meaningless)
- << QVector3D(0.0f, 0.0f, 2.5f/3.0f); // centroid
- QTest::newRow("line from 0(r) [b]")
- << QVector3D(0.0f, 0.0f, 1.0f) // p
- << QVector3D(0.0f, 0.0f, 2.0f) // q
- << QVector3D(0.0f, 0.0f, 0.0f) // r
- << true // degenerate
- << QPlane3D() // plane (degenerate, meaning meaningless)
- << QVector3D(0.0f, 0.0f, 1.0f); // centroid
- QTest::newRow("line from 0(r) [c]")
- << QVector3D(0.0f, 0.0f, 1.5f) // p
- << QVector3D(0.0f, 0.0f, 2.0f) // q
- << QVector3D(0.0f, 0.0f, 0.0f) // r
- << true // degenerate
- << QPlane3D() // plane (degenerate, meaning meaningless)
- << QVector3D(0.0f, 0.0f, 3.5f/3.0f); // centroid
- QTest::newRow("width 0 [a]")
- << QVector3D(0.0f, 0.0f, 2.0f) // p
- << QVector3D(0.0f, 0.0f, 2.0f) // q
- << QVector3D(0.0f, 0.0f, 0.0f) // r
- << true // degenerate
- << QPlane3D() // plane (degenerate, meaning meaningless)
- << QVector3D(0.0f, 0.0f, 4.0f/3.0f); // centroid
- QTest::newRow("width 0 [b]")
- << QVector3D(0.0f, 0.0f, 0.0f) // p
- << QVector3D(0.0f, 0.0f, 0.0f) // q
- << QVector3D(0.0f, 0.0f, 2.0f) // r
- << true // degenerate
- << QPlane3D() // plane (degenerate, meaning meaningless)
- << QVector3D(0.0f, 0.0f, 2.0f/3.0f); // centroid
- QTest::newRow("width 0 [c]")
- << QVector3D(0.0f, 0.0f, 2.0f) // p
- << QVector3D(0.0f, 0.0f, 2.0f) // q
- << QVector3D(0.0f, 0.0f, 4.0f) // r
- << true // degenerate
- << QPlane3D() // plane (degenerate, meaning meaningless)
- << QVector3D(0.0f, 0.0f, 8.0f/3.0f); // centroid
-
- /* The above only tests degenerate triangles colinear with the z axis.
- May also want to tests degenerate triangles offset from origin and
- degenerate triangles on other angles (e.g. x axis, y axis, not colinear
- with any axis)
- */
-
- QTest::newRow("simple at origin")
- << QVector3D(0.0f, 0.0f, 0.0f) // p
- << QVector3D(0.0f, 4.0f, 0.0f) // q
- << QVector3D(0.0f, 2.0f, 5.0f) // r
- << false // degenerate
- << QPlane3D(QVector3D(0.0f, 0.0f, 0.0f), QVector3D(1.0f, 0.0f, 0.0f)) // plane
- << QVector3D(0.0f, 6.0f/3.0f, 5.0f/3.0f); // centroid
-
- QTest::newRow("simple offset from origin")
- << QVector3D(1.0f, 1.0f, 0.0f) // p
- << QVector3D(1.0f, 5.0f, 0.0f) // q
- << QVector3D(1.0f, 3.0f, 5.0f) // r
- << false // degenerate
- << QPlane3D(QVector3D(1.0f, 0.0f, 0.0f), QVector3D(1.0f, 0.0f, 0.0f)) // plane
- << QVector3D(1.0f, 3.0f, 5.0f/3.0f); // centroid
-}
-
-void tst_QTriangle3D::create()
-{
- QFETCH(QVector3D, p);
- QFETCH(QVector3D, q);
- QFETCH(QVector3D, r);
- QFETCH(bool, isDegenerate);
- QFETCH(QPlane3D, plane);
- QFETCH(QVector3D, centroid);
-
- QTriangle3D triangle(p, q, r);
-
- QCOMPARE(triangle.p(), p);
- QCOMPARE(triangle.q(), q);
- QCOMPARE(triangle.r(), r);
-
- QCOMPARE(triangle.faceNormal(), QVector3D::crossProduct(q - p, r - q));
-
- if (!isDegenerate) {
- QPlane3D trianglePlane = triangle.plane();
- QVERIFY(plane.contains(trianglePlane.origin()));
- QCOMPARE(plane.normal().normalized(),
- trianglePlane.normal().normalized());
- }
- QCOMPARE(triangle.center(), centroid);
-
- QTriangle3D triangle2;
- triangle2.setP(p);
- triangle2.setQ(q);
- triangle2.setR(r);
- QCOMPARE(triangle2.p(), p);
- QCOMPARE(triangle2.q(), q);
- QCOMPARE(triangle2.r(), r);
- QVERIFY(triangle == triangle2);
-}
-
-void tst_QTriangle3D::contains_data()
-{
- QTest::addColumn<QVector3D>("p");
- QTest::addColumn<QVector3D>("q");
- QTest::addColumn<QVector3D>("r");
- QTest::addColumn<QVector3D>("point");
- QTest::addColumn<bool>("contains");
-
- QTest::newRow("minimal at null, same")
- << QVector3D(0.0f, 0.0f, 0.0f) // p
- << QVector3D(0.0f, 0.0f, 0.0f) // q
- << QVector3D(0.0f, 0.0f, 0.0f) // r
- << QVector3D(0.0f, 0.0f, 0.0f) // point
- << false; // contains
- QTest::newRow("acute at p")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(1.0f, 2.0f, 2.0f) // point
- << true; // contains
- QTest::newRow("acute at q")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(1.0f, 2.0f, 4.0f) // point
- << true; // contains
- QTest::newRow("acute at r")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(1.0f, 3.0f, 3.0f) // point
- << true; // contains
- QTest::newRow("acute at p-q")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(1.0f, 2.0f, 3.0f) // point
- << true; // contains
- QTest::newRow("acute at p-r")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(1.0f, 2.5f, 2.5f) // point
- << true; // contains
- QTest::newRow("acute at q-r")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(1.0f, 2.5f, 3.5f) // point
- << true; // contains
- QTest::newRow("acute internal")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(1.0f, 2.5f, 3.0f) // point
- << true; // contains
- QTest::newRow("acute external a")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(1.0f, 2.8f, 2.0f) // point
- << false; // contains
- QTest::newRow("acute external b")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(1.0f, 2.8f, 4.0f) // point
- << false; // contains
- QTest::newRow("acute external c")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(1.0f, 1.4f, 3.0f) // point
- << false; // contains
- QTest::newRow("acute above plane")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(1.3f, 2.5f, 3.0f) // point
- << false; // contains
- QTest::newRow("acute below plane")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(0.8f, 2.5f, 3.0f) // point
- << false; // contains
- QTest::newRow("obtuse a")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 5.0f) // r
- << QVector3D(1.0f, 2.5f, 4.8f) // point
- << false; // contains
- QTest::newRow("obtuse b")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 5.0f) // r
- << QVector3D(1.0f, 2.5f, 4.3f) // point
- << true; // contains
- QTest::newRow("obtuse c")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 5.0f) // r
- << QVector3D(1.0f, 2.5f, 4.5f) // point
- << true; // contains
- QTest::newRow("obtuse d")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 5.0f) // r
- << QVector3D(1.2f, 2.5f, 4.3f) // point
- << false; // contains
- QTest::newRow("obtuse e")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 5.0f) // r
- << QVector3D(0.8f, 2.5f, 4.3f) // point
- << false; // contains
-}
-
-void tst_QTriangle3D::contains()
-{
- QFETCH(QVector3D, p);
- QFETCH(QVector3D, q);
- QFETCH(QVector3D, r);
- QFETCH(QVector3D, point);
- QFETCH(bool, contains);
- // qDebug("Triangle: P(%0.10f, %0.10f, %0.10f) Q(%0.10f, %0.10f, %0.10f) R(%0.10f, %0.10f, %0.10f)",
- // p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z());
- // qDebug("Point: (%0.10f, %0.10f, %0.10f)", point.x(), point.y(), point.z());
- QCOMPARE(QTriangle3D(p, q, r).contains(point), contains);
-}
-
-void tst_QTriangle3D::intersect_data()
-{
- QTest::addColumn<QVector3D>("p");
- QTest::addColumn<QVector3D>("q");
- QTest::addColumn<QVector3D>("r");
- QTest::addColumn<QVector3D>("origin");
- QTest::addColumn<QVector3D>("direction");
- QTest::addColumn<QVector3D>("intersection");
- QTest::addColumn<bool>("doesIntersect");
-
- QTest::newRow("minimal at null, same")
- << QVector3D(0.0f, 0.0f, 0.0f) // p
- << QVector3D(0.0f, 0.0f, 0.0f) // q
- << QVector3D(0.0f, 0.0f, 0.0f) // r
- << QVector3D(0.0f, 0.0f, 0.0f) // origin
- << QVector3D(0.0f, 0.0f, 1.0f) // direction
- << QVector3D(0.0f, 0.0f, 0.0f) // intersection
- << false; // degenerate triangles cannot intersect
-
- /*
- lines perpendicular to triangle plane.
- */
- QTest::newRow("acute at p")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(0.0f, 2.0f, 2.0f) // origin
- << QVector3D(1.0f, 0.0f, 0.0f) // direction
- << QVector3D(1.0f, 2.0f, 2.0f) // intersection
- << true; // intersects
- QTest::newRow("acute at q")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(0.0f, 2.0f, 4.0f) // origin
- << QVector3D(1.0f, 0.0f, 0.0f) // direction
- << QVector3D(1.0f, 2.0f, 4.0f) // intersection
- << true; // intersects
- QTest::newRow("acute at r")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(0.0f, 3.0f, 3.0f) // origin
- << QVector3D(1.0f, 0.0f, 0.0f) // direction
- << QVector3D(1.0f, 3.0f, 3.0f) // intersection
- << true; // intersects
- QTest::newRow("acute at p-q")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(0.0f, 2.0f, 3.0f) // origin
- << QVector3D(1.0f, 0.0f, 0.0f) // direction
- << QVector3D(1.0f, 2.0f, 3.0f) // intersection
- << true; // intersects
- QTest::newRow("acute at p-r")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(0.0f, 2.5f, 2.5f) // origin
- << QVector3D(1.0f, 0.0f, 0.0f) // direction
- << QVector3D(1.0f, 2.5f, 2.5f) // intersection
- << true; // intersects
- QTest::newRow("acute at q-r")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(0.0f, 2.5f, 3.5f) // origin
- << QVector3D(1.0f, 0.0f, 0.0f) // direction
- << QVector3D(1.0f, 2.5f, 3.5f) // intersection
- << true; // intersects
- QTest::newRow("acute internal")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(0.0f, 2.5f, 3.0f) // origin
- << QVector3D(1.0f, 0.0f, 0.0f) // direction
- << QVector3D(1.0f, 2.5f, 3.0f) // intersection
- << true; // intersects
- QTest::newRow("acute external a")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(0.0f, 2.8f, 2.0f) // origin
- << QVector3D(1.0f, 0.0f, 0.0f) // direction
- << QVector3D(0.0f, 0.0f, 0.0f) // intersection
- << false; // intersects
- QTest::newRow("acute external b")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(0.0f, 2.8f, 4.0f) // origin
- << QVector3D(1.0f, 0.0f, 0.0f) // direction
- << QVector3D(0.0f, 0.0f, 0.0f) // intersection
- << false; // intersects
- QTest::newRow("acute external c")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 3.0f) // r
- << QVector3D(0.0f, 1.4f, 3.0f) // origin
- << QVector3D(1.0f, 0.0f, 0.0f) // direction
- << QVector3D(0.0f, 0.0f, 0.0f) // intersection
- << false; // intersects
- QTest::newRow("obtuse a")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 5.0f) // r
- << QVector3D(0.0f, 2.5f, 4.8f) // origin
- << QVector3D(1.0f, 0.0f, 0.0f) // direction
- << QVector3D(0.0f, 0.0f, 0.0f) // intersection
- << false; // intersects
- QTest::newRow("obtuse b")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 5.0f) // r
- << QVector3D(0.0f, 2.5f, 4.3f) // origin
- << QVector3D(1.0f, 0.0f, 0.0f) // direction
- << QVector3D(1.0f, 2.5f, 4.3f) // intersection
- << true; // intersects
- QTest::newRow("obtuse c")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 5.0f) // r
- << QVector3D(0.0f, 2.5f, 4.5f) // origin
- << QVector3D(1.0f, 0.0f, 0.0f) // direction
- << QVector3D(1.0f, 2.5f, 4.5f) // intersection
- << true; // intersects
-
- QTest::newRow("in-triangle-plane")
- << QVector3D(1.0f, 2.0f, 2.0f) // p
- << QVector3D(1.0f, 2.0f, 4.0f) // q
- << QVector3D(1.0f, 3.0f, 5.0f) // r
- << QVector3D(1.0f, 2.0f, 2.0f) // origin (p)
- << QVector3D(0.0f, 0.0f, 2.0f) // direction (q - p)
- << QVector3D(0.0f, 0.0f, 0.0f) // intersection
- << false; // intersects
-}
-
-void tst_QTriangle3D::intersect()
-{
- QFETCH(QVector3D, p);
- QFETCH(QVector3D, q);
- QFETCH(QVector3D, r);
- QFETCH(QVector3D, origin);
- QFETCH(QVector3D, direction);
- QFETCH(QVector3D, intersection);
- QFETCH(bool, doesIntersect);
-
- QTriangle3D triangle(p, q, r);
- QRay3D line(origin, direction);
- QCOMPARE(triangle.intersects(line), doesIntersect);
-
- qreal result = triangle.intersection(line);
- if (doesIntersect)
- QCOMPARE(line.point(result), intersection);
- else
- QVERIFY(qIsNaN(result));
-}
-
-void tst_QTriangle3D::uv_data()
-{
- contains_data();
-}
-
-void tst_QTriangle3D::uv()
-{
- QFETCH(QVector3D, p);
- QFETCH(QVector3D, q);
- QFETCH(QVector3D, r);
-
- if (p == q || p == r || q == r)
- return; // Ignore degenerate triangles for this test.
-
- QTriangle3D triangle(p, q, r);
-
- QCOMPARE(triangle.uv(p), QVector2D(1, 0));
- QCOMPARE(triangle.uv(q), QVector2D(0, 1));
- QCOMPARE(triangle.uv(r), QVector2D(0, 0));
-
- QCOMPARE(triangle.uv((p + q) / 2.0f), QVector2D(0.5f, 0.5f));
- QCOMPARE(triangle.uv((p + r) / 2.0f), QVector2D(0.5f, 0.0f));
- QCOMPARE(triangle.uv((q + r) / 2.0f), QVector2D(0.0f, 0.5f));
-
- QVector2D v1(triangle.uv((p + q + r) / 3.0f));
- QVector2D v2(1.0f / 3.0f, 1.0f / 3.0f);
- QVERIFY(qFuzzyCompare(float(v1.x()), float(v2.x())));
- QVERIFY(qFuzzyCompare(float(v1.y()), float(v2.y())));
-}
-
-void tst_QTriangle3D::transform_data()
-{
- create_data();
-}
-
-void tst_QTriangle3D::transform()
-{
- QFETCH(QVector3D, p);
- QFETCH(QVector3D, q);
- QFETCH(QVector3D, r);
-
- QMatrix4x4 m;
- m.translate(-1.0f, 2.5f, 5.0f);
- m.rotate(45.0f, 1.0f, 1.0f, 1.0f);
- m.scale(23.5f);
-
- QTriangle3D tri1(p, q, r);
- QTriangle3D tri2(tri1);
- QTriangle3D tri3;
-
- tri1.transform(m);
- tri3 = tri2.transformed(m);
-
- QCOMPARE(tri1.p(), tri3.p());
- QCOMPARE(tri1.q(), tri3.q());
- QCOMPARE(tri1.r(), tri3.r());
-
- QCOMPARE(tri1.p(), m * p);
- QCOMPARE(tri1.q(), m * q);
- QCOMPARE(tri1.r(), m * r);
-}
-
-void tst_QTriangle3D::compare()
-{
- QVector3D p1(1.0f, 2.0f, 3.0f);
- QVector3D q1(4.0f, 5.0f, 6.0f);
- QVector3D r1(7.0f, 8.0f, 9.0f);
- QVector3D p2(-1.0f, -2.0f, -3.0f);
- QVector3D q2(-4.0f, -5.0f, -6.0f);
- QVector3D r2(-7.0f, -8.0f, -9.0f);
-
- QTriangle3D tri1(p1, q1, r1);
- QTriangle3D tri2(p1, q1, r1);
- QVERIFY(tri1 == tri2);
- QVERIFY(!(tri1 != tri2));
- QVERIFY(qFuzzyCompare(tri1, tri2));
-
- QTriangle3D tri3(p2, q1, r1);
- QVERIFY(tri1 != tri3);
- QVERIFY(!(tri1 == tri3));
- QVERIFY(!qFuzzyCompare(tri1, tri3));
-
- QTriangle3D tri4(p1, q2, r1);
- QVERIFY(tri1 != tri4);
- QVERIFY(!(tri1 == tri4));
- QVERIFY(!qFuzzyCompare(tri1, tri4));
-
- QTriangle3D tri5(p1, q1, r2);
- QVERIFY(tri1 != tri5);
- QVERIFY(!(tri1 == tri5));
- QVERIFY(!qFuzzyCompare(tri1, tri5));
-
- QTriangle3D tri6(p2, q2, r2);
- QVERIFY(tri1 != tri6);
- QVERIFY(!(tri1 == tri6));
- QVERIFY(!qFuzzyCompare(tri1, tri6));
-}
-
-void tst_QTriangle3D::dataStream()
-{
-#ifndef QT_NO_DATASTREAM
- QTriangle3D triangle(QVector3D(1.0f, 2.0f, 3.0f),
- QVector3D(4.0f, 5.0f, 6.0f),
- QVector3D(7.0f, 8.0f, 9.0f));
-
- QByteArray data;
- {
- QDataStream stream(&data, QIODevice::WriteOnly);
- stream << triangle;
- }
-
- QTriangle3D triangle2;
- {
- QDataStream stream2(data);
- stream2 >> triangle2;
- }
-
- QVERIFY(triangle == triangle2);
-#endif
-}
-
-class tst_QTriangle3DProperties : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QTriangle3D triangle READ triangle WRITE setTriangle)
-public:
- tst_QTriangle3DProperties(QObject *parent = 0) : QObject(parent) {}
-
- QTriangle3D triangle() const { return t; }
- void setTriangle(const QTriangle3D& value) { t = value; }
-
-private:
- QTriangle3D t;
-};
-
-// Test getting and setting properties via the metaobject system.
-void tst_QTriangle3D::properties()
-{
- tst_QTriangle3DProperties obj;
-
- qRegisterMetaType<QTriangle3D>();
-
- obj.setTriangle(QTriangle3D(QVector3D(1, 2, 3), QVector3D(4, 5, 6),
- QVector3D(7, 8, 9)));
-
- QTriangle3D t = qVariantValue<QTriangle3D>(obj.property("triangle"));
- QCOMPARE(t.p(), QVector3D(1, 2, 3));
- QCOMPARE(t.q(), QVector3D(4, 5, 6));
- QCOMPARE(t.r(), QVector3D(7, 8, 9));
-
- obj.setProperty("triangle",
- qVariantFromValue
- (QTriangle3D(QVector3D(-1, -2, -3),
- QVector3D(-4, -5, -6),
- QVector3D(-7, -8, -9))));
-
- t = qVariantValue<QTriangle3D>(obj.property("triangle"));
- QCOMPARE(t.p(), QVector3D(-1, -2, -3));
- QCOMPARE(t.q(), QVector3D(-4, -5, -6));
- QCOMPARE(t.r(), QVector3D(-7, -8, -9));
-}
-
-void tst_QTriangle3D::metaTypes()
-{
- int id = qMetaTypeId<QTriangle3D>();
- QVERIFY(QMetaType::type("QTriangle3D") == id);
- QCOMPARE(QByteArray(QMetaType::typeName(id)), QByteArray("QTriangle3D"));
- QVERIFY(QMetaType::isRegistered(id));
-}
-
-QTEST_APPLESS_MAIN(tst_QTriangle3D)
-
-#include "tst_qtriangle3d.moc"
diff --git a/tests/auto/threed/qvectorarray/qvectorarray.pro b/tests/auto/threed/qvectorarray/qvectorarray.pro
deleted file mode 100644
index 07677159..00000000
--- a/tests/auto/threed/qvectorarray/qvectorarray.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-load(qttest_p4.prf)
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-INCLUDEPATH += ../../../shared
-SOURCES += tst_qvectorarray.cpp
diff --git a/tests/auto/threed/qvectorarray/tst_qvectorarray.cpp b/tests/auto/threed/qvectorarray/tst_qvectorarray.cpp
deleted file mode 100644
index 74c6e389..00000000
--- a/tests/auto/threed/qvectorarray/tst_qvectorarray.cpp
+++ /dev/null
@@ -1,664 +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 <QtTest/QtTest>
-#include <QtGui/qmatrix4x4.h>
-#include "qvector2darray.h"
-#include "qvector3darray.h"
-#include "qvector4darray.h"
-#include "qtest_helpers.h"
-
-class tst_QVectorArray : public QObject
-{
- Q_OBJECT
-public:
- tst_QVectorArray() {}
- ~tst_QVectorArray() {}
-
-private slots:
- void create2DArray();
- void create3DArray();
- void create4DArray();
-
- void scale_data();
- void scale();
-
- void translateVector_data();
- void translateVector();
-
- void translateExplicit_data();
- void translateExplicit();
-
- void transform();
-};
-
-void tst_QVectorArray::create2DArray()
-{
- QVector2DArray array;
- QVERIFY(array.isEmpty());
-
- array.append(1.0f, 2.0f);
- array.append(3.0f, 4.0f);
- array.append(QVector2D(5.0f, 6.0f));
- array.append(QPointF(7.0f, 8.0f));
- array.append(QPoint(9, 10));
-
- QCOMPARE(array.size(), 5);
- QVERIFY(array[0] == QVector2D(1.0f, 2.0f));
- QVERIFY(array[1] == QVector2D(3.0f, 4.0f));
- QVERIFY(array[2] == QVector2D(5.0f, 6.0f));
- QVERIFY(array[3] == QVector2D(7.0f, 8.0f));
- QVERIFY(array[4] == QVector2D(9.0f, 10.0f));
-
- array.append(QVector2D(11.0f, 12.0f), QVector2D(13.0f, 14.0f));
- array.append(QVector2D(15.0f, 16.0f), QVector2D(17.0f, 18.0f),
- QVector2D(19.0f, 20.0f));
- array.append(QVector2D(21.0f, 22.0f), QVector2D(23.0f, 24.0f),
- QVector2D(25.0f, 26.0f));
-
- for (int index = 0; index < array.size(); ++index)
- QVERIFY(array[index] == QVector2D(index * 2 + 1, index * 2 + 2));
-
- QVector2DArray array2(34);
- QCOMPARE(array2.size(), 34);
- for (int index = 0; index < array2.size(); ++index)
- QCOMPARE(array2[index], QVector2D(0.0f, 0.0f));
-
- QVector2DArray array3(15, QVector2D(1.0f, 2.0f));
- QCOMPARE(array3.size(), 15);
- for (int index = 0; index < array3.size(); ++index)
- QCOMPARE(array3[index], QVector2D(1.0f, 2.0f));
-}
-
-void tst_QVectorArray::create3DArray()
-{
- QVector3DArray array;
- QVERIFY(array.isEmpty());
-
- array.append(1.0f, 2.0f, 3.0f);
- array.append(3.0f, 4.0f, 5.0f);
- array.append(QVector3D(5.0f, 6.0f, 7.0f));
-
- QCOMPARE(array.size(), 3);
- QVERIFY(array[0] == QVector3D(1.0f, 2.0f, 3.0f));
- QVERIFY(array[1] == QVector3D(3.0f, 4.0f, 5.0f));
- QVERIFY(array[2] == QVector3D(5.0f, 6.0f, 7.0f));
-
- array.append(QVector3D(7.0f, 8.0f, 9.0f),
- QVector3D(9.0f, 10.0f, 11.0f));
- array.append(QVector3D(11.0f, 12.0f, 13.0f),
- QVector3D(13.0f, 14.0f, 15.0f),
- QVector3D(15.0f, 16.0f, 17.0f));
- array.append(QVector3D(17.0f, 18.0f, 19.0f),
- QVector3D(19.0f, 20.0f, 21.0f),
- QVector3D(21.0f, 22.0f, 23.0f));
-
- for (int index = 0; index < array.size(); ++index) {
- QVERIFY(array[index] == QVector3D(index * 2 + 1,
- index * 2 + 2,
- index * 2 + 3));
- }
-
- QVector3DArray array2(34);
- QCOMPARE(array2.size(), 34);
- for (int index = 0; index < array2.size(); ++index)
- QCOMPARE(array2[index], QVector3D(0.0f, 0.0f, 0.0f));
-
- QVector3DArray array3(15, QVector3D(1.0f, 2.0f, 3.0f));
- QCOMPARE(array3.size(), 15);
- for (int index = 0; index < array3.size(); ++index)
- QCOMPARE(array3[index], QVector3D(1.0f, 2.0f, 3.0f));
-}
-
-void tst_QVectorArray::create4DArray()
-{
- QVector4DArray array;
- QVERIFY(array.isEmpty());
-
- array.append(1.0f, 2.0f, 3.0f, 4.0f);
- array.append(3.0f, 4.0f, 5.0f, 6.0f);
- array.append(QVector4D(5.0f, 6.0f, 7.0f, 8.0f));
-
- QCOMPARE(array.size(), 3);
- QVERIFY(array[0] == QVector4D(1.0f, 2.0f, 3.0f, 4.0f));
- QVERIFY(array[1] == QVector4D(3.0f, 4.0f, 5.0f, 6.0f));
- QVERIFY(array[2] == QVector4D(5.0f, 6.0f, 7.0f, 8.0f));
-
- array.append(QVector4D(7.0f, 8.0f, 9.0f, 10.0f),
- QVector4D(9.0f, 10.0f, 11.0f, 12.0f));
- array.append(QVector4D(11.0f, 12.0f, 13.0f, 14.0f),
- QVector4D(13.0f, 14.0f, 15.0f, 16.0f),
- QVector4D(15.0f, 16.0f, 17.0f, 18.0f));
- array.append(QVector4D(17.0f, 18.0f, 19.0f, 20.0f),
- QVector4D(19.0f, 20.0f, 21.0f, 22.0f),
- QVector4D(21.0f, 22.0f, 23.0f, 24.0f));
-
- for (int index = 0; index < array.size(); ++index) {
- QVERIFY(array[index] == QVector4D(index * 2 + 1,
- index * 2 + 2,
- index * 2 + 3,
- index * 2 + 4));
- }
-
- QVector4DArray array2(34);
- QCOMPARE(array2.size(), 34);
- for (int index = 0; index < array2.size(); ++index)
- QCOMPARE(array2[index], QVector4D(0.0f, 0.0f, 0.0f, 0.0f));
-
- QVector4DArray array3(15, QVector4D(1.0f, 2.0f, 3.0f, 4.0f));
- QCOMPARE(array3.size(), 15);
- for (int index = 0; index < array3.size(); ++index)
- QCOMPARE(array3[index], QVector4D(1.0f, 2.0f, 3.0f, 4.0f));
-}
-
-void tst_QVectorArray::scale_data()
-{
- QTest::addColumn<qreal>("scale");
-
- QTest::newRow("zero") << qreal(0.0f);
- QTest::newRow("one") << qreal(1.0f);
- QTest::newRow("neg-one") << qreal(-1.0f);
- QTest::newRow("two") << qreal(2.0f);
- QTest::newRow("neg-two-point-five") << qreal(-2.5f);
- QTest::newRow("half") << qreal(0.5f);
-}
-
-void tst_QVectorArray::scale()
-{
- QFETCH(qreal, scale);
-
- QVector2DArray v2array;
- QVector3DArray v3array;
- QVector4DArray v4array;
- QVector2DArray v2arrayb;
- QVector3DArray v3arrayb;
- QVector4DArray v4arrayb;
-
- for (int index = 0; index < 64; ++index) {
- v2array.append(index * 4, index * 4 + 1);
- v3array.append(index * 4, index * 4 + 1, index * 4 + 2);
- v4array.append(index * 4, index * 4 + 1, index * 4 + 2,
- index * 4 + 3);
- v2arrayb.append(index * 4, index * 4 + 1);
- v3arrayb.append(index * 4, index * 4 + 1, index * 4 + 2);
- v4arrayb.append(index * 4, index * 4 + 1, index * 4 + 2,
- index * 4 + 3);
- }
-
- // Perform a simple in-place scale.
-
- v2array.scale(scale);
- v3array.scale(scale);
- v4array.scale(scale);
-
- QCOMPARE(v2array.size(), 64);
- QCOMPARE(v3array.size(), 64);
- QCOMPARE(v4array.size(), 64);
-
- for (int index = 0; index < 64; ++index) {
- QCOMPARE(v2array[index],
- QVector2D((index * 4) * scale, (index * 4 + 1) * scale));
- QCOMPARE(v3array[index],
- QVector3D((index * 4) * scale, (index * 4 + 1) * scale,
- (index * 4 + 2) * scale));
- QCOMPARE(v4array[index],
- QVector4D((index * 4) * scale, (index * 4 + 1) * scale,
- (index * 4 + 2) * scale, (index * 4 + 3) * scale));
- }
-
- // Increase ref-count on an array and check that detach occurs.
-
- v2array = v2arrayb;
- v3array = v3arrayb;
- v4array = v4arrayb;
-
- QVERIFY(v2array.constData() == v2arrayb.constData());
- QVERIFY(v3array.constData() == v3arrayb.constData());
- QVERIFY(v4array.constData() == v4arrayb.constData());
-
- v2array.scale(scale);
- v3array.scale(scale);
- v4array.scale(scale);
-
- QVERIFY(v2array.constData() != v2arrayb.constData());
- QVERIFY(v3array.constData() != v3arrayb.constData());
- QVERIFY(v4array.constData() != v4arrayb.constData());
-
- QCOMPARE(v2array.size(), 64);
- QCOMPARE(v3array.size(), 64);
- QCOMPARE(v4array.size(), 64);
-
- for (int index = 0; index < 64; ++index) {
- QCOMPARE(v2array[index],
- QVector2D((index * 4) * scale, (index * 4 + 1) * scale));
- QCOMPARE(v3array[index],
- QVector3D((index * 4) * scale, (index * 4 + 1) * scale,
- (index * 4 + 2) * scale));
- QCOMPARE(v4array[index],
- QVector4D((index * 4) * scale, (index * 4 + 1) * scale,
- (index * 4 + 2) * scale, (index * 4 + 3) * scale));
- QCOMPARE(v2arrayb[index],
- QVector2D(index * 4, index * 4 + 1));
- QCOMPARE(v3arrayb[index],
- QVector3D(index * 4, index * 4 + 1, index * 4 + 2));
- QCOMPARE(v4arrayb[index],
- QVector4D(index * 4, index * 4 + 1,
- index * 4 + 2, index * 4 + 3));
- }
-
- // Perform the test again, with scaled() this time.
-
- v2array = v2arrayb.scaled(scale);
- v3array = v3arrayb.scaled(scale);
- v4array = v4arrayb.scaled(scale);
-
- QCOMPARE(v2array.size(), 64);
- QCOMPARE(v3array.size(), 64);
- QCOMPARE(v4array.size(), 64);
-
- for (int index = 0; index < 64; ++index) {
- QCOMPARE(v2array[index],
- QVector2D((index * 4) * scale, (index * 4 + 1) * scale));
- QCOMPARE(v3array[index],
- QVector3D((index * 4) * scale, (index * 4 + 1) * scale,
- (index * 4 + 2) * scale));
- QCOMPARE(v4array[index],
- QVector4D((index * 4) * scale, (index * 4 + 1) * scale,
- (index * 4 + 2) * scale, (index * 4 + 3) * scale));
- QCOMPARE(v2arrayb[index],
- QVector2D(index * 4, index * 4 + 1));
- QCOMPARE(v3arrayb[index],
- QVector3D(index * 4, index * 4 + 1, index * 4 + 2));
- QCOMPARE(v4arrayb[index],
- QVector4D(index * 4, index * 4 + 1,
- index * 4 + 2, index * 4 + 3));
- }
-}
-
-void tst_QVectorArray::translateVector_data()
-{
- QTest::addColumn<QVector4D>("translation");
-
- QTest::newRow("zero") << QVector4D(0.0f, 0.0f, 0.0f, 0.0f);
- QTest::newRow("x-axis") << QVector4D(1.0f, 0.0f, 0.0f, 0.0f);
- QTest::newRow("y-axis") << QVector4D(0.0f, 1.0f, 0.0f, 0.0f);
- QTest::newRow("z-axis") << QVector4D(0.0f, 0.0f, 1.0f, 0.0f);
- QTest::newRow("w-axis") << QVector4D(0.0f, 0.0f, 0.0f, 1.0f);
- QTest::newRow("all-axes") << QVector4D(1.0f, -2.0f, 3.5f, -1.5f);
-}
-
-void tst_QVectorArray::translateVector()
-{
- QFETCH(QVector4D, translation);
-
- QVector2DArray v2array;
- QVector3DArray v3array;
- QVector4DArray v4array;
- QVector2DArray v2arrayb;
- QVector3DArray v3arrayb;
- QVector4DArray v4arrayb;
-
- for (int index = 0; index < 64; ++index) {
- v2array.append(index * 4, index * 4 + 1);
- v3array.append(index * 4, index * 4 + 1, index * 4 + 2);
- v4array.append(index * 4, index * 4 + 1, index * 4 + 2,
- index * 4 + 3);
- v2arrayb.append(index * 4, index * 4 + 1);
- v3arrayb.append(index * 4, index * 4 + 1, index * 4 + 2);
- v4arrayb.append(index * 4, index * 4 + 1, index * 4 + 2,
- index * 4 + 3);
- }
-
- // Perform a simple in-place translate.
-
- v2array.translate(translation.toVector2D());
- v3array.translate(translation.toVector3D());
- v4array.translate(translation);
-
- QCOMPARE(v2array.size(), 64);
- QCOMPARE(v3array.size(), 64);
- QCOMPARE(v4array.size(), 64);
-
- for (int index = 0; index < 64; ++index) {
- QCOMPARE(v2array[index],
- QVector2D((index * 4) + translation.x(),
- (index * 4 + 1) + translation.y()));
- QCOMPARE(v3array[index],
- QVector3D((index * 4) + translation.x(),
- (index * 4 + 1) + translation.y(),
- (index * 4 + 2) + translation.z()));
- QCOMPARE(v4array[index],
- QVector4D((index * 4) + translation.x(),
- (index * 4 + 1) + translation.y(),
- (index * 4 + 2) + translation.z(),
- (index * 4 + 3) + translation.w()));
- }
-
- // Increase ref-count on an array and check that detach occurs.
-
- v2array = v2arrayb;
- v3array = v3arrayb;
- v4array = v4arrayb;
-
- QVERIFY(v2array.constData() == v2arrayb.constData());
- QVERIFY(v3array.constData() == v3arrayb.constData());
- QVERIFY(v4array.constData() == v4arrayb.constData());
-
- v2array.translate(translation.toVector2D());
- v3array.translate(translation.toVector3D());
- v4array.translate(translation);
-
- QVERIFY(v2array.constData() != v2arrayb.constData());
- QVERIFY(v3array.constData() != v3arrayb.constData());
- QVERIFY(v4array.constData() != v4arrayb.constData());
-
- QCOMPARE(v2array.size(), 64);
- QCOMPARE(v3array.size(), 64);
- QCOMPARE(v4array.size(), 64);
-
- for (int index = 0; index < 64; ++index) {
- QCOMPARE(v2array[index],
- QVector2D((index * 4) + translation.x(),
- (index * 4 + 1) + translation.y()));
- QCOMPARE(v3array[index],
- QVector3D((index * 4) + translation.x(),
- (index * 4 + 1) + translation.y(),
- (index * 4 + 2) + translation.z()));
- QCOMPARE(v4array[index],
- QVector4D((index * 4) + translation.x(),
- (index * 4 + 1) + translation.y(),
- (index * 4 + 2) + translation.z(),
- (index * 4 + 3) + translation.w()));
- QCOMPARE(v2arrayb[index],
- QVector2D(index * 4, index * 4 + 1));
- QCOMPARE(v3arrayb[index],
- QVector3D(index * 4, index * 4 + 1, index * 4 + 2));
- QCOMPARE(v4arrayb[index],
- QVector4D(index * 4, index * 4 + 1,
- index * 4 + 2, index * 4 + 3));
- }
-
- // Perform the test again, with translated() this time.
-
- v2array = v2arrayb.translated(translation.toVector2D());
- v3array = v3arrayb.translated(translation.toVector3D());
- v4array = v4arrayb.translated(translation);
-
- QCOMPARE(v2array.size(), 64);
- QCOMPARE(v3array.size(), 64);
- QCOMPARE(v4array.size(), 64);
-
- for (int index = 0; index < 64; ++index) {
- QCOMPARE(v2array[index],
- QVector2D((index * 4) + translation.x(),
- (index * 4 + 1) + translation.y()));
- QCOMPARE(v3array[index],
- QVector3D((index * 4) + translation.x(),
- (index * 4 + 1) + translation.y(),
- (index * 4 + 2) + translation.z()));
- QCOMPARE(v4array[index],
- QVector4D((index * 4) + translation.x(),
- (index * 4 + 1) + translation.y(),
- (index * 4 + 2) + translation.z(),
- (index * 4 + 3) + translation.w()));
- QCOMPARE(v2arrayb[index],
- QVector2D(index * 4, index * 4 + 1));
- QCOMPARE(v3arrayb[index],
- QVector3D(index * 4, index * 4 + 1, index * 4 + 2));
- QCOMPARE(v4arrayb[index],
- QVector4D(index * 4, index * 4 + 1,
- index * 4 + 2, index * 4 + 3));
- }
-}
-
-void tst_QVectorArray::translateExplicit_data()
-{
- translateVector_data();
-}
-
-void tst_QVectorArray::translateExplicit()
-{
- QFETCH(QVector4D, translation);
-
- QVector2DArray v2array;
- QVector3DArray v3array;
- QVector4DArray v4array;
- QVector2DArray v2arrayb;
- QVector3DArray v3arrayb;
- QVector4DArray v4arrayb;
-
- for (int index = 0; index < 64; ++index) {
- v2array.append(index * 4, index * 4 + 1);
- v3array.append(index * 4, index * 4 + 1, index * 4 + 2);
- v4array.append(index * 4, index * 4 + 1, index * 4 + 2,
- index * 4 + 3);
- v2arrayb.append(index * 4, index * 4 + 1);
- v3arrayb.append(index * 4, index * 4 + 1, index * 4 + 2);
- v4arrayb.append(index * 4, index * 4 + 1, index * 4 + 2,
- index * 4 + 3);
- }
-
- // Perform a simple in-place translate.
-
- v2array.translate(translation.x(), translation.y());
- v3array.translate(translation.x(), translation.y(), translation.z());
- v4array.translate(translation.x(), translation.y(),
- translation.z(), translation.w());
-
- QCOMPARE(v2array.size(), 64);
- QCOMPARE(v3array.size(), 64);
- QCOMPARE(v4array.size(), 64);
-
- for (int index = 0; index < 64; ++index) {
- QCOMPARE(v2array[index],
- QVector2D((index * 4) + translation.x(),
- (index * 4 + 1) + translation.y()));
- QCOMPARE(v3array[index],
- QVector3D((index * 4) + translation.x(),
- (index * 4 + 1) + translation.y(),
- (index * 4 + 2) + translation.z()));
- QCOMPARE(v4array[index],
- QVector4D((index * 4) + translation.x(),
- (index * 4 + 1) + translation.y(),
- (index * 4 + 2) + translation.z(),
- (index * 4 + 3) + translation.w()));
- }
-
- // Perform the test again, with translated() this time.
-
- v2array = v2arrayb.translated(translation.x(), translation.y());
- v3array = v3arrayb.translated(translation.x(), translation.y(),
- translation.z());
- v4array = v4arrayb.translated(translation.x(), translation.y(),
- translation.z(), translation.w());
-
- QCOMPARE(v2array.size(), 64);
- QCOMPARE(v3array.size(), 64);
- QCOMPARE(v4array.size(), 64);
-
- for (int index = 0; index < 64; ++index) {
- QCOMPARE(v2array[index],
- QVector2D((index * 4) + translation.x(),
- (index * 4 + 1) + translation.y()));
- QCOMPARE(v3array[index],
- QVector3D((index * 4) + translation.x(),
- (index * 4 + 1) + translation.y(),
- (index * 4 + 2) + translation.z()));
- QCOMPARE(v4array[index],
- QVector4D((index * 4) + translation.x(),
- (index * 4 + 1) + translation.y(),
- (index * 4 + 2) + translation.z(),
- (index * 4 + 3) + translation.w()));
- QCOMPARE(v2arrayb[index],
- QVector2D(index * 4, index * 4 + 1));
- QCOMPARE(v3arrayb[index],
- QVector3D(index * 4, index * 4 + 1, index * 4 + 2));
- QCOMPARE(v4arrayb[index],
- QVector4D(index * 4, index * 4 + 1,
- index * 4 + 2, index * 4 + 3));
- }
-}
-
-static bool fuzzyCompare(const QVector2D &v1, const QVector2D &v2)
-{
- return qAbs(v1.x() - v2.x()) <= 0.00001 &&
- qAbs(v1.y() - v2.y()) <= 0.00001;
-}
-
-static bool fuzzyCompare(const QVector3D &v1, const QVector3D &v2)
-{
- return qAbs(v1.x() - v2.x()) <= 0.00001 &&
- qAbs(v1.y() - v2.y()) <= 0.00001 &&
- qAbs(v1.z() - v2.z()) <= 0.00001;
-}
-
-static bool fuzzyCompare(const QVector4D &v1, const QVector4D &v2)
-{
- return qAbs(v1.x() - v2.x()) <= 0.00001 &&
- qAbs(v1.y() - v2.y()) <= 0.00001 &&
- qAbs(v1.z() - v2.z()) <= 0.00001 &&
- qAbs(v1.w() - v2.w()) <= 0.00001;
-}
-
-void tst_QVectorArray::transform()
-{
- QMatrix4x4 m;
- m.translate(-1.0f, 2.5f, 5.0f);
- m.rotate(45.0f, 1.0f, 1.0f, 1.0f);
- m.scale(23.5f);
-
- QVector2DArray v2array;
- QVector3DArray v3array;
- QVector4DArray v4array;
- QVector2DArray v2arrayb;
- QVector3DArray v3arrayb;
- QVector4DArray v4arrayb;
-
- for (int index = 0; index < 64; ++index) {
- v2array.append(index * 4, index * 4 + 1);
- v3array.append(index * 4, index * 4 + 1, index * 4 + 2);
- v4array.append(index * 4, index * 4 + 1, index * 4 + 2,
- index * 4 + 3);
- v2arrayb.append(index * 4, index * 4 + 1);
- v3arrayb.append(index * 4, index * 4 + 1, index * 4 + 2);
- v4arrayb.append(index * 4, index * 4 + 1, index * 4 + 2,
- index * 4 + 3);
- }
-
- // Perform a simple in-place transform.
-
- v2array.transform(m);
- v3array.transform(m);
- v4array.transform(m);
-
- QCOMPARE(v2array.size(), 64);
- QCOMPARE(v3array.size(), 64);
- QCOMPARE(v4array.size(), 64);
-
- for (int index = 0; index < 64; ++index) {
- QVector2D v2(index * 4, index * 4 + 1);
- QVector3D v3(index * 4, index * 4 + 1, index * 4 + 2);
- QVector4D v4(index * 4, index * 4 + 1, index * 4 + 2, index * 4 + 3);
- QVERIFY(fuzzyCompare(v2array[index], (m * QVector3D(v2)).toVector2D()));
- QVERIFY(fuzzyCompare(v3array[index], m * v3));
- QVERIFY(fuzzyCompare(v4array[index], m * v4));
- }
-
- // Increase ref-count on an array and check that detach occurs.
-
- v2array = v2arrayb;
- v3array = v3arrayb;
- v4array = v4arrayb;
-
- QVERIFY(v2array.constData() == v2arrayb.constData());
- QVERIFY(v3array.constData() == v3arrayb.constData());
- QVERIFY(v4array.constData() == v4arrayb.constData());
-
- v2array.transform(m);
- v3array.transform(m);
- v4array.transform(m);
-
- QVERIFY(v2array.constData() != v2arrayb.constData());
- QVERIFY(v3array.constData() != v3arrayb.constData());
- QVERIFY(v4array.constData() != v4arrayb.constData());
-
- QCOMPARE(v2array.size(), 64);
- QCOMPARE(v3array.size(), 64);
- QCOMPARE(v4array.size(), 64);
-
- for (int index = 0; index < 64; ++index) {
- QVector2D v2(index * 4, index * 4 + 1);
- QVector3D v3(index * 4, index * 4 + 1, index * 4 + 2);
- QVector4D v4(index * 4, index * 4 + 1, index * 4 + 2, index * 4 + 3);
- QVERIFY(fuzzyCompare(v2array[index], (m * QVector3D(v2)).toVector2D()));
- QVERIFY(fuzzyCompare(v3array[index], m * v3));
- QVERIFY(fuzzyCompare(v4array[index], m * v4));
- QVERIFY(fuzzyCompare(v2arrayb[index], v2));
- QVERIFY(fuzzyCompare(v3arrayb[index], v3));
- QVERIFY(fuzzyCompare(v4arrayb[index], v4));
- }
-
- // Perform the test again, with translated() this time.
-
- v2array = v2arrayb.transformed(m);
- v3array = v3arrayb.transformed(m);
- v4array = v4arrayb.transformed(m);
-
- QCOMPARE(v2array.size(), 64);
- QCOMPARE(v3array.size(), 64);
- QCOMPARE(v4array.size(), 64);
-
- for (int index = 0; index < 64; ++index) {
- QVector2D v2(index * 4, index * 4 + 1);
- QVector3D v3(index * 4, index * 4 + 1, index * 4 + 2);
- QVector4D v4(index * 4, index * 4 + 1, index * 4 + 2, index * 4 + 3);
- QVERIFY(fuzzyCompare(v2array[index], (m * QVector3D(v2)).toVector2D()));
- QVERIFY(fuzzyCompare(v3array[index], m * v3));
- QVERIFY(fuzzyCompare(v4array[index], m * v4));
- QVERIFY(fuzzyCompare(v2arrayb[index], v2));
- QVERIFY(fuzzyCompare(v3arrayb[index], v3));
- QVERIFY(fuzzyCompare(v4arrayb[index], v4));
- }
-}
-
-QTEST_APPLESS_MAIN(tst_QVectorArray)
-
-#include "tst_qvectorarray.moc"
diff --git a/tests/auto/threed/threed.pro b/tests/auto/threed/threed.pro
deleted file mode 100644
index 7e029ae1..00000000
--- a/tests/auto/threed/threed.pro
+++ /dev/null
@@ -1,40 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS = \
- qareaallocator \
- qarray \
- qbox3d \
- qcolor4ub \
- qcustomdataarray \
- qgeometrydata \
- qglabstractsurface \
- qglattributedescription \
- qglattributeset \
- qglattributevalue \
- qglbezierpatches \
- qglbuilder \
- qglcamera \
- qglcameraanimation \
- qglcube \
- qglindexbuffer \
- qgllightmodel \
- qgllightparameters \
- qglmaterial \
- qglmaterialcollection \
- qglpainter \
- qglpickcolors \
- qglrender \
- qglscenenode \
- qglsection \
- qglsharedresource \
- qglsphere \
- qglvertexbundle \
- qgraphicstransform3d \
- qopenglfunctions \
- qplane3d \
- qray3d \
- qglcylinder \
- qsphere3d \
- qtriangle3d \
- qvectorarray \
- load_model \
- qglcolladafxeffectfactory
diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro
deleted file mode 100644
index 6c00e7ae..00000000
--- a/tests/benchmarks/benchmarks.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS = qarray \
- qglbuilder_perf
-contains(QT_CONFIG, declarative):SUBDIRS += matrix_properties
diff --git a/tests/benchmarks/matrix_properties/data/CustomObject.qml b/tests/benchmarks/matrix_properties/data/CustomObject.qml
deleted file mode 100644
index 1fa2c474..00000000
--- a/tests/benchmarks/matrix_properties/data/CustomObject.qml
+++ /dev/null
@@ -1,46 +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 Qt 4.7
-
-QtObject {
- property variant variantProp: 0
-}
diff --git a/tests/benchmarks/matrix_properties/data/matrix_component.qml b/tests/benchmarks/matrix_properties/data/matrix_component.qml
deleted file mode 100644
index 4611ca1b..00000000
--- a/tests/benchmarks/matrix_properties/data/matrix_component.qml
+++ /dev/null
@@ -1,171 +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 Qt 4.7
-import Qt3D 1.0
-
-Item {
- CustomObject { id: theObject }
- property real scaleX : 1.0
- property real scaleY : 1.0
- property real scaleZ : 1.0
- property real translationX : 1.0
- property real translationY : 1.0
- property real translationZ : 1.0
- property real unboundReal : 1.0
-
- property real variableBoundToMatrix : 1.0
- property real variableBoundToVariantList : 1.0
-
- property variant matrixWithBoundVariable : Qt3D.matrix4x4 (
- 1.0, 0.0, 0.0, variableBoundToMatrix,
- 0.0, 1.0, 0.0, 1.0,
- 0.0, 0.0, 1.0, 1.0,
- 0.0, 0.0, 0.0, 1.0 );
-
- property variant variantListWithBoundVariable : [
- 1.0, 0.0, 0.0, variableBoundToVariantList,
- 0.0, 1.0, 0.0, 0.0,
- 0.0, 0.0, 1.0, 0.0,
- 0.0, 0.0, 0.0, 1.0 ];
-
-
- function createMatrix4x4WithConstants()
- {
- theObject.variantProp = 0;
- for (var i = 0; i < 1000; ++i)
- theObject.variantProp = Qt3d.matrix4x4(
- 1.0, 0.0, 0.0, 0.0,
- 0.0, 1.0, 0.0, 0.0,
- 0.0, 0.0, 1.0, 0.0,
- 0.0, 0.0, 0.0, 1.0 );
- }
-
- function createOneMatrix4x4WithConstants()
- {
- theObject.variantProp = 0;
- theObject.variantProp = Qt3d.matrix4x4(
- 1.0, 0.0, 0.0, 0.0,
- 0.0, 1.0, 0.0, 0.0,
- 0.0, 0.0, 1.0, 0.0,
- 0.0, 0.0, 0.0, 1.0 );
- }
-
- function createMatrix4x4WithVariables()
- {
- theObject.variantProp = 0;
- for (var i = 0; i < 1000; ++i)
- theObject.variantProp = Qt3d.matrix4x4 (
- scaleX, 0.0, 0.0, translationX,
- 0.0, scaleY, 0.0, translationY,
- 0.0, 0.0, scaleY, translationZ,
- 0.0, 0.0, 0.0, 1.0 );
- }
-
- function createOneMatrix4x4WithVariables()
- {
- theObject.variantProp = 0;
- theObject.variantProp = Qt3d.matrix4x4 (
- scaleX, 0.0, 0.0, translationX,
- 0.0, scaleY, 0.0, translationY,
- 0.0, 0.0, scaleY, translationZ,
- 0.0, 0.0, 0.0, 1.0 );
- }
-
- function createVariantListWithConstants()
- {
- theObject.variantProp = 0;
- for (var i = 0; i < 1000; ++i)
- theObject.variantProp = [
- 1.0, 0.0, 0.0, 0.0,
- 0.0, 1.0, 0.0, 0.0,
- 0.0, 0.0, 1.0, 0.0,
- 0.0, 0.0, 0.0, 1.0 ];
- }
-
- function createOneVariantListWithConstants()
- {
- theObject.variantProp = 0;
- theObject.variantProp = [
- 1.0, 0.0, 0.0, 0.0,
- 0.0, 1.0, 0.0, 0.0,
- 0.0, 0.0, 1.0, 0.0,
- 0.0, 0.0, 0.0, 1.0 ];
- }
-
- function createVariantListWithVariables() {
- theObject.variantProp = 0;
- for (var i = 0; i < 1000; ++i)
- theObject.variantProp = [
- scalex, 0.0, 0.0, translationX,
- 0.0, scaley, 0.0, translationY,
- 0.0, 0.0, scalez, translationZ,
- 0.0, 0.0, 0.0, 1.0 ];
- }
-
- function createOneVariantListWithVariables() {
- theObject.variantProp = 0;
- theObject.variantProp = [
- scalex, 0.0, 0.0, translationX,
- 0.0, scaley, 0.0, translationY,
- 0.0, 0.0, scalez, translationZ,
- 0.0, 0.0, 0.0, 1.0 ];
- }
-
- function modifyMatrix4x4() {
- for (var i = 0; i < 1000; ++i)
- theObject.variantProp.m(2,3) = 1.0;
- }
-
- function modifyVariantList() {
- for (var i = 0; i < 1000; ++i)
- theObject.variantProp[4] = 2.0;
- }
-
- function modifyBoundVariable() {
- translationX += 0.1;
- }
-
- function modifyUnboundVariable() {
- unboundReal += 0.1;
- }
-
-}
diff --git a/tests/benchmarks/matrix_properties/matrix_properties.pro b/tests/benchmarks/matrix_properties/matrix_properties.pro
deleted file mode 100644
index ac490f37..00000000
--- a/tests/benchmarks/matrix_properties/matrix_properties.pro
+++ /dev/null
@@ -1,18 +0,0 @@
-TEMPLATE = app
-TARGET = tst_matrix_properties
-QT += declarative script testlib
-macx:CONFIG -= app_bundle
-
-SOURCES += tst_matrix_properties.cpp
-
-symbian* {
- data.sources = data/*
- data.path = data
- DEPLOYMENT += data
-} else {
- DEFINES += SRCDIR=\\\"$$PWD\\\"
-}
-
-
-
-
diff --git a/tests/benchmarks/matrix_properties/tst_matrix_properties.cpp b/tests/benchmarks/matrix_properties/tst_matrix_properties.cpp
deleted file mode 100644
index 98f4983b..00000000
--- a/tests/benchmarks/matrix_properties/tst_matrix_properties.cpp
+++ /dev/null
@@ -1,183 +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 <QtTest/QtTest>
-#include <QDeclarativeEngine>
-#include <QDeclarativeComponent>
-
-#ifdef Q_OS_SYMBIAN
-// In Symbian OS test data is located in applications private dir
-// Application private dir is default search path for files, so SRCDIR can be set to empty
-#define SRCDIR "."
-#endif
-
-class tst_matrix_properties : public QObject
-{
- Q_OBJECT
-public:
- tst_matrix_properties() {}
-
-private slots:
- void initTestCase();
-
- void create_data();
- void create();
-
- void modify_data();
- void modify();
-
- void boundVariableChange_data();
- void boundVariableChange();
-
-// TODO:
-// void assign();
-
-private:
-};
-
-inline QUrl TEST_FILE(const char *filename)
-{
- return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + QLatin1String(filename));
-}
-
-void tst_matrix_properties::initTestCase()
-{
-}
-
-void tst_matrix_properties::create_data()
-{
- QTest::addColumn<QString>("methodName");
- QTest::newRow("createMatrix4x4WithConstants") << "createMatrix4x4WithConstants()";
- QTest::newRow("createMatrix4x4WithVariables") << "createMatrix4x4WithVariables()";
- QTest::newRow("createVariantListWithConstants") << "createVariantListWithConstants()";
- QTest::newRow("createVariantListWithVariables") << "createVariantListWithVariables()";
-}
-
-void tst_matrix_properties::create()
-{
- QFETCH(QString, methodName);
- QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, TEST_FILE("matrix_component.qml"));
- QObject *item = component.create();
-
- QVERIFY(item != 0);
-
- int index = item->metaObject()->indexOfMethod(methodName.toUtf8().constData());
- QVERIFY(index != -1);
- QMetaMethod method = item->metaObject()->method(index);
-
- QBENCHMARK {
- method.invoke(item, Qt::DirectConnection);
- }
-
- delete item;
-}
-
-void tst_matrix_properties::modify_data()
-{
- QTest::addColumn<QString>("initMethodName");
- QTest::addColumn<QString>("methodName");
- QTest::newRow("modifyMatrix4x4") << "createOneMatrix4x4WithConstants()"
- << "modifyMatrix4x4()";
- QTest::newRow("modifyVariantList") << "createOneVariantListWithConstants()"
- << "modifyVariantList()";
-}
-
-void tst_matrix_properties::modify()
-{
- QFETCH(QString, initMethodName);
- QFETCH(QString, methodName);
- QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, TEST_FILE("matrix_component.qml"));
- QObject *item = component.create();
-
- QVERIFY(item != 0);
-
- // Set the test property to a matrix or variantlist as appropriate.
- int index = item->metaObject()->indexOfMethod(initMethodName.toUtf8().constData());
- QVERIFY(index != -1);
- QMetaMethod method = item->metaObject()->method(index);
- method.invoke(item, Qt::DirectConnection);
-
- index = item->metaObject()->indexOfMethod(methodName.toUtf8().constData());
- QVERIFY(index != -1);
- method = item->metaObject()->method(index);
-
- QBENCHMARK {
- method.invoke(item, Qt::DirectConnection);
- }
-
- delete item;
-}
-
-void tst_matrix_properties::boundVariableChange_data()
-{
- QTest::addColumn<QString>("propertyName");
- QTest::newRow("UnboundVariable")
- << "unboundReal";
- QTest::newRow("BoundOnMatrix")
- << "variableBoundToMatrix";
- QTest::newRow("BoundOnVariantList")
- << "variableBoundToVariantList";
-}
-
-void tst_matrix_properties::boundVariableChange()
-{
- QFETCH(QString, propertyName);
- QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, TEST_FILE("matrix_component.qml"));
- QObject *item = component.create();
-
- QVERIFY(item != 0);
-
- QByteArray propertyNameByteArray = propertyName.toUtf8().constData();
- qreal value = 1.0;
-
- QBENCHMARK {
- item->setProperty(propertyNameByteArray.constData(), (value += 0.1));
- }
-
- delete item;
-}
-
-QTEST_MAIN(tst_matrix_properties)
-
-#include "tst_matrix_properties.moc"
diff --git a/tests/benchmarks/qarray/qarray.pro b/tests/benchmarks/qarray/qarray.pro
deleted file mode 100644
index c237dde4..00000000
--- a/tests/benchmarks/qarray/qarray.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qarray.cpp
diff --git a/tests/benchmarks/qarray/tst_qarray.cpp b/tests/benchmarks/qarray/tst_qarray.cpp
deleted file mode 100644
index a304eae6..00000000
--- a/tests/benchmarks/qarray/tst_qarray.cpp
+++ /dev/null
@@ -1,503 +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 <QtTest/QtTest>
-#include <QtGui/qvector3d.h>
-#include <QtCore/qvarlengtharray.h>
-#include <QtCore/qvector.h>
-#include <QtCore/qlist.h>
-#include "qarray.h"
-#ifndef QT_NO_STL
-#include <vector>
-#endif
-
-//#define TEST_QLIST 1
-
-class tst_QArray : public QObject
-{
- Q_OBJECT
-public:
- tst_QArray() {}
- virtual ~tst_QArray() {}
-
-private slots:
- void append_data();
- void append();
- void appendReserved_data();
- void appendReserved();
- void appendVector3D_data();
- void appendVector3D();
- void appendSmall_data();
- void appendSmall();
- void appendFourAtATime_data();
- void appendFourAtATime();
- void clear_data();
- void clear();
- void randomAccess_data();
- void randomAccess();
-};
-
-enum {
- Test_Vector,
- Test_List,
- Test_VarLengthArray,
- Test_Array,
- Test_STLVector
-};
-
-void tst_QArray::append_data()
-{
- QTest::addColumn<int>("size");
- QTest::addColumn<int>("type");
-
- QByteArray name;
- for (int size = 0; size < 1024; size += 12) {
- name = "QVector--";
- name += QByteArray::number(size);
- QTest::newRow(name.constData()) << size << int(Test_Vector);
-
-#if TEST_QLIST
- name = "QList--";
- name += QByteArray::number(size);
- QTest::newRow(name.constData()) << size << int(Test_List);
-#endif
-
- name = "QVarLengthArray--";
- name += QByteArray::number(size);
- QTest::newRow(name.constData()) << size << int(Test_VarLengthArray);
-
- name = "QArray--";
- name += QByteArray::number(size);
- QTest::newRow(name.constData()) << size << int(Test_Array);
-
-#ifndef QT_NO_STL
- name = "std::vector--";
- name += QByteArray::number(size);
- QTest::newRow(name.constData()) << size << int(Test_STLVector);
-#endif
- }
-}
-
-void tst_QArray::append()
-{
- QFETCH(int, size);
- QFETCH(int, type);
-
- if (type == Test_Vector) {
- QVector<float> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.append(float(i));
- }
- } else if (type == Test_List) {
- QList<float> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.append(float(i));
- }
- } else if (type == Test_VarLengthArray) {
- QVarLengthArray<float> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.append(float(i));
- }
- } else if (type == Test_Array) {
- QArray<float> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.append(float(i));
- }
-#ifndef QT_NO_STL
- } else if (type == Test_STLVector) {
- std::vector<float> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.push_back(float(i));
- }
-#endif
- }
-}
-
-void tst_QArray::appendReserved_data()
-{
- append_data();
-}
-
-void tst_QArray::appendReserved()
-{
- QFETCH(int, size);
- QFETCH(int, type);
-
- if (type == Test_Vector) {
- QVector<float> buffer;
- buffer.reserve(size);
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.append(float(i));
- }
- } else if (type == Test_List) {
- QList<float> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.append(float(i));
- }
- } else if (type == Test_VarLengthArray) {
- QVarLengthArray<float> buffer;
- buffer.reserve(size);
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.append(float(i));
- }
- } else if (type == Test_Array) {
- QArray<float> buffer;
- buffer.reserve(size);
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.append(float(i));
- }
-#ifndef QT_NO_STL
- } else if (type == Test_STLVector) {
- std::vector<float> buffer;
- buffer.reserve(size);
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.push_back(float(i));
- }
-#endif
- }
-}
-
-void tst_QArray::appendVector3D_data()
-{
- append_data();
-}
-
-void tst_QArray::appendVector3D()
-{
- QFETCH(int, size);
- QFETCH(int, type);
-
- if (type == Test_Vector) {
- QVector<QVector3D> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.append(QVector3D(i, i + 1, i + 2));
- }
- } else if (type == Test_List) {
- QList<QVector3D> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.append(QVector3D(i, i + 1, i + 2));
- }
- } else if (type == Test_VarLengthArray) {
- QVarLengthArray<QVector3D> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.append(QVector3D(i, i + 1, i + 2));
- }
- } else if (type == Test_Array) {
- QArray<QVector3D> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.append(QVector3D(i, i + 1, i + 2));
- }
-#ifndef QT_NO_STL
- } else if (type == Test_STLVector) {
- std::vector<QVector3D> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.push_back(QVector3D(i, i + 1, i + 2));
- }
-#endif
- }
-}
-
-void tst_QArray::appendSmall_data()
-{
- QTest::addColumn<int>("size");
- QTest::addColumn<int>("type");
-
- QByteArray name;
- for (int size = 0; size < 16; ++size) {
- name = "QVector--";
- name += QByteArray::number(size);
- QTest::newRow(name.constData()) << size << int(Test_Vector);
-
-#if TEST_QLIST
- name = "QList--";
- name += QByteArray::number(size);
- QTest::newRow(name.constData()) << size << int(Test_List);
-#endif
-
- name = "QVarLengthArray--";
- name += QByteArray::number(size);
- QTest::newRow(name.constData()) << size << int(Test_VarLengthArray);
-
- name = "QArray--";
- name += QByteArray::number(size);
- QTest::newRow(name.constData()) << size << int(Test_Array);
-
-#ifndef QT_NO_STL
- name = "std::vector--";
- name += QByteArray::number(size);
- QTest::newRow(name.constData()) << size << int(Test_STLVector);
-#endif
- }
-}
-
-void tst_QArray::appendSmall()
-{
- append();
-}
-
-void tst_QArray::appendFourAtATime_data()
-{
- append_data();
-}
-
-void tst_QArray::appendFourAtATime()
-{
- QFETCH(int, size);
- QFETCH(int, type);
-
- if (type == Test_Vector) {
- QVector<float> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; i += 4) {
- buffer.append(float(i));
- buffer.append(float(i + 1));
- buffer.append(float(i + 2));
- buffer.append(float(i + 3));
- }
- }
- } else if (type == Test_List) {
- QList<float> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; i += 4) {
- buffer.append(float(i));
- buffer.append(float(i + 1));
- buffer.append(float(i + 2));
- buffer.append(float(i + 3));
- }
- }
- } else if (type == Test_VarLengthArray) {
- QVarLengthArray<float> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; i += 4) {
- buffer.append(float(i));
- buffer.append(float(i + 1));
- buffer.append(float(i + 2));
- buffer.append(float(i + 3));
- }
- }
- } else if (type == Test_Array) {
- QArray<float> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; i += 4) {
- buffer.append(float(i), float(i + 1),
- float(i + 2), float(i + 3));
- }
- }
-#ifndef QT_NO_STL
- } else if (type == Test_STLVector) {
- std::vector<float> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; i += 4) {
- buffer.push_back(float(i));
- buffer.push_back(float(i + 1));
- buffer.push_back(float(i + 2));
- buffer.push_back(float(i + 3));
- }
- }
-#endif
- }
-}
-
-void tst_QArray::clear_data()
-{
- append_data();
-}
-
-void tst_QArray::clear()
-{
- QFETCH(int, size);
- QFETCH(int, type);
-
- if (type == Test_Vector) {
- QVector<float> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.append(float(i));
- buffer.clear();
- for (int i = 0; i < size; ++i)
- buffer.append(float(i));
- }
- } else if (type == Test_List) {
- QList<float> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.append(float(i));
- buffer.clear();
- for (int i = 0; i < size; ++i)
- buffer.append(float(i));
- }
- } else if (type == Test_VarLengthArray) {
- QVarLengthArray<float> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.append(float(i));
- buffer.clear();
- for (int i = 0; i < size; ++i)
- buffer.append(float(i));
- }
- } else if (type == Test_Array) {
- QArray<float> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.append(float(i));
- buffer.resize(0);
- for (int i = 0; i < size; ++i)
- buffer.append(float(i));
- }
-#ifndef QT_NO_STL
- } else if (type == Test_STLVector) {
- std::vector<float> buffer;
- QBENCHMARK {
- for (int i = 0; i < size; ++i)
- buffer.push_back(float(i));
- buffer.clear();
- for (int i = 0; i < size; ++i)
- buffer.push_back(float(i));
- }
-#endif
- }
-}
-
-void tst_QArray::randomAccess_data()
-{
- QTest::addColumn<int>("type");
-
- QTest::newRow("QVector") << int(Test_Vector);
-#if TEST_QLIST
- QTest::newRow("QList") << int(Test_List);
-#endif
- QTest::newRow("QVarLengthArray") << int(Test_VarLengthArray);
- QTest::newRow("QArray") << int(Test_Array);
-#ifndef QT_NO_STL
- QTest::newRow("std::vector") << int(Test_STLVector);
-#endif
-}
-
-// To force the values below to be computed and stored.
-static int volatile finalSum;
-
-void tst_QArray::randomAccess()
-{
- QFETCH(int, type);
-
- if (type == Test_Vector) {
- QVector<int> buffer;
- for (int i = 0; i < 10000; ++i)
- buffer.append(i);
- QBENCHMARK {
- for (int i = 10; i < 10000; ++i)
- buffer[i] = buffer.at(i - 10) + buffer.at(i - 4) * 2;
- int sum = 0;
- for (int i = 0; i < 10000; ++i)
- sum += buffer.at(i);
- finalSum = sum;
- }
- } else if (type == Test_List) {
- QList<int> buffer;
- for (int i = 0; i < 10000; ++i)
- buffer.append(i);
- QBENCHMARK {
- for (int i = 10; i < 10000; ++i)
- buffer[i] = buffer[i - 10] + buffer[i - 4] * 2;
- int sum = 0;
- for (int i = 0; i < 10000; ++i)
- sum += buffer[i];
- finalSum = sum;
- }
- } else if (type == Test_VarLengthArray) {
- QVarLengthArray<int> buffer;
- for (int i = 0; i < 10000; ++i)
- buffer.append(i);
- QBENCHMARK {
- for (int i = 10; i < 10000; ++i)
- buffer[i] = buffer[i - 10] + buffer[i - 4] * 2;
- int sum = 0;
- for (int i = 0; i < 10000; ++i)
- sum += buffer[i];
- finalSum = sum;
- }
- } else if (type == Test_Array) {
- QArray<int> buffer;
- for (int i = 0; i < 10000; ++i)
- buffer.append(i);
- QBENCHMARK {
- for (int i = 10; i < 10000; ++i)
- buffer[i] = buffer.at(i - 10) + buffer.at(i - 4) * 2;
- int sum = 0;
- for (int i = 0; i < 10000; ++i)
- sum += buffer.at(i);
- finalSum = sum;
- }
-#ifndef QT_NO_STL
- } else if (type == Test_STLVector) {
- std::vector<int> buffer;
- for (int i = 0; i < 10000; ++i)
- buffer.push_back(i);
- QBENCHMARK {
- for (int i = 10; i < 10000; ++i)
- buffer[i] = buffer[i - 10] + buffer[i - 4] * 2;
- int sum = 0;
- for (int i = 0; i < 10000; ++i)
- sum += buffer[i];
- finalSum = sum;
- }
-#endif
- }
-}
-
-QTEST_MAIN(tst_QArray)
-
-#include "tst_qarray.moc"
diff --git a/tests/benchmarks/qglbuilder_perf/qglbuilder_perf.pro b/tests/benchmarks/qglbuilder_perf/qglbuilder_perf.pro
deleted file mode 100644
index 6f13bc09..00000000
--- a/tests/benchmarks/qglbuilder_perf/qglbuilder_perf.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-TEMPLATE=app
-QT += testlib
-CONFIG += unittest warn_on qt3d
-
-SOURCES += tst_qglbuilder_perf.cpp
-INCLUDEPATH += ../../../src/threed/geometry
diff --git a/tests/benchmarks/qglbuilder_perf/tst_qglbuilder_perf.cpp b/tests/benchmarks/qglbuilder_perf/tst_qglbuilder_perf.cpp
deleted file mode 100644
index 4667297a..00000000
--- a/tests/benchmarks/qglbuilder_perf/tst_qglbuilder_perf.cpp
+++ /dev/null
@@ -1,245 +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 <ctime>
-#include <QtTest/QtTest>
-#include "qglbuilder.h"
-#include "qglteapot.h"
-#include "qglsection_p.h"
-#include "qgeometrydata.h"
-
-class TestBuilder : public QGLBuilder
-{
-public:
- QGLSection *section() { return currentSection(); }
- void setDefThreshold(int t) { setDefaultThreshold(t); }
-};
-
-class tst_QGLBuilder : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLBuilder() {}
- virtual ~tst_QGLBuilder() {}
- void addQuadBenchMarks(const QVector3DArray &data, int type);
-
-private slots:
- void addQuadRandom_data();
- void addQuadRandom();
- void addQuadOrdered_data();
- void addQuadOrdered();
- void teapot();
-};
-
-enum {
- Test_3,
- Test_7,
- Test_10,
- Test_20
-};
-
-void tst_QGLBuilder::addQuadRandom_data()
-{
- QTest::addColumn<int>("size");
- QTest::addColumn<int>("type");
-
- QByteArray name;
- for (int size = 10; size < 10000; size += 10)
- {
- name = "T3--";
- name += QByteArray::number(size);
- QTest::newRow(name.constData()) << size << int(Test_3);
-
- name = "T7--";
- name += QByteArray::number(size);
- QTest::newRow(name.constData()) << size << int(Test_7);
-
- name = "T10--";
- name += QByteArray::number(size);
- QTest::newRow(name.constData()) << size << int(Test_10);
-
- name = "T20--";
- name += QByteArray::number(size);
- QTest::newRow(name.constData()) << size << int(Test_20);
- }
-}
-
-static inline qreal randCoord()
-{
- return (200.0f * ((qreal)qrand() / (qreal)RAND_MAX)) - 100.0f;
-}
-
-QVector3D randVector()
-{
- static bool seeded = false;
- if (!seeded)
- {
- qsrand(time(0));
- seeded = true;
- }
- return QVector3D(randCoord(), randCoord(), randCoord());
-}
-
-void tst_QGLBuilder::addQuadRandom()
-{
- QFETCH(int, size);
- QFETCH(int, type);
-
- int n = qSqrt(size);
- size = n * n;
- QVector3DArray data;
- data.reserve(size);
- for (int i = 0; i < size; ++i)
- {
- // make sure (in face of randomness) we get a planar quad
- QVector3D origin = randVector();
- QVector3D a;
- while (a.isNull())
- a = randVector();
- QVector3D b;
- while (b.isNull())
- b = randVector();
- data.append(origin, a, a+b, b);
- }
- addQuadBenchMarks(data, type);
-}
-
-void tst_QGLBuilder::addQuadBenchMarks(const QVector3DArray &data, int type)
-{
- int size = data.size();
- if (type == Test_3)
- {
- QBENCHMARK {
- TestBuilder builder;
- builder.newSection(QGL::Smooth);
- builder.section()->setMapThreshold(3);
- for (int i = 0; (i+3) < size; i += 4)
- {
- QGeometryData op;
- op.appendVertex(data[i], data[i+1], data[i+2], data[i+3]);
- builder.addQuads(op);
- }
- builder.finalizedSceneNode();
- }
- }
- else if (type == Test_7)
- {
- QBENCHMARK {
- TestBuilder builder;
- builder.newSection(QGL::Smooth);
- builder.section()->setMapThreshold(7);
- for (int i = 0; (i+3) < size; i += 4)
- {
- QGeometryData op;
- op.appendVertex(data[i], data[i+1], data[i+2], data[i+3]);
- builder.addQuads(op);
- }
- builder.finalizedSceneNode();
- }
- }
- else if (type == Test_10)
- {
- QBENCHMARK {
- TestBuilder builder;
- builder.newSection(QGL::Smooth);
- builder.section()->setMapThreshold(10);
- for (int i = 0; (i+3) < size; i += 4)
- {
- QGeometryData op;
- op.appendVertex(data[i], data[i+1], data[i+2], data[i+3]);
- builder.addQuads(op);
- }
- builder.finalizedSceneNode();
- }
- }
- else if (type == Test_20)
- {
- QBENCHMARK {
- TestBuilder builder;
- builder.newSection(QGL::Smooth);
- builder.section()->setMapThreshold(20);
- for (int i = 0; (i+3) < size; i += 4)
- {
- QGeometryData op;
- op.appendVertex(data[i], data[i+1], data[i+2], data[i+3]);
- builder.addQuads(op);
- }
- builder.finalizedSceneNode();
- }
- }
-}
-
-void tst_QGLBuilder::addQuadOrdered_data()
-{
- addQuadRandom_data();
-}
-
-void tst_QGLBuilder::addQuadOrdered()
-{
- QFETCH(int, size);
- QFETCH(int, type);
-
- int n = qSqrt(size);
- size = n * n;
- QVector3DArray data;
- data.reserve(size);
- for (int i = 0; i < n; ++i)
- for (int j = 0; j < n; ++j)
- data.append(QVector3D(1.0f * i, 1.0f * j, 0.0f),
- QVector3D(1.0f * (i+1), 1.0f * j, 0.0f),
- QVector3D(1.0f * (i+1), 1.0f * (j+1), 0.0f),
- QVector3D(1.0f * i, 1.0f * (j+1), 0.0f));
- addQuadBenchMarks(data, type);
-}
-
-void tst_QGLBuilder::teapot()
-{
- QBENCHMARK {
- QGLBuilder builder;
- builder << QGLTeapot();
- builder.finalizedSceneNode();
- }
-}
-
-
-QTEST_MAIN(tst_QGLBuilder)
-
-#include "tst_qglbuilder_perf.moc"
diff --git a/tests/manual/animations/animations.pro b/tests/manual/animations/animations.pro
deleted file mode 100644
index dcbc3fd7..00000000
--- a/tests/manual/animations/animations.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = app
-TARGET = tst_animations
-CONFIG += qt warn_on
-
-INSTALL_DIRS = qml
-CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
-include(../../../pkg.pri)
-qtcAddDeployment()
-
-SOURCES += main.cpp
diff --git a/tests/manual/animations/main.cpp b/tests/manual/animations/main.cpp
deleted file mode 100644
index bc89a00f..00000000
--- a/tests/manual/animations/main.cpp
+++ /dev/null
@@ -1,63 +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 <QtGui/QApplication>
-#include "qdeclarativeview3d.h"
-
-#include "../../shared/qmlres.h"
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView3D view;
- QString qml = q_get_qmldir(QLatin1String("qml/tst_animations.qml"));
- view.setSource(QUrl::fromLocalFile(qml));
-
- if (QApplication::arguments().contains(QLatin1String("-maximize")))
- view.showMaximized();
- else if (QApplication::arguments().contains(QLatin1String("-fullscreen")))
- view.showFullScreen();
- else
- view.show();
-
- return app.exec();
-}
diff --git a/tests/manual/animations/qml/TestCase.qml b/tests/manual/animations/qml/TestCase.qml
deleted file mode 100644
index 6d979387..00000000
--- a/tests/manual/animations/qml/TestCase.qml
+++ /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$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import Qt3D 1.0
-import Qt3D.Shapes 1.0
-
-Rectangle {
- id: container
- property string text;
- property variant rotationAxis : Qt.vector3d(1,0,0)
- property real defaultWidth: 220
- property real defaultHeight: 150
- property variant rotation: Rotation3D {}
-
- border.width: 2
- border.color: "black"
- radius: 5
- width: defaultWidth
- height: defaultHeight
- Text {
- id: textItem
- wrapMode: "WordWrap"
- horizontalAlignment: "AlignHCenter"
- text: container.text
-
- anchors.left: parent.left
- anchors.right: parent.right
- }
- Rectangle {
- id: viewportContainer
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: textItem.bottom
- anchors.bottom: container.bottom
- color: "#aaccee"
-
- Viewport {
- id: view
- anchors.fill: parent
- picking: true
- camera: Camera { eye: Qt.vector3d(0,15,50)}
- Cube
- {
- id: model
- scale: 8.0
- transform: container.rotation
- }
- }
- }
-}
diff --git a/tests/manual/animations/qml/tst_animations.qml b/tests/manual/animations/qml/tst_animations.qml
deleted file mode 100644
index a6bdc4c0..00000000
--- a/tests/manual/animations/qml/tst_animations.qml
+++ /dev/null
@@ -1,117 +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
-
-// QTBUG-18702
-Item {
- id: screen
- width: aTestCase.defaultWidth * 3
- height: aTestCase.defaultHeight * 3
-
- Flow {
- anchors.fill: parent
-
- TestCase {
- id: aTestCase
- text: "Rotation: Z axis\n(Rolling to the left)\nNumberAnimation"
- rotationAxis: Qt.vector3d(0,0,1)
- rotation: Rotation3D {
- axis: rotationAxis
- NumberAnimation on angle {
- loops: Animation.Infinite
- from: 0
- to: 360
- duration: 1500
- }
- }
- }
-
- TestCase {
- text: "Rotation: Z axis\n(Rolling to the left)\nRotationAnimation"
- rotationAxis: Qt.vector3d(0,0,1)
- rotation: Rotation3D {
- axis: rotationAxis
- RotationAnimation on angle {
- loops: Animation.Infinite
- from: 0
- to: 359
- duration: 1500
- direction: RotationAnimation.Clockwise
- }
- }
- }
-
- TestCase {
- text: "Rotation: Z axis\n(Rolling to the left)\nSmoothedAnimation"
- rotationAxis: Qt.vector3d(0,0,1)
- rotation: Rotation3D {
- axis: rotationAxis
- SmoothedAnimation on angle {
- loops: Animation.Infinite
- from: 0
- to: 360
- duration: 1500
- velocity: 200
- }
- }
- }
-
- TestCase {
- text: "Rotation: Z axis\n(Rolling to the left)\nSpringAnimation"
- rotationAxis: Qt.vector3d(0,0,1)
- rotation: Rotation3D {
- axis: rotationAxis
- SpringAnimation on angle {
- id: rotationAnimation
- loops: Animation.Infinite
- from: 0
- to: 359
- duration: 1500
- spring: 2
- damping: 0.2
- }
- }
- }
- }
-}
diff --git a/tests/manual/animations/qtquick3d.png b/tests/manual/animations/qtquick3d.png
deleted file mode 100644
index 69deef3f..00000000
--- a/tests/manual/animations/qtquick3d.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/animations/tst_animations_qml.desktop b/tests/manual/animations/tst_animations_qml.desktop
deleted file mode 100644
index 3fc4e012..00000000
--- a/tests/manual/animations/tst_animations_qml.desktop
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=tst_animations
-Icon=/usr/share/icons/hicolor/80x80/apps/qtquick3d.png
-Exec=/usr/bin/invoker --type=e -s /usr/bin/tst_animations -fullscreen
-OnlyShowIn=X-MeeGo;
-X-MeeGo-Logical-Id=qtn_comm_appname_tst_animations_qml
diff --git a/tests/manual/displaymodel/README b/tests/manual/displaymodel/README
deleted file mode 100644
index e22b48fd..00000000
--- a/tests/manual/displaymodel/README
+++ /dev/null
@@ -1,16 +0,0 @@
-
-This test renders a series of generated and file loaded meshes to validate functionality.
-
-The first 5 meshes are dynamically generated. They are: points, lines, sphere, cylinder, capsule.
-
-The next 2 meshes are .obj files loaded at runtime. They are: plane.obj, cube.obj.
-
-The next mesh is a .bez teapot mesh.
-
-The final mesh is a .3ds mesh of a lunar lander.
-
-All meshes should be lit & shaded, and can be manually rotated by using ctrl+leftclick and dragging.
-
-Zoom can be achieved by mouse wheel.
-
-Click each object for an "Object clicked" debug message in the debugger.
diff --git a/tests/manual/displaymodel/displaymodel.pro b/tests/manual/displaymodel/displaymodel.pro
deleted file mode 100644
index 667ab092..00000000
--- a/tests/manual/displaymodel/displaymodel.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = app
-TARGET = tst_displaymodel
-CONFIG += qt warn_on
-
-INSTALL_DIRS = qml
-CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
-include(../../../pkg.pri)
-qtcAddDeployment()
-
-SOURCES += main.cpp
diff --git a/tests/manual/displaymodel/main.cpp b/tests/manual/displaymodel/main.cpp
deleted file mode 100644
index b26d4eda..00000000
--- a/tests/manual/displaymodel/main.cpp
+++ /dev/null
@@ -1,63 +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 <QtGui/QApplication>
-#include "qdeclarativeview3d.h"
-
-#include "../../shared/qmlres.h"
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView3D view;
- QString qml = q_get_qmldir(QLatin1String("qml/tst_displaymodel.qml"));
- view.setSource(QUrl::fromLocalFile(qml));
-
- if (QApplication::arguments().contains(QLatin1String("-maximize")))
- view.showMaximized();
- else if (QApplication::arguments().contains(QLatin1String("-fullscreen")))
- view.showFullScreen();
- else
- view.show();
-
- return app.exec();
-}
diff --git a/tests/manual/displaymodel/qml/meshes/lunar-lander.3ds b/tests/manual/displaymodel/qml/meshes/lunar-lander.3ds
deleted file mode 100644
index 7403fdef..00000000
--- a/tests/manual/displaymodel/qml/meshes/lunar-lander.3ds
+++ /dev/null
Binary files differ
diff --git a/tests/manual/displaymodel/qml/meshes/monkey.mtl b/tests/manual/displaymodel/qml/meshes/monkey.mtl
deleted file mode 100644
index 07e6051f..00000000
--- a/tests/manual/displaymodel/qml/meshes/monkey.mtl
+++ /dev/null
@@ -1,2 +0,0 @@
-# Blender MTL File: ''
-# Material Count: 0
diff --git a/tests/manual/displaymodel/qml/meshes/monkey.obj b/tests/manual/displaymodel/qml/meshes/monkey.obj
deleted file mode 100644
index 95ace968..00000000
--- a/tests/manual/displaymodel/qml/meshes/monkey.obj
+++ /dev/null
@@ -1,1013 +0,0 @@
-# Blender v2.57 (sub 1) OBJ File: ''
-# www.blender.org
-mtllib monkey.mtl
-o Monkey
-v 0.447324 0.860709 -0.155921
-v -0.427676 0.860709 -0.155921
-v 0.509824 0.782584 -0.085608
-v -0.490176 0.782584 -0.085608
-v 0.556699 0.673209 -0.046546
-v -0.537051 0.673209 -0.046546
-v 0.361386 0.712272 0.031579
-v -0.341739 0.712272 0.031579
-v 0.361386 0.813834 -0.023108
-v -0.341739 0.813834 -0.023108
-v 0.361386 0.876334 -0.124671
-v -0.341739 0.876334 -0.124671
-v 0.283261 0.891959 -0.155921
-v -0.263614 0.891959 -0.155921
-v 0.212949 0.837272 -0.085608
-v -0.193301 0.837272 -0.085608
-v 0.166074 0.743522 -0.046546
-v -0.146426 0.743522 -0.046546
-v 0.087949 0.751334 -0.234046
-v -0.068301 0.751334 -0.234046
-v 0.150449 0.837272 -0.234046
-v -0.130801 0.837272 -0.234046
-v 0.252011 0.891959 -0.234046
-v -0.232364 0.891959 -0.234046
-v 0.283261 0.891959 -0.319983
-v -0.263614 0.891959 -0.319983
-v 0.212949 0.837272 -0.382483
-v -0.193301 0.837272 -0.382483
-v 0.166074 0.743522 -0.429358
-v -0.146426 0.743522 -0.429358
-v 0.361386 0.712272 -0.507483
-v -0.341739 0.712272 -0.507483
-v 0.361386 0.813834 -0.444983
-v -0.341739 0.813834 -0.444983
-v 0.361386 0.876334 -0.351233
-v -0.341739 0.876334 -0.351233
-v 0.447324 0.860709 -0.319983
-v -0.427676 0.860709 -0.319983
-v 0.509824 0.782584 -0.382483
-v -0.490176 0.782584 -0.382483
-v 0.556699 0.673209 -0.429358
-v -0.537051 0.673209 -0.429358
-v 0.634824 0.657584 -0.234046
-v -0.615176 0.657584 -0.234046
-v 0.572324 0.766959 -0.234046
-v -0.552676 0.766959 -0.234046
-v 0.478574 0.852897 -0.234046
-v -0.458926 0.852897 -0.234046
-v 0.486386 0.868522 -0.234046
-v -0.466739 0.868522 -0.234046
-v 0.455136 0.876334 -0.327796
-v -0.435489 0.876334 -0.327796
-v 0.361386 0.899772 -0.366858
-v -0.341739 0.899772 -0.366858
-v 0.275449 0.915397 -0.327796
-v -0.255801 0.915397 -0.327796
-v 0.236386 0.915397 -0.234046
-v -0.216739 0.915397 -0.234046
-v 0.275449 0.915397 -0.148108
-v -0.255801 0.915397 -0.148108
-v 0.361386 0.923209 -0.234046
-v -0.341739 0.923209 -0.234046
-v 0.361386 0.899772 -0.109046
-v -0.341739 0.899772 -0.109046
-v 0.455136 0.876334 -0.148108
-v -0.435489 0.876334 -0.148108
-v 0.009824 0.837272 -0.421546
-v 0.009824 0.915397 -0.343421
-v 0.009824 0.829459 0.687829
-v 0.009824 0.876334 0.328454
-v 0.009824 0.891959 0.195642
-v 0.009824 0.813834 0.781579
-v 0.009824 0.696647 -0.398108
-v 0.009824 0.665397 -0.562171
-v 0.009824 -0.451791 -0.890296
-v 0.009824 -0.756478 -0.554358
-v 0.009824 -0.733041 -0.062171
-v 0.009824 -0.256478 0.390954
-v 0.212949 0.657584 0.195642
-v -0.193301 0.657584 0.195642
-v 0.322324 0.665397 0.445642
-v -0.302676 0.665397 0.445642
-v 0.361386 0.665397 0.703454
-v -0.341739 0.665397 0.703454
-v 0.377011 0.626334 0.898767
-v -0.357364 0.626334 0.898767
-v 0.337949 0.618522 0.953454
-v -0.318301 0.618522 0.953454
-v 0.189511 0.649772 0.976892
-v -0.169864 0.649772 0.976892
-v 0.009824 0.673209 0.992517
-v 0.447324 0.626334 0.148767
-v -0.427676 0.626334 0.148767
-v 0.642636 0.634147 0.047204
-v -0.622989 0.634147 0.047204
-v 0.837949 0.540397 -0.140296
-v -0.818301 0.540397 -0.140296
-v 0.869199 0.688834 -0.421546
-v -0.849551 0.688834 -0.421546
-v 0.720761 0.720084 -0.476233
-v -0.701114 0.720084 -0.476233
-v 0.502011 0.782584 -0.593421
-v -0.482364 0.782584 -0.593421
-v 0.330136 0.829459 -0.749671
-v -0.310489 0.829459 -0.749671
-v 0.166074 0.852897 -0.710608
-v -0.146426 0.852897 -0.710608
-v 0.072324 0.845084 -0.484046
-v -0.052676 0.845084 -0.484046
-v 0.173886 0.868522 -0.405921
-v -0.154239 0.868522 -0.405921
-v 0.134824 0.860709 -0.296546
-v -0.115176 0.860709 -0.296546
-v 0.212949 0.837272 -0.085608
-v -0.193301 0.837272 -0.085608
-v 0.384824 0.798209 -0.007483
-v -0.365176 0.798209 -0.007483
-v 0.502011 0.766959 -0.054358
-v -0.482364 0.766959 -0.054358
-v 0.634824 0.743522 -0.179358
-v -0.615176 0.743522 -0.179358
-v 0.650449 0.743522 -0.288733
-v -0.630801 0.743522 -0.288733
-v 0.611386 0.759147 -0.366858
-v -0.591739 0.759147 -0.366858
-v 0.439511 0.813834 -0.429358
-v -0.419864 0.813834 -0.429358
-v 0.259824 0.852897 -0.460608
-v -0.240176 0.852897 -0.460608
-v 0.009824 0.829459 0.773767
-v 0.119199 0.829459 0.726892
-v -0.099551 0.829459 0.726892
-v 0.127011 0.806022 0.844079
-v -0.107364 0.806022 0.844079
-v 0.072324 0.790397 0.890954
-v -0.052676 0.790397 0.890954
-v 0.009824 0.782584 0.898767
-v 0.009824 0.845084 0.203454
-v 0.009824 0.837272 0.148767
-v 0.111386 0.837272 0.156579
-v -0.091739 0.837272 0.156579
-v 0.134824 0.845084 0.234704
-v -0.115176 0.845084 0.234704
-v 0.095761 0.837272 0.297204
-v -0.076114 0.837272 0.297204
-v 0.408261 0.766959 0.055017
-v -0.388614 0.766959 0.055017
-v 0.627011 0.720084 -0.046546
-v -0.607364 0.720084 -0.046546
-v 0.736386 0.696647 -0.194983
-v -0.716739 0.696647 -0.194983
-v 0.752011 0.751334 -0.366858
-v -0.732364 0.751334 -0.366858
-v 0.697324 0.821647 -0.405921
-v -0.677676 0.821647 -0.405921
-v 0.447324 0.891959 -0.538733
-v -0.427676 0.891959 -0.538733
-v 0.322324 0.931022 -0.632483
-v -0.302676 0.931022 -0.632483
-v 0.212949 0.946647 -0.609046
-v -0.193301 0.946647 -0.609046
-v 0.111386 0.938834 -0.421546
-v -0.091739 0.938834 -0.421546
-v 0.134824 0.907584 0.109704
-v -0.115176 0.907584 0.109704
-v 0.220761 0.806022 0.453454
-v -0.201114 0.806022 0.453454
-v 0.259824 0.782584 0.711267
-v -0.240176 0.782584 0.711267
-v 0.275449 0.759147 0.828454
-v -0.255801 0.759147 0.828454
-v 0.244199 0.727897 0.922204
-v -0.224551 0.727897 0.922204
-v 0.173886 0.727897 0.937829
-v -0.154239 0.727897 0.937829
-v 0.009824 0.735709 0.953454
-v 0.009824 0.821647 -0.038733
-v 0.009824 0.860709 -0.202796
-v 0.337949 0.837272 -0.468421
-v -0.318301 0.837272 -0.468421
-v 0.173886 0.845084 -0.132483
-v -0.154239 0.845084 -0.132483
-v 0.142636 0.852897 -0.202796
-v -0.122989 0.852897 -0.202796
-v 0.127011 0.829459 0.695642
-v -0.107364 0.829459 0.695642
-v 0.087949 0.845084 0.453454
-v -0.068301 0.845084 0.453454
-v 0.009824 0.845084 0.453454
-v 0.009824 0.837272 0.336267
-v 0.103574 0.876334 0.281579
-v -0.083926 0.876334 0.281579
-v 0.142636 0.891959 0.234704
-v -0.122989 0.891959 0.234704
-v 0.119199 0.876334 0.140954
-v -0.099551 0.876334 0.140954
-v 0.048886 0.876334 0.133142
-v -0.029239 0.876334 0.133142
-v 0.009824 0.923209 0.211267
-v 0.056699 0.907584 0.156579
-v -0.037051 0.907584 0.156579
-v 0.103574 0.907584 0.164392
-v -0.083926 0.907584 0.164392
-v 0.119199 0.923209 0.234704
-v -0.099551 0.923209 0.234704
-v 0.087949 0.899772 0.258142
-v -0.068301 0.899772 0.258142
-v 0.009824 0.899772 0.297204
-v 0.267636 0.649772 0.320642
-v -0.247989 0.649772 0.320642
-v 0.173886 0.806022 0.250329
-v -0.154239 0.806022 0.250329
-v 0.189511 0.806022 0.320642
-v -0.169864 0.806022 0.320642
-v 0.244199 0.649772 0.258142
-v -0.224551 0.649772 0.258142
-v 0.009824 0.782584 0.883142
-v 0.056699 0.782584 0.875329
-v -0.037051 0.782584 0.875329
-v 0.103574 0.806022 0.828454
-v -0.083926 0.806022 0.828454
-v 0.103574 0.821647 0.750329
-v -0.083926 0.821647 0.750329
-v 0.009824 0.751334 0.789392
-v 0.103574 0.759147 0.758142
-v -0.083926 0.759147 0.758142
-v 0.103574 0.735709 0.820642
-v -0.083926 0.735709 0.820642
-v 0.056699 0.727897 0.859704
-v -0.037051 0.727897 0.859704
-v 0.009824 0.727897 0.867517
-v 0.181699 0.876334 -0.210608
-v -0.162051 0.876334 -0.210608
-v 0.197324 0.868522 -0.148108
-v -0.177676 0.868522 -0.148108
-v 0.345761 0.852897 -0.421546
-v -0.326114 0.852897 -0.421546
-v 0.283261 0.868522 -0.413733
-v -0.263614 0.868522 -0.413733
-v 0.431699 0.868522 -0.390296
-v -0.412051 0.868522 -0.390296
-v 0.572324 0.790397 -0.343421
-v -0.552676 0.790397 -0.343421
-v 0.595761 0.782584 -0.280921
-v -0.576114 0.782584 -0.280921
-v 0.587949 0.774772 -0.187171
-v -0.568301 0.774772 -0.187171
-v 0.486386 0.813834 -0.093421
-v -0.466739 0.813834 -0.093421
-v 0.384824 0.837272 -0.054358
-v -0.365176 0.837272 -0.054358
-v 0.236386 0.876334 -0.101233
-v -0.216739 0.876334 -0.101233
-v 0.189511 0.876334 -0.288733
-v -0.169864 0.876334 -0.288733
-v 0.220761 0.876334 -0.366858
-v -0.201114 0.876334 -0.366858
-v 0.244199 0.852897 -0.351233
-v -0.224551 0.852897 -0.351233
-v 0.205136 0.852897 -0.288733
-v -0.185489 0.852897 -0.288733
-v 0.252011 0.852897 -0.116858
-v -0.232364 0.852897 -0.116858
-v 0.384824 0.821647 -0.077796
-v -0.365176 0.821647 -0.077796
-v 0.470761 0.798209 -0.109046
-v -0.451114 0.798209 -0.109046
-v 0.556699 0.766959 -0.202796
-v -0.537051 0.766959 -0.202796
-v 0.564511 0.766959 -0.273108
-v -0.544864 0.766959 -0.273108
-v 0.541074 0.774772 -0.327796
-v -0.521426 0.774772 -0.327796
-v 0.423886 0.845084 -0.382483
-v -0.404239 0.845084 -0.382483
-v 0.291074 0.860709 -0.390296
-v -0.271426 0.860709 -0.390296
-v 0.345761 0.845084 -0.398108
-v -0.326114 0.845084 -0.398108
-v 0.212949 0.845084 -0.163733
-v -0.193301 0.845084 -0.163733
-v 0.205136 0.845084 -0.218421
-v -0.185489 0.845084 -0.218421
-v 0.119199 0.704459 -0.452796
-v -0.099551 0.704459 -0.452796
-v 0.205136 0.712272 -0.655921
-v -0.185489 0.712272 -0.655921
-v 0.345761 0.688834 -0.679358
-v -0.326114 0.688834 -0.679358
-v 0.494199 0.649772 -0.546546
-v -0.474551 0.649772 -0.546546
-v 0.689511 0.587272 -0.444983
-v -0.669864 0.587272 -0.444983
-v 0.806699 0.556022 -0.398108
-v -0.787051 0.556022 -0.398108
-v 0.783261 0.470084 -0.155921
-v -0.763614 0.470084 -0.155921
-v 0.611386 0.509147 0.008142
-v -0.591739 0.509147 0.008142
-v 0.447324 0.563834 0.101892
-v -0.427676 0.563834 0.101892
-v 0.009824 0.384147 -0.890296
-v 0.009824 0.016959 -0.976233
-v 0.009824 -0.576791 0.203454
-v 0.009824 0.282584 0.469079
-v 0.009824 0.556022 0.984704
-v 0.009824 0.438834 0.812829
-v 0.009824 0.415397 0.578454
-v 0.009824 0.376334 0.492517
-v 0.861386 0.149772 -0.226233
-v -0.841739 0.149772 -0.226233
-v 0.869199 0.048209 -0.312171
-v -0.849551 0.048209 -0.312171
-v 0.783261 -0.342416 -0.257483
-v -0.763614 -0.342416 -0.257483
-v 0.470761 -0.608041 -0.429358
-v -0.451114 -0.608041 -0.429358
-v 0.744199 0.165397 0.055017
-v -0.724551 0.165397 0.055017
-v 0.603574 -0.068978 0.133142
-v -0.583926 -0.068978 0.133142
-v 0.650449 -0.334603 0.015954
-v -0.630801 -0.334603 0.015954
-v 0.345761 -0.568978 -0.046546
-v -0.326114 -0.568978 -0.046546
-v 0.244199 0.501334 0.359704
-v -0.224551 0.501334 0.359704
-v 0.189511 0.352897 0.422204
-v -0.169864 0.352897 0.422204
-v 0.298886 0.477897 0.719079
-v -0.279239 0.477897 0.719079
-v 0.259824 0.485709 0.508142
-v -0.240176 0.485709 0.508142
-v 0.337949 0.493522 0.922204
-v -0.318301 0.493522 0.922204
-v 0.150449 0.462272 0.765954
-v -0.130801 0.462272 0.765954
-v 0.134824 0.454459 0.547204
-v -0.115176 0.454459 0.547204
-v 0.173886 0.532584 0.953454
-v -0.154239 0.532584 0.953454
-v 0.228574 0.524772 0.289392
-v -0.208926 0.524772 0.289392
-v 0.220761 0.563834 0.234704
-v -0.201114 0.563834 0.234704
-v 0.212949 0.595084 0.180017
-v -0.193301 0.595084 0.180017
-v 0.220761 0.259147 0.398767
-v -0.201114 0.259147 0.398767
-v 0.306699 -0.170541 0.320642
-v -0.287051 -0.170541 0.320642
-v 0.353574 -0.443978 0.156579
-v -0.333926 -0.443978 0.156579
-v 0.462949 -0.287728 -0.859046
-v -0.443301 -0.287728 -0.859046
-v 0.462949 0.024772 -0.921546
-v -0.443301 0.024772 -0.921546
-v 0.462949 0.329459 -0.843421
-v -0.443301 0.329459 -0.843421
-v 0.470761 0.524772 -0.515296
-v -0.451114 0.524772 -0.515296
-v 0.736386 0.431022 -0.398108
-v -0.716739 0.431022 -0.398108
-v 0.642636 0.376334 -0.444983
-v -0.622989 0.376334 -0.444983
-v 0.650449 0.149772 -0.694983
-v -0.630801 0.149772 -0.694983
-v 0.806699 0.220084 -0.554358
-v -0.787051 0.220084 -0.554358
-v 0.806699 -0.022103 -0.609046
-v -0.787051 -0.022103 -0.609046
-v 0.650449 -0.100228 -0.741858
-v -0.630801 -0.100228 -0.741858
-v 0.650449 -0.350228 -0.671546
-v -0.630801 -0.350228 -0.671546
-v 0.806699 -0.264291 -0.530921
-v -0.787051 -0.264291 -0.530921
-v 0.627011 -0.490853 -0.319983
-v -0.607364 -0.490853 -0.319983
-v 0.494199 -0.451791 -0.015296
-v -0.474551 -0.451791 -0.015296
-v 0.830136 -0.108041 -0.319983
-v -0.810489 -0.108041 -0.319983
-v 0.416074 0.243522 0.180017
-v -0.396426 0.243522 0.180017
-v 0.439511 -0.115853 0.203454
-v -0.419864 -0.115853 0.203454
-v 0.900449 -0.139291 -0.398108
-v -0.880801 -0.139291 -0.398108
-v 0.783261 -0.029916 0.148767
-v -0.763614 -0.029916 0.148767
-v 1.048886 -0.233041 0.109704
-v -1.029239 -0.233041 0.109704
-v 1.291074 -0.334603 -0.046546
-v -1.271426 -0.334603 -0.046546
-v 1.361386 -0.326791 -0.312171
-v -1.341739 -0.326791 -0.312171
-v 1.244199 -0.326791 -0.499671
-v -1.224551 -0.326791 -0.499671
-v 1.033261 -0.217416 -0.468421
-v -1.013614 -0.217416 -0.468421
-v 1.025449 -0.193978 -0.405921
-v -1.005801 -0.193978 -0.405921
-v 1.197324 -0.295541 -0.429358
-v -1.177676 -0.295541 -0.429358
-v 1.275449 -0.311166 -0.280921
-v -1.255801 -0.311166 -0.280921
-v 1.220761 -0.311166 -0.069983
-v -1.201114 -0.311166 -0.069983
-v 1.041074 -0.209603 0.047204
-v -1.021426 -0.209603 0.047204
-v 0.837949 -0.037728 0.078454
-v -0.818301 -0.037728 0.078454
-v 0.931699 -0.123666 -0.351233
-v -0.912051 -0.123666 -0.351233
-v 0.955136 -0.193978 -0.296546
-v -0.935489 -0.193978 -0.296546
-v 0.892636 -0.115853 0.031579
-v -0.872989 -0.115853 0.031579
-v 1.048886 -0.272103 0.008142
-v -1.029239 -0.272103 0.008142
-v 1.197324 -0.350228 -0.085608
-v -1.177676 -0.350228 -0.085608
-v 1.244199 -0.350228 -0.241858
-v -1.224551 -0.350228 -0.241858
-v 1.181699 -0.342416 -0.351233
-v -1.162051 -0.342416 -0.351233
-v 1.033261 -0.264291 -0.335608
-v -1.013614 -0.264291 -0.335608
-v 0.853574 -0.115853 -0.280921
-v -0.833926 -0.115853 -0.280921
-v 0.845761 -0.178353 -0.163733
-v -0.826114 -0.178353 -0.163733
-v 0.767636 -0.178353 -0.085608
-v -0.747989 -0.178353 -0.085608
-v 0.830136 -0.178353 -0.077796
-v -0.810489 -0.178353 -0.077796
-v 0.853574 -0.178353 -0.007483
-v -0.833926 -0.178353 -0.007483
-v 0.822324 -0.178353 0.023767
-v -0.802676 -0.178353 0.023767
-v 0.736386 0.024772 0.008142
-v -0.716739 0.024772 0.008142
-v 0.728574 -0.076791 0.031579
-v -0.708926 -0.076791 0.031579
-v 0.728574 -0.092416 -0.030921
-v -0.708926 -0.092416 -0.030921
-v 0.806699 -0.115853 -0.194983
-v -0.787051 -0.115853 -0.194983
-v 0.900449 -0.170541 -0.234046
-v -0.880801 -0.170541 -0.234046
-v 0.900449 -0.225228 -0.226233
-v -0.880801 -0.225228 -0.226233
-v 0.822324 -0.225228 0.023767
-v -0.802676 -0.225228 0.023767
-v 0.861386 -0.225228 -0.007483
-v -0.841739 -0.225228 -0.007483
-v 0.837949 -0.225228 -0.069983
-v -0.818301 -0.225228 -0.069983
-v 0.775449 -0.225228 -0.085608
-v -0.755801 -0.225228 -0.085608
-v 0.853574 -0.225228 -0.163733
-v -0.833926 -0.225228 -0.163733
-v 1.048886 -0.318978 -0.319983
-v -1.029239 -0.318978 -0.319983
-v 1.197324 -0.389291 -0.335608
-v -1.177676 -0.389291 -0.335608
-v 1.267636 -0.397103 -0.234046
-v -1.247989 -0.397103 -0.234046
-v 1.220761 -0.389291 -0.077796
-v -1.201114 -0.389291 -0.077796
-v 1.056699 -0.326791 0.008142
-v -1.037051 -0.326791 0.008142
-v 0.892636 -0.170541 0.023767
-v -0.872989 -0.170541 0.023767
-v 0.962949 -0.248666 -0.280921
-v -0.943301 -0.248666 -0.280921
-v 0.900449 -0.233041 -0.101233
-v -0.880801 -0.233041 -0.101233
-v 0.947324 -0.240853 -0.054358
-v -0.927676 -0.240853 -0.054358
-v 1.009824 -0.272103 -0.116858
-v -0.990176 -0.272103 -0.116858
-v 0.970761 -0.256478 -0.163733
-v -0.951114 -0.256478 -0.163733
-v 1.025449 -0.279916 -0.226233
-v -1.005801 -0.279916 -0.226233
-v 1.064511 -0.287728 -0.179358
-v -1.044864 -0.287728 -0.179358
-v 1.119199 -0.295541 -0.202796
-v -1.099551 -0.295541 -0.202796
-v 1.095761 -0.295541 -0.265296
-v -1.076114 -0.295541 -0.265296
-v 1.033261 -0.389291 -0.429358
-v -1.013614 -0.389291 -0.429358
-v 1.259824 -0.451791 -0.460608
-v -1.240176 -0.451791 -0.460608
-v 1.377011 -0.404916 -0.288733
-v -1.357364 -0.404916 -0.288733
-v 1.322324 -0.436166 -0.046546
-v -1.302676 -0.436166 -0.046546
-v 1.048886 -0.397103 0.094079
-v -1.029239 -0.397103 0.094079
-v 0.798886 -0.233041 0.133142
-v -0.779239 -0.233041 0.133142
-v 0.869199 -0.287728 -0.374671
-v -0.849551 -0.287728 -0.374671
-usemtl (null)
-s off
-f 47 1 3 45
-f 4 2 48 46
-f 45 3 5 43
-f 6 4 46 44
-f 3 9 7 5
-f 8 10 4 6
-f 1 11 9 3
-f 10 12 2 4
-f 11 13 15 9
-f 16 14 12 10
-f 9 15 17 7
-f 18 16 10 8
-f 15 21 19 17
-f 20 22 16 18
-f 13 23 21 15
-f 22 24 14 16
-f 23 25 27 21
-f 28 26 24 22
-f 21 27 29 19
-f 30 28 22 20
-f 27 33 31 29
-f 32 34 28 30
-f 25 35 33 27
-f 34 36 26 28
-f 35 37 39 33
-f 40 38 36 34
-f 33 39 41 31
-f 42 40 34 32
-f 39 45 43 41
-f 44 46 40 42
-f 37 47 45 39
-f 46 48 38 40
-f 47 37 51 49
-f 52 38 48 50
-f 37 35 53 51
-f 54 36 38 52
-f 35 25 55 53
-f 56 26 36 54
-f 25 23 57 55
-f 58 24 26 56
-f 23 13 59 57
-f 60 14 24 58
-f 13 11 63 59
-f 64 12 14 60
-f 11 1 65 63
-f 66 2 12 64
-f 1 47 49 65
-f 50 48 2 66
-f 61 65 49
-f 50 66 62
-f 63 65 61
-f 62 66 64
-f 61 59 63
-f 64 60 62
-f 61 57 59
-f 60 58 62
-f 61 55 57
-f 58 56 62
-f 61 53 55
-f 56 54 62
-f 61 51 53
-f 54 52 62
-f 61 49 51
-f 52 50 62
-f 89 174 176 91
-f 176 175 90 91
-f 87 172 174 89
-f 175 173 88 90
-f 85 170 172 87
-f 173 171 86 88
-f 83 168 170 85
-f 171 169 84 86
-f 81 166 168 83
-f 169 167 82 84
-f 79 92 146 164
-f 147 93 80 165
-f 92 94 148 146
-f 149 95 93 147
-f 94 96 150 148
-f 151 97 95 149
-f 96 98 152 150
-f 153 99 97 151
-f 98 100 154 152
-f 155 101 99 153
-f 100 102 156 154
-f 157 103 101 155
-f 102 104 158 156
-f 159 105 103 157
-f 104 106 160 158
-f 161 107 105 159
-f 106 108 162 160
-f 163 109 107 161
-f 108 67 68 162
-f 68 67 109 163
-f 110 128 160 162
-f 161 129 111 163
-f 128 179 158 160
-f 159 180 129 161
-f 126 156 158 179
-f 159 157 127 180
-f 124 154 156 126
-f 157 155 125 127
-f 122 152 154 124
-f 155 153 123 125
-f 120 150 152 122
-f 153 151 121 123
-f 118 148 150 120
-f 151 149 119 121
-f 116 146 148 118
-f 149 147 117 119
-f 114 164 146 116
-f 147 165 115 117
-f 114 181 177 164
-f 177 182 115 165
-f 110 162 68 112
-f 68 163 111 113
-f 112 68 178 183
-f 178 68 113 184
-f 177 181 183 178
-f 184 182 177 178
-f 135 137 176 174
-f 176 137 136 175
-f 133 135 174 172
-f 175 136 134 173
-f 131 133 172 170
-f 173 134 132 171
-f 166 187 185 168
-f 186 188 167 169
-f 131 170 168 185
-f 169 171 132 186
-f 144 190 189 187
-f 189 190 145 188
-f 185 187 189 69
-f 189 188 186 69
-f 130 131 185 69
-f 186 132 130 69
-f 142 193 191 144
-f 192 194 143 145
-f 140 195 193 142
-f 194 196 141 143
-f 139 197 195 140
-f 196 198 139 141
-f 138 71 197 139
-f 198 71 138 139
-f 190 144 191 70
-f 192 145 190 70
-f 70 191 206 208
-f 207 192 70 208
-f 71 199 200 197
-f 201 199 71 198
-f 197 200 202 195
-f 203 201 198 196
-f 195 202 204 193
-f 205 203 196 194
-f 193 204 206 191
-f 207 205 194 192
-f 199 204 202 200
-f 203 205 199 201
-f 199 208 206 204
-f 207 208 199 205
-f 139 140 164 177
-f 165 141 139 177
-f 140 142 211 164
-f 212 143 141 165
-f 142 144 213 211
-f 214 145 143 212
-f 144 187 166 213
-f 167 188 145 214
-f 81 209 213 166
-f 214 210 82 167
-f 209 215 211 213
-f 212 216 210 214
-f 79 164 211 215
-f 212 165 80 216
-f 131 130 72 222
-f 72 130 132 223
-f 133 131 222 220
-f 223 132 134 221
-f 135 133 220 218
-f 221 134 136 219
-f 137 135 218 217
-f 219 136 137 217
-f 217 218 229 231
-f 230 219 217 231
-f 218 220 227 229
-f 228 221 219 230
-f 220 222 225 227
-f 226 223 221 228
-f 222 72 224 225
-f 224 72 223 226
-f 224 231 229 225
-f 230 231 224 226
-f 225 229 227
-f 228 230 226
-f 183 181 234 232
-f 235 182 184 233
-f 112 183 232 254
-f 233 184 113 255
-f 110 112 254 256
-f 255 113 111 257
-f 181 114 252 234
-f 253 115 182 235
-f 114 116 250 252
-f 251 117 115 253
-f 116 118 248 250
-f 249 119 117 251
-f 118 120 246 248
-f 247 121 119 249
-f 120 122 244 246
-f 245 123 121 247
-f 122 124 242 244
-f 243 125 123 245
-f 124 126 240 242
-f 241 127 125 243
-f 126 179 236 240
-f 237 180 127 241
-f 179 128 238 236
-f 239 129 180 237
-f 128 110 256 238
-f 257 111 129 239
-f 238 256 258 276
-f 259 257 239 277
-f 236 238 276 278
-f 277 239 237 279
-f 240 236 278 274
-f 279 237 241 275
-f 242 240 274 272
-f 275 241 243 273
-f 244 242 272 270
-f 273 243 245 271
-f 246 244 270 268
-f 271 245 247 269
-f 248 246 268 266
-f 269 247 249 267
-f 250 248 266 264
-f 267 249 251 265
-f 252 250 264 262
-f 265 251 253 263
-f 234 252 262 280
-f 263 253 235 281
-f 256 254 260 258
-f 261 255 257 259
-f 254 232 282 260
-f 283 233 255 261
-f 232 234 280 282
-f 281 235 233 283
-f 67 108 284 73
-f 285 109 67 73
-f 108 106 286 284
-f 287 107 109 285
-f 106 104 288 286
-f 289 105 107 287
-f 104 102 290 288
-f 291 103 105 289
-f 102 100 292 290
-f 293 101 103 291
-f 100 98 294 292
-f 295 99 101 293
-f 98 96 296 294
-f 297 97 99 295
-f 96 94 298 296
-f 299 95 97 297
-f 94 92 300 298
-f 301 93 95 299
-f 308 309 328 338
-f 329 309 308 339
-f 307 308 338 336
-f 339 308 307 337
-f 306 307 336 340
-f 337 307 306 341
-f 89 91 306 340
-f 306 91 90 341
-f 87 89 340 334
-f 341 90 88 335
-f 85 87 334 330
-f 335 88 86 331
-f 83 85 330 332
-f 331 86 84 333
-f 330 336 338 332
-f 339 337 331 333
-f 330 334 340 336
-f 341 335 331 337
-f 326 332 338 328
-f 339 333 327 329
-f 81 83 332 326
-f 333 84 82 327
-f 209 342 344 215
-f 345 343 210 216
-f 81 326 342 209
-f 343 327 82 210
-f 79 215 344 346
-f 345 216 80 347
-f 79 346 300 92
-f 301 347 80 93
-f 77 324 352 304
-f 353 325 77 304
-f 304 352 350 78
-f 351 353 304 78
-f 78 350 348 305
-f 349 351 78 305
-f 305 348 328 309
-f 329 349 305 309
-f 326 328 348 342
-f 349 329 327 343
-f 296 298 318 310
-f 319 299 297 311
-f 76 316 324 77
-f 325 317 76 77
-f 302 358 356 303
-f 357 359 302 303
-f 303 356 354 75
-f 355 357 303 75
-f 75 354 316 76
-f 317 355 75 76
-f 292 294 362 364
-f 363 295 293 365
-f 364 362 368 366
-f 369 363 365 367
-f 366 368 370 372
-f 371 369 367 373
-f 372 370 376 374
-f 377 371 373 375
-f 314 378 374 376
-f 375 379 315 377
-f 316 354 374 378
-f 375 355 317 379
-f 354 356 372 374
-f 373 357 355 375
-f 356 358 366 372
-f 367 359 357 373
-f 358 360 364 366
-f 365 361 359 367
-f 290 292 364 360
-f 365 293 291 361
-f 74 360 358 302
-f 359 361 74 302
-f 284 286 288 290
-f 289 287 285 291
-f 284 290 360 74
-f 361 291 285 74
-f 73 284 74
-f 74 285 73
-f 294 296 310 362
-f 311 297 295 363
-f 310 312 368 362
-f 369 313 311 363
-f 312 382 370 368
-f 371 383 313 369
-f 314 376 370 382
-f 371 377 315 383
-f 348 350 386 384
-f 387 351 349 385
-f 318 384 386 320
-f 387 385 319 321
-f 298 300 384 318
-f 385 301 299 319
-f 300 344 342 384
-f 343 345 301 385
-f 342 348 384
-f 385 349 343
-f 300 346 344
-f 345 347 301
-f 314 322 380 378
-f 381 323 315 379
-f 316 378 380 324
-f 381 379 317 325
-f 320 386 380 322
-f 381 387 321 323
-f 350 352 380 386
-f 381 353 351 387
-f 324 380 352
-f 353 381 325
-f 400 388 414 402
-f 415 389 401 403
-f 400 402 404 398
-f 405 403 401 399
-f 398 404 406 396
-f 407 405 399 397
-f 396 406 408 394
-f 409 407 397 395
-f 394 408 410 392
-f 411 409 395 393
-f 392 410 412 390
-f 413 411 393 391
-f 410 420 418 412
-f 419 421 411 413
-f 408 422 420 410
-f 421 423 409 411
-f 406 424 422 408
-f 423 425 407 409
-f 404 426 424 406
-f 425 427 405 407
-f 402 428 426 404
-f 427 429 403 405
-f 402 414 416 428
-f 417 415 403 429
-f 318 320 444 442
-f 445 321 319 443
-f 320 390 412 444
-f 413 391 321 445
-f 310 318 442 312
-f 443 319 311 313
-f 382 430 414 388
-f 415 431 383 389
-f 412 418 440 444
-f 441 419 413 445
-f 438 446 444 440
-f 445 447 439 441
-f 434 446 438 436
-f 439 447 435 437
-f 432 448 446 434
-f 447 449 433 435
-f 430 448 432 450
-f 433 449 431 451
-f 414 430 450 416
-f 451 431 415 417
-f 312 448 430 382
-f 431 449 313 383
-f 312 442 446 448
-f 447 443 313 449
-f 442 444 446
-f 447 445 443
-f 416 450 452 476
-f 453 451 417 477
-f 450 432 462 452
-f 463 433 451 453
-f 432 434 460 462
-f 461 435 433 463
-f 434 436 458 460
-f 459 437 435 461
-f 436 438 456 458
-f 457 439 437 459
-f 438 440 454 456
-f 455 441 439 457
-f 440 418 474 454
-f 475 419 441 455
-f 428 416 476 464
-f 477 417 429 465
-f 426 428 464 466
-f 465 429 427 467
-f 424 426 466 468
-f 467 427 425 469
-f 422 424 468 470
-f 469 425 423 471
-f 420 422 470 472
-f 471 423 421 473
-f 418 420 472 474
-f 473 421 419 475
-f 458 456 480 478
-f 481 457 459 479
-f 478 480 482 484
-f 483 481 479 485
-f 484 482 488 486
-f 489 483 485 487
-f 486 488 490 492
-f 491 489 487 493
-f 464 476 486 492
-f 487 477 465 493
-f 452 484 486 476
-f 487 485 453 477
-f 452 462 478 484
-f 479 463 453 485
-f 458 478 462 460
-f 463 479 459 461
-f 454 474 480 456
-f 481 475 455 457
-f 472 482 480 474
-f 481 483 473 475
-f 470 488 482 472
-f 483 489 471 473
-f 468 490 488 470
-f 489 491 469 471
-f 466 492 490 468
-f 491 493 467 469
-f 464 492 466
-f 467 493 465
-f 392 390 504 502
-f 505 391 393 503
-f 394 392 502 500
-f 503 393 395 501
-f 396 394 500 498
-f 501 395 397 499
-f 398 396 498 496
-f 499 397 399 497
-f 400 398 496 494
-f 497 399 401 495
-f 388 400 494 506
-f 495 401 389 507
-f 494 502 504 506
-f 505 503 495 507
-f 494 496 500 502
-f 501 497 495 503
-f 496 498 500
-f 501 499 497
-f 314 382 388 506
-f 389 383 315 507
-f 314 506 504 322
-f 505 507 315 323
-f 320 322 504 390
-f 505 323 321 391
diff --git a/tests/manual/displaymodel/qml/meshes/teapot.bez b/tests/manual/displaymodel/qml/meshes/teapot.bez
deleted file mode 100644
index 02b2ac44..00000000
--- a/tests/manual/displaymodel/qml/meshes/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/tests/manual/displaymodel/qml/tst_displaymodel.qml b/tests/manual/displaymodel/qml/tst_displaymodel.qml
deleted file mode 100644
index 855a8799..00000000
--- a/tests/manual/displaymodel/qml/tst_displaymodel.qml
+++ /dev/null
@@ -1,371 +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
-
-// QTBUG-17392 / QTBUG-17391
-Item {
- id: screen
- width: 720
- height: 480
-
- //ITEM 1: Points
- Rectangle {
- id: panel1
- x: 0; y:0
- width: screen.width/3
- height: screen.height/3
- border.width: 3
- color: "#3333aa"
-
- Viewport {
- anchors.fill: parent
- camera: Camera { eye: Qt.vector3d(0,3,15)}
- picking: true
-
- Point {
- vertices: [
- -1, 1, 0,
- -1, -2, 0,
- 1, -2, 0
- ]
- pointSize: 3
- onClicked: console.log("Points clicked")
- }
- }
-
- Rectangle {
- border.width: 3; radius: 5
- width: parent.width
- height: text1.height + 10
- Text {
- id: text1
- width: parent.width
- wrapMode: "WordWrap"
- text: " POINT CONSTRUCTION:\n 3 Points in an L shape should be visible."
- anchors.centerIn: parent
- }
- }
- }
-
- //ITEM 2: Lines
- Rectangle {
- id: panel2
- anchors.left: panel1.right
- anchors.top: parent.top
- width: screen.width/3
- height: screen.height/3
- border.width: 3
- color: "#3333aa"
-
- Viewport {
- anchors.fill: parent
- camera: Camera { eye: Qt.vector3d(0,3,15)}
- picking: true
-
- Line {
- vertices: [
- -1, 1, 0,
- -1, -2, 0,
- 1, -2, 0
- ]
- width: 3
- onClicked: console.log("Line clicked")
- }
- }
-
- Rectangle {
- border.width: 3; radius: 5
- width: parent.width
- height: text2.height + 10
- Text {
- id: text2
- width: parent.width
- wrapMode: "WordWrap"
- text: " LINE CONSTRUCTION:\n 2 Lines in an L shape should be visible."
- anchors.centerIn: parent
- }
- }
- }
-
- //ITEM 3: A Sphere
- Rectangle {
- id: panel3
- anchors.left: panel2.right
- anchors.top: parent.top
- width: screen.width/3
- height: screen.height/3
- border.width: 3
- color: "#3333aa"
-
- Viewport {
- anchors.fill: parent
- camera: Camera { eye: Qt.vector3d(0,0,10)}
- picking: true
-
- Sphere {onClicked: console.log("Sphere clicked")}
- }
- //text for item3
- Rectangle {
- border.width: 3; radius: 5
- width: parent.width
- height: text3.height + 10
- Text {
- id: text3
- width: parent.width
- wrapMode: "WordWrap"
- text: " SPHERE CONSTRUCTION:\n A shaded sphere should be visible."
- anchors.centerIn: parent
- }
- }
- }
-
- //ITEM 4: A Cylinder
- Rectangle {
- id: panel4
- anchors.left: parent.left
- anchors.top: panel1.bottom
- width: screen.width/3
- height: screen.height/3
- border.width: 3
- color: "#3333aa"
-
- Viewport {
- anchors.fill: parent
- camera: Camera { eye: Qt.vector3d(0,0,10)}
- picking: true
-
- Cylinder {height: 3; onClicked: console.log("Cylinder clicked");}
- }
-
- Rectangle {
- border.width: 3; radius: 5
- width: parent.width
- height: text4.height + 10
- Text {
- id: text4
- width: parent.width
- wrapMode: "WordWrap"
- text: " CYLINDER CONSTRUCTION:\n A shaded cylinder with 8 sides should be visible."
- anchors.centerIn: parent
- }
- }
- }
-
- //ITEM 5: A Capsule
- Rectangle {
- id: panel5
- anchors.left: panel4.right
- anchors.top: panel2.bottom
- width: screen.width/3
- height: screen.height/3
- border.width: 3
- color: "#3333aa"
-
- Viewport {
- anchors.fill: parent
- camera: Camera { eye: Qt.vector3d(0,0,10)}
- picking: true
-
- Capsule {onClicked: console.log("Capsule clicked");}
-
- }
-
- Rectangle {
- border.width: 3; radius: 5
- width: parent.width
- height: text5.height + 10
- Text {
- id: text5
- width: parent.width
- wrapMode: "WordWrap"
- text: " CAPSULE CONSTRUCTION:\n A shaded capsule with 8 sides should be visible."
- anchors.centerIn: parent
- }
- }
- }
-
- //ITEM 6: A Quad
- Rectangle {
- id: panel6
- anchors.left: panel5.right
- anchors.top: panel3.bottom
- width: screen.width/3
- height: screen.height/3
- border.width: 3
- color: "#3333aa"
-
- Viewport {
- anchors.fill: parent
- camera: Camera {eye: Qt.vector3d(0,5,10)}
- picking: true
-
- Quad {
- scale: 2;
- onClicked: console.log("Quad clicked")
- }
- }
-
- Rectangle {
- border.width: 3; radius: 5
- width: parent.width
- height: text6.height + 10
- Text {
- id: text6
- width: parent.width
- wrapMode: "WordWrap"
- text: " .OBJ LOADING:\n A planar quad should be visible."
- anchors.centerIn: parent
- }
- }
- }
-
- //ITEM 7: A Cube
- Rectangle {
- id: panel7
- anchors.left: parent.left
- anchors.top: panel4.bottom
- width: screen.width/3
- height: screen.height/3
- border.width: 3
- color: "#3333aa"
-
-
- Viewport {
- anchors.fill: parent
- camera: Camera { eye: Qt.vector3d(0,0,10)}
- picking: true
-
- Cube {
- scale: 2
- onClicked: console.log("Cube clicked");
- }
- }
-
- Rectangle {
- border.width: 3; radius: 5
- width: parent.width
- height: text7.height + 10
- Text {
- id: text7
- width: parent.width
- wrapMode: "WordWrap"
- text: " .OBJ LOADING:\n A shaded cube should be visible."
- anchors.centerIn: parent
- }
- }
- }
-
- //ITEM 8: A Teapot
- Rectangle {
- id: panel8
- anchors.left: panel7.right
- anchors.top: panel5.bottom
- width: screen.width/3
- height: screen.height/3
- border.width: 3
- color: "#3333aa"
-
- Viewport {
- anchors.fill: parent
- camera: Camera { eye: Qt.vector3d(0,0,10)}
- picking: true
-
- Teapot {
- scale: 1.3
- onClicked: console.log("Teapot clicked");
- }
- }
-
- Rectangle {
- border.width: 3; radius: 5
- width: parent.width
- height: text8.height + 10
- Text {
- id: text8
- width: parent.width
- wrapMode: "WordWrap"
- text: " .BEZ LOADING:\n A shaded teapot should be visible."
- anchors.centerIn: parent
- }
- }
- }
-
- //ITEM 9: A Lunar Lander
- Rectangle {
- id: panel9
- anchors.left: panel8.right
- anchors.top: panel6.bottom
- width: screen.width/3
- height: screen.height/3
- border.width: 3
- color: "#3333aa"
-
- Viewport {
- anchors.fill: parent
- camera: Camera { eye: Qt.vector3d(0,0,10)}
- picking: true
-
- Item3D {
- scale: 0.5
- position: Qt.vector3d(0,-1,0)
- mesh: Mesh {source: "meshes/lunar-lander.3ds"}
- onClicked: console.log("Lunar lander clicked")
- }
- }
-
- Rectangle {
- border.width: 3; radius: 5
- width: parent.width
- height: text9.height + 10
- Text {
- id: text9
- width: parent.width
- wrapMode: "WordWrap"
- text: " .3DS LOADING:\n A lunar lander module should be visible."
- anchors.centerIn: parent
- }
- }
- }
-}
-
diff --git a/tests/manual/displaymodel/qtquick3d.png b/tests/manual/displaymodel/qtquick3d.png
deleted file mode 100644
index 8351083e..00000000
--- a/tests/manual/displaymodel/qtquick3d.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/lighting/lighting.pro b/tests/manual/lighting/lighting.pro
deleted file mode 100644
index 2f62efdd..00000000
--- a/tests/manual/lighting/lighting.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = app
-TARGET = tst_lighting
-CONFIG += qt warn_on
-
-INSTALL_DIRS = qml
-CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
-include(../../../pkg.pri)
-qtcAddDeployment()
-
-SOURCES += main.cpp
diff --git a/tests/manual/lighting/main.cpp b/tests/manual/lighting/main.cpp
deleted file mode 100644
index 8aa66508..00000000
--- a/tests/manual/lighting/main.cpp
+++ /dev/null
@@ -1,63 +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 <QtGui/QApplication>
-#include "qdeclarativeview3d.h"
-
-#include "../../shared/qmlres.h"
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView3D view;
- QString qml = q_get_qmldir(QLatin1String("qml/tst_lighting.qml"));
- view.setSource(QUrl::fromLocalFile(qml));
-
- if (QApplication::arguments().contains(QLatin1String("-maximize")))
- view.showMaximized();
- else if (QApplication::arguments().contains(QLatin1String("-fullscreen")))
- view.showFullScreen();
- else
- view.show();
-
- return app.exec();
-}
diff --git a/tests/manual/lighting/qml/LightingTestCase.qml b/tests/manual/lighting/qml/LightingTestCase.qml
deleted file mode 100644
index 35a3ead4..00000000
--- a/tests/manual/lighting/qml/LightingTestCase.qml
+++ /dev/null
@@ -1,132 +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
-
-Rectangle {
- id: container
- // Parameters for editting and access
- property string text;
- property variant camera: defaultCamera
- property variant light: defaultLight // The actual Light
- // lightItem contains the defaultLight and a small white sphere at the same
- // position.
- property alias lightItem: lightItem
- // lightSphere is the sphere in lightItem. It's intended use is to be a
- // visible object at the source of the light, to make it easier to see
- // where the light should be coming from.
- property alias lightSphere: lightSphere
- // The teapotContainer is an item containing the 5 teapots, to make it
- // easier to move them around if necessary
- property alias teapotContainer: teapotContainer
- // view is the viewport that displays the test
- property alias view: view
-
- // Default values:
- property variant defaultCamera: Camera { eye: Qt.vector3d(0,0,15)}
- property variant defaultLight: Light {}
- property real defaultWidth: 440
- property real defaultHeight: 300
-
- // Utility values
- property real theta: 0.0
- SequentialAnimation on theta {
- running: true
- loops: Animation.Infinite
- PropertyAnimation {
- from: 0.0
- to: 2.0 * Math.PI
- duration: 2000
- }
- }
-
- border.width: 2
- border.color: "black"
- radius: 5
- width: defaultWidth
- height: defaultHeight
-
- Text {
- id: textItem
- wrapMode: "WordWrap"
- horizontalAlignment: "AlignHCenter"
- text: container.text
- anchors.left: parent.left
- anchors.right: parent.right
- }
-
- Rectangle {
- id: viewportContainer
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: 1
- anchors.topMargin: 2
- anchors.top: textItem.bottom
- anchors.bottom: container.bottom
- color: "#aaccee"
-
- Viewport {
- id: view
- anchors.fill: parent
- picking: true
- camera: container.camera
- light: container.light
- Item3D {
- id:lightItem
- // This sphere is small enough to be obscured by the center
- // teapot if it's not manipulated
- Sphere { id: lightSphere; scale: 0.3;
- }
- Light{ id: testLight; }
- }
- Item3D {
- id: teapotContainer
- Teapot { id: centerTeapot }
- Teapot { id: topRightTeapot; x:2; y:2 }
- Teapot { id: topLeftTeapot; x:-2; y:2 }
- Teapot { id: bottomRightTeapot; x:2; y:-2 }
- Teapot { id: bottomLeftTeapot; x:-2; y:-2 }
- }
- }
- }
-}
diff --git a/tests/manual/lighting/qml/tst_lighting.qml b/tests/manual/lighting/qml/tst_lighting.qml
deleted file mode 100644
index d5c9c4ee..00000000
--- a/tests/manual/lighting/qml/tst_lighting.qml
+++ /dev/null
@@ -1,76 +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
-
-// QTBUG-17408
-Item {
- id: screen
-
- width: aTestCase.defaultWidth * 2
- height: aTestCase.defaultHeight * 1
-
- Flow {
- anchors.fill: parent
-
- LightingTestCase {
- id: aTestCase
- text: "Positional Lighting Direct Position Test. The light should appear to be emanating from the sphere, rotating around the middle teapot and lighting the insides of the other 4 teapots dynamically."
-
- onThetaChanged: {
- light.position = Qt.vector3d(1.5 * Math.sin(theta),
- 1.5 * Math.cos(theta), 0);
- lightSphere.position = light.position;
- }
- }
-
- LightingTestCase {
- text: "Directional Lighting Test.
- Lighting should look the same on all teapots"
- onThetaChanged: {
- light.direction = Qt.vector3d(1.5 * Math.sin(theta),
- 1.5 * Math.cos(theta),0);
- }
- }
- }
-}
diff --git a/tests/manual/lighting/qtquick3d.png b/tests/manual/lighting/qtquick3d.png
deleted file mode 100644
index 8351083e..00000000
--- a/tests/manual/lighting/qtquick3d.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/lighting/tst_lighting_qml.desktop b/tests/manual/lighting/tst_lighting_qml.desktop
deleted file mode 100644
index 6cb79035..00000000
--- a/tests/manual/lighting/tst_lighting_qml.desktop
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=tst_lighting
-Icon=/usr/share/icons/hicolor/80x80/apps/qtquick3d.png
-Exec=/usr/bin/invoker --type=e -s /usr/bin/tst_lighting -fullscreen
-OnlyShowIn=X-MeeGo;
-X-MeeGo-Logical-Id=qtn_comm_appname_tst_lighting_qml
diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro
deleted file mode 100644
index 8200a5da..00000000
--- a/tests/manual/manual.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS += displaymodel \
- lighting \
- model3ds \
- navigation1 \
- rotation \
- scaling \
- submesh \
- translation \
- transformations \
- animations \
- qrc \
- shapes
diff --git a/tests/manual/model3ds/README b/tests/manual/model3ds/README
deleted file mode 100644
index 63630c78..00000000
--- a/tests/manual/model3ds/README
+++ /dev/null
@@ -1,12 +0,0 @@
-
-This test renders a series of 3ds files to exercise currently supported functionality.
-
-The first model is comprised of a single mesh with no materials.
-
-The second model is a single mesh with coloured materials.
-
-The third mesh is a heirarchic mesh with no materials.
-
-The fourth mesh is a heirarchic mesh with colours/textures.
-
-All meshes should be lit & shaded, and can be manually rotated etc. as per QtQuick3D norms.
diff --git a/tests/manual/model3ds/main.cpp b/tests/manual/model3ds/main.cpp
deleted file mode 100644
index 2b2276c1..00000000
--- a/tests/manual/model3ds/main.cpp
+++ /dev/null
@@ -1,63 +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 <QtGui/QApplication>
-#include "qdeclarativeview3d.h"
-
-#include "../../shared/qmlres.h"
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView3D view;
- QString qml = q_get_qmldir(QLatin1String("qml/tst_model3ds.qml"));
- view.setSource(QUrl::fromLocalFile(qml));
-
- if (QApplication::arguments().contains(QLatin1String("-maximize")))
- view.showMaximized();
- else if (QApplication::arguments().contains(QLatin1String("-fullscreen")))
- view.showFullScreen();
- else
- view.show();
-
- return app.exec();
-}
diff --git a/tests/manual/model3ds/model3ds.pro b/tests/manual/model3ds/model3ds.pro
deleted file mode 100644
index bc19365e..00000000
--- a/tests/manual/model3ds/model3ds.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = app
-TARGET = tst_model3ds
-CONFIG += qt warn_on
-
-INSTALL_DIRS = qml
-CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
-include(../../../pkg.pri)
-qtcAddDeployment()
-
-SOURCES += main.cpp
diff --git a/tests/manual/model3ds/model3ds.qrc b/tests/manual/model3ds/model3ds.qrc
deleted file mode 100644
index 6dbd8edd..00000000
--- a/tests/manual/model3ds/model3ds.qrc
+++ /dev/null
@@ -1,10 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>qml/tst_model3ds.qml</file>
- <file>qml/meshes/lunar-lander.3ds</file>
- <file>qml/meshes/monkey.3ds</file>
- <file>qml/meshes/penguin.3ds</file>
- <file>qml/meshes/robot.3ds</file>
- <file>qml/meshes/hazard.png</file>
- </qresource>
-</RCC>
diff --git a/tests/manual/model3ds/qml/meshes/hazard.png b/tests/manual/model3ds/qml/meshes/hazard.png
deleted file mode 100644
index a7c0b7fe..00000000
--- a/tests/manual/model3ds/qml/meshes/hazard.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/model3ds/qml/meshes/lunar-lander.3ds b/tests/manual/model3ds/qml/meshes/lunar-lander.3ds
deleted file mode 100644
index 7403fdef..00000000
--- a/tests/manual/model3ds/qml/meshes/lunar-lander.3ds
+++ /dev/null
Binary files differ
diff --git a/tests/manual/model3ds/qml/meshes/monkey.3ds b/tests/manual/model3ds/qml/meshes/monkey.3ds
deleted file mode 100644
index e9a007b2..00000000
--- a/tests/manual/model3ds/qml/meshes/monkey.3ds
+++ /dev/null
Binary files differ
diff --git a/tests/manual/model3ds/qml/meshes/penguin.3ds b/tests/manual/model3ds/qml/meshes/penguin.3ds
deleted file mode 100644
index 26c09ac0..00000000
--- a/tests/manual/model3ds/qml/meshes/penguin.3ds
+++ /dev/null
Binary files differ
diff --git a/tests/manual/model3ds/qml/meshes/robot.3ds b/tests/manual/model3ds/qml/meshes/robot.3ds
deleted file mode 100644
index ed872c82..00000000
--- a/tests/manual/model3ds/qml/meshes/robot.3ds
+++ /dev/null
Binary files differ
diff --git a/tests/manual/model3ds/qml/tst_model3ds.qml b/tests/manual/model3ds/qml/tst_model3ds.qml
deleted file mode 100644
index 7a24ae67..00000000
--- a/tests/manual/model3ds/qml/tst_model3ds.qml
+++ /dev/null
@@ -1,199 +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
-
-// QTBUG-17392 / QTBUG-17391
-Item {
- id: screen
- width: 720
- height: 480
-
- //ITEM 1: Simple model without materials
- Rectangle {
- id: panel1
- x: 0; y:0
- width: screen.width/4
- height: screen.height
- border.width: 3
- color: "#3333aa"
-
- Viewport {
- anchors.fill: parent
- camera: Camera { eye: Qt.vector3d(0,3,15)}
-
- Item3D {
- scale: 2
- position: Qt.vector3d(0,-1,0)
- mesh: Mesh {source: "meshes/monkey.3ds"}
- }
- }
-
- Rectangle {
- border.width: 3; radius: 5
- width: parent.width
- height: text1.height + 10
- Text {
- id: text1
- width: parent.width
- wrapMode: "WordWrap"
- text: " MULTI-COMPONENT: No\n MATERIALS: None\n\n A grey shaded monkey head\n should be visible.\n\n Use mouse to rotate/zoom."
- anchors.centerIn: parent
- }
- }
- }
-
- //ITEM 2: Simple model with materials
- Rectangle {
- id: panel2
- anchors.left: panel1.right
- anchors.top: parent.top
- width: screen.width/4
- height: screen.height
- border.width: 3
- color: "#3333aa"
-
- Viewport {
- anchors.fill: parent
- camera: Camera { eye: Qt.vector3d(0,3,15)}
-
- Item3D {
- scale: 0.8
- position: Qt.vector3d(0,-1,0)
- mesh: Mesh {source: "meshes/penguin.3ds"}
- }
- }
-
- Rectangle {
- border.width: 3; radius: 5
- width: parent.width
- height: text2.height + 10
- Text {
- id: text2
- width: parent.width
- wrapMode: "WordWrap"
- text: " MULTI-COMPONENT: No\n MATERIALS: Yes\n\n A coloured, lit penguin\n should be visible.\n\n Use mouse to rotate/zoom."
- anchors.centerIn: parent
- }
- }
- }
-
- //ITEM 3: A complex model without materials
- Rectangle {
- id: panel3
- anchors.left: panel2.right
- anchors.top: parent.top
- width: screen.width/4
- height: screen.height
- border.width: 3
- color: "#3333aa"
-
- Viewport {
- anchors.fill: parent
- camera: Camera { eye: Qt.vector3d(0,0,10)}
-
- Item3D {
- scale: 0.4
- position: Qt.vector3d(0,-1,0)
- mesh: Mesh {source: "meshes/lunar-lander.3ds"}
- }
- }
- //text for item3
- Rectangle {
- border.width: 3; radius: 5
- width: parent.width
- height: text3.height + 10
- Text {
- id: text3
- width: parent.width
- wrapMode: "WordWrap"
- text: " MULTI-COMPONENT: Yes\n MATERIALS: None\n\n A grey shaded lunar lander\n should be visible.\n\n Use mouse to rotate/zoom."
- anchors.centerIn: parent
- }
- }
- }
- //ITEM 4: A Complex model with materials
- Rectangle {
- id: panel4
- anchors.left: panel3.right
- anchors.top: parent.top
- width: screen.width/4
- height: screen.height
- border.width: 3
- color: "#3333aa"
-
- Viewport {
- anchors.fill: parent
- camera: Camera { eye: Qt.vector3d(0,0,10)}
-
- Item3D {
- scale: 0.4
- position: Qt.vector3d(0,-2,0)
-
- transform: [
- Rotation3D {id: correct; angle: 90; axis: Qt.vector3d(0,1,0)},
- Rotation3D {id: pitch; angle: -90; axis: Qt.vector3d(0,0,1)},
- Rotation3D {id: roll; angle: 0; axis: Qt.vector3d(1,0,0)},
- Rotation3D {id: yaw; angle: 0; axis: Qt.vector3d(0,1,0)}
- ]
-
- mesh: Mesh {source: "meshes/robot.3ds"}
- }
- }
- //text for item4
- Rectangle {
- border.width: 3; radius: 5
- width: parent.width
- height: text4.height + 10
- Text {
- id: text4
- width: parent.width
- wrapMode: "WordWrap"
- text: " MULTI-COMPONENT: Yes\n MATERIALS: Yes\n\n A lit, coloured, textured robot\n should be visible.\n\n Use mouse to rotate/zoom."
- anchors.centerIn: parent
- }
- }
- }
-}
-
-
diff --git a/tests/manual/model3ds/qtquick3d.png b/tests/manual/model3ds/qtquick3d.png
deleted file mode 100644
index 8351083e..00000000
--- a/tests/manual/model3ds/qtquick3d.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/model3ds/tst_submesh_qml.desktop b/tests/manual/model3ds/tst_submesh_qml.desktop
deleted file mode 100644
index 7bd7fd92..00000000
--- a/tests/manual/model3ds/tst_submesh_qml.desktop
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=tst_submesh
-Icon=/usr/share/icons/hicolor/80x80/apps/qtquick3d.png
-Exec=/usr/bin/invoker --type=e -s /usr/bin/tst_submesh -fullscreen
-OnlyShowIn=X-MeeGo;
-X-MeeGo-Logical-Id=qtn_comm_appname_tst_submesh_qml
diff --git a/tests/manual/navigation1/README b/tests/manual/navigation1/README
deleted file mode 100644
index 29aaad44..00000000
--- a/tests/manual/navigation1/README
+++ /dev/null
@@ -1,8 +0,0 @@
-This tests navigation, specifically zooming and rotating the object using the default
-navigation configuration for QML applications.
-
-The first panel shows a 3D monkey head, and uses positional zooming: zooming in will
-move the camera physically closer to the object until it is clipped by the near plane.
-
-The second panel show a 3D monkey head, and uses field of view zooming: zooming is
-based on adjusting the field of view: zooming in will not clip the object.
diff --git a/tests/manual/navigation1/main.cpp b/tests/manual/navigation1/main.cpp
deleted file mode 100644
index f3d6a8b9..00000000
--- a/tests/manual/navigation1/main.cpp
+++ /dev/null
@@ -1,63 +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 <QtGui/QApplication>
-#include "qdeclarativeview3d.h"
-
-#include "../../shared/qmlres.h"
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView3D view;
- QString qml = q_get_qmldir(QLatin1String("qml/tst_navigation1.qml"));
- view.setSource(QUrl::fromLocalFile(qml));
-
- if (QApplication::arguments().contains(QLatin1String("-maximize")))
- view.showMaximized();
- else if (QApplication::arguments().contains(QLatin1String("-fullscreen")))
- view.showFullScreen();
- else
- view.show();
-
- return app.exec();
-}
diff --git a/tests/manual/navigation1/navigation1.pro b/tests/manual/navigation1/navigation1.pro
deleted file mode 100644
index a1d3bfad..00000000
--- a/tests/manual/navigation1/navigation1.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = app
-TARGET = tst_navigation1
-CONFIG += qt warn_on
-
-INSTALL_DIRS = qml
-CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
-include(../../../pkg.pri)
-qtcAddDeployment()
-
-SOURCES += main.cpp
diff --git a/tests/manual/navigation1/qml/meshes/monkey.3ds b/tests/manual/navigation1/qml/meshes/monkey.3ds
deleted file mode 100644
index e9a007b2..00000000
--- a/tests/manual/navigation1/qml/meshes/monkey.3ds
+++ /dev/null
Binary files differ
diff --git a/tests/manual/navigation1/qml/tst_navigation1.qml b/tests/manual/navigation1/qml/tst_navigation1.qml
deleted file mode 100644
index 14f16429..00000000
--- a/tests/manual/navigation1/qml/tst_navigation1.qml
+++ /dev/null
@@ -1,133 +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
-
-// QTBUG-17408 TEST
-Item {
- id: screen
- width: 720
- height: 480
-
- //ITEM 1: Simple model without materials
- Rectangle {
- id: panel1
- x: 0; y:0
- width: screen.width/2
- height: screen.height
- border.width: 3
- color: "#3333aa"
-
- Viewport {
- anchors.fill: parent
- camera: Camera { eye: Qt.vector3d(0,3,15)}
-
- Item3D {
- scale: 2
- position: Qt.vector3d(0,-1,0)
- mesh: Mesh {source: "meshes/monkey.3ds"}
- }
- }
-
- Rectangle {
- border.width: 3; radius: 5
- width: parent.width
- height: text1.height + 10
- Text {
- id: text1
- width: parent.width
- wrapMode: "WordWrap"
- text: " POSITIONAL ZOOM:\n\n" +
- " A shaded lit monkey head should\n"+
- " be displayed. Left click-and-hold" +
- " & move mouse to rotate.\n\n" +
- " Wheel to zoom. Zooming in should\n"+
- " result in eventual clipping.";
- anchors.centerIn: parent
- }
- }
- }
-
- //ITEM 2: Simple model with materials
- Rectangle {
- id: panel2
- anchors.left: panel1.right
- anchors.top: parent.top
- anchors.right: parent.right
- height: screen.height
- border.width: 3
- color: "#3333aa"
-
- Viewport {
- anchors.fill: parent
- fovzoom: true
- camera: Camera { eye: Qt.vector3d(0,3,15)}
-
- Item3D {
- scale: 2
- position: Qt.vector3d(0,-1,0)
- mesh: Mesh {source: "meshes/monkey.3ds"}
- }
- }
-
- Rectangle {
- border.width: 3; radius: 5
- width: parent.width
- height: text2.height + 10
- Text {
- id: text2
- width: parent.width
- wrapMode: "WordWrap"
- text: " FIELD-OF-VIEW ZOOM:\n\n" +
- " A shaded lit monkey head should\n"+
- " be displayed. Left click-and-hold" +
- " & move mouse to rotate.\n\n" +
- " Wheel to zoom. Zooming in should\n"+
- " not result in eventual clipping.";
- anchors.centerIn: parent
- }
- }
- }
-}
-
-
diff --git a/tests/manual/navigation1/qtquick3d.png b/tests/manual/navigation1/qtquick3d.png
deleted file mode 100644
index 8351083e..00000000
--- a/tests/manual/navigation1/qtquick3d.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/qrc/README b/tests/manual/qrc/README
deleted file mode 100644
index 8adbd818..00000000
--- a/tests/manual/qrc/README
+++ /dev/null
@@ -1,4 +0,0 @@
-Test is to make sure that the qrc: loaders don't change their functionality
-between releases.
-
-Both left and right cubes should be non-rotating and textured with Qt logo.
diff --git a/tests/manual/qrc/main.cpp b/tests/manual/qrc/main.cpp
deleted file mode 100644
index e56a21ed..00000000
--- a/tests/manual/qrc/main.cpp
+++ /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$
-**
-****************************************************************************/
-
-#include <QtGui/QApplication>
-#include "qdeclarativeview3d.h"
-#include <QWidget>
-#include <QHBoxLayout>
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QWidget widget;
- QHBoxLayout layout;
-
- QDeclarativeView3D viewL;
- viewL.setSource(QUrl("qrc:///qml/cube.qml"));
- layout.addWidget(&viewL);
-
- QDeclarativeView3D viewR;
- viewR.setSource(QUrl("Qrc:/qml/cube.qml"));
-
- layout.addWidget(&viewR);
-
- widget.setLayout(&layout);
- widget.show();
-
- return app.exec();
-}
diff --git a/tests/manual/qrc/qml/cube.qml b/tests/manual/qrc/qml/cube.qml
deleted file mode 100644
index 89a7e669..00000000
--- a/tests/manual/qrc/qml/cube.qml
+++ /dev/null
@@ -1,63 +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 examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-//! [1]
-import QtQuick 1.0
-import Qt3D 1.0
-import Qt3D.Shapes 1.0
-
-Viewport {
- width: 640; height: 480
-
- Cube {
- scale: 1.5
-
- transform: Rotation3D {
- angle: 45
- axis: Qt.vector3d(1, 1, 1)
- }
-
- effect: Effect {
- color: "#aaca00"
- texture: "qtlogo.png"
- decal: true
- }
- }
-}
-//! [1]
diff --git a/tests/manual/qrc/qml/qtlogo.png b/tests/manual/qrc/qml/qtlogo.png
deleted file mode 100644
index 7d3e97eb..00000000
--- a/tests/manual/qrc/qml/qtlogo.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/qrc/qrc.pro b/tests/manual/qrc/qrc.pro
deleted file mode 100644
index a17882d7..00000000
--- a/tests/manual/qrc/qrc.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-TEMPLATE = app
-TARGET = tst_qrc
-CONFIG += qt warn_on
-
-INSTALL_DIRS = qml
-CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
-include(../../../pkg.pri)
-qtcAddDeployment()
-
-SOURCES += main.cpp
-
-OTHER_FILES += \
- qml/tst_cube.qml
-
-RESOURCES += \
- qrc.qrc
-
diff --git a/tests/manual/qrc/qrc.qrc b/tests/manual/qrc/qrc.qrc
deleted file mode 100644
index 168976b5..00000000
--- a/tests/manual/qrc/qrc.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>qml/cube.qml</file>
- <file>qml/qtlogo.png</file>
- </qresource>
-</RCC>
diff --git a/tests/manual/qrc/qtquick3d.png b/tests/manual/qrc/qtquick3d.png
deleted file mode 100644
index 8351083e..00000000
--- a/tests/manual/qrc/qtquick3d.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/qrc/tst_qrc_qml.desktop b/tests/manual/qrc/tst_qrc_qml.desktop
deleted file mode 100644
index 02f18027..00000000
--- a/tests/manual/qrc/tst_qrc_qml.desktop
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=tst_qrc
-Icon=/usr/share/icons/hicolor/80x80/apps/qtquick3d.png
-Exec=/usr/bin/invoker --type=e -s /usr/bin/tst_qrc -fullscreen
-OnlyShowIn=X-MeeGo;
-X-MeeGo-Logical-Id=qtn_comm_appname_tst_qrc_qml
diff --git a/tests/manual/qt3d.svg b/tests/manual/qt3d.svg
deleted file mode 100644
index 4b25ec50..00000000
--- a/tests/manual/qt3d.svg
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-<!-- Converted with SVG Converter - Version 0.9.5 (Compiled Mon May 30 09:08:51 2011) - Copyright (C) 2011 Nokia -->
-<svg xmlns="http://www.w3.org/2000/svg" width="287" version="1.1" height="286" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="tiny" id="svg2">
- <defs id="defs4">
- <linearGradient id="linearGradient4309">
- <stop offset="0" style="stop-color:#d4f301;stop-opacity:1;" id="stop4311"/>
- <stop offset="1" style="stop-color:#d4f301;stop-opacity:0;" id="stop4313"/>
- </linearGradient>
- <linearGradient gradientTransform="matrix(1.0104795,0,0,1.004441,23.387309,76.758859)" id="linearGradient3730-2" y1="131.35715" y2="156.39526" x1="23.626827" gradientUnits="userSpaceOnUse" x2="303.57144">
- <stop offset="0" style="stop-color:#038d30;stop-opacity:1;" id="stop3726-7"/>
- <stop offset="1" style="stop-color:#038d30;stop-opacity:0;" id="stop3728-1"/>
- </linearGradient>
- <linearGradient id="linearGradient3724-7">
- <stop offset="0" style="stop-color:#038d30;stop-opacity:1;" id="stop3726-7"/>
- <stop offset="1" style="stop-color:#038d30;stop-opacity:0;" id="stop3728-1"/>
- </linearGradient>
- <linearGradient id="linearGradient4315" y1="62.920685" y2="62.920685" x1="72.492188" gradientUnits="userSpaceOnUse" x2="165.83203">
- <stop offset="0" style="stop-color:#d4f301;stop-opacity:1;" id="stop4311"/>
- <stop offset="1" style="stop-color:#d4f301;stop-opacity:0;" id="stop4313"/>
- </linearGradient>
- </defs>
- <metadata id="metadata7"/>
- <g id="layer1" transform="translate(-25.071424,-77.933617)">
- <path style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#d4f301;stroke-width:8.85648727;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="path3722" d="M 149.39285,339.37194 C 118.29002,338.06386 93.410274,329.21846 78.267585,314.08502 66.239667,302.06444 58.159936,285.11057 54.818135,264.88047 c -1.962614,-11.881 -2.442596,-20.11519 -2.455216,-42.1199 -0.01051,-18.36712 0.160997,-23.0644 1.239861,-33.95521 2.529982,-25.53941 11.482605,-46.43472 25.677112,-59.93007 16.042727,-15.25252 39.462148,-23.21337 72.203768,-24.54383 6.77105,-0.27512 31.97542,0.38686 41.46813,1.08915 17.85829,1.32123 29.86273,4.01251 41.92069,9.39824 16.71724,7.46685 28.60768,18.52238 36.44553,33.88638 5.7477,11.26691 9.34961,23.29707 11.69339,39.05536 2.22754,14.97664 2.81073,44.00559 1.22086,60.77114 -2.76934,29.20404 -10.704,50.36949 -24.19378,64.53629 -8.65346,9.08774 -21.29946,16.39504 -35.37578,20.44137 -13.11053,3.76868 -25.14568,5.0858 -52.44498,5.73944 -13.81368,0.33078 -17.4242,0.35023 -22.82487,0.12311 l 0,0 z"/>
- <rect width="236.93414" x="49.282932" y="102.78797" rx="95.84404" ry="92.255867" height="239.43414" style="opacity:0;fill:none;stroke:#008000;stroke-width:3.29858350999999980;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="rect2852"/>
- <rect width="175" x="28.571428" y="19.214285" rx="95.84404" ry="92.255867" height="206.07143" style="opacity:0;fill:#b94b4b;fill-opacity:1;stroke:#05d105;stroke-width:4.147;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="rect3704" transform="translate(25.071424,77.933617)"/>
- <image width="172.71428" x="86.571419" y="214.50505" height="93.14286" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIkAAABMCAYAAABZAZTOAAAABHNCSVQICAgIfAhkiAAAF+NJREFU eJztXVlzHMeR/qq6e06ABE9QomTJlu0IKdaxftmH/Xf783Zf1l7FWpbWFiXSFA+QIIDBYDBXd+1D ZlZlVdcMTpLYBTKi0T19d9fXmV8eVTAAHG7kRtaI/dg3cCNXX25AciMnSvmxb+CDiwEMAGPW7+Zc PL/Ocu1A0ukAvT5QdQFjAWsUYBzQOKBeAssFMD0GFvMbo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EeUNSMuAcIB2vDGuyxvD6Omg42S7nq5vwnyvkv4ZeZbkSIAFCctDVZK97 gzACtVSKd/thZKSyopELbZkQ2RQoUIBRyz4xuMrcrOAkIS0cPBkdPKszJmU2BdwYOOYBd0f7gbhP Dq+eeUnlyoAEoJc1nxORk7E1pNimKLkHWydolS4P+CIxlZbHk9S/AiHg5qBAlNxDdi6AELOjEnXi wYh2kP+WJbGQ+YzGuhXeMRmHcW+vOkAAZKvoPqpIg0uEteyq/58nBdPc8L0+daKOttn4HD4amxZF a4CkwTTxXhCWI2Kq4h9LxTumkzB2i/xrNdEuNY+gLUk97fpfdblyIGmJJp5JEExGBIqCZxle4jmJ Njnq/JHkPBwFGOcAKUzy3g248WUUbO0e8zl1nuf/mlx9kNzIRxd78i43ct3lBiQ3cqLcgORGTpQb kNzIiXIDkhs5Uf4XvCkz5B6wzDwAAAAASUVORK5CYII= " id="image3149"/>
- <image width="156.57143" x="89.857132" y="140.67836" height="65.897751" id="image3075" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPMAAABoCAIAAACrNVHoAAAAA3NCSVQICAjb4U/gAAAgAElEQVR4 nO29ebR9SVXn+Yk4w73vvvd+7zfkPJFJAmKiKS0qMpQMIlQJBYhoaQMKWpZFid2WrdCuokpKWykX WtqKJbZDtraKUoWKE6JLUFBAlDlBSCAHciCH3/SGe+8ZYug/dkTcc+f3ywGl+7fXXW+de96558SJ 2LHju8eA83SeztN5Ok9fKKQe3NsVRfGox1xx9aOOHL/MXXlNfuWJ8qKNo+3Gme2eHtbu5vF9e/vu 4Iz77Cfb2z/Z3PGZ4d4pOx6aB7cNX4i0ublx5TUnLr92MDiito/mR47nWb/dOZLtbGa9QtetOzU+ qCvfDNVdt47vunW4e8oenHGn76mr8fneW0z5A7/FxmDjWc/88mc96zGPf/zFX/IllxdFBqfgPtiF IRyH2+K1TfeHlpMtnDzwv/nes+/5vfyDb2/uuKlyzj/wJv3Tp6uvvfQF3/RFT/yKK6691lx77e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8ZZ/zdJ54qDn7 vttC3ZJE3eR7STpKlRhSlrJox6JrzmSGJses2PbDnDkPNM/THD3Q7eBXkzV87K8heobn83GI0cmT qO54vDbxu5uBd57O0ww9tJwNvPUNfPbjh4ob7pI4lmcqrZ2n83R4esDbwR+CPvYu7voUV15HUU7F BkyOO9GkIqpTmc0Z/3ZK7ewef+rvpxLgztN54qHG2ULec8uHecMr2DrG0Yu56GFcdR0nLqfoL04a 9S7MOLF/J9u24JnDFxI/T/9/pn8CBjMVAtaWWqZ9+hN/oeJ5MY/Y896K83SeztN5Ok/n6Tydp/N0 ns7TeTpP5+k83T/6fwEfb2KSI/kgFgAAAABJRU5ErkJggg== "/>
- <rect width="285.97864" x="26.028843" y="78.512794" rx="0" height="284.96848" ry="0" style="fill:#000000;fill-opacity:1;stroke:none;opacity:0" id="rect2995"/>
- </g>
- <g id="layer2"/>
-</svg>
diff --git a/tests/manual/qtquick3d.svg b/tests/manual/qtquick3d.svg
deleted file mode 100644
index 3b8a5c7a..00000000
--- a/tests/manual/qtquick3d.svg
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<!-- Converted with SVG Converter - Version 0.9.5 (Compiled Mon May 30 09:08:51 2011) - Copyright (C) 2011 Nokia -->
-<svg xmlns="http://www.w3.org/2000/svg" width="287" version="1.1" height="286" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="tiny" id="svg2">
- <defs id="defs4">
- <linearGradient gradientTransform="matrix(1.0104795,0,0,1.004441,23.387309,76.758859)" id="linearGradient3730-2" y1="131.35715" y2="156.39526" x1="23.626827" gradientUnits="userSpaceOnUse" x2="303.57144">
- <stop offset="0" style="stop-color:#038d30;stop-opacity:1;" id="stop3726-7"/>
- <stop offset="1" style="stop-color:#038d30;stop-opacity:0;" id="stop3728-1"/>
- </linearGradient>
- <linearGradient id="linearGradient3724-7">
- <stop offset="0" style="stop-color:#038d30;stop-opacity:1;" id="stop3726-7"/>
- <stop offset="1" style="stop-color:#038d30;stop-opacity:0;" id="stop3728-1"/>
- </linearGradient>
- </defs>
- <metadata id="metadata7"/>
- <g id="layer1" transform="translate(-25.071424,-77.933617)">
- <path style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#00ffff;stroke-width:8.85648727000000060;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="path3722" d="M 149.39285,339.37194 C 118.29002,338.06386 93.410274,329.21846 78.267585,314.08502 66.239667,302.06444 58.159936,285.11057 54.818135,264.88047 c -1.962614,-11.881 -2.442596,-20.11519 -2.455216,-42.1199 -0.01051,-18.36712 0.160997,-23.0644 1.239861,-33.95521 2.529982,-25.53941 11.482605,-46.43472 25.677112,-59.93007 16.042727,-15.25252 39.462148,-23.21337 72.203768,-24.54383 6.77105,-0.27512 31.97542,0.38686 41.46813,1.08915 17.85829,1.32123 29.86273,4.01251 41.92069,9.39824 16.71724,7.46685 28.60768,18.52238 36.44553,33.88638 5.7477,11.26691 9.34961,23.29707 11.69339,39.05536 2.22754,14.97664 2.81073,44.00559 1.22086,60.77114 -2.76934,29.20404 -10.704,50.36949 -24.19378,64.53629 -8.65346,9.08774 -21.29946,16.39504 -35.37578,20.44137 -13.11053,3.76868 -25.14568,5.0858 -52.44498,5.73944 -13.81368,0.33078 -17.4242,0.35023 -22.82487,0.12311 l 0,0 z"/>
- <rect width="236.93414" x="49.282932" y="102.78797" rx="95.84404" ry="92.255867" height="239.43414" style="opacity:0;fill:none;stroke:#008000;stroke-width:3.29858350999999980;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="rect2852"/>
- <rect width="175" x="28.571428" y="19.214285" rx="95.84404" ry="92.255867" height="206.07143" style="opacity:0;fill:#b94b4b;fill-opacity:1;stroke:#05d105;stroke-width:4.147;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="rect3704" transform="translate(25.071424,77.933617)"/>
- <image width="191.18274" x="73.931854" y="148.93103" height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SX9NzRJWgv6bmjS9Be0nNH&#xa;l6C9pOeOLkF7Sc8dXYL2kp47ugTtJT139P84WGaZUimIJgAAAABJRU5ErkJggg==&#xa;" id="image3163"/>
- <rect width="282.94818" x="28.049149" y="81.03817" rx="0" height="279.91772" ry="0" style="fill:none;fill-opacity:1;stroke:none;stroke-width:5.44153594999999960;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="rect2995"/>
- </g>
- <g id="layer2"/>
-</svg>
diff --git a/tests/manual/rotation/main.cpp b/tests/manual/rotation/main.cpp
deleted file mode 100644
index 9c44b41e..00000000
--- a/tests/manual/rotation/main.cpp
+++ /dev/null
@@ -1,63 +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 <QtGui/QApplication>
-#include "qdeclarativeview3d.h"
-
-#include "../../shared/qmlres.h"
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView3D view;
- QString qml = q_get_qmldir(QLatin1String("qml/tst_rotation.qml"));
- view.setSource(QUrl::fromLocalFile(qml));
-
- if (QApplication::arguments().contains(QLatin1String("-maximize")))
- view.showMaximized();
- else if (QApplication::arguments().contains(QLatin1String("-fullscreen")))
- view.showFullScreen();
- else
- view.show();
-
- return app.exec();
-}
diff --git a/tests/manual/rotation/qml/TestCase.qml b/tests/manual/rotation/qml/TestCase.qml
deleted file mode 100644
index e07805fe..00000000
--- a/tests/manual/rotation/qml/TestCase.qml
+++ /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$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import Qt3D 1.0
-import Qt3D.Shapes 1.0
-
-Rectangle {
- id: container
- property string text;
- property variant rotationAxis : Qt.vector3d(1,0,0)
- property real defaultWidth: 220
- property real defaultHeight: 150
- property variant rotation: Rotation3D {
- id: rotationTransform
- axis: rotationAxis
- PropertyAnimation on angle {
- loops: Animation.Infinite
- from: 0
- to: 360
- duration: 1500
- }
- }
- border.width: 2
- border.color: "black"
- radius: 5
- width: defaultWidth
- height: defaultHeight
- Text {
- id: textItem
- wrapMode: "WordWrap"
- horizontalAlignment: "AlignHCenter"
- text: container.text
-
- anchors.left: parent.left
- anchors.right: parent.right
- }
- Rectangle {
- id: viewportContainer
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: textItem.bottom
- anchors.bottom: container.bottom
- color: "#aaccee"
-
- Viewport {
- id: view
- anchors.fill: parent
- picking: true
- camera: Camera { eye: Qt.vector3d(0,15,50)}
- Cube
- {
- id: model
- scale: 8.0
- transform: container.rotation
- }
- }
- }
-}
diff --git a/tests/manual/rotation/qml/tst_rotation.qml b/tests/manual/rotation/qml/tst_rotation.qml
deleted file mode 100644
index 9a783e15..00000000
--- a/tests/manual/rotation/qml/tst_rotation.qml
+++ /dev/null
@@ -1,102 +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
-
-// QTBUG-17408
-Item {
- id: screen
- width: aTestCase.defaultWidth * 3
- height: aTestCase.defaultHeight * 3
-
- Flow {
- anchors.fill: parent
-
- TestCase {
- id: aTestCase
- text: "Rotation: X axis\n(Rolling towards you)"
- rotationAxis: Qt.vector3d(1,0,0)
- }
-
- TestCase {
- text: "Rotation on Y Axis\n(Cube front rotating left to right)"
- rotationAxis: Qt.vector3d(0,1,0)
- }
-
- TestCase {
- text: "Rotation: Z axis\n(Rolling to the left)"
- rotationAxis: Qt.vector3d(0,0,1)
- }
-
-
- TestCase {
- text: "Rotation: -X axis\n(Rolling away)"
- rotationAxis: Qt.vector3d(-1,0,0)
- }
-
- TestCase {
- text: "Rotation on -Y Axis\n(Cube front rotating right to left)"
- rotationAxis: Qt.vector3d(0,-1,0)
- }
-
- TestCase {
- text: "Rotation: -Z axis\n(Rolling to the right)"
- rotationAxis: Qt.vector3d(0,0,-1)
- }
-
- TestCase {
- text: "Rotation: 3 axis\n(top-right-front corner stationary)"
- rotationAxis: Qt.vector3d(1,1,1)
- }
-
- TestCase {
- text: "Axis Normalization\n(Identical to previous case)"
- rotationAxis: Qt.vector3d(12.3,12.3,12.3)
- }
-
- TestCase {
- text: "Degenerate Axis\n(Anything but a crash is ok)"
- rotationAxis: Qt.vector3d(0,0,0)
- }
- }
-}
diff --git a/tests/manual/rotation/qtquick3d.png b/tests/manual/rotation/qtquick3d.png
deleted file mode 100644
index 8351083e..00000000
--- a/tests/manual/rotation/qtquick3d.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/rotation/rotation.pro b/tests/manual/rotation/rotation.pro
deleted file mode 100644
index e806e3f9..00000000
--- a/tests/manual/rotation/rotation.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = app
-TARGET = tst_rotation
-CONFIG += qt warn_on
-
-INSTALL_DIRS = qml
-CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
-include(../../../pkg.pri)
-qtcAddDeployment()
-
-SOURCES += main.cpp
diff --git a/tests/manual/rotation/tst_rotation_qml.desktop b/tests/manual/rotation/tst_rotation_qml.desktop
deleted file mode 100644
index 37bf2fc6..00000000
--- a/tests/manual/rotation/tst_rotation_qml.desktop
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=tst_rotation
-Icon=/usr/share/icons/hicolor/80x80/apps/qtquick3d.png
-Exec=/usr/bin/invoker --type=e -s /usr/bin/tst_rotation -fullscreen
-OnlyShowIn=X-MeeGo;
-X-MeeGo-Logical-Id=qtn_comm_appname_tst_rotation_qml
diff --git a/tests/manual/scaling/main.cpp b/tests/manual/scaling/main.cpp
deleted file mode 100644
index b4112b44..00000000
--- a/tests/manual/scaling/main.cpp
+++ /dev/null
@@ -1,63 +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 <QtGui/QApplication>
-#include "qdeclarativeview3d.h"
-
-#include "../../shared/qmlres.h"
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView3D view;
- QString qml = q_get_qmldir(QLatin1String("qml/tst_scaling.qml"));
- view.setSource(QUrl::fromLocalFile(qml));
-
- if (QApplication::arguments().contains(QLatin1String("-maximize")))
- view.showMaximized();
- else if (QApplication::arguments().contains(QLatin1String("-fullscreen")))
- view.showFullScreen();
- else
- view.show();
-
- return app.exec();
-}
diff --git a/tests/manual/scaling/qml/ScalingTestCase.qml b/tests/manual/scaling/qml/ScalingTestCase.qml
deleted file mode 100644
index 14ba7fb8..00000000
--- a/tests/manual/scaling/qml/ScalingTestCase.qml
+++ /dev/null
@@ -1,122 +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
-
-Rectangle {
- id: container
- // Parameters for editting
- property string text;
- property variant testTransform: defaultTransform
- property real scaleFactor: 1.0
- property variant scaleVectorA: Qt.vector3d(1,1,1)
- property variant scaleVectorB: Qt.vector3d(1,1,1)
- property variant camera: defaultCamera
-
- // Default values:
- property variant defaultCamera: Camera { eye: Qt.vector3d(0,5,5)}
- property real defaultWidth: 220
- property real defaultHeight: 150
- property variant defaultTransform: Scale3D {
- scale: Qt.vector3d((scaleVectorA.x * animationFactor +
- scaleVectorB.x * (1.0 - animationFactor)),
- scaleVectorA.y * animationFactor +
- scaleVectorB.y * (1.0 - animationFactor),
- scaleVectorA.z * animationFactor +
- scaleVectorB.z * (1.0 - animationFactor))
- property real animationFactor: 1.0
-
- SequentialAnimation on animationFactor {
- loops: Animation.Infinite
- PropertyAnimation {
- from: 1.0
- to: 0.0
- duration: 2000
- }
- PropertyAnimation {
- from: 0.0
- to: 1.0
- duration: 2000
- }
- }
- }
-
- border.width: 2
- border.color: "black"
- radius: 5
- width: defaultWidth
- height: defaultHeight
-
- Text {
- id: textItem
- wrapMode: "WordWrap"
- horizontalAlignment: "AlignHCenter"
- text: container.text
- anchors.left: parent.left
- anchors.right: parent.right
- }
-
- Rectangle {
- id: viewportContainer
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: 1
- anchors.topMargin: 2
- anchors.top: textItem.bottom
- anchors.bottom: container.bottom
- color: "#aaccee"
-
- Viewport {
- id: view
- anchors.fill: parent
- picking: true
- camera: container.camera
- Teapot
- {
- id: model
- scale: container.scaleFactor
- transform: container.testTransform
- }
- }
- }
-}
diff --git a/tests/manual/scaling/qml/tst_scaling.qml b/tests/manual/scaling/qml/tst_scaling.qml
deleted file mode 100644
index 4c6b60c0..00000000
--- a/tests/manual/scaling/qml/tst_scaling.qml
+++ /dev/null
@@ -1,150 +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
-
-// QTBUG-17408
-Item {
- id: screen
- width: aTestCase.defaultWidth * 3
- height: aTestCase.defaultHeight * 4
- property variant scalingCamera: Camera {eye: Qt.vector3d(0,20,20) }
-
- Flow {
- anchors.fill: parent
-
- ScalingTestCase {
- id: aTestCase
- text: "Scaling up"
- camera: scalingCamera
- scaleVectorA: Qt.vector3d(1,1,1)
- scaleVectorB: Qt.vector3d(4,4,4)
- }
-
- ScalingTestCase {
- text: "Scaling down"
- scaleVectorA: Qt.vector3d(1,1,1)
- scaleVectorB: Qt.vector3d(0.1,0.1,0.1)
- }
-
- ScalingTestCase {
- text: "Scaling using real\n(scaling and inversion)"
- testTransform: Scale3D {}
- camera: scalingCamera
- scaleFactor: 1
- SequentialAnimation on scaleFactor {
- loops: Animation.Infinite
- PropertyAnimation {
- from: -3
- to: 3
- duration: 1500
- }
- PropertyAnimation {
- from: 3
- to: -3
- duration: 1500
- }
- }
- }
-
- ScalingTestCase {
- text: "Scaling in X\n(mirroring horizontally)"
- camera: scalingCamera
- scaleVectorA: Qt.vector3d(1,1,1)
- scaleVectorB: Qt.vector3d(4,1,1)
- }
-
- ScalingTestCase {
- text: "Scaling in Y\n(stretching vertically)"
- camera: scalingCamera
- scaleVectorA: Qt.vector3d(1,1,1)
- scaleVectorB: Qt.vector3d(1,4,1)
- }
-
- ScalingTestCase {
- text: "Scaling in Z\n(depth-wise)"
- camera: scalingCamera
- scaleVectorA: Qt.vector3d(1,1,1)
- scaleVectorB: Qt.vector3d(1,1,4)
- }
-
- ScalingTestCase {
- text: "Negative Scaling in X\n(mirroring horizontally)"
- scaleVectorA: Qt.vector3d(1,1,1)
- scaleVectorB: Qt.vector3d(-1,1,1)
- }
-
- ScalingTestCase {
- text: "Negative Scaling in Y\n(flipping upside-down)"
- scaleVectorA: Qt.vector3d(1,1,1)
- scaleVectorB: Qt.vector3d(1,-1,1)
- }
-
- ScalingTestCase {
- text: "Negative Scaling in Z\n(depth-wise)"
- scaleVectorA: Qt.vector3d(1,1,1)
- scaleVectorB: Qt.vector3d(1,1,-1)
- }
-
- ScalingTestCase {
- text: "Zero Z\n(Probable artifacts)"
- scaleVectorA: Qt.vector3d(1,1,0)
- scaleVectorB: Qt.vector3d(1,1,0)
- }
-
- ScalingTestCase {
- text: "Zero Y\n(Probable artifacts)"
- scaleVectorA: Qt.vector3d(1,0,1)
- scaleVectorB: Qt.vector3d(1,0,1)
- }
-
- // Skipping zero X because it would be invisible with the
- // camera position all the other tests have
-
- ScalingTestCase {
- text: "Zero Vector\n(Not visible and shouldn't crash)"
- scaleVectorA: Qt.vector3d(0,0,0)
- scaleVectorB: Qt.vector3d(0,0,0)
- }
- }
-}
diff --git a/tests/manual/scaling/qtquick3d.png b/tests/manual/scaling/qtquick3d.png
deleted file mode 100644
index 8351083e..00000000
--- a/tests/manual/scaling/qtquick3d.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/scaling/scaling.pro b/tests/manual/scaling/scaling.pro
deleted file mode 100644
index ad71ce81..00000000
--- a/tests/manual/scaling/scaling.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = app
-TARGET = tst_scaling
-CONFIG += qt warn_on
-
-INSTALL_DIRS = qml
-CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
-include(../../../pkg.pri)
-qtcAddDeployment()
-
-SOURCES += main.cpp
diff --git a/tests/manual/scaling/tst_scaling_qml.desktop b/tests/manual/scaling/tst_scaling_qml.desktop
deleted file mode 100644
index 5b036b5c..00000000
--- a/tests/manual/scaling/tst_scaling_qml.desktop
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=tst_scaling
-Icon=/usr/share/icons/hicolor/80x80/apps/qtquick3d.png
-Exec=/usr/bin/invoker --type=e -s /usr/bin/tst_scaling -fullscreen
-OnlyShowIn=X-MeeGo;
-X-MeeGo-Logical-Id=qtn_comm_appname_tst_scaling_qml
diff --git a/tests/manual/shapes/README b/tests/manual/shapes/README
deleted file mode 100644
index 0d2d97a3..00000000
--- a/tests/manual/shapes/README
+++ /dev/null
@@ -1,6 +0,0 @@
-This is a basic manual test for the shapes classes in QML.
-It needs to be extended greatly to deal with level-of-detail, and the
-other properties which can be changed, such as radius and length,
-also checking on the animations of these, and creation of larger
-numbers of shapes. This last item is to confirm that only one copy
-of the geometry is created in this case.
diff --git a/tests/manual/shapes/main.cpp b/tests/manual/shapes/main.cpp
deleted file mode 100644
index 374b7c73..00000000
--- a/tests/manual/shapes/main.cpp
+++ /dev/null
@@ -1,63 +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 <QtGui/QApplication>
-#include "qdeclarativeview3d.h"
-
-#include "../../shared/qmlres.h"
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView3D view;
- QString qml = q_get_qmldir(QLatin1String("qml/tst_shapes.qml"));
- view.setSource(QUrl::fromLocalFile(qml));
-
- if (QApplication::arguments().contains(QLatin1String("-maximize")))
- view.showMaximized();
- else if (QApplication::arguments().contains(QLatin1String("-fullscreen")))
- view.showFullScreen();
- else
- view.show();
-
- return app.exec();
-}
diff --git a/tests/manual/shapes/qml/tst_shapes.qml b/tests/manual/shapes/qml/tst_shapes.qml
deleted file mode 100644
index e402e90d..00000000
--- a/tests/manual/shapes/qml/tst_shapes.qml
+++ /dev/null
@@ -1,98 +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
-
-Item {
- id: screen
- width: 720
- height: 480
- Rectangle {
- id: description
- border.width: 3
- radius: 5
- width: parent.width
- height: text.height + 10
- Text {
- id: text
- width: parent.width
- wrapMode: "WordWrap"
- text: "There should be a green cylinder on the left, a beige sphere in the middle,\n" +
- "and a red capsule on the right hand side.\n\n" +
- "They should be the same diameter, but the capsule & cylinder twice the height.\n" +
- "The capsule and cylinder should be oriented with their length vertically.\n" +
- "Click & drag in the window to rotate the objects to confirm."
- anchors.centerIn: parent
- }
- }
- Rectangle {
- width: parent.width
- anchors.top: description.bottom
- anchors.bottom: screen.bottom
- anchors.left: screen.left
- anchors.right: screen.right
- color: "#aaccee"
-
- Viewport {
- id: view
- anchors.fill: parent
- showSceneGraph: true
- Cylinder {
- x: -2.2
- y: 1.5
- transform: Rotation3D { axis: "1, 0, 0"; angle: 90 }
- length: 3
- effect: Effect { color: "green" }
- }
- Sphere {
- effect: Effect { color: "burlywood" }
- }
- Capsule {
- x: 2.2
- length: 3
- transform: Rotation3D { axis: "1, 0, 0"; angle: 90 }
- effect: Effect { color: "red" }
- }
- }
- }
-}
diff --git a/tests/manual/shapes/qtquick3d.png b/tests/manual/shapes/qtquick3d.png
deleted file mode 100644
index 8351083e..00000000
--- a/tests/manual/shapes/qtquick3d.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/shapes/shapes.pro b/tests/manual/shapes/shapes.pro
deleted file mode 100644
index d4950ff5..00000000
--- a/tests/manual/shapes/shapes.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = app
-TARGET = tst_shapes
-CONFIG += qt warn_on
-
-INSTALL_DIRS = qml
-CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
-include(../../../pkg.pri)
-qtcAddDeployment()
-
-SOURCES += main.cpp
diff --git a/tests/manual/shapes/tst_shapes_qml.desktop b/tests/manual/shapes/tst_shapes_qml.desktop
deleted file mode 100644
index 7bd7fd92..00000000
--- a/tests/manual/shapes/tst_shapes_qml.desktop
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=tst_submesh
-Icon=/usr/share/icons/hicolor/80x80/apps/qtquick3d.png
-Exec=/usr/bin/invoker --type=e -s /usr/bin/tst_submesh -fullscreen
-OnlyShowIn=X-MeeGo;
-X-MeeGo-Logical-Id=qtn_comm_appname_tst_submesh_qml
diff --git a/tests/manual/submesh/README b/tests/manual/submesh/README
deleted file mode 100644
index 4dc84f04..00000000
--- a/tests/manual/submesh/README
+++ /dev/null
@@ -1,9 +0,0 @@
-
-This test renders a lander model and submeshes to validate functionality.
-A radar dish submesh is stripped off, and duplicated three times.
-One instance rotates near the original position on the lander.
-If the submesh is not successfully removed from the model, there will be a second
-stationary dish underneath/near this rotating dish.
-A second model moves left and right, and should appear close to the right of lander.
-The third dish is testing scaling. Because of the way the scaling works, it may also appear to
-be moving left and right, and this is acceptable.
diff --git a/tests/manual/submesh/main.cpp b/tests/manual/submesh/main.cpp
deleted file mode 100644
index 67e68746..00000000
--- a/tests/manual/submesh/main.cpp
+++ /dev/null
@@ -1,63 +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 <QtGui/QApplication>
-#include "qdeclarativeview3d.h"
-
-#include "../../shared/qmlres.h"
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView3D view;
- QString qml = q_get_qmldir(QLatin1String("qml/tst_submesh.qml"));
- view.setSource(QUrl::fromLocalFile(qml));
-
- if (QApplication::arguments().contains(QLatin1String("-maximize")))
- view.showMaximized();
- else if (QApplication::arguments().contains(QLatin1String("-fullscreen")))
- view.showFullScreen();
- else
- view.show();
-
- return app.exec();
-}
diff --git a/tests/manual/submesh/qml/meshes/lunar-lander.3ds b/tests/manual/submesh/qml/meshes/lunar-lander.3ds
deleted file mode 100644
index 7403fdef..00000000
--- a/tests/manual/submesh/qml/meshes/lunar-lander.3ds
+++ /dev/null
Binary files differ
diff --git a/tests/manual/submesh/qml/tst_submesh.qml b/tests/manual/submesh/qml/tst_submesh.qml
deleted file mode 100644
index 2fb42e66..00000000
--- a/tests/manual/submesh/qml/tst_submesh.qml
+++ /dev/null
@@ -1,207 +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
-
-// QTBUG-17418
-Item {
- id: screen
- width: 720
- height: 480
- Rectangle {
- id: description
- border.width: 3
- radius: 5
- property variant radarPostion: recieverItem.localToWorld();
- x: radarPostion.x * view.width
- width: parent.width
- height: text.height + 10
- Text {
- id: text
- width: parent.width
- wrapMode: "WordWrap"
- text: "There should be a stationary lander model with a rotating radar dish attached. \n" +
- "The lander and attached radar dish should show no scaling or translation.\n" +
- "There should be a second radar dish colored red, oscillating horizontally without scaling.\n" +
- "There should be a third radar dish colored blue, scaling but not rotating.. \n" +
- "It is acceptable if the scaling dish appears to be moving due to the scaling."
- anchors.centerIn: parent
- }
- }
- Rectangle {
- width: parent.width
- anchors.top: description.bottom
- anchors.bottom: screen.bottom
- anchors.left: screen.left
- anchors.right: screen.right
- color: "#aaccee"
-
- Viewport {
- id: view
- anchors.fill: parent
- picking: true
- // showPicking: true
- camera: Camera { eye: Qt.vector3d(0,15,50)}
-
- Effect {
- id: redEffect; material: red
- objectName: "redEffect"
- }
-
- Effect {
- id: blueEffect; material: blue
- objectName: "blueEffect"
- }
-
- Mesh {
- id:landerMesh
- source: "meshes/lunar-lander.3ds"
- }
-
- // A second lander mesh so we can have two different colors
- Mesh {
- id:landerMesh2
- source: "meshes/lunar-lander.3ds"
- }
-
- Item3D {
- mesh: landerMesh
- objectName: "lander"
- effect: Effect { material: green ; objectName: "greenEffect"}
- Item3D {
- // Correct context loss from "pulling off" of graph
- transform: [
- Rotation3D { axis: Qt.vector3d(1.0, 0.0, 0.0) ; angle: -90},
- Rotation3D {
- id: radarSpin2 ; axis: Qt.vector3d(0.0, 1.0, 0.0);
- angle: 0
- origin: Qt.vector3d(0.55,0.0,0.0)
- NumberAnimation on angle {
- running: true; loops: Animation.Infinite
- from: 360; to: 0; duration: 3000;
- }
- }
- ]
- Item3D { mesh: landerMesh; meshNode: "Rod.001" }
- Item3D { mesh: landerMesh; meshNode: "Receiver.001" }
- Item3D { mesh: landerMesh; meshNode: "Dish.001" }
- }
- }
-
- Item3D {
- // Check that you can duplicate items
- id: scalingRadarDish
- SequentialAnimation on scale {
- loops: Animation.Infinite; running: true
- NumberAnimation { from:1.0 ; to: 3.0; duration: 500 }
- NumberAnimation { from:3.0 ; to: 1.0; duration: 500 }
- }
- // rotate object to remove ambiguity - scaling causes
- // movement, and if this is in the z axis, the scaling
- // could be confused with perspective.
- position: Qt.vector3d(3.0,0.0,0.0)
- transform: Rotation3D {
- axis: Qt.vector3d(0.0,1.0,0.0)
- angle: -90
- }
- Material {
- // Distinctive green Color
- id: green
- ambientColor: "#448844"
- diffuseColor: "#88EE44"
- specularColor: "#88FF88"
- shininess: 200
- }
-
- Material {
- // Distinctive red Color
- id: red
- ambientColor: "#884422"
- diffuseColor: "#EE4422"
- specularColor: "#FF6644"
- shininess: 200
- }
-
- Material {
- // Distinctive blue Color
- id: blue
- ambientColor: "#224488"
- diffuseColor: "#2244EE"
- specularColor: "#4466FF"
- shininess: 200
- }
-
- Item3D { mesh: landerMesh2; meshNode: "Rod.001"
- effect: blueEffect
- }
- Item3D { id: recieverItem; mesh: landerMesh2; meshNode: "Receiver.001" ;
- effect: blueEffect
- }
- Item3D { mesh: landerMesh2; meshNode: "Dish.001" ;
- effect: blueEffect
- }
- }
- Item3D {
- // Check that you can duplicate items
- id: translatingRadarDish
- SequentialAnimation on x {
- loops: Animation.Infinite
- NumberAnimation { from: 0.0; to: 5.0 ; duration: 600 }
- NumberAnimation { from: 5.0; to: 0.0 ; duration: 600 }
- }
-
- Item3D { mesh: landerMesh; meshNode: "Rod.001";
- effect: redEffect
- objectName: "Rod"
- }
- Item3D { mesh: landerMesh; meshNode: "Receiver.001";
- effect: redEffect
- objectName: "Receiver"
- }
- Item3D { mesh: landerMesh; meshNode: "Dish.001";
- effect: redEffect
- objectName: "Dish"
- }
- }
- }
- }
-}
diff --git a/tests/manual/submesh/qtquick3d.png b/tests/manual/submesh/qtquick3d.png
deleted file mode 100644
index 8351083e..00000000
--- a/tests/manual/submesh/qtquick3d.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/submesh/submesh.pro b/tests/manual/submesh/submesh.pro
deleted file mode 100644
index 6f39b010..00000000
--- a/tests/manual/submesh/submesh.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = app
-TARGET = tst_submesh
-CONFIG += qt warn_on
-
-INSTALL_DIRS = qml
-CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
-include(../../../pkg.pri)
-qtcAddDeployment()
-
-SOURCES += main.cpp
diff --git a/tests/manual/submesh/tst_submesh_qml.desktop b/tests/manual/submesh/tst_submesh_qml.desktop
deleted file mode 100644
index 7bd7fd92..00000000
--- a/tests/manual/submesh/tst_submesh_qml.desktop
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=tst_submesh
-Icon=/usr/share/icons/hicolor/80x80/apps/qtquick3d.png
-Exec=/usr/bin/invoker --type=e -s /usr/bin/tst_submesh -fullscreen
-OnlyShowIn=X-MeeGo;
-X-MeeGo-Logical-Id=qtn_comm_appname_tst_submesh_qml
diff --git a/tests/manual/transformations/main.cpp b/tests/manual/transformations/main.cpp
deleted file mode 100644
index 56ac5a46..00000000
--- a/tests/manual/transformations/main.cpp
+++ /dev/null
@@ -1,63 +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 <QtGui/QApplication>
-#include "qdeclarativeview3d.h"
-
-#include "../../shared/qmlres.h"
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView3D view;
- QString qml = q_get_qmldir(QLatin1String("qml/tst_transformations.qml"));
- view.setSource(QUrl::fromLocalFile(qml));
-
- if (QApplication::arguments().contains(QLatin1String("-maximize")))
- view.showMaximized();
- else if (QApplication::arguments().contains(QLatin1String("-fullscreen")))
- view.showFullScreen();
- else
- view.show();
-
- return app.exec();
-}
diff --git a/tests/manual/transformations/qml/ComposedItemTransformationsTestCase.qml b/tests/manual/transformations/qml/ComposedItemTransformationsTestCase.qml
deleted file mode 100644
index 93598afa..00000000
--- a/tests/manual/transformations/qml/ComposedItemTransformationsTestCase.qml
+++ /dev/null
@@ -1,149 +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
-
-Rectangle {
- id: container
- property string text:
- "This example nests Item3Ds with a rotation, a scale and a translate" +
- " transformation. It should show a teapot spinning anti-clockwise, " +
- "growing and moving up-right relative to the initial camera, " +
- "and then reversing.";
- property variant camera: defaultCamera
-
- // Default values:
- property variant defaultCamera: Camera { eye: Qt.vector3d(0,5,30) }
- property real defaultWidth: 440
- property real defaultHeight: 300
- property real animationFactor: 0.0
- property real animationDuration: 2000
-
- SequentialAnimation on animationFactor {
- loops: Animation.Infinite
- PropertyAnimation {
- from: 0.0
- to: 1.0
- duration: animationDuration
- }
- PropertyAnimation {
- from: 1.0
- to: 0.0
- duration: animationDuration
- }
- }
-
- border.width: 2
- border.color: "black"
- radius: 5
- width: defaultWidth
- height: defaultHeight
-
- Text {
- id: textItem
- wrapMode: "WordWrap"
- horizontalAlignment: "AlignHCenter"
- text: container.text
- anchors.left: parent.left
- anchors.right: parent.right
- }
-
- Rectangle {
- id: viewportContainer
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: 1
- anchors.topMargin: 2
- anchors.top: textItem.bottom
- anchors.bottom: container.bottom
- color: "#aaccee"
-
- Viewport {
- id: view
- anchors.fill: parent
- picking: true
- camera: container.camera
-
- Item3D {
- transform: Translation3D {
- translate: Qt.vector3d(testModel.translationX,
- testModel.translationY,
- testModel.translationZ)
- }
- Item3D {
- transform: Rotation3D {
- axis: Qt.vector3d(testModel.rotationAxisX,
- testModel.rotationAxisY,
- testModel.rotationAxisZ)
- angle: testModel.rotationAngle
- }
-
- Teapot {
- id: testModel
- property real scaleX: 1 + (2.0 * animationFactor);
- property real scaleY: 1 + (2.0 * animationFactor);
- property real scaleZ: 1 + (2.0 * animationFactor);
-
- property real rotationAngle: 360.0 * animationFactor;
- property real rotationAxisX: 0.0;
- property real rotationAxisY: 0.0;
- property real rotationAxisZ: 1.0;
-
- property real translationX:
- 4 * (2.0 * (animationFactor -0.5));
- property real translationY:
- 3 * (2.0 * (animationFactor - 0.5));
- property real translationZ:
- 2 * (2.0 * (animationFactor - 0.5));
-
- transform: Scale3D {
- scale: Qt.vector3d(testModel.scaleX,
- testModel.scaleY,
- testModel.scaleZ)
- }
- }
- }
- }
- }
- }
-}
diff --git a/tests/manual/transformations/qml/TransformationListTestCase.qml b/tests/manual/transformations/qml/TransformationListTestCase.qml
deleted file mode 100644
index c3b66aea..00000000
--- a/tests/manual/transformations/qml/TransformationListTestCase.qml
+++ /dev/null
@@ -1,144 +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
-
-Rectangle {
- id: container
- property string text:
- "This example combines a rotation, scale and translate in one " +
- "Item3D. It should show a teapot spinning anti-clockwise, growing " +
- "and moving up-right relative to the initial camera, and then " +
- "reversing.";
- property variant camera: defaultCamera
-
- // Default values:
- property variant defaultCamera: Camera { eye: Qt.vector3d(0,5,30) }
- property real defaultWidth: 440
- property real defaultHeight: 300
- property real animationFactor: 0.0
- property real animationDuration: 2000
-
- SequentialAnimation on animationFactor {
- loops: Animation.Infinite
- PropertyAnimation {
- from: 0.0
- to: 1.0
- duration: animationDuration
- }
- PropertyAnimation {
- from: 1.0
- to: 0.0
- duration: animationDuration
- }
- }
-
- border.width: 2
- border.color: "black"
- radius: 5
- width: defaultWidth
- height: defaultHeight
-
- Text {
- id: textItem
- wrapMode: "WordWrap"
- horizontalAlignment: "AlignHCenter"
- text: container.text
- anchors.left: parent.left
- anchors.right: parent.right
- }
-
- Rectangle {
- id: viewportContainer
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: 1
- anchors.topMargin: 2
- anchors.top: textItem.bottom
- anchors.bottom: container.bottom
- color: "#aaccee"
-
- Viewport {
- id: view
- anchors.fill: parent
- picking: true
- camera: container.camera
-
- Teapot
- {
- id: testModel
- property real scaleX: 1 + (2.0 * animationFactor);
- property real scaleY: 1 + (2.0 * animationFactor);
- property real scaleZ: 1 + (2.0 * animationFactor);
-
- property real rotationAngle: 360.0 * animationFactor;
- property real rotationAxisX: 0.0;
- property real rotationAxisY: 0.0;
- property real rotationAxisZ: 1.0;
-
- property real translationX: 4 * (2.0 * (animationFactor -0.5));
- property real translationY: 3 * (2.0 * (animationFactor - 0.5));
- property real translationZ: 0;
-
- transform: [
- Scale3D {
- scale: Qt.vector3d(testModel.scaleX,
- testModel.scaleY,
- testModel.scaleZ)
- },
- Rotation3D {
- axis: Qt.vector3d(testModel.rotationAxisX,
- testModel.rotationAxisY,
- testModel.rotationAxisZ)
- angle: testModel.rotationAngle
- },
- Translation3D {
- translate: Qt.vector3d(testModel.translationX,
- testModel.translationY,
- testModel.translationZ)
- }
- ]
- }
- }
- }
-}
diff --git a/tests/manual/transformations/qml/tst_transformations.qml b/tests/manual/transformations/qml/tst_transformations.qml
deleted file mode 100644
index b07bded5..00000000
--- a/tests/manual/transformations/qml/tst_transformations.qml
+++ /dev/null
@@ -1,64 +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
-
-// QTBUG-17408
-Flickable {
-
- contentWidth: aTestCase.defaultWidth * 2
- contentHeight: aTestCase.defaultHeight * 1
-
- width: aTestCase.defaultWidth * 2
- height: aTestCase.defaultHeight * 1
-
- Flow {
- ComposedItemTransformationsTestCase {
- id: aTestCase
- focus: false
- }
-
- TransformationListTestCase {
- focus: false
- }
- }
-}
diff --git a/tests/manual/transformations/qtquick3d.png b/tests/manual/transformations/qtquick3d.png
deleted file mode 100644
index 8351083e..00000000
--- a/tests/manual/transformations/qtquick3d.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/transformations/transformations.pro b/tests/manual/transformations/transformations.pro
deleted file mode 100644
index 577f43bf..00000000
--- a/tests/manual/transformations/transformations.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = app
-TARGET = tst_transformations
-CONFIG += qt warn_on
-
-INSTALL_DIRS = qml
-CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
-include(../../../pkg.pri)
-qtcAddDeployment()
-
-SOURCES += main.cpp
diff --git a/tests/manual/transformations/tst_transformations_qml.desktop b/tests/manual/transformations/tst_transformations_qml.desktop
deleted file mode 100644
index 8dc16d05..00000000
--- a/tests/manual/transformations/tst_transformations_qml.desktop
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=tst_transformations
-Icon=/usr/share/icons/hicolor/80x80/apps/qtquick3d.png
-Exec=/usr/bin/invoker --type=e -s /usr/bin/tst_transformations -fullscreen
-OnlyShowIn=X-MeeGo;
-X-MeeGo-Logical-Id=qtn_comm_appname_tst_transformations_qml
diff --git a/tests/manual/translation/README b/tests/manual/translation/README
deleted file mode 100644
index bbffedd5..00000000
--- a/tests/manual/translation/README
+++ /dev/null
@@ -1 +0,0 @@
-The "One teapot" test is ensuring that the two different ways of specifying position (x,y,z vs position) both have the same result. Two teapots are being rendered. To pass, the two teapots should be rendered in exactly the same position, so it looks like only one teapot. This test fails if the teapots are not aligned - e.g. there are two spouts, or the teapot is distorted.
diff --git a/tests/manual/translation/main.cpp b/tests/manual/translation/main.cpp
deleted file mode 100644
index 2755fd86..00000000
--- a/tests/manual/translation/main.cpp
+++ /dev/null
@@ -1,63 +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 <QtGui/QApplication>
-#include "qdeclarativeview3d.h"
-
-#include "../../shared/qmlres.h"
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView3D view;
- QString qml = q_get_qmldir(QLatin1String("qml/tst_translation.qml"));
- view.setSource(QUrl::fromLocalFile(qml));
-
- if (QApplication::arguments().contains(QLatin1String("-maximize")))
- view.showMaximized();
- else if (QApplication::arguments().contains(QLatin1String("-fullscreen")))
- view.showFullScreen();
- else
- view.show();
-
- return app.exec();
-}
diff --git a/tests/manual/translation/qml/AxesVsVectorTestCase.qml b/tests/manual/translation/qml/AxesVsVectorTestCase.qml
deleted file mode 100644
index c5357322..00000000
--- a/tests/manual/translation/qml/AxesVsVectorTestCase.qml
+++ /dev/null
@@ -1,155 +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
-
-Rectangle {
- id: container
- // Parameters for editting
- property string text;
- property variant translationVectorA: Qt.vector3d(1,1,1)
- property variant translationVectorB: Qt.vector3d(1,1,1)
- property variant camera: defaultCamera
- property real itemX: 0
- property real itemY: 0
- property real itemZ: 0
- property int animationDuration: 2000
-
- // Default values:
- property variant defaultCamera: Camera {eye: Qt.vector3d(0,5,30)}
- property real defaultWidth: 220
- property real defaultHeight: 150
- property variant itemPosition:
- Qt.vector3d((translationVectorB.x * animationFactor +
- translationVectorA.x * (1.0 - animationFactor)),
- translationVectorB.y * animationFactor +
- translationVectorA.y * (1.0 - animationFactor),
- translationVectorB.z * animationFactor +
- translationVectorA.z * (1.0 - animationFactor))
- property real animationFactor: 0.0
-
- SequentialAnimation on animationFactor {
- loops: Animation.Infinite
- PropertyAnimation {
- from: 0.0
- to: 1.0
- duration: animationDuration
- }
- }
-
- border.width: 2
- border.color: "black"
- radius: 5
- width: defaultWidth
- height: defaultHeight
-
- Text {
- id: textItem
- wrapMode: "WordWrap"
- horizontalAlignment: "AlignHCenter"
- text: container.text
- anchors.left: parent.left
- anchors.right: parent.right
- }
-
- Rectangle {
- id: viewportContainer
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: 1
- anchors.topMargin: 2
- anchors.top: textItem.bottom
- anchors.bottom: container.bottom
- color: "#aaccee"
-
- Viewport {
- id: view
- anchors.fill: parent
- picking: true
- camera: container.camera
-
- Material {
- // Distinctive red Color
- id: red
- ambientColor: "#884422"
- diffuseColor: "#EE4422"
- specularColor: "#FF6644"
- shininess: 200
- }
-
- Material {
- // Distinctive blue Color
- id: blue
- ambientColor: "#224488"
- diffuseColor: "#2244EE"
- specularColor: "#4466FF"
- shininess: 200
- }
-
- Effect {
- id: redEffect; material: red
- objectName: "redEffect"
- }
-
- Effect {
- id: blueEffect; material: blue
- objectName: "blueEffect"
- }
-
- Teapot
- {
- id: vectorModel
-// effect: redEffect
- position: itemPosition
- }
- Teapot
- {
- id: axesModel
-// effect: blueEffect
- x: itemX
- y: itemY
- z: itemZ
- }
- }
- }
-}
diff --git a/tests/manual/translation/qml/TranslationTestCase.qml b/tests/manual/translation/qml/TranslationTestCase.qml
deleted file mode 100644
index 9526cc1e..00000000
--- a/tests/manual/translation/qml/TranslationTestCase.qml
+++ /dev/null
@@ -1,110 +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
-
-Rectangle {
- id: container
- // Parameters for editting
- property string text;
- property real itemX: 0
- property real itemY: 0
- property real itemZ: 0
- property variant camera: defaultCamera
-
- // Default values:
- property variant defaultCamera: Camera { eye: Qt.vector3d(0,5,30) }
- property real defaultWidth: 220
- property real defaultHeight: 150
- property real animationFactor: 0.0
- property real animationDuration: 2000
-
- SequentialAnimation on animationFactor {
- loops: Animation.Infinite
- PropertyAnimation {
- from: 0.0
- to: 1.0
- duration: animationDuration
- }
- }
-
- border.width: 2
- border.color: "black"
- radius: 5
- width: defaultWidth
- height: defaultHeight
-
- Text {
- id: textItem
- wrapMode: "WordWrap"
- horizontalAlignment: "AlignHCenter"
- text: container.text
- anchors.left: parent.left
- anchors.right: parent.right
- }
-
- Rectangle {
- id: viewportContainer
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: 1
- anchors.topMargin: 2
- anchors.top: textItem.bottom
- anchors.bottom: container.bottom
- color: "#aaccee"
-
- Viewport {
- id: view
- anchors.fill: parent
- picking: true
- camera: container.camera
- Teapot
- {
- id: model
- x: itemX
- y: itemY
- z: itemZ
- }
- }
- }
-}
diff --git a/tests/manual/translation/qml/TranslationVectorTestCase.qml b/tests/manual/translation/qml/TranslationVectorTestCase.qml
deleted file mode 100644
index 79bbe8fd..00000000
--- a/tests/manual/translation/qml/TranslationVectorTestCase.qml
+++ /dev/null
@@ -1,114 +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
-
-Rectangle {
- id: container
- // Parameters for editting
- property string text;
- property variant translationVectorA: Qt.vector3d(1,1,1)
- property variant translationVectorB: Qt.vector3d(1,1,1)
- property variant camera: defaultCamera
-
- // Default values:
- property variant defaultCamera: Camera {eye: Qt.vector3d(0,5,30)}
- property real defaultWidth: 220
- property real defaultHeight: 150
- property variant itemPosition:
- Qt.vector3d((translationVectorB.x * animationFactor +
- translationVectorA.x * (1.0 - animationFactor)),
- translationVectorB.y * animationFactor +
- translationVectorA.y * (1.0 - animationFactor),
- translationVectorB.z * animationFactor +
- translationVectorA.z * (1.0 - animationFactor))
- property real animationFactor: 0.0
- property int animationDuration: 2000
-
- SequentialAnimation on animationFactor {
- loops: Animation.Infinite
- PropertyAnimation {
- from: 0.0
- to: 1.0
- duration: animationDuration
- }
- }
-
- border.width: 2
- border.color: "black"
- radius: 5
- width: defaultWidth
- height: defaultHeight
-
- Text {
- id: textItem
- wrapMode: "WordWrap"
- horizontalAlignment: "AlignHCenter"
- text: container.text
- anchors.left: parent.left
- anchors.right: parent.right
- }
-
- Rectangle {
- id: viewportContainer
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: 1
- anchors.topMargin: 2
- anchors.top: textItem.bottom
- anchors.bottom: container.bottom
- color: "#aaccee"
-
- Viewport {
- id: view
- anchors.fill: parent
- picking: true
- camera: container.camera
- Teapot
- {
- id: model
- position: itemPosition
- }
- }
- }
-}
diff --git a/tests/manual/translation/qml/tst_translation.qml b/tests/manual/translation/qml/tst_translation.qml
deleted file mode 100644
index 0cea31b7..00000000
--- a/tests/manual/translation/qml/tst_translation.qml
+++ /dev/null
@@ -1,158 +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
-
-// QTBUG-17408
-Item {
- id: screen
- width: aTestCase.defaultWidth * 3
- height: aTestCase.defaultHeight * 4
-
- Flow {
- anchors.fill: parent
- TranslationVectorTestCase {
- id: aTestCase
- text: "X Translation\n(Left to Right)"
- translationVectorA: Qt.vector3d(-4,1,1)
- translationVectorB: Qt.vector3d(4,1,1)
- }
-
- TranslationVectorTestCase {
- text: "Y Translation\n(Bottom to Top)"
- translationVectorA: Qt.vector3d(1,-4,1)
- translationVectorB: Qt.vector3d(1,4,1)
- }
-
- TranslationVectorTestCase {
- text: "Z Translation\n(Back to Front)"
- translationVectorA: Qt.vector3d(1,1,-4)
- translationVectorB: Qt.vector3d(1,1,4)
- }
-
- TranslationVectorTestCase {
- text: "-X Translation\n(Right to Left)"
- translationVectorA: Qt.vector3d(4,1,1)
- translationVectorB: Qt.vector3d(-4,1,1)
- }
-
- TranslationVectorTestCase {
- text: "-Y Translation\n(Top to Bottom)"
- translationVectorA: Qt.vector3d(1,4,1)
- translationVectorB: Qt.vector3d(1,-4,1)
- }
-
- TranslationVectorTestCase {
- text: "-Z Translation\n(Front to Back)"
- translationVectorA: Qt.vector3d(1,1,4)
- translationVectorB: Qt.vector3d(1,1,-4)
- }
-
- TranslationVectorTestCase {
- text: "Sequential Translation in X,Y,Z\n(Previous 6 in order)"
- id: sequentialTestCase
- property real itemX:-4;
- property real itemY:-4;
- property real itemZ:-4;
- itemPosition: Qt.vector3d(itemX,itemY,itemZ)
- // itemPosition: Qt.vector3d(itemX,4,4)
- SequentialAnimation {
- loops: Animation.Infinite
- running: true
- PropertyAnimation {
- target: sequentialTestCase; property: "itemX";
- to: 4; duration: 1000
- }
- PropertyAnimation {
- target: sequentialTestCase; property: "itemY";
- to: 4; duration: 1000
- }
- PropertyAnimation {
- target: sequentialTestCase; property: "itemZ";
- to: 4; duration: 1000
- }
- PropertyAnimation {
- target: sequentialTestCase; property: "itemX";
- to: -4; duration: 1000
- }
- PropertyAnimation {
- target: sequentialTestCase; property: "itemY";
- to: -4; duration: 1000
- }
- PropertyAnimation {
- target: sequentialTestCase; property: "itemZ";
- to: -4; duration: 1000
- }
- }
- }
-
- TranslationTestCase {
- text: "Translation in X,Y,Z properties\n(Smooth Animation)"
- id: attributeTestCase
- itemX: 4 * Math.sin(animationFactor * Math.PI * 2.0 * 3.0);
- itemY: 4 * Math.sin(animationFactor * Math.PI * 2.0 * 5.0);
- itemZ: 4 * Math.sin(animationFactor * Math.PI * 2.0 * 7.0);
- animationDuration: 15000
- }
-
- TranslationVectorTestCase {
- text: "Translation in Qt.Vector3d(X,Y,Z)\n(Smooth Animation)"
- id: combinedVectorTestCase
- property real itemX: 4 * Math.sin(animationFactor * Math.PI * 2.0 * 3.0);
- property real itemY: 4 * Math.sin(animationFactor * Math.PI * 2.0 * 5.0);
- property real itemZ: 4 * Math.sin(animationFactor * Math.PI * 2.0 * 7.0);
- itemPosition: Qt.vector3d(itemX,itemY,itemZ)
- animationDuration: 15000
- }
-
- AxesVsVectorTestCase {
- text: "Last two overlaid\n(Should look like one teapot)"
- id: axesVsVectorTestCase
- itemX: 4 * Math.sin(animationFactor * Math.PI * 2.0 * 3.0);
- itemY: 4 * Math.sin(animationFactor * Math.PI * 2.0 * 5.0);
- itemZ: 4 * Math.sin(animationFactor * Math.PI * 2.0 * 7.0);
- itemPosition: Qt.vector3d(itemX,itemY,itemZ)
- animationDuration: 15000
- }
- }
-}
diff --git a/tests/manual/translation/qtquick3d.png b/tests/manual/translation/qtquick3d.png
deleted file mode 100644
index 8351083e..00000000
--- a/tests/manual/translation/qtquick3d.png
+++ /dev/null
Binary files differ
diff --git a/tests/manual/translation/translation.pro b/tests/manual/translation/translation.pro
deleted file mode 100644
index f88fb24a..00000000
--- a/tests/manual/translation/translation.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = app
-TARGET = tst_translation
-CONFIG += qt warn_on
-
-INSTALL_DIRS = qml
-CONFIG += qt3d_deploy_qml qt3dquick_deploy_pkg
-include(../../../pkg.pri)
-qtcAddDeployment()
-
-SOURCES += main.cpp
diff --git a/tests/manual/translation/tst_translation_qml.desktop b/tests/manual/translation/tst_translation_qml.desktop
deleted file mode 100644
index bbdab15c..00000000
--- a/tests/manual/translation/tst_translation_qml.desktop
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=tst_translation
-Icon=/usr/share/icons/hicolor/80x80/apps/qtquick3d.png
-Exec=/usr/bin/invoker --type=e -s /usr/bin/tst_translation -fullscreen
-OnlyShowIn=X-MeeGo;
-X-MeeGo-Logical-Id=qtn_comm_appname_tst_translation_qml
diff --git a/tests/shared/compareimage.cpp b/tests/shared/compareimage.cpp
deleted file mode 100644
index 74bf95db..00000000
--- a/tests/shared/compareimage.cpp
+++ /dev/null
@@ -1,165 +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 "compareimage.h"
-
-//#define DEBUG_QIMAGECOMPARE
-
-#ifdef DEBUG_QIMAGECOMPARE
-#include <QDebug>
-#endif
-
-// qProportionDifferentRGBPixels compares two images and returns a float
-// between 0.0 and 1.0 indicating the proportion of pixels with a difference
-// greater than the relevant threshold in RGB space, where 0.0 indicates that
-// every pixel matches, and 1.0 indicates that no pixels match.
-//
-// For example, the RGB colors 0x0088ff and 0x000000 have a red difference
-// of 0, a green difference of 0x88, and a blue difference of 0xff. If any
-// of these values is greater than the corresponding threshold, the pixel
-// would be considered "different".
-//
-// If the images are different sizes, the function compares those pixels that
-// fall in the overlapping area. If one image is simply smaller than the
-// other, this will be the size of the smaller image.
-
-float qProportionDifferentRGBPixels(const QImage& img1, const QImage& img2, int redThreshold, int greenThreshold, int blueThreshold, int alphaThreshold)
-{
- int result = 0;
-
- int width = qMin(img1.width(), img2.width());
- int height = qMin(img1.height(), img2.height());
- int pixelcount = 0;
-
-#ifdef DEBUG_QIMAGECOMPARE
- int sumDiff = 0;
- QImage *resultImage = new QImage (width,height,QImage::Format_RGB16);
-#endif
-
-
- for (int y = 0; y < height; y++)
- {
- for (int x = 0; x < width; x++)
- {
- QColor pix1 = img1.pixel(x,y);
- QColor pix2 = img2.pixel(x,y);
- int redDiff = qMax(pix1.red(),pix2.red()) - qMin(pix1.red(),pix2.red());
- int greenDiff = qMax(pix1.green(),pix2.green()) - qMin(pix1.green(),pix2.green());
- int blueDiff = qMax(pix1.blue(),pix2.blue()) - qMin(pix1.blue(),pix2.blue());
- int alphaDiff = qMax(pix1.alpha(),pix2.alpha()) - qMin(pix1.alpha(),pix2.alpha());
-
-#ifdef DEBUG_QIMAGECOMPARE
- QColor colorDiff;
- colorDiff.setRed(redDiff);
- colorDiff.setGreen(greenDiff);
- colorDiff.setBlue(blueDiff);
- colorDiff.setAlpha(255-alphaDiff);
- sumDiff += redDiff+greenDiff+blueDiff;
-#endif
-
- pixelcount++;
- if (redDiff > redThreshold
- || greenDiff > greenThreshold
- || blueDiff > blueThreshold
- || alphaDiff > alphaThreshold)
- {
- result++;
-#ifdef DEBUG_QIMAGECOMPARE
- resultImage->setPixel(x,y, colorDiff.rgba());
-#endif
- }
- }
- }
-#ifdef DEBUG_QIMAGECOMPARE
- qDebug() << "qimageCompare result was: " << result << "/"<<pixelcount<<" = "<< (int)(((float)result/(float)pixelcount)*100) << "%";
- qDebug() << "Sum of absolute differences was:"<< sumDiff;
- qDebug() << "Average difference per pixel was:" << (float)sumDiff/(float)pixelcount;
-#endif
- return (float)result/(float)pixelcount;
-};
-
-
-
-inline float qProportionDifferentRGBPixels(const QImage& img1, const QImage& img2, int threshold )
-{
- return qProportionDifferentRGBPixels(img1, img2, threshold, threshold, threshold);
-}
-
-bool qFuzzyCompare(const QImage& img1, const QImage& img2)
-{
- // The two images must have the same size.
- if (img1.width() != img2.width() || img1.height() != img2.height())
- return false;
-
-
- int count = 0;
- for (int y = 0; y < img1.height(); ++y) {
- for (int x = 0; x < img1.width(); ++x) {
- // Compare the top two bits of the red, green, and blue
- // values for equality. This should factor out rounding
- // errors due to 16-bit vs 32-bit conversions and so on.
- // We assume that the source images use primary colors.
- if ((img1.pixel(x, y) & 0x00C0C0C0) == (img2.pixel(x, y) & 0x00C0C0C0))
- ++count;
- }
- }
-
- // We consider the images the same if at least 95% of the
- // pixels have the same or very similar RGB values.
-
- // 64 is a rough approximation of bitwise & 0xC0
- return qProportionDifferentRGBPixels(img1, img2, 64) <= 0.05001;
- //return (count >= (img1.width() * img1.height() * 95 / 100));
-}
-
-bool qFuzzyCompare(const QImage& img1, const QColor& color)
-{
- int count = 0;
- for (int y = 0; y < img1.height(); ++y) {
- for (int x = 0; x < img1.width(); ++x) {
- if ((img1.pixel(x, y) & 0x00C0C0C0) == (color.rgb() & 0x00C0C0C0))
- ++count;
- }
- }
- return (count >= (img1.width() * img1.height() * 95 / 100));
-}
-
-
diff --git a/tests/shared/compareimage.h b/tests/shared/compareimage.h
deleted file mode 100644
index 4b2af2f3..00000000
--- a/tests/shared/compareimage.h
+++ /dev/null
@@ -1,54 +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 COMPAREIMAGE_H
-#define COMPAREIMAGE_H
-
-#include <QImage>
-#include <QColor>
-#include <limits.h>
-
-bool qFuzzyCompare(const QImage& img1, const QImage& img2);
-bool qFuzzyCompare(const QImage& img1, const QColor& color);
-
-float qProportionDifferentRGBPixels(const QImage& img1, const QImage& img2, int threshold = 0);
-float qProportionDifferentRGBPixels(const QImage& img1, const QImage& img2, int redThreshold, int greenThreshold, int blueThreshold, int alphaThreshold = INT_MAX);
-#endif
diff --git a/tests/shared/qmlres.h b/tests/shared/qmlres.h
deleted file mode 100644
index 872d71a1..00000000
--- a/tests/shared/qmlres.h
+++ /dev/null
@@ -1,129 +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 QMLRES_H
-#define QMLRES_H
-
-#include <QtCore/qdir.h>
-#include <QtCore/qcoreapplication.h>
-
-#include <QtCore/qdebug.h>
-
-#define internal_xstr(s) internal_str(s)
-#define internal_str(s) #s
-
-/*!
- \internal
- Returns a string with the path to qml resources, including qml sources,
- 3D assets and textures. The path depends on the platform, and (for
- some platforms) whether it was installed from a package or is being run
- in a development setting.
-*/
-static QString q_get_qmldir(const QString &name)
-{
- QString qml = name;
- // try for a Linux package install first
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-#ifdef QT3D_USE_OPT
- QDir pkgdir(QLatin1String("/opt/mt/applications/" internal_xstr(QT3D_USE_OPT)));
-#else
- QDir pkgdir(QLatin1String("/usr/share/qt5/quick3d/examples"));
-#endif
-#else
- QDir pkgdir(QLatin1String("/usr/share/qt4/quick3d/examples"));
-#endif
- QString app = QCoreApplication::applicationFilePath();
- app = app.section(QDir::separator(), -1);
- if (pkgdir.cd(app) && pkgdir.exists())
- {
- qml = pkgdir.filePath(qml);
- }
- else
- {
- // failing that try Mac (pkg & dev) next
- QDir dir(QCoreApplication::applicationDirPath());
- if (dir.path().endsWith(QLatin1String("MacOS")))
- {
- if (dir.cdUp() && dir.cd(QLatin1String("Resources"))
- && dir.exists())
- {
- qml = dir.filePath(qml);
- }
- else
- {
- qWarning("Expected app bundle with QML resources!");
- }
- }
- else
- {
- // for Windows (pkg & dev), and for Linux dev expect to find it
- // in a "resources" directory next to the binary
- if (dir.cd(QLatin1String("resources")) && dir.exists())
- {
- app = QDir::toNativeSeparators(app);
- //For windows platforms the "app" filepath should have the .exe extension removed.
- const QString winExtension = ".exe";
- if (app.right(winExtension.length()) == winExtension) {
- app = app.left(app.length() - winExtension.length());
- }
-
- //Grab just the app name itself.
- app = app.section(QDir::separator(), -1);
-
- if (dir.cd(QLatin1String("examples")) && dir.cd(app) && dir.exists())
- {
- qml = dir.filePath(qml);
- }
- else
- {
- QString msg = QLatin1String("examples");
- msg += QDir::separator();
- msg += app;
- qWarning("Expected %s directry with qml resources!", qPrintable(msg));
- }
- }
- }
- }
- return qml;
-}
-
-#endif // QMLRES_H
diff --git a/tests/shared/qtest_helpers.h b/tests/shared/qtest_helpers.h
deleted file mode 100644
index 0d198cbf..00000000
--- a/tests/shared/qtest_helpers.h
+++ /dev/null
@@ -1,160 +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 QTEST_HELPERS_H
-#define QTEST_HELPERS_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 <QtTest/QtTest>
-#include <QtGui/qvector4d.h>
-#include <QtGui/qvector3d.h>
-#include <QtGui/qvector2d.h>
-#include "qcolor4ub.h"
-#include <QByteArray>
-
-QT_BEGIN_NAMESPACE
-
-namespace QTest {
- char *toString(const QVector4D &v)
- {
- char *msg = new char[128];
- qsnprintf(msg, 128, "(%0.4f, %0.4f, %0.4f, %0.4f)",
- v.x(), v.y(), v.z(), v.w());
- return msg;
- }
-
- char *toString(const QVector3D &v)
- {
- char *msg = new char[128];
- qsnprintf(msg, 128, "(%0.4f, %0.4f, %0.4f)", v.x(), v.y(), v.z());
- return msg;
- }
-
- char *toString(const QVector2D &v)
- {
- char *msg = new char[128];
- qsnprintf(msg, 128, "(%0.4f, %0.4f)", v.x(), v.y());
- return msg;
- }
-
- char *toString(const QColor4ub &c)
- {
- char *msg = new char[128];
- qsnprintf(msg, 128, "R: %0.2f, G: %0.2f, B: %0.2f, A: %0.2)",
- c.redF(), c.greenF(), c.blueF(), c.alphaF());
- return msg;
- }
-
- template<> bool qCompare<QVector4D>(const QVector4D &t1, const QVector4D &t2,
- const char *actual, const char *expected,
- const char *file, int line)
- {
- if (t1 == t2)
- {
- return compare_helper(true, "COMPARE()", file, line);
- }
- else
- {
- return compare_helper(false, "Compared QVector4D values are not the same:",
- toString(t1), toString(t2), actual, expected, file, line);
- }
- }
-
- template<> bool qCompare<QVector3D>(const QVector3D &t1, const QVector3D &t2,
- const char *actual, const char *expected,
- const char *file, int line)
- {
- if (t1 == t2)
- {
- return compare_helper(true, "COMPARE()", file, line);
- }
- else
- {
- return compare_helper(false, "Compared QVector3D values are not the same:",
- toString(t1), toString(t2), actual, expected, file, line);
- }
- }
-
- template<> bool qCompare<QVector2D>(const QVector2D &t1, const QVector2D &t2,
- const char *actual, const char *expected,
- const char *file, int line)
- {
- if (t1 == t2)
- {
- return compare_helper(true, "COMPARE()", file, line);
- }
- else
- {
- return compare_helper(false, "Compared QVector2D values are not the same:",
- toString(t1), toString(t2), actual, expected, file, line);
- }
- }
-
- template<> bool qCompare<QColor4ub>(const QColor4ub &t1, const QColor4ub &t2,
- const char *actual, const char *expected,
- const char *file, int line)
- {
- if (t1 == t2)
- {
- return compare_helper(true, "COMPARE()", file, line);
- }
- else
- {
- return compare_helper(false, "Compared QColor4ub values are not the same:",
- toString(t1), toString(t2), actual, expected, file, line);
- }
- }
-
-};
-
-QT_END_NAMESPACE
-
-#endif // QTEST_HELPERS_H
diff --git a/tests/systemtests/sys_quick3d.pro b/tests/systemtests/sys_quick3d.pro
deleted file mode 100644
index b9d6c694..00000000
--- a/tests/systemtests/sys_quick3d.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-CONFIG+=systemtest
-SOURCES=sys_quick3d.qtt
-
-unix:!symbian {
- maemo5 {
- target.path = /opt/usr/bin
- } else {
- target.path = /usr/local/bin
- }
- INSTALLS += target
-}
diff --git a/tests/systemtests/sys_quick3d.qtt b/tests/systemtests/sys_quick3d.qtt
deleted file mode 100644
index 1a335823..00000000
--- a/tests/systemtests/sys_quick3d.qtt
+++ /dev/null
@@ -1,1094 +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 Qt Mobility Components.
-**
-** $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$
-**
-****************************************************************************/
-
-//TESTED_COMPONENT=src/qtquick3d
-
-testcase = {
-
- basket_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Basket";
- testBinary = "basket";
- testSource = "$QTDIR/qtquick3d/examples/qt3d/";
- testGoal = "Test animating objects in Qt3D.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the basket C++ example | the application starts and shows animation of a rotating basket with textures |
- | Use the mouse or touch pad to rotate the view | the view rotates fine, user can view the basket from all angles |
- | Maximize/minimize/resize the view | the animation maximizes/minimizes/resize with the viewport, shows fine, no crash |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- basket_qml_test: function()
- {
- //test meta data
- testTitle = "Quick3D - Basket";
- testBinary = "basket_qml";
- testSource = "$QTDIR/qtquick3d/examples/quick3d/";
- testGoal = "Test animating objects in Quick3D.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the basket_qml example | the application starts and showss animation of a rotating basket with textures |
- | Use the mouse or touch pad to rotate the view | the view rotates fine, user can view the basket from all angles |
- | Maximize/minimize/resize the view | the animation does not change size with the viewport, shows fine with no crash |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- builder_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Builder";
- testBinary = "builder";
- testSource = "$QTDIR/qtquick3d/examples/qt3d/";
- testGoal = "Test creating scenes using Builder";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the builder example | the application starts and shows three cans with picture textures |
- | Use the mouse or touch pad to rotate the view | the view rotates fine, user can view the cans from all angles, no culling out of any can |
- | Maximize/minimize/resize the view | the animation maximizes/minimizes/resize with the viewport, shows fine, no crash |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- cube_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Cube";
- testBinary = "cube";
- testSource = "$QTDIR/qtquick3d/examples/qt3d/";
- testGoal = "Test applying transformations and materials to objects.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the cube C++ example | the application starts and show a cube with Qt logo textures on each face |
- | Use the mouse or touch pad to rotate the view | the cube rotates fine, user can view all faces of the cube |
- | Maximize/minimize/resize the view | the cube maximizes/minizes/resize with the viewport, shows fine without crash |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- cubehouse_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Cube House";
- testBinary = "cubehouse";
- testSource = "$QTDIR/qtquick3d/demos/qt3d/";
- testGoal = "Test rendering, accelerometers handling";
- testPreconditions = "OpenGL/OpenGL ES required, GLSL Extension Required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the cube house demo | the application starts and shows a teapot with a semi-transparent rotating cube with Qt logo texture, in a colored block house |
- | Maximize/minimize/resize the view | the house resizes, the models scales retaining the aspect ratio, animation keeps going |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- cube_qml_test: function()
- {
- //test meta data
- testTitle = "Quick3D - Cube";
- testBinary = "cube_qml";
- testSource = "$QTDIR/qtquick3d/examples/quick3d/";
- testGoal = "Test applying transformations and materials to objects using QML.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the cube qml example | the application starts and show a cube with Qt logo textures on each face |
- | Use the mouse or touch pad to rotate the view | the cube rotates fine, user can view all faces of the cube |
- | Maximize/minimize/resize the view | the cube does not change in size |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- cylinder_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Cylinder";
- testBinary = "cylinder";
- testSource = "$QTDIR/qtquick3d/examples/qt3d/";
- testGoal = "Test Builder, material, network transparency";
- testPreconditions = "OpenGL/OpenGL ES required, Internet required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the cylinder example | the application starts and shows a cup of cappucino, with Qt 3D label and a coffee teapot texture on top |
- | Use the mouse or touch pad to rotate the view | the cup rotates fine, user can view all faces of the cube |
- | Maximize/minimize/resize the view | the cup maximizes/minimizes/resizes without crash |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- flickr3d_test: function()
- {
- //test meta data
- testTitle = "Quick3D - Flickr 3D";
- testBinary = "flickr3d";
- testSource = "$QTDIR/qtquick3d/demos/quick3d/";
- testGoal = "Test camera use with QML, skybox in QML";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the flickr3d demo | the application starts and shows a swing lake surrounded with mountains, together with a green cube floating on the center |
- | Drag mouse or touch | the green cube will slightly swing |
- | Maximize/minimize/resize the view | the view keeps size without resizing |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- forest_qml_test: function()
- {
- //test meta data
- testTitle = "Quick3D - Forest";
- testBinary = "forest_qml";
- testSource = "$QTDIR/qtquick3d/examples/quick3d/";
- testGoal = "Test creating billboard objects.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the forest qml example | the application starts and shows a brown earth plain with 11 green trees planted |
- | Use the mouse or touch pad to rotate the view | the objects rotates fine, user can view from all angles |
- | Maximize/minimize/resize the view | the view keeps size without resizing |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- geometry_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Geometry";
- testBinary = "geometry";
- testSource = "$QTDIR/qtquick3d/examples/qt3d/";
- testGoal = "Test geometry building and painter building";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the geometry | the application starts and shows a paper polyhedron with number textures, together with its unfolded plain view |
- | Use the mouse or touch pad to rotate the view | the objects rotates fine, user can view from all angles |
- | Maximize/minimize/resize the view | the view resizes accordingly, animation continues |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- graphicsview_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Graphicsview";
- testBinary = "graphicsview";
- testSource = "$QTDIR/qtquick3d/examples/qt3d/";
- testGoal = "Test frame buffer and interactions.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the graphicsview example | the application starts, showing a teapot with rubber band textures on it |
- | Use the mouse or touch pad to rotate the view | the teapot rotates fine |
- | Click and drag the rubber band end points | the rubber band texture should be dragged, presenting a texture animation |
- | Maximize/minimize/resize the view | the view resizes accordingly, animation continues |
- | Click on the cube on top left corner | the main object change from teapot to cube, retaining the texture |
- | Repeat 2-4 for the cube | the behavior are same as the teapot |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- lander_test: function()
- {
- //test meta data
- testTitle = "Quick3D - Lander";
- testBinary = "lander";
- testSource = "$QTDIR/qtquick3d/examples/quick3d/";
- testGoal = "Test QML integration, shaders, submesh, materials, mouse events";
- testPreconditions = "OpenGL/OpenGL ES required, GLSL Extension Required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the lander example | the application starts, showing a galaxy background with color flashing Qt-Lander and tap to play text |
- | Click to start play | over the galaxy background there is a lunar land, a lunar ship floating on top with shadow projected |
- | Click and hold mouse/tap to navigate the ship | the ship flames and accelerates to the sky |
- | Navigate the ship to land on the surface | the game finishes when the ship hits the surface, return to the welcome screen |
- | Navigate the ship to land outside the surface | the game finishes when the ship hits the surface, return to the welcome screen |
- | Maximize/minimize/resize the view | the view keeps size without resizing |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- matrix_animation_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Matrix Animation";
- testBinary = "matrix_animation";
- testSource = "$QTDIR/qtquick3d/examples/quick3d/";
- testGoal = "Test matrix animation.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the matrix animation example | the application starts, showing a Qt logo textured teapot, rotating and jumping up and down |
- | Click on the screen | the teapot stretches/squeezes in response to click |
- | Maximize/minimize/resize the view | the view keeps size without resizing |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- model_viewer_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Model Viewer";
- testBinary = "model_viewer";
- testSource = "$QTDIR/qtquick3d/demos/quick3d/";
- testGoal = "Test model loading and zooming.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the model viewer demo | the application starts, showing a gray monkey head and buttons with an address bar on bottom |
- | Rotate the model by mouse/tap | the model rotates as desired |
- | Click on +/- button | the model zoom in/out accordingly |
- | Fill in a file address/url to the address bar, click on the arrow | the model get loaded and displayed |
- | Repeat step 4 for all supported model formats | all supported formats load and display fine |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- monkeygod_test: function()
- {
- //test meta data
- testTitle = "Quick3D - Monkey God";
- testBinary = "monkeygod";
- testSource = "$QTDIR/qtquick3d/examples/quick3d/";
- testGoal = "Test building up complex 3D scenes including materials and animations.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the monkeygod example | the application starts, showing a wooden textured cube, a monkey head watching some penguins dancing |
- | Rotate the view with mouse/tap | the material/lights are correctly rendered, animation works while rotating |
- | Maximize/minimize/resize the view | the view keeps size without resizing |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- moon_test: function()
- {
- //test meta data
- testTitle = "Quick3D - Moon";
- testBinary = "moon";
- testSource = "$QTDIR/qtquick3d/examples/quick3d/";
- testGoal = "Test sphere and textures.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the moon example | the application starts, showing a moon ball in the center of the view, with moon texture |
- | Rotate the moon | the lights from right side to left renders fine |
- | Maximize/minimize/resize the view | the view keeps size without resizing |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- nesting_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Nesting";
- testBinary = "nesting";
- testSource = "$QTDIR/qtquick3d/examples/qt3d/";
- testGoal = "Test drawing into framebuffer objects.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the nesting example | the application starts, showing two rotating cubes, one brown with Qt logo texture, the other blue with spinning teapot animating texture |
- | Rotate the view | the objects get rotated while spinning |
- | Maximize/minimize/resize the view | the resizes accordingly |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- pageflip_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Page Flip";
- testBinary = "pageflip";
- testSource = "$QTDIR/qtquick3d/demos/qt3d/";
- testGoal = "Test using shaders to combine textures.";
- testPreconditions = "OpenGL/OpenGL ES required, GLSL Extension Required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the pageflip demo | the application starts, showing a page flipping book with Qt Quarterly content |
- | Observe the animation | the shadow is projected properly while page flips |
- | Maximize/minimize/resize the view | the view keeps size without resizing |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- photobrowser3d_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Photo Browser 3D";
- testBinary = "photobrowser3d";
- testSource = "$QTDIR/qtquick3d/demos/qt3d/";
- testGoal = "Test skybox, animation, mouse intraction and camera.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the photo browser 3d demo | the application starts, a lake surrounded with mountain appears, plus a photo frame with some pictures |
- | Click on one of the pictures | the picture shows full screen |
- | Maximize/minimize/resize the view | the resizes accordingly |
- | Click again on the picture | the picture goes back to the frame |
- | Close the application | application closes without warning or errors |
- | Click on the << or >> button | the camera swings around |
- '));
- },
-
- photoroom_test: function()
- {
- //test meta data
- testTitle = "Quick3D - Photo Room";
- testBinary = "photoroom";
- testSource = "$QTDIR/qtquick3d/examples/quick3d/";
- testGoal = "Test mouse events on items, model view";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the photo room example | the application starts, showing 10 pictures in two rows |
- | Move mouse cursor over the pictures | the pictures hovered pops up with bouncing effect (this is not applicable for touch screen devices) |
- | Maximize/minimize/resize the view | the view keeps size without resizing |
- | Click on one of the pictures | the picture shows full screen |
- | Close the application | application closes without warning or errors |
- | Click on the picture again | the picture falls back with effects |
- '));
- },
-
- qglinfo_test: function()
- {
- //test meta data
- testTitle = "Qt3D - QGLInfo";
- testBinary = "qglinfo";
- testSource = "$QTDIR/qtquick3d/utils/qt3d/";
- testGoal = "Test OpenGL information.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch qglinfo utility (called QtQuick3D on Windows) | the application starts, showing a window with OpenGL informations |
- | Read the information | the information displayed reflects the system OpenGL ability |
- | Click on menu File - Save as | the displayed information can be saved as a text file |
- | Click on menu Edit - Copy | the information are copied to the clipboard |
- | Click on menu View - Run FPS Test | a test window pops up with a green cube rotating |
- | Close the test window | a frame per second number is shown in the main windows status bar |
- | Click on menu Help - About | correct about information are displayed |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- penguin_advanced_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Penguin Advanced";
- testBinary = "qt3d/tutorials/penguin_advanced";
- testSource = "$QTDIR/qtquick3d/tutorials/qt3d/";
- testGoal = "Test 3DS model loading and camera.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the penguin advanced application in tutorial (not available in binary packages) | the application starts, showing a penguin on dark background |
- | Maximize/minimize/resize the view | the view keeps size without resizing |
- | Rotate the view | the object get rotated |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- robo_bounce_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Robot Bounce";
- testBinary = "robo_bounce";
- testSource = "$QTDIR/qtquick3d/demos/quick3d/";
- testGoal = "Test building complex objects using models, materials, and interactions.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the robo bounce demo | the application starts, showing a calculator |
- | Try some simple calculation on the calculator | correct results are got |
- | Click on QML 3D icon on top left corner | the scene changes to a face of a cube, rotates |
- | Watch the animation | a scene with modern city background, a celled plain, a robot fells down and stand up, a magic cube and three icons appears on top of the scene |
- | Click on the magic cube or the cube icon | the magic cube fells down, the robot catch up and push it down the plain, then return to the center |
- | Click on the spin icon | the plain spins around |
- | Click on the specification icon | a specification appears on left |
- | Rotate the view | the objects get rotated properly |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- shaders_test: function()
- {
- //test meta data
- testTitle = "Quick3D - Shaders";
- testBinary = "shaders";
- testSource = "$QTDIR/qtquick3d/examples/quick3d/";
- testGoal = "Test using GLSL shaders in QML";
- testPreconditions = "OpenGL/OpenGL ES required, GLSL Extension Required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the shader example | a rotating teapot with Qt logo texture is shown |
- | Click on the collapsing shader button | the teapot collapses into a Qt logo icon piece repeatly |
- | Click on the animation shader button | the teapot is squeezed into a flat teapot shape repeatly |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- shapes_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Shapes";
- testBinary = "shapes";
- testSource = "$QTDIR/qtquick3d/demos/qt3d/";
- testGoal = "Test paints all of the basic OpenGL shapes.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Lauch the shapes demo | nine basic shapes are drawn on the view port |
- | Observe the shapes | the correct names and shapes are drawn (on small screens the dots might not be big enough to see) |
- | Maximize/minimize/resize the view | the view resizes accordingly |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- solarsystem_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Solar System";
- testBinary = "solarsystem";
- testSource = "$QTDIR/qtquick3d/examples/qt3d/";
- testGoal = "Test shaders effects, QGLBuilder, nest tranformations and translations";
- testPreconditions = "OpenGL/OpenGL ES required, GLSL Extension Required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the solar system example | a sun, an earth, a moon appears and moves on their tracks |
- | Observe the animation | the sun glares with shader effects, earth and moon moves correct following track |
- | Rotate the view | the objects get rotated properly |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- sphere_test: function()
- {
- //test meta data
- testTitle = "Quick3D - Sphere";
- testBinary = "sphere";
- testSource = "$QTDIR/qtquick3d/examples/quick3d/";
- testGoal = "Test sphers.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the sphere example | ten spheres with different smootheness appear |
- | Observe the spheres | all spheres are drawn properly |
- | Rotate the view | the objects get rotated properly |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- tank_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Tank";
- testBinary = "tank";
- testSource = "$QTDIR/qtquick3d/examples/qt3d/";
- testGoal = "Test blending, texture, property animation and interactions.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the tank example | a grided plane appears with one rising transparent water tank |
- | Double click on the grided plane | a new water tank with different color appears and grow |
- | Rotate the view | the objects get rotated properly |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- teapot_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Teapot";
- testBinary = "teapot";
- testSource = "$QTDIR/qtquick3d/examples/qt3d/";
- testGoal = "Test drawing a basic object in Qt3D.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the teapot example | the application starts and shows a gray teapot |
- | Use the mouse or touch pad to rotate the view | the view rotates fine, user can view the teapot from all angles |
- | Maximize/minimize/resize the view | the teapot maximizes/minimizes/resize with the viewport, shows fine, no crash |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- teapot_bounce_qml_test: function()
- {
- //test meta data
- testTitle = "Quick3D - Teapot Bounce";
- testBinary = "teapot_bounce_qml";
- testSource = "$QTDIR/qtquick3d/demos/quick3d/";
- testGoal = "Test QML integration.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the teapot bounce qml example | the application starts and shows a gray teapot bouncing repeatly |
- | Use the mouse or touch pad to rotate the view | the view rotates fine, user can view the teapot from all angles |
- | Maximize/minimize/resize the view | the teapot maximizes/minimizes/resize with the viewport, shows fine, no crash |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- teapot_qml_test: function()
- {
- //test meta data
- testTitle = "Quick3D - Teapot";
- testBinary = "teapot_qml";
- testSource = "$QTDIR/qtquick3d/demos/quick3d/";
- testGoal = "Test drawing a basic object in Quick3D.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the teapot qml example | the application starts and shows a gray teapot |
- | Use the mouse or touch pad to rotate the view | the view rotates fine, user can view the teapot from all angles |
- | Maximize/minimize/resize the view | the teapot maximizes/minimizes/resize with the viewport, shows fine, no crash |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- teaservice_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Tea Service";
- testBinary = "teaservice";
- testSource = "$QTDIR/qtquick3d/demos/quick3d/";
- testGoal = "Test complex scenes and object picking.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the tea service C++ example | the application starts and shows a set of tea stuff |
- | Move mouse over the teapot and cups | the material/reflection of object changes |
- | Maximize/minimize/resize the view | the teapot maximizes/minimizes/resize with the viewport, shows fine, no crash |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- tea_service_test: function()
- {
- //test meta data
- testTitle = "Quick3D - Tea Service";
- testBinary = "tea_service";
- testSource = "$QTDIR/qtquick3d/demos/quick3d/";
- testGoal = "Test complex scenes and object picking with QML.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the tea service qml example | the application starts and shows a set of tea stuff |
- | Click on the tepot and cups | the object clicked will bounce up in response |
- | Maximize/minimize/resize the view | the teapot does not resize with the viewport, shows fine, no crash |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- tst_animations_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Animation Tests";
- testBinary = "tst_animations";
- testSource = "$QTDIR/qtquick3d/tests/manual/";
- testGoal = "Test basic animations.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | observe the first scene | the cube rotates to the left as described |
- | Launch the tst_animation test | four test scenes are displayed with animations |
- | observe the second scene | the cube rotates to the left as described |
- | observe the third scene | the cube rotates to the left once (not continuesly, so start the application and observe immediately) |
- | observe the fourth scene | the cube rotates to the left once with spring effect (not continuesly, so start the application and observe immediately) |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- tst_displaymodel_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Display Model Tests";
- testBinary = "tst_displaymodel";
- testSource = "$QTDIR/qtquick3d/tests/manual/";
- testGoal = "Test building/loading model and display.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the tst_displaymodel test | nine models should be loaded and displayed |
- | observe the nine scenes | the correct model is displayed as described |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- tst_model3ds_test: function()
- {
- //test meta data
- testTitle = "Qt3D - 3DS Model Tests";
- testBinary = "tst_model3ds";
- testSource = "$QTDIR/qtquick3d/tests/manual/";
- testGoal = "Test loading 3DS model and display.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the tst_model3ds test | four scenes are created displayiing one 3ds model each |
- | Observe the four scenes | the models get properly drawn as described |
- | Close the application | application closes without warning or errors |
- | Rotate the models with mouse/tap | the models rotates fine |
- '));
- },
-
- tst_navigation1_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Navigation";
- testBinary = "tst_navigation1";
- testSource = "$QTDIR/qtquick3d/tests/manual/";
- testGoal = "Test rotating/zooming model.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the tst_navigation1 test | two scenes are created with a dark gray monkey head in each |
- | Rotate the monkey heads with mouse/tap | the models rotates properly |
- | Zoom in using mouse wheel/multi-touch | the model on the left get culled when zoomed in to a certain level, the model on the right does not, as described |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- tst_qrc_test: function()
- {
- //test meta data
- testTitle = "Qt3D - QRC resource Tests";
- testBinary = "tst_qrc";
- testSource = "$QTDIR/qtquick3d/tests/manual/";
- testGoal = "Test loading resources from QRC files.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the tst_qrc test | two scenes are created with a textured cube in each |
- | Observe the cubes | they are identical |
- | Rotate the two cubes | they are fully textured with Qt logo and identical |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- tst_rotation_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Rotation Tests";
- testBinary = "tst_rotation";
- testSource = "$QTDIR/qtquick3d/tests/manual/";
- testGoal = "Test rotating objects.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the tst_rotation test | nine scenes are created with rotating cube animations |
- | Observe each scene | the cubes animates as described |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- tst_scaling_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Scaling Tests";
- testBinary = "tst_scaling";
- testSource = "$QTDIR/qtquick3d/tests/manual/";
- testGoal = "Testing scaling objects.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the tst_scaling test | nine scenes are created with scaling teapot animations |
- | Observe each scene | the teapots animates as described |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- tst_submesh_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Submesh Tests";
- testBinary = "tst_submesh";
- testSource = "$QTDIR/qtquick3d/tests/manual/";
- testGoal = "Testing operating sub-meshes in object.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the tst_submesh test | a scene of animation is created |
- | Observe the scene | the sub meshes move as described |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- tst_transformations_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Transformation Tests";
- testBinary = "tst_transformations";
- testSource = "$QTDIR/qtquick3d/tests/manual/";
- testGoal = "Testing transformations on objects.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the tst_transformation test | two scenes are created with moving teapot animations |
- | Observe each scene | the teapots animates as described |
- | Close the application | application closes without warning or errors |
- '));
- },
-
- tst_translation_test: function()
- {
- //test meta data
- testTitle = "Qt3D - Translation Tests";
- testBinary = "tst_translation";
- testSource = "$QTDIR/qtquick3d/tests/manual/";
- testGoal = "Testing object translation.";
- testPreconditions = "OpenGL/OpenGL ES required";
- testGroups = "BAT, TP1, TP2, 1.0";
- testRequirements = "NA";
- //Test Steps
- prompt(twiki('---+++ ' + testTitle + '<br><br>
- *Goal:* ' + testGoal + '<br>
- *Pre-Requisites:* ' + testPreconditions + '<br>
- *Tested Binary:* ' + testBinary + '<br>
- *Requirements:* ' + testRequirements + '<br>
- | *Step* | *Verification* |
- | Launch the tst_translation test | ten scenes are created with moving teapot animations |
- | Observe each scene | the teapots animates as described |
- | Close the application | application closes without warning or errors |
- '));
- }
-
-}
diff --git a/tests/tests.pro b/tests/tests.pro
deleted file mode 100644
index 6f7cec58..00000000
--- a/tests/tests.pro
+++ /dev/null
@@ -1,8 +0,0 @@
-TEMPLATE = subdirs
-
-# load this since its needed to turn qtc_harmattan->maemo
-include(../pkg.pri)
-
-# we dont package unit tests for maemo
-!maemo: SUBDIRS = manual
-!package: SUBDIRS += auto benchmarks