From 0542f1614aa6d50c4c9809fb0ce5f1adb5666d67 Mon Sep 17 00:00:00 2001 From: Paul Lemire Date: Mon, 11 Apr 2016 14:58:17 +0200 Subject: Move defaults and geometries out of Qt3DRender and into Qt3DExtras QBoundingVolumeDebug has been disabled for now. Will be re-enabled later on. Change-Id: Id6b0abab2ec2aa697330bd20d782f9d104d25d50 Reviewed-by: Sean Harmer --- .../qt3d/anaglyph-rendering/anaglyph-rendering.pro | 2 +- examples/qt3d/anaglyph-rendering/main.qml | 1 + examples/qt3d/assimp-cpp/assimp-cpp.pro | 2 +- examples/qt3d/assimp-cpp/main.cpp | 2 +- examples/qt3d/assimp/assimp.pro | 2 +- examples/qt3d/assimp/main.qml | 1 + examples/qt3d/basicshapes-cpp/main.cpp | 4 ++-- examples/qt3d/basicshapes-cpp/scenemodifier.cpp | 24 +++++++++++----------- examples/qt3d/basicshapes-cpp/scenemodifier.h | 16 +++++++-------- examples/qt3d/bigmodel-qml/MyEntity.qml | 1 + examples/qt3d/bigmodel-qml/bigmodel-qml.pro | 2 +- examples/qt3d/bigmodel-qml/main.qml | 1 + examples/qt3d/bigscene-cpp/entity.cpp | 8 ++++---- examples/qt3d/bigscene-cpp/entity.h | 6 +++--- examples/qt3d/bigscene-cpp/main.cpp | 6 +++--- .../bigscene-instanced-qml.pro | 2 +- examples/qt3d/bigscene-instanced-qml/main.qml | 1 + .../qt3d/clip-planes-qml/ClipCappingFrameGraph.qml | 2 ++ examples/qt3d/clip-planes-qml/ClipPlaneEntity.qml | 1 + examples/qt3d/clip-planes-qml/ClippingPlanes.qml | 1 + examples/qt3d/clip-planes-qml/clip-planes-qml.pro | 2 +- examples/qt3d/component-changes/main.cpp | 12 +++++------ examples/qt3d/compute-particles/ParticlesScene.qml | 1 + .../qt3d/compute-particles/compute-particles.pro | 2 +- examples/qt3d/controls/Logo.qml | 1 + examples/qt3d/cpp_example/cpp_example.pro | 2 +- examples/qt3d/cpp_example/main.cpp | 4 ++-- examples/qt3d/custom-mesh-cpp/main.cpp | 6 +++--- examples/qt3d/custom-mesh-qml/main.qml | 1 + examples/qt3d/cylinder-cpp/main.cpp | 10 ++++----- examples/qt3d/cylinder-qml/cylinder-qml.pro | 2 +- examples/qt3d/cylinder-qml/main.qml | 1 + .../deferred-renderer-cpp.pro | 2 +- examples/qt3d/deferred-renderer-cpp/main.cpp | 8 ++++---- examples/qt3d/deferred-renderer-qml/main.qml | 1 + examples/qt3d/dynamicscene-cpp/boxentity.cpp | 4 ++-- examples/qt3d/dynamicscene-cpp/boxentity.h | 8 ++++---- examples/qt3d/dynamicscene-cpp/main.cpp | 2 +- examples/qt3d/enabled-qml/main.qml | 1 + examples/qt3d/examples-common/examples-common.pri | 2 +- examples/qt3d/examples-common/examples-common.pro | 4 ++-- examples/qt3d/examples-common/qt3dwindow.cpp | 6 +++--- examples/qt3d/examples-common/qt3dwindow.h | 9 +++++--- examples/qt3d/gooch-qml/MyEntity.qml | 1 + examples/qt3d/gooch-qml/main.qml | 1 + .../qt3d/instanced-arrays-qml/instancebuffer.cpp | 2 +- examples/qt3d/instanced-arrays-qml/main.qml | 1 + examples/qt3d/keyboardinput-qml/SphereEntity.qml | 1 + examples/qt3d/keyboardinput-qml/main.qml | 1 + examples/qt3d/lights/PlaneEntity.qml | 1 + examples/qt3d/lights/main.qml | 1 + examples/qt3d/loader-qml/CuboidEntity.qml | 1 + examples/qt3d/loader-qml/SphereEntity.qml | 1 + examples/qt3d/loader-qml/main.qml | 1 + examples/qt3d/materials-cpp/barrel.cpp | 2 +- examples/qt3d/materials-cpp/barrel.h | 4 ++-- examples/qt3d/materials-cpp/houseplant.cpp | 6 +++--- examples/qt3d/materials-cpp/houseplant.h | 10 ++++----- examples/qt3d/materials-cpp/main.cpp | 12 +++++------ examples/qt3d/materials-cpp/planeentity.cpp | 6 +++--- examples/qt3d/materials-cpp/planeentity.h | 6 +++--- examples/qt3d/materials/Barrel.qml | 1 + examples/qt3d/materials/Chest.qml | 1 + examples/qt3d/materials/HousePlant.qml | 1 + examples/qt3d/materials/PlaneEntity.qml | 1 + examples/qt3d/materials/main.qml | 1 + examples/qt3d/mouseinput-qml/main.qml | 1 + examples/qt3d/multiviewport/main.qml | 1 + examples/qt3d/picking-qml/main.qml | 1 + examples/qt3d/plasma/main.qml | 1 + examples/qt3d/scene3d-loader/AnimatedEntity.qml | 1 + examples/qt3d/scene3d-loader/Scene2.qml | 1 + examples/qt3d/scene3d/AnimatedEntity.qml | 1 + examples/qt3d/shadow-map-qml/GroundPlane.qml | 1 + examples/qt3d/simple-cpp/main.cpp | 16 +++++++-------- examples/qt3d/simple-qml/main.qml | 1 + examples/qt3d/simple-shaders-qml/main.qml | 1 + examples/qt3d/skybox/Skybox.qml | 1 + examples/qt3d/skybox/main.qml | 1 + examples/qt3d/tessellation-modes/main.qml | 1 + examples/qt3d/torus-qml/main.qml | 1 + examples/qt3d/transforms-qml/main.qml | 1 + examples/qt3d/transparency-qml-scene3d/Scene.qml | 1 + examples/qt3d/transparency-qml/main.qml | 1 + examples/qt3d/wave/Wave.qml | 1 + examples/qt3d/wireframe/main.qml | 1 + 86 files changed, 163 insertions(+), 111 deletions(-) (limited to 'examples/qt3d') diff --git a/examples/qt3d/anaglyph-rendering/anaglyph-rendering.pro b/examples/qt3d/anaglyph-rendering/anaglyph-rendering.pro index 436b6dc35..d31b21924 100644 --- a/examples/qt3d/anaglyph-rendering/anaglyph-rendering.pro +++ b/examples/qt3d/anaglyph-rendering/anaglyph-rendering.pro @@ -4,7 +4,7 @@ SOURCE += main.cpp -QT += qml quick 3dcore 3drender 3dinput 3dquick +QT += qml quick 3dcore 3drender 3dinput 3dquick 3dextras OTHER_FILES += *.qml diff --git a/examples/qt3d/anaglyph-rendering/main.qml b/examples/qt3d/anaglyph-rendering/main.qml index 36a612310..3510850a2 100644 --- a/examples/qt3d/anaglyph-rendering/main.qml +++ b/examples/qt3d/anaglyph-rendering/main.qml @@ -51,6 +51,7 @@ import QtQuick 2.4 as QQ2 import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/assimp-cpp/assimp-cpp.pro b/examples/qt3d/assimp-cpp/assimp-cpp.pro index 0cc6dd164..201cef7a2 100644 --- a/examples/qt3d/assimp-cpp/assimp-cpp.pro +++ b/examples/qt3d/assimp-cpp/assimp-cpp.pro @@ -6,6 +6,6 @@ android|ios|tvos|winrt { error( "Couldn't find the examples.pri file!" ) } -QT += widgets 3dcore 3drender 3dinput +QT += widgets 3dcore 3drender 3dinput 3dextras SOURCES += main.cpp diff --git a/examples/qt3d/assimp-cpp/main.cpp b/examples/qt3d/assimp-cpp/main.cpp index f7dd6fccd..11e58a5f8 100644 --- a/examples/qt3d/assimp-cpp/main.cpp +++ b/examples/qt3d/assimp-cpp/main.cpp @@ -57,7 +57,7 @@ #include #include #include -#include +#include #include "qt3dwindow.h" #include "qfirstpersoncameracontroller.h" diff --git a/examples/qt3d/assimp/assimp.pro b/examples/qt3d/assimp/assimp.pro index 02eac7dc9..798a22b67 100644 --- a/examples/qt3d/assimp/assimp.pro +++ b/examples/qt3d/assimp/assimp.pro @@ -4,7 +4,7 @@ SOURCE += main.cpp -QT += qml quick 3dcore 3drender 3dinput 3dquick +QT += qml quick 3dcore 3drender 3dinput 3dquick 3dextras OTHER_FILES += main.qml diff --git a/examples/qt3d/assimp/main.qml b/examples/qt3d/assimp/main.qml index 40ea31e51..f3ea3c7a5 100644 --- a/examples/qt3d/assimp/main.qml +++ b/examples/qt3d/assimp/main.qml @@ -53,6 +53,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Examples 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { diff --git a/examples/qt3d/basicshapes-cpp/main.cpp b/examples/qt3d/basicshapes-cpp/main.cpp index 591c0cfc3..e01c0feeb 100644 --- a/examples/qt3d/basicshapes-cpp/main.cpp +++ b/examples/qt3d/basicshapes-cpp/main.cpp @@ -65,7 +65,7 @@ #include -#include +#include #include #include #include @@ -78,7 +78,7 @@ #include #include -#include +#include #include "qt3dwindow.h" #include "qfirstpersoncameracontroller.h" diff --git a/examples/qt3d/basicshapes-cpp/scenemodifier.cpp b/examples/qt3d/basicshapes-cpp/scenemodifier.cpp index b1420b7e6..798d3aeb6 100644 --- a/examples/qt3d/basicshapes-cpp/scenemodifier.cpp +++ b/examples/qt3d/basicshapes-cpp/scenemodifier.cpp @@ -58,7 +58,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity) // Torus shape data //! [0] - m_torus = new Qt3DRender::QTorusMesh(); + m_torus = new Qt3DExtras::QTorusMesh(); m_torus->setRadius(1.0f); m_torus->setMinorRadius(0.4f); m_torus->setRings(100); @@ -74,7 +74,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity) //! [1] //! [2] - Qt3DRender::QPhongMaterial *torusMaterial = new Qt3DRender::QPhongMaterial(); + Qt3DExtras::QPhongMaterial *torusMaterial = new Qt3DExtras::QPhongMaterial(); torusMaterial->setDiffuse(QColor(QRgb(0xbeb32b))); //! [2] @@ -87,7 +87,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity) //! [3] // Cone shape data - Qt3DRender::QConeMesh *cone = new Qt3DRender::QConeMesh(); + Qt3DExtras::QConeMesh *cone = new Qt3DExtras::QConeMesh(); cone->setTopRadius(0.5); cone->setBottomRadius(1); cone->setLength(3); @@ -100,7 +100,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity) coneTransform->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1.0f, 0.0f, 0.0f), 45.0f)); coneTransform->setTranslation(QVector3D(0.0f, 4.0f, -1.5)); - Qt3DRender::QPhongMaterial *coneMaterial = new Qt3DRender::QPhongMaterial(); + Qt3DExtras::QPhongMaterial *coneMaterial = new Qt3DExtras::QPhongMaterial(); coneMaterial->setDiffuse(QColor(QRgb(0x928327))); // Cone @@ -110,7 +110,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity) m_coneEntity->addComponent(coneTransform); // Cylinder shape data - Qt3DRender::QCylinderMesh *cylinder = new Qt3DRender::QCylinderMesh(); + Qt3DExtras::QCylinderMesh *cylinder = new Qt3DExtras::QCylinderMesh(); cylinder->setRadius(1); cylinder->setLength(3); cylinder->setRings(100); @@ -122,7 +122,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity) cylinderTransform->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1.0f, 0.0f, 0.0f), 45.0f)); cylinderTransform->setTranslation(QVector3D(-5.0f, 4.0f, -1.5)); - Qt3DRender::QPhongMaterial *cylinderMaterial = new Qt3DRender::QPhongMaterial(); + Qt3DExtras::QPhongMaterial *cylinderMaterial = new Qt3DExtras::QPhongMaterial(); cylinderMaterial->setDiffuse(QColor(QRgb(0x928327))); // Cylinder @@ -132,14 +132,14 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity) m_cylinderEntity->addComponent(cylinderTransform); // Cuboid shape data - Qt3DRender::QCuboidMesh *cuboid = new Qt3DRender::QCuboidMesh(); + Qt3DExtras::QCuboidMesh *cuboid = new Qt3DExtras::QCuboidMesh(); // CuboidMesh Transform Qt3DCore::QTransform *cuboidTransform = new Qt3DCore::QTransform(); cuboidTransform->setScale(4.0f); cuboidTransform->setTranslation(QVector3D(5.0f, -4.0f, 0.0f)); - Qt3DRender::QPhongMaterial *cuboidMaterial = new Qt3DRender::QPhongMaterial(); + Qt3DExtras::QPhongMaterial *cuboidMaterial = new Qt3DExtras::QPhongMaterial(); cuboidMaterial->setDiffuse(QColor(QRgb(0x665423))); //Cuboid @@ -149,7 +149,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity) m_cuboidEntity->addComponent(cuboidTransform); // Plane shape data - Qt3DRender::QPlaneMesh *planeMesh = new Qt3DRender::QPlaneMesh(); + Qt3DExtras::QPlaneMesh *planeMesh = new Qt3DExtras::QPlaneMesh(); planeMesh->setWidth(2); planeMesh->setHeight(2); @@ -159,7 +159,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity) planeTransform->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1.0f, 0.0f, 0.0f), 45.0f)); planeTransform->setTranslation(QVector3D(0.0f, -4.0f, 0.0f)); - Qt3DRender::QPhongMaterial *planeMaterial = new Qt3DRender::QPhongMaterial(); + Qt3DExtras::QPhongMaterial *planeMaterial = new Qt3DExtras::QPhongMaterial(); planeMaterial->setDiffuse(QColor(QRgb(0xa69929))); // Plane @@ -169,7 +169,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity) m_planeEntity->addComponent(planeTransform); // Sphere shape data - Qt3DRender::QSphereMesh *sphereMesh = new Qt3DRender::QSphereMesh(); + Qt3DExtras::QSphereMesh *sphereMesh = new Qt3DExtras::QSphereMesh(); sphereMesh->setRings(20); sphereMesh->setSlices(20); sphereMesh->setRadius(2); @@ -180,7 +180,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity) sphereTransform->setScale(1.3f); sphereTransform->setTranslation(QVector3D(-5.0f, -4.0f, 0.0f)); - Qt3DRender::QPhongMaterial *sphereMaterial = new Qt3DRender::QPhongMaterial(); + Qt3DExtras::QPhongMaterial *sphereMaterial = new Qt3DExtras::QPhongMaterial(); sphereMaterial->setDiffuse(QColor(QRgb(0xa69929))); // Sphere diff --git a/examples/qt3d/basicshapes-cpp/scenemodifier.h b/examples/qt3d/basicshapes-cpp/scenemodifier.h index fed79a433..2d33ec95e 100644 --- a/examples/qt3d/basicshapes-cpp/scenemodifier.h +++ b/examples/qt3d/basicshapes-cpp/scenemodifier.h @@ -56,13 +56,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include class SceneModifier : public QObject { @@ -82,7 +82,7 @@ public slots: private: Qt3DCore::QEntity *m_rootEntity; - Qt3DRender::QTorusMesh *m_torus; + Qt3DExtras::QTorusMesh *m_torus; Qt3DCore::QEntity *m_coneEntity; Qt3DCore::QEntity *m_cylinderEntity; Qt3DCore::QEntity *m_torusEntity; diff --git a/examples/qt3d/bigmodel-qml/MyEntity.qml b/examples/qt3d/bigmodel-qml/MyEntity.qml index 04b77aedc..c2c7e5d7c 100644 --- a/examples/qt3d/bigmodel-qml/MyEntity.qml +++ b/examples/qt3d/bigmodel-qml/MyEntity.qml @@ -51,6 +51,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/bigmodel-qml/bigmodel-qml.pro b/examples/qt3d/bigmodel-qml/bigmodel-qml.pro index d183530e5..063a27b01 100644 --- a/examples/qt3d/bigmodel-qml/bigmodel-qml.pro +++ b/examples/qt3d/bigmodel-qml/bigmodel-qml.pro @@ -2,7 +2,7 @@ error( "Couldn't find the examples.pri file!" ) } -QT += 3dcore 3drender 3dinput 3dquick qml quick +QT += 3dcore 3drender 3dinput 3dquick qml quick 3dextras SOURCES += \ main.cpp diff --git a/examples/qt3d/bigmodel-qml/main.qml b/examples/qt3d/bigmodel-qml/main.qml index e83cace9d..61d9d39a5 100644 --- a/examples/qt3d/bigmodel-qml/main.qml +++ b/examples/qt3d/bigmodel-qml/main.qml @@ -51,6 +51,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 import QtQuick 2.2 as QQ2 Entity { diff --git a/examples/qt3d/bigscene-cpp/entity.cpp b/examples/qt3d/bigscene-cpp/entity.cpp index 878a3839f..9a4ecae3b 100644 --- a/examples/qt3d/bigscene-cpp/entity.cpp +++ b/examples/qt3d/bigscene-cpp/entity.cpp @@ -50,16 +50,16 @@ #include "entity.h" -#include -#include +#include +#include #include #include Entity::Entity(Qt3DCore::QNode *parent) : QEntity(parent) , m_transform(new Qt3DCore::QTransform()) - , m_mesh(new Qt3DRender::QCylinderMesh()) - , m_material(new Qt3DRender::QPhongMaterial()) + , m_mesh(new Qt3DExtras::QCylinderMesh()) + , m_material(new Qt3DExtras::QPhongMaterial()) { m_mesh->setRings(50.0f); m_mesh->setSlices(30.0f); diff --git a/examples/qt3d/bigscene-cpp/entity.h b/examples/qt3d/bigscene-cpp/entity.h index cf4f1497d..04dcbbcb3 100644 --- a/examples/qt3d/bigscene-cpp/entity.h +++ b/examples/qt3d/bigscene-cpp/entity.h @@ -61,7 +61,7 @@ namespace Qt3DCore { class QTransform; } -namespace Qt3DRender { +namespace Qt3DExtras { class QCylinderMesh; class QPhongMaterial; } @@ -101,8 +101,8 @@ private: private: Qt3DCore::QTransform *m_transform; - Qt3DRender::QCylinderMesh *m_mesh; - Qt3DRender::QPhongMaterial *m_material; + Qt3DExtras::QCylinderMesh *m_mesh; + Qt3DExtras::QPhongMaterial *m_material; float m_theta; float m_phi; QVector3D m_position; diff --git a/examples/qt3d/bigscene-cpp/main.cpp b/examples/qt3d/bigscene-cpp/main.cpp index 15f113280..4c5d0a115 100644 --- a/examples/qt3d/bigscene-cpp/main.cpp +++ b/examples/qt3d/bigscene-cpp/main.cpp @@ -61,11 +61,11 @@ #include #include #include -#include +#include #include #include -#include -#include +#include +#include #include #include "qt3dwindow.h" #include "qfirstpersoncameracontroller.h" diff --git a/examples/qt3d/bigscene-instanced-qml/bigscene-instanced-qml.pro b/examples/qt3d/bigscene-instanced-qml/bigscene-instanced-qml.pro index 78c0e6927..d2c5166ee 100644 --- a/examples/qt3d/bigscene-instanced-qml/bigscene-instanced-qml.pro +++ b/examples/qt3d/bigscene-instanced-qml/bigscene-instanced-qml.pro @@ -2,7 +2,7 @@ error( "Couldn't find the examples.pri file!" ) } -QT += qml quick 3dcore 3drender 3dinput 3dquick +QT += qml quick 3dcore 3drender 3dinput 3dquick 3dextras SOURCES += \ main.cpp diff --git a/examples/qt3d/bigscene-instanced-qml/main.qml b/examples/qt3d/bigscene-instanced-qml/main.qml index 79fb09533..ea804963a 100644 --- a/examples/qt3d/bigscene-instanced-qml/main.qml +++ b/examples/qt3d/bigscene-instanced-qml/main.qml @@ -52,6 +52,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import QtQuick 2.2 as QQ2 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { id: sceneRoot diff --git a/examples/qt3d/clip-planes-qml/ClipCappingFrameGraph.qml b/examples/qt3d/clip-planes-qml/ClipCappingFrameGraph.qml index fb03341cb..5af9be195 100644 --- a/examples/qt3d/clip-planes-qml/ClipCappingFrameGraph.qml +++ b/examples/qt3d/clip-planes-qml/ClipCappingFrameGraph.qml @@ -54,6 +54,7 @@ import Qt3D.Render 2.0 Viewport { property alias camera: cameraSelector.camera property alias window: surfaceSelector.surface + property alias clearColor: clearBuffer.clearColor RenderSurfaceSelector { id: surfaceSelector @@ -76,6 +77,7 @@ Viewport { // Fills depth buffer for entities that are clipped layers: ["content", "visualization"] ClearBuffers { + id: clearBuffer buffers: ClearBuffers.ColorDepthBuffer RenderPassFilter { matchAny: FilterKey { name: "pass"; value: "material" } diff --git a/examples/qt3d/clip-planes-qml/ClipPlaneEntity.qml b/examples/qt3d/clip-planes-qml/ClipPlaneEntity.qml index d3cac2c81..e70177c6d 100644 --- a/examples/qt3d/clip-planes-qml/ClipPlaneEntity.qml +++ b/examples/qt3d/clip-planes-qml/ClipPlaneEntity.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/clip-planes-qml/ClippingPlanes.qml b/examples/qt3d/clip-planes-qml/ClippingPlanes.qml index 28f526955..c1dd905f3 100644 --- a/examples/qt3d/clip-planes-qml/ClippingPlanes.qml +++ b/examples/qt3d/clip-planes-qml/ClippingPlanes.qml @@ -51,6 +51,7 @@ import QtQuick 2.4 as QQ2 import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/clip-planes-qml/clip-planes-qml.pro b/examples/qt3d/clip-planes-qml/clip-planes-qml.pro index 5ecc28ca7..81500e4ce 100644 --- a/examples/qt3d/clip-planes-qml/clip-planes-qml.pro +++ b/examples/qt3d/clip-planes-qml/clip-planes-qml.pro @@ -2,7 +2,7 @@ error( "Couldn't find the examples.pri file!" ) } -QT += qml quick 3dcore 3drender 3dinput 3dquick +QT += qml quick 3dcore 3drender 3dinput 3dquick 3dextras SOURCES += main.cpp diff --git a/examples/qt3d/component-changes/main.cpp b/examples/qt3d/component-changes/main.cpp index 7cac4e0be..93ae52d4d 100644 --- a/examples/qt3d/component-changes/main.cpp +++ b/examples/qt3d/component-changes/main.cpp @@ -51,9 +51,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -121,14 +121,14 @@ int main(int argc, char **argv) cameraController->setCamera(camera); // Cylinder mesh data - Qt3DRender::QCylinderMesh *cylinderMesh = new Qt3DRender::QCylinderMesh(); + Qt3DExtras::QCylinderMesh *cylinderMesh = new Qt3DExtras::QCylinderMesh(); cylinderMesh->setRadius(1); cylinderMesh->setLength(3); cylinderMesh->setRings(5); cylinderMesh->setSlices(40); // Sphere mesh data - Qt3DRender::QSphereMesh *sphereMesh = new Qt3DRender::QSphereMesh(); + Qt3DExtras::QSphereMesh *sphereMesh = new Qt3DExtras::QSphereMesh(); sphereMesh->setRings(20); sphereMesh->setSlices(40); @@ -138,7 +138,7 @@ int main(int argc, char **argv) transform->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1, 0, 0), 45.0f)); // Material - Qt3DRender::QPhongMaterial *material = new Qt3DRender::QPhongMaterial(rootEntity); + Qt3DExtras::QPhongMaterial *material = new Qt3DExtras::QPhongMaterial(rootEntity); material->setDiffuse(Qt::red); // Cylinder diff --git a/examples/qt3d/compute-particles/ParticlesScene.qml b/examples/qt3d/compute-particles/ParticlesScene.qml index e9a309022..cbb21f266 100644 --- a/examples/qt3d/compute-particles/ParticlesScene.qml +++ b/examples/qt3d/compute-particles/ParticlesScene.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { property alias particleStep: computeMaterial.particleStep diff --git a/examples/qt3d/compute-particles/compute-particles.pro b/examples/qt3d/compute-particles/compute-particles.pro index c25cc0c30..96b1a6b5d 100644 --- a/examples/qt3d/compute-particles/compute-particles.pro +++ b/examples/qt3d/compute-particles/compute-particles.pro @@ -2,7 +2,7 @@ error( "Couldn't find the examples.pri file!" ) } -QT += 3dcore 3drender 3dquick 3dinput quick qml +QT += 3dcore 3drender 3dquick 3dinput quick qml 3dextras HEADERS += \ diff --git a/examples/qt3d/controls/Logo.qml b/examples/qt3d/controls/Logo.qml index 0f2fe1fb3..a686e29bd 100644 --- a/examples/qt3d/controls/Logo.qml +++ b/examples/qt3d/controls/Logo.qml @@ -51,6 +51,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import QtQuick 2.0 +import Qt3D.Extras 2.0 Entity { id: sceneRoot diff --git a/examples/qt3d/cpp_example/cpp_example.pro b/examples/qt3d/cpp_example/cpp_example.pro index f78ec0860..b6fffb8cc 100644 --- a/examples/qt3d/cpp_example/cpp_example.pro +++ b/examples/qt3d/cpp_example/cpp_example.pro @@ -2,7 +2,7 @@ error( "Couldn't find the examples.pri file!" ) } -QT += 3dcore 3drender 3dinput +QT += 3dcore 3drender 3dinput 3dextras SOURCES += main.cpp diff --git a/examples/qt3d/cpp_example/main.cpp b/examples/qt3d/cpp_example/main.cpp index e93c417ee..68e657670 100644 --- a/examples/qt3d/cpp_example/main.cpp +++ b/examples/qt3d/cpp_example/main.cpp @@ -58,7 +58,7 @@ #include -#include +#include #include #include #include @@ -88,7 +88,7 @@ int main(int ac, char **av) Qt3DCore::QEntity *torusEntity = new Qt3DCore::QEntity(rootEntity); // Torus shape data - Qt3DRender::QTorusMesh *torus = new Qt3DRender::QTorusMesh(); + Qt3DExtras::QTorusMesh *torus = new Qt3DExtras::QTorusMesh(); torus->setRadius(40); torus->setMinorRadius(15); diff --git a/examples/qt3d/custom-mesh-cpp/main.cpp b/examples/qt3d/custom-mesh-cpp/main.cpp index 68f2683bf..d4652839c 100644 --- a/examples/qt3d/custom-mesh-cpp/main.cpp +++ b/examples/qt3d/custom-mesh-cpp/main.cpp @@ -60,8 +60,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -94,7 +94,7 @@ int main(int argc, char* argv[]) camController->setCamera(cameraEntity); // Material - Qt3DRender::QMaterial *material = new Qt3DRender::QPerVertexColorMaterial(rootEntity); + Qt3DRender::QMaterial *material = new Qt3DExtras::QPerVertexColorMaterial(rootEntity); // Torus Qt3DCore::QEntity *customMeshEntity = new Qt3DCore::QEntity(rootEntity); diff --git a/examples/qt3d/custom-mesh-qml/main.qml b/examples/qt3d/custom-mesh-qml/main.qml index 2d93d84f3..e5d26e23f 100644 --- a/examples/qt3d/custom-mesh-qml/main.qml +++ b/examples/qt3d/custom-mesh-qml/main.qml @@ -52,6 +52,7 @@ import QtQuick 2.2 as QQ2 import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { id: sceneRoot diff --git a/examples/qt3d/cylinder-cpp/main.cpp b/examples/qt3d/cylinder-cpp/main.cpp index 22442d813..725d373fe 100644 --- a/examples/qt3d/cylinder-cpp/main.cpp +++ b/examples/qt3d/cylinder-cpp/main.cpp @@ -54,15 +54,15 @@ #include #include -#include +#include #include #include -#include +#include #include #include #include #include -#include +#include #include #include @@ -91,7 +91,7 @@ int main(int argc, char **argv) cameraController->setCamera(camera); // Cylinder shape data - Qt3DRender::QCylinderMesh *mesh = new Qt3DRender::QCylinderMesh(); + Qt3DExtras::QCylinderMesh *mesh = new Qt3DExtras::QCylinderMesh(); mesh->setRadius(1); mesh->setLength(3); mesh->setRings(100); @@ -103,7 +103,7 @@ int main(int argc, char **argv) transform->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1, 0, 0), 45.0f)); // Material - Qt3DRender::QPhongMaterial *material = new Qt3DRender::QPhongMaterial(rootEntity); + Qt3DExtras::QPhongMaterial *material = new Qt3DExtras::QPhongMaterial(rootEntity); material->setDiffuse(Qt::red); // Cylinder diff --git a/examples/qt3d/cylinder-qml/cylinder-qml.pro b/examples/qt3d/cylinder-qml/cylinder-qml.pro index 5658d30ff..ed5b093b3 100644 --- a/examples/qt3d/cylinder-qml/cylinder-qml.pro +++ b/examples/qt3d/cylinder-qml/cylinder-qml.pro @@ -2,7 +2,7 @@ error( "Couldn't find the examples.pri file!" ) } -QT += 3dcore 3drender 3dinput 3dquick qml quick +QT += 3dcore 3drender 3dinput 3dquick qml quick 3dextras SOURCES += \ main.cpp diff --git a/examples/qt3d/cylinder-qml/main.qml b/examples/qt3d/cylinder-qml/main.qml index 3735c8569..9d2fed54b 100644 --- a/examples/qt3d/cylinder-qml/main.qml +++ b/examples/qt3d/cylinder-qml/main.qml @@ -51,6 +51,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { id: sceneRoot diff --git a/examples/qt3d/deferred-renderer-cpp/deferred-renderer-cpp.pro b/examples/qt3d/deferred-renderer-cpp/deferred-renderer-cpp.pro index 261d893ce..f9f239f24 100644 --- a/examples/qt3d/deferred-renderer-cpp/deferred-renderer-cpp.pro +++ b/examples/qt3d/deferred-renderer-cpp/deferred-renderer-cpp.pro @@ -2,7 +2,7 @@ error( "Couldn't find the examples.pri file!" ) } -QT += 3dcore 3drender 3dinput +QT += 3dcore 3drender 3dinput 3dextras HEADERS += \ gbuffer.h \ diff --git a/examples/qt3d/deferred-renderer-cpp/main.cpp b/examples/qt3d/deferred-renderer-cpp/main.cpp index f1221fd3b..868158e49 100644 --- a/examples/qt3d/deferred-renderer-cpp/main.cpp +++ b/examples/qt3d/deferred-renderer-cpp/main.cpp @@ -51,8 +51,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -87,7 +87,7 @@ int main(int ac, char **av) FinalEffect *finalEffect = new FinalEffect(); SceneEffect *sceneEffect = new SceneEffect(); - Qt3DRender::QSphereMesh *sphereMesh = new Qt3DRender::QSphereMesh(); + Qt3DExtras::QSphereMesh *sphereMesh = new Qt3DExtras::QSphereMesh(); sphereMesh->setRings(50); sphereMesh->setSlices(100); @@ -97,7 +97,7 @@ int main(int ac, char **av) Qt3DRender::QLayer *quadLayer = new Qt3DRender::QLayer(); quadLayer->setNames(QStringList("screenQuad")); - Qt3DRender::QPlaneMesh *planeMesh = new Qt3DRender::QPlaneMesh(); + Qt3DExtras::QPlaneMesh *planeMesh = new Qt3DExtras::QPlaneMesh(); planeMesh->setMeshResolution(QSize(2, 2)); planeMesh->setWidth(2.0f); planeMesh->setHeight(2.0f); diff --git a/examples/qt3d/deferred-renderer-qml/main.qml b/examples/qt3d/deferred-renderer-qml/main.qml index 09812674f..cca32ca3c 100644 --- a/examples/qt3d/deferred-renderer-qml/main.qml +++ b/examples/qt3d/deferred-renderer-qml/main.qml @@ -52,6 +52,7 @@ import QtQuick 2.0 as QQ2 import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { id : root diff --git a/examples/qt3d/dynamicscene-cpp/boxentity.cpp b/examples/qt3d/dynamicscene-cpp/boxentity.cpp index c0e8c7511..a39c9a9dc 100644 --- a/examples/qt3d/dynamicscene-cpp/boxentity.cpp +++ b/examples/qt3d/dynamicscene-cpp/boxentity.cpp @@ -55,8 +55,8 @@ BoxEntity::BoxEntity(QNode *parent) : Qt3DCore::QEntity(parent) , m_transform(new Qt3DCore::QTransform()) - , m_mesh(new Qt3DRender::QCuboidMesh()) - , m_material(new Qt3DRender::QPhongMaterial()) + , m_mesh(new Qt3DExtras::QCuboidMesh()) + , m_material(new Qt3DExtras::QPhongMaterial()) , m_angle(0.0f) , m_radius(1.0f) { diff --git a/examples/qt3d/dynamicscene-cpp/boxentity.h b/examples/qt3d/dynamicscene-cpp/boxentity.h index 1aa24c436..f9fdb9580 100644 --- a/examples/qt3d/dynamicscene-cpp/boxentity.h +++ b/examples/qt3d/dynamicscene-cpp/boxentity.h @@ -53,8 +53,8 @@ #include #include -#include -#include +#include +#include class BoxEntity : public Qt3DCore::QEntity { @@ -85,8 +85,8 @@ private: void updateTransformation(); Qt3DCore::QTransform *m_transform; - Qt3DRender::QCuboidMesh *m_mesh; - Qt3DRender::QPhongMaterial *m_material; + Qt3DExtras::QCuboidMesh *m_mesh; + Qt3DExtras::QPhongMaterial *m_material; float m_angle; float m_radius; }; diff --git a/examples/qt3d/dynamicscene-cpp/main.cpp b/examples/qt3d/dynamicscene-cpp/main.cpp index 3839b480a..353f6a42d 100644 --- a/examples/qt3d/dynamicscene-cpp/main.cpp +++ b/examples/qt3d/dynamicscene-cpp/main.cpp @@ -56,7 +56,7 @@ #include #include -#include +#include #include "examplescene.h" #include "qt3dwindow.h" diff --git a/examples/qt3d/enabled-qml/main.qml b/examples/qt3d/enabled-qml/main.qml index 0a0894e82..182d35ca8 100644 --- a/examples/qt3d/enabled-qml/main.qml +++ b/examples/qt3d/enabled-qml/main.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 import QtQuick 2.0 as QQ2 Entity { diff --git a/examples/qt3d/examples-common/examples-common.pri b/examples/qt3d/examples-common/examples-common.pri index e50e39edd..ce77eadbe 100644 --- a/examples/qt3d/examples-common/examples-common.pri +++ b/examples/qt3d/examples-common/examples-common.pri @@ -1,4 +1,4 @@ -QT += 3dcore 3drender 3dinput 3dlogic qml +QT += 3dcore 3drender 3dinput 3dlogic qml 3dextras INCLUDEPATH += $$PWD diff --git a/examples/qt3d/examples-common/examples-common.pro b/examples/qt3d/examples-common/examples-common.pro index b5be67137..85123db4e 100644 --- a/examples/qt3d/examples-common/examples-common.pro +++ b/examples/qt3d/examples-common/examples-common.pro @@ -1,7 +1,7 @@ TEMPLATE = lib CONFIG += staticlib TARGET = examples-common -QT += core-private 3dcore 3dcore-private 3drender 3dinput 3dlogic qml quick +QT += core-private 3dcore 3dcore-private 3drender 3dinput 3dlogic qml quick 3dextras SOURCES += \ qfirstpersoncameracontroller.cpp \ @@ -9,6 +9,7 @@ SOURCES += \ qt3dwindow.cpp \ qt3dquickwindow.cpp + HEADERS += \ qfirstpersoncameracontroller.h \ qfirstpersoncameracontroller_p.h \ @@ -17,7 +18,6 @@ HEADERS += \ qt3dwindow.h \ qt3dquickwindow.h - QML_FILES = \ $$PWD/OrbitController.qml \ $$PWD/FirstPersonCameraController.qml diff --git a/examples/qt3d/examples-common/qt3dwindow.cpp b/examples/qt3d/examples-common/qt3dwindow.cpp index bbf3ee51f..4c0bfc21a 100644 --- a/examples/qt3d/examples-common/qt3dwindow.cpp +++ b/examples/qt3d/examples-common/qt3dwindow.cpp @@ -50,7 +50,7 @@ #include "qt3dwindow.h" -#include +#include #include #include #include @@ -72,7 +72,7 @@ Qt3DWindow::Qt3DWindow(QScreen *screen) , m_inputAspect(new Qt3DInput::QInputAspect) , m_logicAspect(new Qt3DLogic::QLogicAspect) , m_renderSettings(new Qt3DRender::QRenderSettings) - , m_forwardRenderer(new Qt3DRender::QForwardRenderer) + , m_forwardRenderer(new Qt3DExtras::QForwardRenderer) , m_defaultCamera(new Qt3DRender::QCamera) , m_inputSettings(new Qt3DInput::QInputSettings) , m_root(new Qt3DCore::QEntity) @@ -141,7 +141,7 @@ Qt3DRender::QFrameGraphNode *Qt3DWindow::activeFrameGraph() const return m_renderSettings->activeFrameGraph(); } -Qt3DRender::QForwardRenderer *Qt3DWindow::defaultFramegraph() const +Qt3DExtras::QForwardRenderer *Qt3DWindow::defaultFramegraph() const { return m_forwardRenderer; } diff --git a/examples/qt3d/examples-common/qt3dwindow.h b/examples/qt3d/examples-common/qt3dwindow.h index 90b660112..5cb71d1d9 100644 --- a/examples/qt3d/examples-common/qt3dwindow.h +++ b/examples/qt3d/examples-common/qt3dwindow.h @@ -64,11 +64,14 @@ class QEntity; namespace Qt3DRender { class QCamera; class QFrameGraphNode; -class QForwardRenderer; class QRenderAspect; class QRenderSettings; } +namespace Qt3DExtras { +class QForwardRenderer; +} + namespace Qt3DInput { class QInputAspect; class QInputSettings; @@ -92,7 +95,7 @@ public: void setActiveFrameGraph(Qt3DRender::QFrameGraphNode *activeFrameGraph); Qt3DRender::QFrameGraphNode *activeFrameGraph() const; - Qt3DRender::QForwardRenderer *defaultFramegraph() const; + Qt3DExtras::QForwardRenderer *defaultFramegraph() const; Qt3DRender::QCamera *camera() const; @@ -114,7 +117,7 @@ private: // Renderer configuration Qt3DRender::QRenderSettings *m_renderSettings; - Qt3DRender::QForwardRenderer *m_forwardRenderer; + Qt3DExtras::QForwardRenderer *m_forwardRenderer; Qt3DRender::QCamera *m_defaultCamera; // Input configuration diff --git a/examples/qt3d/gooch-qml/MyEntity.qml b/examples/qt3d/gooch-qml/MyEntity.qml index aba3f327e..0867c0f0e 100644 --- a/examples/qt3d/gooch-qml/MyEntity.qml +++ b/examples/qt3d/gooch-qml/MyEntity.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/gooch-qml/main.qml b/examples/qt3d/gooch-qml/main.qml index 9208512b6..571b894ee 100644 --- a/examples/qt3d/gooch-qml/main.qml +++ b/examples/qt3d/gooch-qml/main.qml @@ -51,6 +51,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 import QtQuick 2.2 as QQ2 Entity { diff --git a/examples/qt3d/instanced-arrays-qml/instancebuffer.cpp b/examples/qt3d/instanced-arrays-qml/instancebuffer.cpp index 3151464e3..bfe7fa951 100644 --- a/examples/qt3d/instanced-arrays-qml/instancebuffer.cpp +++ b/examples/qt3d/instanced-arrays-qml/instancebuffer.cpp @@ -57,7 +57,7 @@ static const int colCount = 20; static const int maxInstanceCount = rowCount * colCount; InstanceBuffer::InstanceBuffer(Qt3DCore::QNode *parent) - : Qt3DRender::QBuffer(QBuffer::VertexBuffer, parent) + : Qt3DRender::QBuffer(Qt3DRender::QBuffer::VertexBuffer, parent) , m_instanceCount(maxInstanceCount) { // Create some per instance data - position of each instance diff --git a/examples/qt3d/instanced-arrays-qml/main.qml b/examples/qt3d/instanced-arrays-qml/main.qml index c1478e965..91558fc42 100644 --- a/examples/qt3d/instanced-arrays-qml/main.qml +++ b/examples/qt3d/instanced-arrays-qml/main.qml @@ -51,6 +51,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 import QtQuick 2.2 as QQ2 Entity { diff --git a/examples/qt3d/keyboardinput-qml/SphereEntity.qml b/examples/qt3d/keyboardinput-qml/SphereEntity.qml index f0e26e776..2b7b449d7 100644 --- a/examples/qt3d/keyboardinput-qml/SphereEntity.qml +++ b/examples/qt3d/keyboardinput-qml/SphereEntity.qml @@ -52,6 +52,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 import QtQuick 2.3 as QQ2 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/keyboardinput-qml/main.qml b/examples/qt3d/keyboardinput-qml/main.qml index 396d75891..cc65c4a83 100644 --- a/examples/qt3d/keyboardinput-qml/main.qml +++ b/examples/qt3d/keyboardinput-qml/main.qml @@ -51,6 +51,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/lights/PlaneEntity.qml b/examples/qt3d/lights/PlaneEntity.qml index a00c0f1c0..268c59add 100644 --- a/examples/qt3d/lights/PlaneEntity.qml +++ b/examples/qt3d/lights/PlaneEntity.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/lights/main.qml b/examples/qt3d/lights/main.qml index 26f6716f8..b07733e5b 100644 --- a/examples/qt3d/lights/main.qml +++ b/examples/qt3d/lights/main.qml @@ -51,6 +51,7 @@ import QtQuick 2.0 as Quick import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { diff --git a/examples/qt3d/loader-qml/CuboidEntity.qml b/examples/qt3d/loader-qml/CuboidEntity.qml index 512c3369b..8555b6903 100644 --- a/examples/qt3d/loader-qml/CuboidEntity.qml +++ b/examples/qt3d/loader-qml/CuboidEntity.qml @@ -51,6 +51,7 @@ import QtQuick 2.4 as QQ2 import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { components: [ mesh, phongMaterial, transform ] diff --git a/examples/qt3d/loader-qml/SphereEntity.qml b/examples/qt3d/loader-qml/SphereEntity.qml index fe0556e78..8e11de99e 100644 --- a/examples/qt3d/loader-qml/SphereEntity.qml +++ b/examples/qt3d/loader-qml/SphereEntity.qml @@ -51,6 +51,7 @@ import QtQuick 2.4 as QQ2 import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { components: [ mesh, material, transform ] diff --git a/examples/qt3d/loader-qml/main.qml b/examples/qt3d/loader-qml/main.qml index 7ea7f43ca..42d9f4004 100644 --- a/examples/qt3d/loader-qml/main.qml +++ b/examples/qt3d/loader-qml/main.qml @@ -52,6 +52,7 @@ import QtQuick 2.2 as QQ2 import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { id: sceneRoot diff --git a/examples/qt3d/materials-cpp/barrel.cpp b/examples/qt3d/materials-cpp/barrel.cpp index 0a64a4f94..147f586aa 100644 --- a/examples/qt3d/materials-cpp/barrel.cpp +++ b/examples/qt3d/materials-cpp/barrel.cpp @@ -76,7 +76,7 @@ Barrel::Barrel(Qt3DCore::QNode *parent) , m_bumps(NoBumps) , m_diffuseColor(Red) , m_specularColor(None) - , m_material(new Qt3DRender::QNormalDiffuseSpecularMapMaterial()) + , m_material(new Qt3DExtras::QNormalDiffuseSpecularMapMaterial()) , m_diffuseTexture(m_material->diffuse()) , m_normalTexture(m_material->normal()) , m_specularTexture(m_material->specular()) diff --git a/examples/qt3d/materials-cpp/barrel.h b/examples/qt3d/materials-cpp/barrel.h index 293501519..237ab446c 100644 --- a/examples/qt3d/materials-cpp/barrel.h +++ b/examples/qt3d/materials-cpp/barrel.h @@ -51,7 +51,7 @@ #ifndef BARREL_H #define BARREL_H -#include +#include #include #include "renderableentity.h" @@ -96,7 +96,7 @@ private: Bumps m_bumps; DiffuseColor m_diffuseColor; SpecularColor m_specularColor; - Qt3DRender::QNormalDiffuseSpecularMapMaterial *m_material; + Qt3DExtras::QNormalDiffuseSpecularMapMaterial *m_material; Qt3DRender::QAbstractTexture *m_diffuseTexture; Qt3DRender::QAbstractTexture *m_normalTexture; Qt3DRender::QAbstractTexture *m_specularTexture; diff --git a/examples/qt3d/materials-cpp/houseplant.cpp b/examples/qt3d/materials-cpp/houseplant.cpp index b9b42f5a2..638f8c4d1 100644 --- a/examples/qt3d/materials-cpp/houseplant.cpp +++ b/examples/qt3d/materials-cpp/houseplant.cpp @@ -72,9 +72,9 @@ HousePlant::HousePlant(Qt3DCore::QNode *parent) , m_pot(new RenderableEntity(this)) , m_plant(new RenderableEntity(m_pot)) , m_cover(new RenderableEntity(m_pot)) - , m_potMaterial(new Qt3DRender::QNormalDiffuseMapMaterial()) - , m_plantMaterial(new Qt3DRender::QNormalDiffuseMapAlphaMaterial()) - , m_coverMaterial(new Qt3DRender::QNormalDiffuseMapMaterial()) + , m_potMaterial(new Qt3DExtras::QNormalDiffuseMapMaterial()) + , m_plantMaterial(new Qt3DExtras::QNormalDiffuseMapAlphaMaterial()) + , m_coverMaterial(new Qt3DExtras::QNormalDiffuseMapMaterial()) , m_potImage(new Qt3DRender::QTextureImage()) , m_potNormalImage(new Qt3DRender::QTextureImage()) , m_plantImage(new Qt3DRender::QTextureImage()) diff --git a/examples/qt3d/materials-cpp/houseplant.h b/examples/qt3d/materials-cpp/houseplant.h index 232608843..d2081b3d1 100644 --- a/examples/qt3d/materials-cpp/houseplant.h +++ b/examples/qt3d/materials-cpp/houseplant.h @@ -53,8 +53,8 @@ #include "renderableentity.h" #include -#include -#include +#include +#include #include class HousePlant : public Qt3DCore::QEntity @@ -96,9 +96,9 @@ private: RenderableEntity *m_plant; RenderableEntity *m_cover; - Qt3DRender::QNormalDiffuseMapMaterial *m_potMaterial; - Qt3DRender::QNormalDiffuseMapAlphaMaterial *m_plantMaterial; - Qt3DRender::QNormalDiffuseMapMaterial *m_coverMaterial; + Qt3DExtras::QNormalDiffuseMapMaterial *m_potMaterial; + Qt3DExtras::QNormalDiffuseMapAlphaMaterial *m_plantMaterial; + Qt3DExtras::QNormalDiffuseMapMaterial *m_coverMaterial; Qt3DRender::QTextureImage *m_potImage; Qt3DRender::QTextureImage *m_potNormalImage; diff --git a/examples/qt3d/materials-cpp/main.cpp b/examples/qt3d/materials-cpp/main.cpp index 91c0ec8c2..0514df414 100644 --- a/examples/qt3d/materials-cpp/main.cpp +++ b/examples/qt3d/materials-cpp/main.cpp @@ -57,9 +57,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include "planeentity.h" @@ -95,7 +95,7 @@ int main(int argc, char* argv[]) planeEntity->mesh()->setWidth(100.0f); planeEntity->mesh()->setMeshResolution(QSize(20, 20)); - Qt3DRender::QNormalDiffuseSpecularMapMaterial *normalDiffuseSpecularMapMaterial = new Qt3DRender::QNormalDiffuseSpecularMapMaterial(); + Qt3DExtras::QNormalDiffuseSpecularMapMaterial *normalDiffuseSpecularMapMaterial = new Qt3DExtras::QNormalDiffuseSpecularMapMaterial(); normalDiffuseSpecularMapMaterial->setTextureScale(10.0f); normalDiffuseSpecularMapMaterial->setShininess(80.0f); normalDiffuseSpecularMapMaterial->setAmbient(QColor::fromRgbF(0.2f, 0.2f, 0.2f, 1.0f)); @@ -118,7 +118,7 @@ int main(int argc, char* argv[]) RenderableEntity *chest = new RenderableEntity(sceneRoot); chest->transform()->setScale(0.03f); chest->mesh()->setSource(QUrl(QStringLiteral("qrc:/assets/chest/Chest.obj"))); - Qt3DRender::QDiffuseMapMaterial *diffuseMapMaterial = new Qt3DRender::QDiffuseMapMaterial(); + Qt3DExtras::QDiffuseMapMaterial *diffuseMapMaterial = new Qt3DExtras::QDiffuseMapMaterial(); diffuseMapMaterial->setSpecular(QColor::fromRgbF(0.2f, 0.2f, 0.2f, 1.0f)); diffuseMapMaterial->setShininess(2.0f); @@ -133,7 +133,7 @@ int main(int argc, char* argv[]) RotatingTrefoilKnot *trefoil = new RotatingTrefoilKnot(sceneRoot); trefoil->setPosition(QVector3D(0.0f, 3.5f, 0.0f)); trefoil->setScale(0.5f); - Qt3DRender::QPhongMaterial *phongMaterial = new Qt3DRender::QPhongMaterial(); + Qt3DExtras::QPhongMaterial *phongMaterial = new Qt3DExtras::QPhongMaterial(); phongMaterial->setDiffuse(QColor(204, 205, 75)); // Safari Yellow #cccd4b phongMaterial->setSpecular(Qt::white); trefoil->addComponent(phongMaterial); diff --git a/examples/qt3d/materials-cpp/planeentity.cpp b/examples/qt3d/materials-cpp/planeentity.cpp index e291e2d8f..b60e6c186 100644 --- a/examples/qt3d/materials-cpp/planeentity.cpp +++ b/examples/qt3d/materials-cpp/planeentity.cpp @@ -50,12 +50,12 @@ #include "planeentity.h" -#include +#include #include PlaneEntity::PlaneEntity(Qt3DCore::QNode *parent) : Qt3DCore::QEntity(new Qt3DCore::QEntity(parent)) - , m_mesh(new Qt3DRender::QPlaneMesh()) + , m_mesh(new Qt3DExtras::QPlaneMesh()) , m_transform(new Qt3DCore::QTransform()) { addComponent(m_mesh); @@ -66,7 +66,7 @@ PlaneEntity::~PlaneEntity() { } -Qt3DRender::QPlaneMesh *PlaneEntity::mesh() const +Qt3DExtras::QPlaneMesh *PlaneEntity::mesh() const { return m_mesh; } diff --git a/examples/qt3d/materials-cpp/planeentity.h b/examples/qt3d/materials-cpp/planeentity.h index 28c90a3a8..8491efb1a 100644 --- a/examples/qt3d/materials-cpp/planeentity.h +++ b/examples/qt3d/materials-cpp/planeentity.h @@ -53,7 +53,7 @@ #include #include -#include +#include class PlaneEntity : public Qt3DCore::QEntity { @@ -61,10 +61,10 @@ public: PlaneEntity(Qt3DCore::QNode *parent = 0); ~PlaneEntity(); - Qt3DRender::QPlaneMesh *mesh() const; + Qt3DExtras::QPlaneMesh *mesh() const; private: - Qt3DRender::QPlaneMesh *m_mesh; + Qt3DExtras::QPlaneMesh *m_mesh; Qt3DCore::QTransform *m_transform; }; diff --git a/examples/qt3d/materials/Barrel.qml b/examples/qt3d/materials/Barrel.qml index 58987cd8d..40da0533a 100644 --- a/examples/qt3d/materials/Barrel.qml +++ b/examples/qt3d/materials/Barrel.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/materials/Chest.qml b/examples/qt3d/materials/Chest.qml index ab3eaa587..879ebb26f 100644 --- a/examples/qt3d/materials/Chest.qml +++ b/examples/qt3d/materials/Chest.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/materials/HousePlant.qml b/examples/qt3d/materials/HousePlant.qml index 667d721f9..a06f69e1e 100644 --- a/examples/qt3d/materials/HousePlant.qml +++ b/examples/qt3d/materials/HousePlant.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/materials/PlaneEntity.qml b/examples/qt3d/materials/PlaneEntity.qml index a00c0f1c0..268c59add 100644 --- a/examples/qt3d/materials/PlaneEntity.qml +++ b/examples/qt3d/materials/PlaneEntity.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/materials/main.qml b/examples/qt3d/materials/main.qml index bfcc7ead0..46a48c4e2 100644 --- a/examples/qt3d/materials/main.qml +++ b/examples/qt3d/materials/main.qml @@ -52,6 +52,7 @@ import QtQuick 2.1 as QQ2 import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/mouseinput-qml/main.qml b/examples/qt3d/mouseinput-qml/main.qml index c25166682..6f6386ce6 100644 --- a/examples/qt3d/mouseinput-qml/main.qml +++ b/examples/qt3d/mouseinput-qml/main.qml @@ -51,6 +51,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { id: sceneRoot diff --git a/examples/qt3d/multiviewport/main.qml b/examples/qt3d/multiviewport/main.qml index 4566600d1..df01bacec 100644 --- a/examples/qt3d/multiviewport/main.qml +++ b/examples/qt3d/multiviewport/main.qml @@ -52,6 +52,7 @@ import QtQuick 2.0 import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { id: rootNode diff --git a/examples/qt3d/picking-qml/main.qml b/examples/qt3d/picking-qml/main.qml index bc0bf82ba..fcc122e47 100644 --- a/examples/qt3d/picking-qml/main.qml +++ b/examples/qt3d/picking-qml/main.qml @@ -51,6 +51,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 import QtQuick 2.0 as QQ2 import QtQuick.Window 2.2 as W diff --git a/examples/qt3d/plasma/main.qml b/examples/qt3d/plasma/main.qml index 96927cd4c..0a01f699b 100644 --- a/examples/qt3d/plasma/main.qml +++ b/examples/qt3d/plasma/main.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { components: RenderSettings { diff --git a/examples/qt3d/scene3d-loader/AnimatedEntity.qml b/examples/qt3d/scene3d-loader/AnimatedEntity.qml index f95466cc5..0f6b7da1a 100644 --- a/examples/qt3d/scene3d-loader/AnimatedEntity.qml +++ b/examples/qt3d/scene3d-loader/AnimatedEntity.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 import QtQuick 2.0 as QQ2 diff --git a/examples/qt3d/scene3d-loader/Scene2.qml b/examples/qt3d/scene3d-loader/Scene2.qml index 287e80169..efbb921c5 100644 --- a/examples/qt3d/scene3d-loader/Scene2.qml +++ b/examples/qt3d/scene3d-loader/Scene2.qml @@ -52,6 +52,7 @@ import QtQuick 2.0 import QtQuick.Scene3D 2.0 import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Scene3D { focus: true diff --git a/examples/qt3d/scene3d/AnimatedEntity.qml b/examples/qt3d/scene3d/AnimatedEntity.qml index f95466cc5..0f6b7da1a 100644 --- a/examples/qt3d/scene3d/AnimatedEntity.qml +++ b/examples/qt3d/scene3d/AnimatedEntity.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 import QtQuick 2.0 as QQ2 diff --git a/examples/qt3d/shadow-map-qml/GroundPlane.qml b/examples/qt3d/shadow-map-qml/GroundPlane.qml index 653e306a8..d78f5b07a 100644 --- a/examples/qt3d/shadow-map-qml/GroundPlane.qml +++ b/examples/qt3d/shadow-map-qml/GroundPlane.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/simple-cpp/main.cpp b/examples/qt3d/simple-cpp/main.cpp index 38d8842ed..af7f429fe 100644 --- a/examples/qt3d/simple-cpp/main.cpp +++ b/examples/qt3d/simple-cpp/main.cpp @@ -59,11 +59,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -77,11 +77,11 @@ Qt3DCore::QEntity *createScene() Qt3DCore::QEntity *rootEntity = new Qt3DCore::QEntity; // Material - Qt3DRender::QMaterial *material = new Qt3DRender::QPhongMaterial(rootEntity); + Qt3DRender::QMaterial *material = new Qt3DExtras::QPhongMaterial(rootEntity); // Torus Qt3DCore::QEntity *torusEntity = new Qt3DCore::QEntity(rootEntity); - Qt3DRender::QTorusMesh *torusMesh = new Qt3DRender::QTorusMesh; + Qt3DExtras::QTorusMesh *torusMesh = new Qt3DExtras::QTorusMesh; torusMesh->setRadius(5); torusMesh->setMinorRadius(1); torusMesh->setRings(100); @@ -97,7 +97,7 @@ Qt3DCore::QEntity *createScene() // Sphere Qt3DCore::QEntity *sphereEntity = new Qt3DCore::QEntity(rootEntity); - Qt3DRender::QSphereMesh *sphereMesh = new Qt3DRender::QSphereMesh; + Qt3DExtras::QSphereMesh *sphereMesh = new Qt3DExtras::QSphereMesh; sphereMesh->setRadius(3); Qt3DCore::QTransform *sphereTransform = new Qt3DCore::QTransform; diff --git a/examples/qt3d/simple-qml/main.qml b/examples/qt3d/simple-qml/main.qml index 04bdee4b5..fb18043c3 100644 --- a/examples/qt3d/simple-qml/main.qml +++ b/examples/qt3d/simple-qml/main.qml @@ -52,6 +52,7 @@ import QtQuick 2.2 as QQ2 import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { id: sceneRoot diff --git a/examples/qt3d/simple-shaders-qml/main.qml b/examples/qt3d/simple-shaders-qml/main.qml index 17c673215..d1b5f4484 100644 --- a/examples/qt3d/simple-shaders-qml/main.qml +++ b/examples/qt3d/simple-shaders-qml/main.qml @@ -52,6 +52,7 @@ import QtQuick 2.2 as QQ2 import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { id: sceneRoot diff --git a/examples/qt3d/skybox/Skybox.qml b/examples/qt3d/skybox/Skybox.qml index 84994e396..84d999771 100644 --- a/examples/qt3d/skybox/Skybox.qml +++ b/examples/qt3d/skybox/Skybox.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { diff --git a/examples/qt3d/skybox/main.qml b/examples/qt3d/skybox/main.qml index 34206c770..13468906c 100644 --- a/examples/qt3d/skybox/main.qml +++ b/examples/qt3d/skybox/main.qml @@ -51,6 +51,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/tessellation-modes/main.qml b/examples/qt3d/tessellation-modes/main.qml index c8d20cb88..d9c371aa0 100644 --- a/examples/qt3d/tessellation-modes/main.qml +++ b/examples/qt3d/tessellation-modes/main.qml @@ -52,6 +52,7 @@ import QtQuick 2.1 as QQ2 import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/torus-qml/main.qml b/examples/qt3d/torus-qml/main.qml index b52c03f7c..2c4f263fb 100644 --- a/examples/qt3d/torus-qml/main.qml +++ b/examples/qt3d/torus-qml/main.qml @@ -51,6 +51,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { id: sceneRoot diff --git a/examples/qt3d/transforms-qml/main.qml b/examples/qt3d/transforms-qml/main.qml index 2a8c97604..f49e161f2 100644 --- a/examples/qt3d/transforms-qml/main.qml +++ b/examples/qt3d/transforms-qml/main.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { id: sceneRoot diff --git a/examples/qt3d/transparency-qml-scene3d/Scene.qml b/examples/qt3d/transparency-qml-scene3d/Scene.qml index 618ecc519..868f29ec1 100644 --- a/examples/qt3d/transparency-qml-scene3d/Scene.qml +++ b/examples/qt3d/transparency-qml-scene3d/Scene.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 import QtQuick 2.2 as QQ2 Entity { diff --git a/examples/qt3d/transparency-qml/main.qml b/examples/qt3d/transparency-qml/main.qml index 880e80875..2a45b22c8 100644 --- a/examples/qt3d/transparency-qml/main.qml +++ b/examples/qt3d/transparency-qml/main.qml @@ -51,6 +51,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 import QtQuick 2.4 as QQ2 Entity { diff --git a/examples/qt3d/wave/Wave.qml b/examples/qt3d/wave/Wave.qml index b527b8025..a4728e5a9 100644 --- a/examples/qt3d/wave/Wave.qml +++ b/examples/qt3d/wave/Wave.qml @@ -50,6 +50,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 +import Qt3D.Extras 2.0 Entity { id: root diff --git a/examples/qt3d/wireframe/main.qml b/examples/qt3d/wireframe/main.qml index 7c281a360..e0b6b3304 100644 --- a/examples/qt3d/wireframe/main.qml +++ b/examples/qt3d/wireframe/main.qml @@ -52,6 +52,7 @@ import QtQuick 2.1 as QQ2 import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 Entity { id: root -- cgit v1.2.3