From 7f2cdb0c35eb77183e6fb31b31befa901b299c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= <christian.stromme@qt.io> Date: Tue, 28 Jan 2020 11:54:58 +0100 Subject: [PATCH] Make it right handed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change removes the option to set the orientation of the nodes in the scene. The default will now be that all front-end nodes are in a right handed coordination system; the same as the back-end nodes. [ChangeLog] The coordinate system is now right-handed. Fixes: QTBUG-77608 Change-Id: I5cb7dd0adb4816d4c835e070448865c11ad21994 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io> --- .../quick3d/blendmodes/BackgroundView.qml | 2 +- .../quick3d/blendmodes/ForegroundView.qml | 4 +- .../quick3d/custommaterial/WeirdShape.qml | 2 +- examples/quick3d/custommaterial/main.qml | 10 +-- examples/quick3d/customshaders/main.qml | 4 +- examples/quick3d/dynamiccreation/main.qml | 4 +- examples/quick3d/dynamictexture/Doors.qml | 6 -- examples/quick3d/hellocube/main.qml | 6 +- examples/quick3d/lights/main.qml | 16 ++-- examples/quick3d/picking/main.qml | 8 +- examples/quick3d/principledmaterial/main.qml | 4 +- examples/quick3d/simple/main.qml | 6 +- examples/quick3d/view3d/main.qml | 14 +-- src/imports/quick3d/designer/NodeSection.qml | 13 --- .../assetimporters/assimp/assimpimporter.cpp | 3 - .../assetimporters/uip/propertymap.cpp | 1 - .../assetimporters/uip/uippresentation.cpp | 25 ++---- src/quick3d/qquick3dcamera.cpp | 13 +-- src/quick3d/qquick3dnode.cpp | 85 +++---------------- src/quick3d/qquick3dnode_p.h | 9 -- src/quick3d/qquick3dnode_p_p.h | 5 +- .../graphobjects/qssgrendercamera.cpp | 7 -- .../graphobjects/qssgrendernode.cpp | 6 +- .../graphobjects/qssgrendernode_p.h | 30 +++---- .../rendererimpl/qssgrendererimpl.cpp | 4 - .../qssgrendererimpllayerrenderdata.cpp | 11 +-- src/utils/qssgrendereulerangles.cpp | 4 - src/utils/qssgrendereulerangles_p.h | 1 - src/utils/qssgutils.cpp | 2 +- .../quick3d/qquick3dnode/tst_qquick3dnode.cpp | 8 -- .../data/camera/ChildCamera.qml | 12 +-- .../data/camera/ChildTransformCamera.qml | 14 +-- .../data/camera/DefaultCamera.qml | 10 +-- .../data/camera/OrbitCamera.qml | 16 ++-- .../data/camera/Orthographic_camera.qml | 4 +- .../data/camera/Perspective_camera.qml | 4 +- .../data/custommaterials/Aluminum.qml | 4 +- .../data/custommaterials/AluminumAnodized.qml | 4 +- .../AluminumAnodizedEmissive.qml | 4 +- .../data/custommaterials/AluminumBrushed.qml | 4 +- .../data/custommaterials/AluminumEmissive.qml | 4 +- .../data/custommaterials/Copper.qml | 4 +- .../data/custommaterials/FrostedGlass.qml | 4 +- .../FrostedGlassSinglePass.qml | 4 +- .../data/custommaterials/Glass.qml | 4 +- .../data/custommaterials/GlassRefractive.qml | 4 +- .../data/custommaterials/PaperArtistic.qml | 4 +- .../data/custommaterials/PaperOffice.qml | 4 +- .../custommaterials/PlasticStructuredRed.qml | 4 +- .../PlasticStructuredRedEmissive.qml | 4 +- .../custommaterials/SteelMilledConcentric.qml | 4 +- .../Defaultmaterial_multiply.qml | 14 +-- .../Defaultmaterial_normal.qml | 12 +-- .../Defaultmaterial_screen.qml | 12 +-- .../data/defaultmaterial/Primitives.qml | 2 +- .../data/layers/Ambient_occlusion.qml | 9 +- .../data/layers/Background_solidcolor.qml | 9 +- .../quick3d_lancelot/data/layers/Defaults.qml | 9 +- .../data/layers/Disable_depth_prepass.qml | 9 +- .../data/layers/Disable_depth_test.qml | 9 +- .../data/layers/Geometry_1.qml | 8 +- .../data/layers/Geometry_2.qml | 8 +- .../data/layers/Geometry_3.qml | 8 +- .../data/layers/Geometry_4.qml | 8 +- .../data/layers/Geometry_5.qml | 8 +- .../data/layers/Geometry_6.qml | 8 +- .../data/layers/Light_probe.qml | 9 +- .../data/layers/Multisample_aa_2x.qml | 9 +- .../data/layers/Multisample_aa_4x.qml | 9 +- .../data/layers/Multisample_aa_ssaa.qml | 9 +- .../quick3d_lancelot/data/layers/Ssaa.qml | 8 +- .../data/layers/Temporal_aa.qml | 9 +- .../data/lighting/Imagebasedlighting.qml | 4 +- .../lighting/Lightmaps_default_material.qml | 27 +++--- .../Lightmaps_referenced_material.qml | 12 ++- .../data/lighting/ScopedLights.qml | 4 +- .../data/qml/presentations/Qmlstream.qml | 4 +- .../data/qml/presentations/Qmlstreamlayer.qml | 4 +- .../data/shadows/Arealight.qml | 12 +-- .../data/shadows/Directionallight.qml | 10 +-- .../data/shadows/Pointlight.qml | 10 +-- .../data/shadows/Pointlight_2.qml | 10 +-- .../shadows/Pointlight_nodepthprepass.qml | 10 +-- .../quick3d_lancelot/data/textures/Envmap.qml | 2 +- .../data/textures/Image_params_1.qml | 2 +- .../data/textures/Image_params_2.qml | 2 +- .../data/textures/Image_params_control.qml | 2 +- .../data/textures/Opacitymap.qml | 12 +-- .../data/view3d/ActiveCamera.qml | 4 +- .../data/view3d/RenderModeOverlay.qml | 4 +- .../data/view3d/RenderModeRenderNode.qml | 4 +- .../data/view3d/RenderModeTexture.qml | 4 +- .../data/view3d/RenderModeUnderlay.qml | 4 +- .../quick3d_lancelot/quick3d/tst_quick3d.cpp | 1 + .../quick3d_lancelot/scenegrabber/main.cpp | 4 + .../scenegrabber/scenegrabber.pro | 2 +- 96 files changed, 305 insertions(+), 468 deletions(-) diff --git a/examples/quick3d/blendmodes/BackgroundView.qml b/examples/quick3d/blendmodes/BackgroundView.qml index b79503527..480ccf953 100644 --- a/examples/quick3d/blendmodes/BackgroundView.qml +++ b/examples/quick3d/blendmodes/BackgroundView.qml @@ -64,7 +64,7 @@ View3D { } PerspectiveCamera { - z: -500 + z: 500 } Model { diff --git a/examples/quick3d/blendmodes/ForegroundView.qml b/examples/quick3d/blendmodes/ForegroundView.qml index bceeae9c4..b8d7b3ade 100644 --- a/examples/quick3d/blendmodes/ForegroundView.qml +++ b/examples/quick3d/blendmodes/ForegroundView.qml @@ -76,7 +76,7 @@ View3D { } PerspectiveCamera { - z: -500 + z: 500 } } @@ -92,7 +92,7 @@ View3D { Model { id: cone1 y: -100 - rotation.x: 45 + rotation.x: -45 source: "#Cone" materials: CopperMaterial {} diff --git a/examples/quick3d/custommaterial/WeirdShape.qml b/examples/quick3d/custommaterial/WeirdShape.qml index 0fa90f6f9..676364e71 100644 --- a/examples/quick3d/custommaterial/WeirdShape.qml +++ b/examples/quick3d/custommaterial/WeirdShape.qml @@ -64,7 +64,7 @@ Node { Model { source: "weirdShape.mesh" scale: Qt.vector3d(150, 150, 150) - rotation: Qt.vector3d(90, 0, 0) + rotation: Qt.vector3d(-90, 0, 0) SequentialAnimation on rotation { loops: Animation.Infinite diff --git a/examples/quick3d/custommaterial/main.qml b/examples/quick3d/custommaterial/main.qml index fc5ecc646..36a101c12 100644 --- a/examples/quick3d/custommaterial/main.qml +++ b/examples/quick3d/custommaterial/main.qml @@ -77,7 +77,7 @@ Window { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) } //! [bumpy aluminum] @@ -85,20 +85,20 @@ Window { customMaterial: AluminumMaterial { bump_amount: 5.0 } - position: Qt.vector3d(150, 150, 100) + position: Qt.vector3d(150, 150, -100) } //! [bumpy aluminum] //! [copper] WeirdShape { customMaterial: CopperMaterial {} - position: Qt.vector3d(-150, -150, 100) + position: Qt.vector3d(-150, -150, -100) } //! [copper] //! [frosted glass] Model { - position: Qt.vector3d(-300, 0, -100) + position: Qt.vector3d(-300, 0, 100) scale: Qt.vector3d(2.5, 2.5, 2.5) source: "#Sphere" materials: [ FrostedGlassSinglePassMaterial { @@ -113,7 +113,7 @@ Window { //! [plastic] Model { - position: Qt.vector3d(300, 0, -100) + position: Qt.vector3d(300, 0, 100) scale: Qt.vector3d(2.5, 2.5, 2.5) source: "#Sphere" materials: [ PlasticStructuredRedMaterial { diff --git a/examples/quick3d/customshaders/main.qml b/examples/quick3d/customshaders/main.qml index 096bb7124..74a73dc69 100644 --- a/examples/quick3d/customshaders/main.qml +++ b/examples/quick3d/customshaders/main.qml @@ -72,8 +72,8 @@ Window { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 200, -300) - rotation: Qt.vector3d(30, 0, 0) + position: Qt.vector3d(0, 200, 300) + rotation: Qt.vector3d(-30, 0, 0) } //! [use] diff --git a/examples/quick3d/dynamiccreation/main.qml b/examples/quick3d/dynamiccreation/main.qml index 1be878906..7b69f4f12 100644 --- a/examples/quick3d/dynamiccreation/main.qml +++ b/examples/quick3d/dynamiccreation/main.qml @@ -138,10 +138,10 @@ Window { position: Qt.vector3d(0, 0, 0); PerspectiveCamera { - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) } - rotation: Qt.vector3d(0, 90, 0) + rotation: Qt.vector3d(0, -90, 0) SequentialAnimation on rotation { loops: Animation.Infinite diff --git a/examples/quick3d/dynamictexture/Doors.qml b/examples/quick3d/dynamictexture/Doors.qml index 15ac4bfcb..8227a97fa 100644 --- a/examples/quick3d/dynamictexture/Doors.qml +++ b/examples/quick3d/dynamictexture/Doors.qml @@ -54,7 +54,6 @@ import QtQuick 2.14 Node { id: doorRoot rotationOrder: Node.XYZr - orientation: Node.RightHanded property PerspectiveCamera activeCamera: camera PointLight { @@ -62,7 +61,6 @@ Node { x: -10 y: 100 z: -100 - orientation: Node.RightHanded color: "#ffffffff" linearFade: 1 brightness: 300 @@ -79,7 +77,6 @@ Node { rotation.y: 171.605 rotationOrder: Node.XYZr - orientation: Node.RightHanded fieldOfViewOrientation: Camera.Horizontal } @@ -92,7 +89,6 @@ Node { scale.y: 3.5 scale.z: 0.5 rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "meshes/door1.mesh" pickable: true @@ -134,7 +130,6 @@ Node { scale.y: 100 scale.z: 10 rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "meshes/wall.mesh" DefaultMaterial { @@ -155,7 +150,6 @@ Node { scale.z: 0.5 pivot.x: -20 rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "meshes/door2.mesh" pickable: true materials: [ diff --git a/examples/quick3d/hellocube/main.qml b/examples/quick3d/hellocube/main.qml index c7f00e25c..e96234ec1 100644 --- a/examples/quick3d/hellocube/main.qml +++ b/examples/quick3d/hellocube/main.qml @@ -127,12 +127,12 @@ Window { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 200, -300) - rotation: Qt.vector3d(30, 0, 0) + position: Qt.vector3d(0, 200, 300) + rotation: Qt.vector3d(-30, 0, 0) } DirectionalLight { - rotation: Qt.vector3d(30, 0, 0) + rotation: Qt.vector3d(-30, 0, 0) } Model { diff --git a/examples/quick3d/lights/main.qml b/examples/quick3d/lights/main.qml index 82afc05a7..e062cf660 100644 --- a/examples/quick3d/lights/main.qml +++ b/examples/quick3d/lights/main.qml @@ -68,8 +68,8 @@ Window { } PerspectiveCamera { - position: Qt.vector3d(0, 400, -600) - rotation: Qt.vector3d(30, 0, 0) + position: Qt.vector3d(0, 400, 600) + rotation: Qt.vector3d(-30, 0, 0) clipFar: 2000 } @@ -133,7 +133,7 @@ Window { color: Qt.rgba(0.1, 0.1, 1.0, 1.0) ambientColor: Qt.rgba(0.1, 0.1, 0.1, 1.0) position: Qt.vector3d(-50, 250, -150) - rotation: Qt.vector3d(90, 0, 0) + rotation: Qt.vector3d(-90, 0, 0) width: 1000 height: 200 shadowMapFar: 2000 @@ -163,7 +163,7 @@ Window { color: Qt.rgba(1.0, 0.9, 0.7, 1.0) ambientColor: Qt.rgba(0.0, 0.0, 0.0, 0.0) position: Qt.vector3d(0, 250, 0) - rotation: Qt.vector3d(45, 0, 0) + rotation: Qt.vector3d(-45, 0, 0) shadowMapFar: 2000 shadowMapQuality: Light.ShadowMapQualityHigh visible: checkBox4.checked @@ -172,8 +172,8 @@ Window { coneAngle: 50 Vector3dAnimation on rotation { loops: Animation.Infinite - from: Qt.vector3d(45, 0, 0) - to: Qt.vector3d(45, 360, 0) + from: Qt.vector3d(-45, 0, 0) + to: Qt.vector3d(-45, 360, 0) duration: 10000 } } @@ -184,7 +184,7 @@ Window { source: "#Rectangle" y: -200 scale: Qt.vector3d(15, 15, 15) - rotation: Qt.vector3d(90, 0, 0) + rotation: Qt.vector3d(-90, 0, 0) materials: [ DefaultMaterial { diffuseColor: Qt.rgba(0.8, 0.6, 0.4, 1.0) @@ -193,7 +193,7 @@ Window { } Model { source: "#Rectangle" - z: 400 + z: -400 scale: Qt.vector3d(15, 15, 15) materials: [ DefaultMaterial { diff --git a/examples/quick3d/picking/main.qml b/examples/quick3d/picking/main.qml index ef587204f..d6a6487c4 100644 --- a/examples/quick3d/picking/main.qml +++ b/examples/quick3d/picking/main.qml @@ -103,13 +103,13 @@ Window { PointLight { x: -200 y: 200 - z: -300 + z: 300 quadraticFade: 0 brightness: 150 } PerspectiveCamera { - z: -500 + z: 500 } environment: SceneEnvironment { @@ -160,7 +160,7 @@ Window { property bool isPicked: false x: 200 - z: -100 + z: 100 scale.x: 2 scale.y: 1.5 @@ -193,7 +193,7 @@ Window { x: -100 y: -100 - z: 100 + z: -100 scale.x: 5 scale.y: 3 diff --git a/examples/quick3d/principledmaterial/main.qml b/examples/quick3d/principledmaterial/main.qml index 308c29dad..882728a0f 100644 --- a/examples/quick3d/principledmaterial/main.qml +++ b/examples/quick3d/principledmaterial/main.qml @@ -73,7 +73,7 @@ Window { //! [rotating light] // Rotate the light direction DirectionalLight { - rotation: Qt.vector3d(0, 100, 0) + rotation: Qt.vector3d(0, -100, 0) brightness: 100 SequentialAnimation on rotation { loops: Animation.Infinite @@ -100,7 +100,7 @@ Window { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) } //! [basic principled] diff --git a/examples/quick3d/simple/main.qml b/examples/quick3d/simple/main.qml index c65910d09..0ec011d5f 100644 --- a/examples/quick3d/simple/main.qml +++ b/examples/quick3d/simple/main.qml @@ -71,14 +71,14 @@ Window { //! [camera] PerspectiveCamera { - position: Qt.vector3d(0, 200, -300) - rotation: Qt.vector3d(30, 0, 0) + position: Qt.vector3d(0, 200, 300) + rotation: Qt.vector3d(-30, 0, 0) } //! [camera] //! [light] DirectionalLight { - rotation: Qt.vector3d(30, 70, 0) + rotation: Qt.vector3d(-30, 70, 0) } //! [light] diff --git a/examples/quick3d/view3d/main.qml b/examples/quick3d/view3d/main.qml index dafbe4edf..8874d9f35 100644 --- a/examples/quick3d/view3d/main.qml +++ b/examples/quick3d/view3d/main.qml @@ -74,7 +74,7 @@ Window { source: "#Cube" y: -104 scale: Qt.vector3d(3, 3, 0.1) - rotation: Qt.vector3d(90, 0, 0) + rotation: Qt.vector3d(-90, 0, 0) materials: [ DefaultMaterial { diffuseColor: Qt.rgba(0.8, 0.8, 0.8, 1.0) @@ -111,7 +111,7 @@ Window { Node { PerspectiveCamera { id: cameraPerspectiveOne - z: -600 + z: 600 } PropertyAnimation on rotation { loops: Animation.Infinite @@ -124,7 +124,7 @@ Window { // Stationary perspective camera PerspectiveCamera { id: cameraPerspectiveTwo - z: -600 + z: 600 } //! [cameras start] @@ -133,7 +133,7 @@ Window { PerspectiveCamera { id: cameraPerspectiveThree x: 500 - rotation: Qt.vector3d(0, -90, 0) + rotation: Qt.vector3d(0, 90, 0) } PropertyAnimation on rotation { loops: Animation.Infinite @@ -147,13 +147,13 @@ Window { OrthographicCamera { id: cameraOrthographicTop y: 600 - rotation: Qt.vector3d(90, 0, 0) + rotation: Qt.vector3d(-90, 0, 0) } // Stationary orthographic camera viewing from the front OrthographicCamera { id: cameraOrthographicFront - z: -600 + z: 600 rotation: Qt.vector3d(0, 0, 0) } @@ -162,7 +162,7 @@ Window { OrthographicCamera { id: cameraOrthographicLeft x: -600 - rotation: Qt.vector3d(0, 90, 0) + rotation: Qt.vector3d(0, -90, 0) } } //! [cameras end] diff --git a/src/imports/quick3d/designer/NodeSection.qml b/src/imports/quick3d/designer/NodeSection.qml index 25fcf2abd..b24829f0f 100644 --- a/src/imports/quick3d/designer/NodeSection.qml +++ b/src/imports/quick3d/designer/NodeSection.qml @@ -68,19 +68,6 @@ Column { } } - Label { - text: qsTr("Orientation") - tooltip: qsTr("Defines whether the node is using a right-handed or left-handed coordinate system.") - } - SecondColumnLayout { - ComboBox { - scope: "Node" - model: ["LeftHanded", "RightHanded"] - backendValue: backendValues.orientation - Layout.fillWidth: true - } - } - Label { text: qsTr("Rotation Order") tooltip: qsTr("Defines the order in which rotation properties components are applied.") diff --git a/src/plugins/assetimporters/assimp/assimpimporter.cpp b/src/plugins/assetimporters/assimp/assimpimporter.cpp index ac42b85c6..5a6f633f3 100644 --- a/src/plugins/assetimporters/assimp/assimpimporter.cpp +++ b/src/plugins/assetimporters/assimp/assimpimporter.cpp @@ -559,9 +559,6 @@ void AssimpImporter::generateNodeProperties(aiNode *node, QTextStream &output, i // rotation order QSSGQmlUtilities::writeQmlPropertyHelper(output, tabLevel, QSSGQmlUtilities::PropertyMap::Node, QStringLiteral("rotationOrder"), QStringLiteral("Node.XYZr")); - // orientation - QSSGQmlUtilities::writeQmlPropertyHelper(output, tabLevel, QSSGQmlUtilities::PropertyMap::Node, QStringLiteral("orientation"), QStringLiteral("Node.RightHanded")); - // visible } diff --git a/src/plugins/assetimporters/uip/propertymap.cpp b/src/plugins/assetimporters/uip/propertymap.cpp index bb30e6ca7..36ffc96e5 100644 --- a/src/plugins/assetimporters/uip/propertymap.cpp +++ b/src/plugins/assetimporters/uip/propertymap.cpp @@ -88,7 +88,6 @@ void insertNodeProperties(PropertyMap::PropertiesMap *node) node->insert(QStringLiteral("pivot.z"), PropertyMap::Property(QStringLiteral("pivot.z"), Q3DS::Float, 0.0f)); node->insert(QStringLiteral("opacity"), PropertyMap::Property(QStringLiteral("opacity"), Q3DS::Float, 1.0f)); node->insert(QStringLiteral("rotationorder"), PropertyMap::Property(QStringLiteral("rotationOrder"), Q3DS::Enum, QStringLiteral("Node.YXZ"))); - node->insert(QStringLiteral("orientation"), PropertyMap::Property(QStringLiteral("orientation"), Q3DS::Enum, QStringLiteral("Node.LeftHanded"))); node->insert(QStringLiteral("visible"), PropertyMap::Property(QStringLiteral("visible"), Q3DS::Boolean, true)); node->insert(QStringLiteral("eyeball"), PropertyMap::Property(QStringLiteral("visible"), Q3DS::Boolean, true)); } diff --git a/src/plugins/assetimporters/uip/uippresentation.cpp b/src/plugins/assetimporters/uip/uippresentation.cpp index f34c8bb1e..15358cf02 100644 --- a/src/plugins/assetimporters/uip/uippresentation.cpp +++ b/src/plugins/assetimporters/uip/uippresentation.cpp @@ -1424,24 +1424,18 @@ QString rotationOrderToString(Node::RotationOrder ro) { Q_ASSERT(false); return QString(); } -QString orientationToString(Node::Orientation orientation) -{ - if (orientation == Node::LeftHanded) - return QStringLiteral("Node.LeftHanded"); - - return QStringLiteral("Node.RightHanded"); -} } void Node::writeQmlProperties(QTextStream &output, int tabLevel, bool isInRootLevel) { Q_UNUSED(isInRootLevel) + const float handednessAdjustment = (m_orientation == Node::LeftHanded) ? -1.0f : 1.0f; output << QSSGQmlUtilities::insertTabs(tabLevel) << QStringLiteral("id: ") << qmlId() << Qt::endl; writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("position.x"), m_position.x()); writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("position.y"), m_position.y()); - writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("position.z"), m_position.z()); - writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("rotation.x"), m_rotation.x()); - writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("rotation.y"), m_rotation.y()); + writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("position.z"), m_position.z() * handednessAdjustment); + writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("rotation.x"), m_rotation.x() * handednessAdjustment); + writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("rotation.y"), m_rotation.y() * handednessAdjustment); writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("rotation.z"), m_rotation.z()); writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("scale.x"), m_scale.x()); writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("scale.y"), m_scale.y()); @@ -1451,7 +1445,6 @@ void Node::writeQmlProperties(QTextStream &output, int tabLevel, bool isInRootLe writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("pivot.z"), m_pivot.z()); writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("opacity"), m_localOpacity * 0.01f); writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("rotationorder"), rotationOrderToString(m_rotationOrder)); - writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("orientation"), orientationToString(m_orientation)); writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("visible"), m_flags.testFlag(Node::Active)); } @@ -1459,16 +1452,16 @@ void Node::writeQmlProperties(const PropertyChangeList &changeList, QTextStream { // apply the changes so the values are translated applyPropertyChanges(changeList); - + const float handednessAdjustment = (m_orientation == Node::LeftHanded) ? -1.0f : 1.0f; for (auto change : changeList) { QString targetProperty = change.nameStr(); if (targetProperty == QStringLiteral("position")) { writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("position.x"), m_position.x(), true); writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("position.y"), m_position.y(), true); - writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("position.z"), m_position.z(), true); + writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("position.z"), m_position.z() * handednessAdjustment, true); } else if (targetProperty == QStringLiteral("rotation")) { - writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("rotation.x"), m_rotation.x(), true); - writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("rotation.y"), m_rotation.y(), true); + writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("rotation.x"), m_rotation.x() * handednessAdjustment, true); + writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("rotation.y"), m_rotation.y() * handednessAdjustment, true); writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("rotation.z"), m_rotation.z(), true); } else if (targetProperty == QStringLiteral("scale")) { writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("scale.x"), m_scale.x(), true); @@ -1482,8 +1475,6 @@ void Node::writeQmlProperties(const PropertyChangeList &changeList, QTextStream writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("opacity"), m_localOpacity * 0.01f, true); } else if (targetProperty == QStringLiteral("rotationorder")) { writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("rotationorder"), rotationOrderToString(m_rotationOrder), true); - } else if (targetProperty == QStringLiteral("orientation")) { - writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("orientation"), orientationToString(m_orientation), true); } else if (targetProperty == QStringLiteral("visible")) { writeQmlPropertyHelper(output, tabLevel, type(), QStringLiteral("visible"), m_flags.testFlag(Node::Active), true); } diff --git a/src/quick3d/qquick3dcamera.cpp b/src/quick3d/qquick3dcamera.cpp index f97d743d4..1a3d7ca85 100644 --- a/src/quick3d/qquick3dcamera.cpp +++ b/src/quick3d/qquick3dcamera.cpp @@ -135,13 +135,9 @@ QVector3D QQuick3DCamera::mapToViewport(const QVector3D &scenePos) const return QVector3D(0, 0, 0); QVector4D scenePosRightHand(scenePos, 1); - if (orientation() == LeftHanded) { - // Convert from left-handed to right-handed - scenePosRightHand.setZ(-scenePosRightHand.z()); - } // Transform position - const QMatrix4x4 sceneToCamera = sceneTransformRightHanded().inverted(); + const QMatrix4x4 sceneToCamera = sceneTransform().inverted(); const QMatrix4x4 projectionViewMatrix = m_cameraNode->projection * sceneToCamera; const QVector4D transformedScenePos = mat44::transform(projectionViewMatrix, scenePosRightHand); @@ -210,7 +206,7 @@ QVector3D QQuick3DCamera::mapFromViewport(const QVector3D &viewportPos) const clipFarPos.setZ(0); // Transform position to scene - const QMatrix4x4 sceneToCamera = sceneTransformRightHanded().inverted(); + const QMatrix4x4 sceneToCamera = sceneTransform().inverted(); const QMatrix4x4 projectionViewMatrixInv = (m_cameraNode->projection * sceneToCamera).inverted(); const QVector4D transformedClipNearPos = mat44::transform(projectionViewMatrixInv, clipNearPos); @@ -230,11 +226,6 @@ QVector3D QQuick3DCamera::mapFromViewport(const QVector3D &viewportPos) const const float distanceFromClipNear = viewportPos.z(); QVector3D scenePos = clipNearPosScene + (direction * distanceFromClipNear); - if (orientation() == LeftHanded) { - // Convert from right-handed to left-handed - scenePos.setZ(-scenePos.z()); - } - return scenePos; } diff --git a/src/quick3d/qquick3dnode.cpp b/src/quick3d/qquick3dnode.cpp index 07ad2ed1e..4f6457132 100644 --- a/src/quick3d/qquick3dnode.cpp +++ b/src/quick3d/qquick3dnode.cpp @@ -275,24 +275,6 @@ QQuick3DNode::RotationOrder QQuick3DNode::rotationOrder() const return d->m_rotationorder; } -/*! - \qmlproperty enumeration QtQuick3D::Node::orientation - - This property defines whether the Node is using a right-handed or left-handed - coordinate system. - - \value Node.LeftHanded - Left-handed coordinate system. - \value Node.RightHanded - Right-handed coordinate system. - -*/ -QQuick3DNode::Orientation QQuick3DNode::orientation() const -{ - Q_D(const QQuick3DNode); - return d->m_orientation; -} - /*! \qmlproperty bool QtQuick3D::Node::visible @@ -405,46 +387,24 @@ QVector3D QQuick3DNode::sceneScale() const \qmlproperty matrix4x4 QtQuick3D::Node::sceneTransform This property returns the global transform matrix for this node. - \note the return value will be \c LeftHanded or \c RightHanded - depending on \l orientation. + \note the return value will be in right-handed coordinates. */ QMatrix4x4 QQuick3DNode::sceneTransform() const -{ - Q_D(const QQuick3DNode); - return d->m_orientation == LeftHanded ? sceneTransformLeftHanded() : sceneTransformRightHanded(); -} - -/* - This function returns the global transform matrix for this node - as a left-handed coordinate system, regardless of orientation. -*/ -QMatrix4x4 QQuick3DNode::sceneTransformLeftHanded() const -{ - QMatrix4x4 transform = sceneTransformRightHanded(); - mat44::flip(transform); - return transform; -} - -/* - This function returns the global transform matrix for this node - as a right-handed coordinate system, regardless of orientation. -*/ -QMatrix4x4 QQuick3DNode::sceneTransformRightHanded() const { Q_D(const QQuick3DNode); if (d->m_sceneTransformDirty) const_cast<QQuick3DNodePrivate *>(d)->calculateGlobalVariables(); - return d->m_sceneTransformRightHanded; + return d->m_sceneTransform; } void QQuick3DNodePrivate::calculateGlobalVariables() { Q_Q(QQuick3DNode); m_sceneTransformDirty = false; - QMatrix4x4 localTransformRightHanded = calculateLocalTransformRightHanded(); + QMatrix4x4 localTransform = calculateLocalTransform(); QQuick3DNode *parent = q->parentNode(); if (!parent) { - m_sceneTransformRightHanded = localTransformRightHanded; + m_sceneTransform = localTransform; m_hasInheritedUniformScale = true; return; } @@ -452,7 +412,7 @@ void QQuick3DNodePrivate::calculateGlobalVariables() if (privateParent->m_sceneTransformDirty) privateParent->calculateGlobalVariables(); - m_sceneTransformRightHanded = privateParent->m_sceneTransformRightHanded * localTransformRightHanded; + m_sceneTransform = privateParent->m_sceneTransform * localTransform; // Check if we have an ancestor with non-uniform scale. This will decide whether // or not we can use the sceneTransform to extract sceneRotation and sceneScale. @@ -463,7 +423,7 @@ void QQuick3DNodePrivate::calculateGlobalVariables() } } -QMatrix4x4 QQuick3DNodePrivate::calculateLocalTransformRightHanded() +QMatrix4x4 QQuick3DNodePrivate::calculateLocalTransform() { const QVector3D pivot = -m_pivot * m_scale; QMatrix4x4 localTransform; @@ -482,9 +442,6 @@ QMatrix4x4 QQuick3DNodePrivate::calculateLocalTransformRightHanded() localTransform(1, 3) += m_position[1]; localTransform(2, 3) += m_position[2]; - if (Q_LIKELY(m_orientation == QQuick3DNode::LeftHanded)) - mat44::flip(localTransform); - return localTransform; } @@ -527,15 +484,15 @@ QQuick3DObject::Type QQuick3DNode::type() const void QQuick3DNodePrivate::emitChangesToSceneTransform() { Q_Q(QQuick3DNode); - const QVector3D prevPosition = mat44::getPosition(m_sceneTransformRightHanded); - const QVector3D prevRotation = mat44::getRotation(m_sceneTransformRightHanded, EulerOrder(m_rotationorder)); - const QVector3D prevScale = mat44::getScale(m_sceneTransformRightHanded); + const QVector3D prevPosition = mat44::getPosition(m_sceneTransform); + const QVector3D prevRotation = mat44::getRotation(m_sceneTransform, EulerOrder(m_rotationorder)); + const QVector3D prevScale = mat44::getScale(m_sceneTransform); calculateGlobalVariables(); - const QVector3D newPosition = mat44::getPosition(m_sceneTransformRightHanded); - const QVector3D newRotation = mat44::getRotation(m_sceneTransformRightHanded, EulerOrder(m_rotationorder)); - const QVector3D newScale = mat44::getScale(m_sceneTransformRightHanded); + const QVector3D newPosition = mat44::getPosition(m_sceneTransform); + const QVector3D newRotation = mat44::getRotation(m_sceneTransform, EulerOrder(m_rotationorder)); + const QVector3D newScale = mat44::getScale(m_sceneTransform); const bool positionChanged = prevPosition != newPosition; const bool rotationChanged = prevRotation != newRotation; @@ -745,18 +702,6 @@ void QQuick3DNode::setRotationOrder(QQuick3DNode::RotationOrder rotationorder) update(); } -void QQuick3DNode::setOrientation(QQuick3DNode::Orientation orientation) -{ - Q_D(QQuick3DNode); - if (d->m_orientation == orientation) - return; - - d->m_orientation = orientation; - d->markSceneTransformDirty(); - emit orientationChanged(); - update(); -} - void QQuick3DNode::setVisible(bool visible) { Q_D(QQuick3DNode); @@ -875,12 +820,6 @@ QSSGRenderGraphObject *QQuick3DNode::updateSpatialNode(QSSGRenderGraphObject *no spacialNode->localOpacity = d->m_opacity; - const bool leftHanded = d->m_orientation == LeftHanded; - if (spacialNode->flags.testFlag(QSSGRenderNode::Flag::LeftHanded) != leftHanded) { - transformIsDirty = true; - spacialNode->flags.setFlag(QSSGRenderNode::Flag::LeftHanded, leftHanded); - } - // The Hidden in Editor flag overrides the visible value if (d->m_isHiddenInEditor) spacialNode->flags.setFlag(QSSGRenderNode::Flag::Active, false); diff --git a/src/quick3d/qquick3dnode_p.h b/src/quick3d/qquick3dnode_p.h index 50011697e..c33f5ddf1 100644 --- a/src/quick3d/qquick3dnode_p.h +++ b/src/quick3d/qquick3dnode_p.h @@ -63,7 +63,6 @@ class Q_QUICK3D_EXPORT QQuick3DNode : public QQuick3DObject Q_PROPERTY(QVector3D pivot READ pivot WRITE setPivot NOTIFY pivotChanged) Q_PROPERTY(float opacity READ localOpacity WRITE setLocalOpacity NOTIFY localOpacityChanged) Q_PROPERTY(RotationOrder rotationOrder READ rotationOrder WRITE setRotationOrder NOTIFY rotationOrderChanged) - Q_PROPERTY(Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged) Q_PROPERTY(bool visible READ visible WRITE setVisible NOTIFY visibleChanged) Q_PROPERTY(QVector3D forward READ forward) Q_PROPERTY(QVector3D up READ up) @@ -98,9 +97,6 @@ public: }; Q_ENUM(TransformSpace) - enum Orientation { LeftHanded = 0, RightHanded }; - Q_ENUM(Orientation) - enum StaticFlags { }; Q_ENUM(StaticFlags) @@ -117,7 +113,6 @@ public: QVector3D pivot() const; float localOpacity() const; RotationOrder rotationOrder() const; - Orientation orientation() const; bool visible() const; int staticFlags() const; @@ -131,8 +126,6 @@ public: QVector3D sceneRotation() const; QVector3D sceneScale() const; QMatrix4x4 sceneTransform() const; - QMatrix4x4 sceneTransformLeftHanded() const; - QMatrix4x4 sceneTransformRightHanded() const; QQuick3DObject::Type type() const override; @@ -164,7 +157,6 @@ public Q_SLOTS: void setPivot(const QVector3D &pivot); void setLocalOpacity(float opacity); void setRotationOrder(RotationOrder rotationorder); - void setOrientation(Orientation orientation); void setVisible(bool visible); void setStaticFlags(int staticFlags); @@ -178,7 +170,6 @@ Q_SIGNALS: void pivotChanged(); void localOpacityChanged(); void rotationOrderChanged(); - void orientationChanged(); void visibleChanged(); void sceneTransformChanged(); void scenePositionChanged(); diff --git a/src/quick3d/qquick3dnode_p_p.h b/src/quick3d/qquick3dnode_p_p.h index dca92b97b..43e038d93 100644 --- a/src/quick3d/qquick3dnode_p_p.h +++ b/src/quick3d/qquick3dnode_p_p.h @@ -64,7 +64,7 @@ public: ~QQuick3DNodePrivate(); void init(); - QMatrix4x4 calculateLocalTransformRightHanded(); + QMatrix4x4 calculateLocalTransform(); void calculateGlobalVariables(); void markSceneTransformDirty(); @@ -84,10 +84,9 @@ public: QVector3D m_pivot; float m_opacity = 1.0f; QQuick3DNode::RotationOrder m_rotationorder = QQuick3DNode::YXZ; - QQuick3DNode::Orientation m_orientation = QQuick3DNode::LeftHanded; int m_staticFlags = 0; bool m_visible = true; - QMatrix4x4 m_sceneTransformRightHanded; + QMatrix4x4 m_sceneTransform; // Right handed bool m_sceneTransformDirty = true; int m_sceneTransformConnectionCount = 0; bool m_isHiddenInEditor = false; diff --git a/src/runtimerender/graphobjects/qssgrendercamera.cpp b/src/runtimerender/graphobjects/qssgrendercamera.cpp index a006fd46c..ed8d09f4c 100644 --- a/src/runtimerender/graphobjects/qssgrendercamera.cpp +++ b/src/runtimerender/graphobjects/qssgrendercamera.cpp @@ -152,11 +152,6 @@ QMatrix3x3 QSSGRenderCamera::getLookAtMatrix(const QVector3D &inUpDir, const QVe theCrossDir.normalize(); QVector3D theFinalDir = QVector3D::crossProduct(theCrossDir, theDirection); theFinalDir.normalize(); - float multiplier = 1.0f; - if (flags.testFlag(Flag::LeftHanded)) - multiplier = -1.0f; - - theDirection *= multiplier; float matrixData[9] = { theCrossDir.x(), theFinalDir.x(), theDirection.x(), theCrossDir.y(), theFinalDir.y(), theDirection.y(), theCrossDir.z(), theFinalDir.z(), theDirection.z() @@ -169,8 +164,6 @@ QMatrix3x3 QSSGRenderCamera::getLookAtMatrix(const QVector3D &inUpDir, const QVe void QSSGRenderCamera::lookAt(const QVector3D &inCameraPos, const QVector3D &inUpDir, const QVector3D &inTargetPos) { QVector3D theDirection = inTargetPos - inCameraPos; - if (flags.testFlag(Flag::LeftHanded)) - theDirection.setZ(theDirection.z() * -1.0f); rotation = getRotationVectorFromRotationMatrix(getLookAtMatrix(inUpDir, theDirection)); position = inCameraPos; markDirty(TransformDirtyFlag::TransformIsDirty); diff --git a/src/runtimerender/graphobjects/qssgrendernode.cpp b/src/runtimerender/graphobjects/qssgrendernode.cpp index 801f3b67d..389b747f4 100644 --- a/src/runtimerender/graphobjects/qssgrendernode.cpp +++ b/src/runtimerender/graphobjects/qssgrendernode.cpp @@ -123,7 +123,7 @@ bool QSSGRenderNode::calculateGlobalVariables() QVector3D QSSGRenderNode::getRotationVectorFromRotationMatrix(const QMatrix3x3 &inMatrix) const { - return QSSGEulerAngleConverter::calculateRotationVector(inMatrix, flags.testFlag(Flag::LeftHanded), rotationOrder); + return QSSGEulerAngleConverter::calculateRotationVector(inMatrix, rotationOrder); } QVector3D QSSGRenderNode::getRotationVectorFromEulerAngles(const EulerAngles &inAngles) @@ -139,7 +139,6 @@ void QSSGRenderNode::calculateRotationMatrix(QMatrix4x4 &outMatrix) const void QSSGRenderNode::calculateLocalTransform() { flags.setFlag(Flag::TransformDirty, false); - const bool leftHanded = flags.testFlag(Flag::LeftHanded); localTransform = QMatrix4x4(); globalTransform = localTransform; float *writePtr = localTransform.data(); @@ -160,9 +159,6 @@ void QSSGRenderNode::calculateLocalTransform() writePtr[12] += position[0]; writePtr[13] += position[1]; writePtr[14] += position[2]; - - if (leftHanded) - mat44::flip(localTransform); } void QSSGRenderNode::setLocalTransformFromMatrix(QMatrix4x4 &inTransform) diff --git a/src/runtimerender/graphobjects/qssgrendernode_p.h b/src/runtimerender/graphobjects/qssgrendernode_p.h index 9d956aa12..810844e89 100644 --- a/src/runtimerender/graphobjects/qssgrendernode_p.h +++ b/src/runtimerender/graphobjects/qssgrendernode_p.h @@ -68,23 +68,22 @@ struct Q_QUICK3DRUNTIMERENDER_EXPORT QSSGRenderNode : public QSSGRenderGraphObje Dirty = 1, TransformDirty = 1 << 1, Active = 1 << 2, ///< Is this exact object active - LeftHanded = 1 << 3, - Orthographic = 1 << 4, - PointLight = 1 << 5, - GloballyActive = 1 << 6, ///< set based in Active and if a parent is active. - TextDirty = 1 << 7, - LocallyPickable = 1 << 8, - GloballyPickable = 1 << 9, - LayerEnableDepthTest = 1 << 10, - LayerRenderToTarget = 1 << 11, ///< Does this layer render to the normal render target, + Orthographic = 1 << 3, + PointLight = 1 << 4, + GloballyActive = 1 << 5, ///< set based in Active and if a parent is active. + TextDirty = 1 << 6, + LocallyPickable = 1 << 7, + GloballyPickable = 1 << 8, + LayerEnableDepthTest = 1 << 9, + LayerRenderToTarget = 1 << 10, ///< Does this layer render to the normal render target, /// or is it offscreen-only - ForceLayerOffscreen = 1 << 12, ///< Forces a layer to always use the offscreen rendering + ForceLayerOffscreen = 1 << 11, ///< Forces a layer to always use the offscreen rendering /// mechanism. This can be usefulf or caching purposes. - IgnoreParentTransform = 1 << 13, - LayerEnableDepthPrePass = 1 << 14, ///< True when we render a depth pass before - CameraDirty = 1 << 15, ///< True when the camera inheriting from this is dirty - CameraFrustumProjection = 1 << 16, - CameraCustomProjection = 1 << 17 + IgnoreParentTransform = 1 << 12, + LayerEnableDepthPrePass = 1 << 13, ///< True when we render a depth pass before + CameraDirty = 1 << 14, ///< True when the camera inheriting from this is dirty + CameraFrustumProjection = 1 << 15, + CameraCustomProjection = 1 << 16 }; Q_DECLARE_FLAGS(Flags, Flag) @@ -111,7 +110,6 @@ struct Q_QUICK3DRUNTIMERENDER_EXPORT QSSGRenderNode : public QSSGRenderGraphObje Flags flags { Flag::Dirty, Flag::TransformDirty, - Flag::LeftHanded, Flag::Active, }; // These end up right handed diff --git a/src/runtimerender/rendererimpl/qssgrendererimpl.cpp b/src/runtimerender/rendererimpl/qssgrendererimpl.cpp index b492e2fb6..3f6d05a52 100644 --- a/src/runtimerender/rendererimpl/qssgrendererimpl.cpp +++ b/src/runtimerender/rendererimpl/qssgrendererimpl.cpp @@ -622,10 +622,6 @@ QVector3D QSSGRendererImpl::unprojectWithDepth(QSSGRenderNode &inNode, QVector3D QVector3D theTargetPosition = theRay.origin + theRay.direction * theDepth; if (inNode.parent != nullptr && inNode.parent->type != QSSGRenderGraphObject::Type::Layer) theTargetPosition = mat44::transform(inNode.parent->globalTransform.inverted(), theTargetPosition); - // Our default global space is right handed, so if you are left handed z means something - // opposite. - if (inNode.flags.testFlag(QSSGRenderNode::Flag::LeftHanded)) - theTargetPosition.setZ(theTargetPosition.z() * -1); return theTargetPosition; } diff --git a/src/runtimerender/rendererimpl/qssgrendererimpllayerrenderdata.cpp b/src/runtimerender/rendererimpl/qssgrendererimpllayerrenderdata.cpp index aef7b4943..cefb6f277 100644 --- a/src/runtimerender/rendererimpl/qssgrendererimpllayerrenderdata.cpp +++ b/src/runtimerender/rendererimpl/qssgrendererimpllayerrenderdata.cpp @@ -357,9 +357,6 @@ void setupCameraForShadowMap(const QVector2D &/*inCameraVec*/, QVector3D inLightPos = inLight->getGlobalPos(); QVector3D inLightDir = inLight->getDirection(); - if (inLight->flags.testFlag(QSSGRenderLight::Flag::LeftHanded)) - inLightPos.setZ(-inLightPos.z()); - inLightPos -= inLightDir * inCamera.clipNear; theCamera.fov = qDegreesToRadians(90.f); @@ -412,8 +409,6 @@ void setupCameraForShadowMap(const QVector2D &/*inCameraVec*/, theCamera.clipFar = std::abs(maxDistanceZ - minDistanceZ); } - theCamera.flags.setFlag(QSSGRenderCamera::Flag::LeftHanded, false); - theCamera.flags.setFlag(QSSGRenderCamera::Flag::Orthographic, inLight->m_lightType == QSSGRenderLight::Type::Directional); theCamera.parent = nullptr; theCamera.pivot = inLight->pivot; @@ -438,9 +433,7 @@ void setupCubeShadowCameras(const QSSGRenderLight *inLight, QSSGRenderCamera inC Q_ASSERT(inLight != nullptr); Q_ASSERT(inLight->m_lightType != QSSGRenderLight::Type::Directional); - QVector3D inLightPos = inLight->getGlobalPos(); - if (inLight->flags.testFlag(QSSGRenderLight::Flag::LeftHanded)) - inLightPos.setZ(-inLightPos.z()); + const QVector3D inLightPos = inLight->getGlobalPos(); rotOfs[0] = QVector3D(0.f, -QSSG_HALFPI, QSSG_PI); rotOfs[1] = QVector3D(0.f, QSSG_HALFPI, QSSG_PI); @@ -450,8 +443,6 @@ void setupCubeShadowCameras(const QSSGRenderLight *inLight, QSSGRenderCamera inC rotOfs[5] = QVector3D(0.f, 0.f, QSSG_PI); for (int i = 0; i < 6; ++i) { - inCameras[i].flags.setFlag(QSSGRenderCamera::Flag::LeftHanded, false); - inCameras[i].flags.setFlag(QSSGRenderCamera::Flag::Orthographic, false); inCameras[i].parent = nullptr; inCameras[i].pivot = inLight->pivot; diff --git a/src/utils/qssgrendereulerangles.cpp b/src/utils/qssgrendereulerangles.cpp index 09e0dd562..8e6b4ed84 100644 --- a/src/utils/qssgrendereulerangles.cpp +++ b/src/utils/qssgrendereulerangles.cpp @@ -592,7 +592,6 @@ QMatrix4x4 QSSGEulerAngleConverter::createRotationMatrix(const QVector3D &rotati } QVector3D QSSGEulerAngleConverter::calculateRotationVector(const QMatrix3x3 &rotationMatrix, - bool matrixIsLeftHanded, EulerOrder order) { QMatrix4x4 theConvertMatrix = { rotationMatrix(0, 0), @@ -612,9 +611,6 @@ QVector3D QSSGEulerAngleConverter::calculateRotationVector(const QMatrix3x3 &rot 0.0f, 1.0f }; - if (matrixIsLeftHanded) - mat44::flip(theConvertMatrix); - HMatrix *theHMatrix = reinterpret_cast<HMatrix *>(theConvertMatrix.data()); EulerAngles theAngles = QSSGEulerAngleConverter::eulerFromHMatrix(*theHMatrix, order); return calculateRotationVector(theAngles); diff --git a/src/utils/qssgrendereulerangles_p.h b/src/utils/qssgrendereulerangles_p.h index 555e840ff..b1c6cf33b 100644 --- a/src/utils/qssgrendereulerangles_p.h +++ b/src/utils/qssgrendereulerangles_p.h @@ -137,7 +137,6 @@ public: static EulerAngles calculateEulerAngles(const QVector3D &rotation, EulerOrder order); static QVector3D calculateRotationVector(const EulerAngles &angles); static QVector3D calculateRotationVector(const QMatrix3x3 &rotationMatrix, - bool matrixIsLeftHanded, EulerOrder order); static QMatrix4x4 createRotationMatrix(const QVector3D &rotationAsRadians, EulerOrder order); }; diff --git a/src/utils/qssgutils.cpp b/src/utils/qssgutils.cpp index 590a9ad5b..61c036a5e 100644 --- a/src/utils/qssgutils.cpp +++ b/src/utils/qssgutils.cpp @@ -172,7 +172,7 @@ QVector3D mat44::getPosition(const QMatrix4x4 &m) QVector3D mat44::getRotation(const QMatrix4x4 &m, EulerOrder order) { const QMatrix3x3 rotationMatrix = mat44::getUpper3x3(m); - const QVector3D radians = QSSGEulerAngleConverter::calculateRotationVector(rotationMatrix, false, order); + const QVector3D radians = QSSGEulerAngleConverter::calculateRotationVector(rotationMatrix, order); return radToDeg(radians); } diff --git a/tests/auto/quick3d/qquick3dnode/tst_qquick3dnode.cpp b/tests/auto/quick3d/qquick3dnode/tst_qquick3dnode.cpp index 1e7bc7618..59144a8e2 100644 --- a/tests/auto/quick3d/qquick3dnode/tst_qquick3dnode.cpp +++ b/tests/auto/quick3d/qquick3dnode/tst_qquick3dnode.cpp @@ -138,14 +138,6 @@ void tst_QQuick3DNode::testEnums() auto node = static_cast<QSSGRenderNode *>(nodeItem.updateSpatialNode(nullptr)); QVERIFY(node); - // Orientation - nodeItem.setOrientation(QQuick3DNode::Orientation::LeftHanded); - node = static_cast<QSSGRenderNode *>(nodeItem.updateSpatialNode(node)); - QVERIFY(node->flags.testFlag(QSSGRenderNode::Flag::LeftHanded)); - nodeItem.setOrientation(QQuick3DNode::Orientation::RightHanded); - node = static_cast<QSSGRenderNode *>(nodeItem.updateSpatialNode(node)); - QVERIFY(!node->flags.testFlag(QSSGRenderNode::Flag::LeftHanded)); - // RotationOrder auto rotationOrders = { QQuick3DNode::RotationOrder::XYZ, QQuick3DNode::RotationOrder::YZX, diff --git a/tests/auto/quick3d_lancelot/data/camera/ChildCamera.qml b/tests/auto/quick3d_lancelot/data/camera/ChildCamera.qml index cec1106c1..fa5d7a5c9 100644 --- a/tests/auto/quick3d_lancelot/data/camera/ChildCamera.qml +++ b/tests/auto/quick3d_lancelot/data/camera/ChildCamera.qml @@ -74,7 +74,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -135,7 +135,7 @@ Rectangle { PerspectiveCamera { id: camera_001 position: Qt.vector3d(0, 98.234, 0) - rotation: Qt.vector3d(26, 90, 0) + rotation: Qt.vector3d(-26, -90, 0) rotationOrder: Node.YZX clipFar: 5000 } @@ -144,7 +144,7 @@ Rectangle { Node { id: arrowForward position: Qt.vector3d(-138.558, 0, 0) - rotation: Qt.vector3d(90, 0, 0) + rotation: Qt.vector3d(-90, 0, 0) rotationOrder: Node.YZX Model { @@ -191,7 +191,7 @@ Rectangle { Node { id: arrowDown position: Qt.vector3d(91.1513, 0, 0) - rotation: Qt.vector3d(180, 0, 0) + rotation: Qt.vector3d(-180, 0, 0) rotationOrder: Node.YZX Model { @@ -238,7 +238,7 @@ Rectangle { Node { id: arrowBackwards position: Qt.vector3d(312.117, 0, 0) - rotation: Qt.vector3d(-90, 0, 0) + rotation: Qt.vector3d(90, 0, 0) rotationOrder: Node.YZX Model { @@ -282,7 +282,7 @@ Rectangle { DirectionalLight { id: light2 - rotation: Qt.vector3d(180, 90, 0) + rotation: Qt.vector3d(-180, -90, 0) rotationOrder: Node.YZX color: Qt.rgba(1, 0.988235, 0.882353, 1) } diff --git a/tests/auto/quick3d_lancelot/data/camera/ChildTransformCamera.qml b/tests/auto/quick3d_lancelot/data/camera/ChildTransformCamera.qml index dc84b77cc..8349b1ac8 100644 --- a/tests/auto/quick3d_lancelot/data/camera/ChildTransformCamera.qml +++ b/tests/auto/quick3d_lancelot/data/camera/ChildTransformCamera.qml @@ -74,13 +74,13 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 Model { id: sphere - position: Qt.vector3d(0, 0, 203) + position: Qt.vector3d(0, 0, -203) rotationOrder: Node.YZX source: "#Sphere" @@ -182,7 +182,7 @@ Rectangle { PerspectiveCamera { id: camera_001 position: Qt.vector3d(0, 98.234, 0) - rotation: Qt.vector3d(26, 90, 0) + rotation: Qt.vector3d(-26, -90, 0) rotationOrder: Node.YZX clipFar: 5000 } @@ -191,7 +191,7 @@ Rectangle { Node { id: arrowForward position: Qt.vector3d(-138.558, 0, 0) - rotation: Qt.vector3d(90, 0, 0) + rotation: Qt.vector3d(-90, 0, 0) rotationOrder: Node.YZX Model { @@ -242,7 +242,7 @@ Rectangle { Node { id: arrowDown position: Qt.vector3d(91.1513, 0, 0) - rotation: Qt.vector3d(180, 0, 0) + rotation: Qt.vector3d(-180, 0, 0) rotationOrder: Node.YZX Model { @@ -293,7 +293,7 @@ Rectangle { Node { id: arrowBackwards position: Qt.vector3d(312.117, 0, 0) - rotation: Qt.vector3d(-90, 0, 0) + rotation: Qt.vector3d(90, 0, 0) rotationOrder: Node.YZX Model { @@ -341,7 +341,7 @@ Rectangle { DirectionalLight { id: light2 - rotation: Qt.vector3d(180, 90, 0) + rotation: Qt.vector3d(-180, -90, 0) rotationOrder: Node.YZX color: Qt.rgba(1, 0.988235, 0.882353, 1) shadowFactor: 10 diff --git a/tests/auto/quick3d_lancelot/data/camera/DefaultCamera.qml b/tests/auto/quick3d_lancelot/data/camera/DefaultCamera.qml index 374c87b28..f4b392e05 100644 --- a/tests/auto/quick3d_lancelot/data/camera/DefaultCamera.qml +++ b/tests/auto/quick3d_lancelot/data/camera/DefaultCamera.qml @@ -74,7 +74,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -148,7 +148,7 @@ Rectangle { Node { id: arrowForward position: Qt.vector3d(-138.558, 0, 0) - rotation: Qt.vector3d(90, 0, 0) + rotation: Qt.vector3d(-90, 0, 0) rotationOrder: Node.YZX Model { @@ -199,7 +199,7 @@ Rectangle { Node { id: arrowDown position: Qt.vector3d(91.1513, 0, 0) - rotation: Qt.vector3d(180, 0, 0) + rotation: Qt.vector3d(-180, 0, 0) rotationOrder: Node.YZX Model { @@ -250,7 +250,7 @@ Rectangle { Node { id: arrowBackwards position: Qt.vector3d(312.117, 0, 0) - rotation: Qt.vector3d(-90, 0, 0) + rotation: Qt.vector3d(90, 0, 0) rotationOrder: Node.YZX Model { @@ -298,7 +298,7 @@ Rectangle { DirectionalLight { id: light2 - rotation: Qt.vector3d(180, 90, 0) + rotation: Qt.vector3d(-180, -90, 0) rotationOrder: Node.YZX color: Qt.rgba(1, 0.988235, 0.882353, 1) shadowFactor: 10 diff --git a/tests/auto/quick3d_lancelot/data/camera/OrbitCamera.qml b/tests/auto/quick3d_lancelot/data/camera/OrbitCamera.qml index 3e61eaa61..375893e33 100644 --- a/tests/auto/quick3d_lancelot/data/camera/OrbitCamera.qml +++ b/tests/auto/quick3d_lancelot/data/camera/OrbitCamera.qml @@ -74,7 +74,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -139,7 +139,7 @@ Rectangle { PerspectiveCamera { id: camera_001 position: Qt.vector3d(0, 98.234, 0) - rotation: Qt.vector3d(26, 90, 0) + rotation: Qt.vector3d(-26, -90, 0) rotationOrder: Node.YZX clipFar: 5000 } @@ -148,7 +148,7 @@ Rectangle { Node { id: arrowForward position: Qt.vector3d(-138.558, 0, 0) - rotation: Qt.vector3d(90, 0, 0) + rotation: Qt.vector3d(-90, 0, 0) rotationOrder: Node.YZX Model { @@ -199,7 +199,7 @@ Rectangle { Node { id: arrowDown position: Qt.vector3d(91.1513, 0, 0) - rotation: Qt.vector3d(180, 0, 0) + rotation: Qt.vector3d(-180, 0, 0) rotationOrder: Node.YZX Model { @@ -250,7 +250,7 @@ Rectangle { Node { id: arrowBackwards position: Qt.vector3d(312.117, 0, 0) - rotation: Qt.vector3d(-90, 0, 0) + rotation: Qt.vector3d(90, 0, 0) rotationOrder: Node.YZX Model { @@ -298,7 +298,7 @@ Rectangle { DirectionalLight { id: light2 - rotation: Qt.vector3d(180, 90, 0) + rotation: Qt.vector3d(-180, 90, 0) rotationOrder: Node.YZX color: Qt.rgba(1, 0.988235, 0.882353, 1) shadowFactor: 10 @@ -306,12 +306,12 @@ Rectangle { Node { id: orbiter - rotation: Qt.vector3d(0, 45, 0) + rotation: Qt.vector3d(0, -45, 0) rotationOrder: Node.YZX PerspectiveCamera { id: camera_002 - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } diff --git a/tests/auto/quick3d_lancelot/data/camera/Orthographic_camera.qml b/tests/auto/quick3d_lancelot/data/camera/Orthographic_camera.qml index b86798ab9..061370678 100644 --- a/tests/auto/quick3d_lancelot/data/camera/Orthographic_camera.qml +++ b/tests/auto/quick3d_lancelot/data/camera/Orthographic_camera.qml @@ -74,7 +74,7 @@ Rectangle { OrthographicCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -108,7 +108,7 @@ Rectangle { Model { id: cylinder2 - position: Qt.vector3d(55.7838, 116.872, -200) + position: Qt.vector3d(55.7838, 116.872, 200) rotationOrder: Node.YZX source: "#Cylinder" diff --git a/tests/auto/quick3d_lancelot/data/camera/Perspective_camera.qml b/tests/auto/quick3d_lancelot/data/camera/Perspective_camera.qml index 514cbccd6..d07542524 100644 --- a/tests/auto/quick3d_lancelot/data/camera/Perspective_camera.qml +++ b/tests/auto/quick3d_lancelot/data/camera/Perspective_camera.qml @@ -74,7 +74,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -108,7 +108,7 @@ Rectangle { Model { id: cylinder2 - position: Qt.vector3d(55.7838, 116.872, -200) + position: Qt.vector3d(55.7838, 116.872, 200) rotationOrder: Node.YZX source: "#Cylinder" diff --git a/tests/auto/quick3d_lancelot/data/custommaterials/Aluminum.qml b/tests/auto/quick3d_lancelot/data/custommaterials/Aluminum.qml index cbe7e00c4..39ae64dae 100644 --- a/tests/auto/quick3d_lancelot/data/custommaterials/Aluminum.qml +++ b/tests/auto/quick3d_lancelot/data/custommaterials/Aluminum.qml @@ -67,12 +67,12 @@ Rectangle { } PerspectiveCamera { - z: -100 + z: 100 } Model { y: -20 x: 10 - rotation: Qt.vector3d(45, 30, 0) + rotation: Qt.vector3d(-45, -30, 0) scale: Qt.vector3d(70, 70, 70) rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/custommaterials/AluminumAnodized.qml b/tests/auto/quick3d_lancelot/data/custommaterials/AluminumAnodized.qml index 33c0f9011..bbfafdee9 100644 --- a/tests/auto/quick3d_lancelot/data/custommaterials/AluminumAnodized.qml +++ b/tests/auto/quick3d_lancelot/data/custommaterials/AluminumAnodized.qml @@ -67,12 +67,12 @@ Rectangle { } PerspectiveCamera { - z: -100 + z: 100 } Model { y: -20 x: 10 - rotation: Qt.vector3d(45, 30, 0) + rotation: Qt.vector3d(-45, -30, 0) scale: Qt.vector3d(70, 70, 70) rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/custommaterials/AluminumAnodizedEmissive.qml b/tests/auto/quick3d_lancelot/data/custommaterials/AluminumAnodizedEmissive.qml index 4d33c11d8..407b4ac07 100644 --- a/tests/auto/quick3d_lancelot/data/custommaterials/AluminumAnodizedEmissive.qml +++ b/tests/auto/quick3d_lancelot/data/custommaterials/AluminumAnodizedEmissive.qml @@ -67,12 +67,12 @@ Rectangle { } PerspectiveCamera { - z: -100 + z: 100 } Model { y: -20 x: 10 - rotation: Qt.vector3d(45, 30, 0) + rotation: Qt.vector3d(-45, -30, 0) scale: Qt.vector3d(70, 70, 70) rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/custommaterials/AluminumBrushed.qml b/tests/auto/quick3d_lancelot/data/custommaterials/AluminumBrushed.qml index f34bb2780..d1e40cf6d 100644 --- a/tests/auto/quick3d_lancelot/data/custommaterials/AluminumBrushed.qml +++ b/tests/auto/quick3d_lancelot/data/custommaterials/AluminumBrushed.qml @@ -67,12 +67,12 @@ Rectangle { } PerspectiveCamera { - z: -100 + z: 100 } Model { y: -20 x: 10 - rotation: Qt.vector3d(45, 30, 0) + rotation: Qt.vector3d(-45, -30, 0) scale: Qt.vector3d(70, 70, 70) rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/custommaterials/AluminumEmissive.qml b/tests/auto/quick3d_lancelot/data/custommaterials/AluminumEmissive.qml index c9296ec81..b79d30c36 100644 --- a/tests/auto/quick3d_lancelot/data/custommaterials/AluminumEmissive.qml +++ b/tests/auto/quick3d_lancelot/data/custommaterials/AluminumEmissive.qml @@ -67,12 +67,12 @@ Rectangle { } PerspectiveCamera { - z: -100 + z: 100 } Model { y: -20 x: 10 - rotation: Qt.vector3d(45, 30, 0) + rotation: Qt.vector3d(-45, -30, 0) scale: Qt.vector3d(70, 70, 70) rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/custommaterials/Copper.qml b/tests/auto/quick3d_lancelot/data/custommaterials/Copper.qml index b65fe07c7..0c6fb3728 100644 --- a/tests/auto/quick3d_lancelot/data/custommaterials/Copper.qml +++ b/tests/auto/quick3d_lancelot/data/custommaterials/Copper.qml @@ -67,12 +67,12 @@ Rectangle { } PerspectiveCamera { - z: -100 + z: 100 } Model { y: -20 x: 10 - rotation: Qt.vector3d(45, 30, 0) + rotation: Qt.vector3d(-45, -30, 0) scale: Qt.vector3d(70, 70, 70) rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/custommaterials/FrostedGlass.qml b/tests/auto/quick3d_lancelot/data/custommaterials/FrostedGlass.qml index 30bb43205..495b1dd50 100644 --- a/tests/auto/quick3d_lancelot/data/custommaterials/FrostedGlass.qml +++ b/tests/auto/quick3d_lancelot/data/custommaterials/FrostedGlass.qml @@ -67,12 +67,12 @@ Rectangle { } PerspectiveCamera { - z: -100 + z: 100 } Model { y: -20 x: 10 - rotation: Qt.vector3d(45, 30, 0) + rotation: Qt.vector3d(-45, -30, 0) scale: Qt.vector3d(70, 70, 70) rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/custommaterials/FrostedGlassSinglePass.qml b/tests/auto/quick3d_lancelot/data/custommaterials/FrostedGlassSinglePass.qml index 5bbdac0cb..e1ef5e6ae 100644 --- a/tests/auto/quick3d_lancelot/data/custommaterials/FrostedGlassSinglePass.qml +++ b/tests/auto/quick3d_lancelot/data/custommaterials/FrostedGlassSinglePass.qml @@ -67,12 +67,12 @@ Rectangle { } PerspectiveCamera { - z: -100 + z: 100 } Model { y: -20 x: 10 - rotation: Qt.vector3d(45, 30, 0) + rotation: Qt.vector3d(-45, -30, 0) scale: Qt.vector3d(70, 70, 70) rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/custommaterials/Glass.qml b/tests/auto/quick3d_lancelot/data/custommaterials/Glass.qml index 775beea5f..deac0b088 100644 --- a/tests/auto/quick3d_lancelot/data/custommaterials/Glass.qml +++ b/tests/auto/quick3d_lancelot/data/custommaterials/Glass.qml @@ -67,12 +67,12 @@ Rectangle { } PerspectiveCamera { - z: -100 + z: 100 } Model { y: -20 x: 10 - rotation: Qt.vector3d(45, 30, 0) + rotation: Qt.vector3d(-45, -30, 0) scale: Qt.vector3d(70, 70, 70) rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/custommaterials/GlassRefractive.qml b/tests/auto/quick3d_lancelot/data/custommaterials/GlassRefractive.qml index e3effe242..83c6ac07b 100644 --- a/tests/auto/quick3d_lancelot/data/custommaterials/GlassRefractive.qml +++ b/tests/auto/quick3d_lancelot/data/custommaterials/GlassRefractive.qml @@ -67,12 +67,12 @@ Rectangle { } PerspectiveCamera { - z: -100 + z: 100 } Model { y: -20 x: 10 - rotation: Qt.vector3d(45, 30, 0) + rotation: Qt.vector3d(-45, -30, 0) scale: Qt.vector3d(70, 70, 70) rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/custommaterials/PaperArtistic.qml b/tests/auto/quick3d_lancelot/data/custommaterials/PaperArtistic.qml index 1aca6fe74..b58ad191d 100644 --- a/tests/auto/quick3d_lancelot/data/custommaterials/PaperArtistic.qml +++ b/tests/auto/quick3d_lancelot/data/custommaterials/PaperArtistic.qml @@ -67,12 +67,12 @@ Rectangle { } PerspectiveCamera { - z: -100 + z: 100 } Model { y: -20 x: 10 - rotation: Qt.vector3d(45, 30, 0) + rotation: Qt.vector3d(-45, -30, 0) scale: Qt.vector3d(70, 70, 70) rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/custommaterials/PaperOffice.qml b/tests/auto/quick3d_lancelot/data/custommaterials/PaperOffice.qml index 36c0d4b9d..13d811d25 100644 --- a/tests/auto/quick3d_lancelot/data/custommaterials/PaperOffice.qml +++ b/tests/auto/quick3d_lancelot/data/custommaterials/PaperOffice.qml @@ -67,12 +67,12 @@ Rectangle { } PerspectiveCamera { - z: -100 + z: 100 } Model { y: -20 x: 10 - rotation: Qt.vector3d(45, 30, 0) + rotation: Qt.vector3d(-45, -30, 0) scale: Qt.vector3d(70, 70, 70) rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/custommaterials/PlasticStructuredRed.qml b/tests/auto/quick3d_lancelot/data/custommaterials/PlasticStructuredRed.qml index 11841c781..374eb60ca 100644 --- a/tests/auto/quick3d_lancelot/data/custommaterials/PlasticStructuredRed.qml +++ b/tests/auto/quick3d_lancelot/data/custommaterials/PlasticStructuredRed.qml @@ -67,12 +67,12 @@ Rectangle { } PerspectiveCamera { - z: -100 + z: 100 } Model { y: -20 x: 10 - rotation: Qt.vector3d(45, 30, 0) + rotation: Qt.vector3d(-45, -30, 0) scale: Qt.vector3d(70, 70, 70) rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/custommaterials/PlasticStructuredRedEmissive.qml b/tests/auto/quick3d_lancelot/data/custommaterials/PlasticStructuredRedEmissive.qml index eb1c6e9f7..4c95fa493 100644 --- a/tests/auto/quick3d_lancelot/data/custommaterials/PlasticStructuredRedEmissive.qml +++ b/tests/auto/quick3d_lancelot/data/custommaterials/PlasticStructuredRedEmissive.qml @@ -67,12 +67,12 @@ Rectangle { } PerspectiveCamera { - z: -100 + z: 100 } Model { y: -20 x: 10 - rotation: Qt.vector3d(45, 30, 0) + rotation: Qt.vector3d(-45, -30, 0) scale: Qt.vector3d(70, 70, 70) rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/custommaterials/SteelMilledConcentric.qml b/tests/auto/quick3d_lancelot/data/custommaterials/SteelMilledConcentric.qml index 878f7d0a8..49e284676 100644 --- a/tests/auto/quick3d_lancelot/data/custommaterials/SteelMilledConcentric.qml +++ b/tests/auto/quick3d_lancelot/data/custommaterials/SteelMilledConcentric.qml @@ -67,12 +67,12 @@ Rectangle { } PerspectiveCamera { - z: -100 + z: 100 } Model { y: -20 x: 10 - rotation: Qt.vector3d(45, 30, 0) + rotation: Qt.vector3d(-45, -30, 0) scale: Qt.vector3d(70, 70, 70) rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/defaultmaterial/Defaultmaterial_multiply.qml b/tests/auto/quick3d_lancelot/data/defaultmaterial/Defaultmaterial_multiply.qml index 367b0aed5..d301f7db5 100644 --- a/tests/auto/quick3d_lancelot/data/defaultmaterial/Defaultmaterial_multiply.qml +++ b/tests/auto/quick3d_lancelot/data/defaultmaterial/Defaultmaterial_multiply.qml @@ -74,8 +74,8 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, -40, -600) - rotation: Qt.vector3d(-10, 0, -10) + position: Qt.vector3d(0, -40, 600) + rotation: Qt.vector3d(10, 0, -10) rotationOrder: Node.YZX clipFar: 5000 } @@ -88,8 +88,8 @@ Rectangle { Model { id: sphere - position: Qt.vector3d(-479.719, 208.826, 220.558) - rotation: Qt.vector3d(-20.8358, 34.3489, -62.5045) + position: Qt.vector3d(-479.719, 208.826, -220.558) + rotation: Qt.vector3d(20.8358, -34.3489, -62.5045) opacity: 0.5 rotationOrder: Node.YZX source: "#Sphere" @@ -114,8 +114,8 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(211.66, 54.7973, -123.049) - rotation: Qt.vector3d(-29.16, 22.9975, -41.0578) + position: Qt.vector3d(211.66, 54.7973, 123.049) + rotation: Qt.vector3d(29.16, -22.9975, -41.0578) scale: Qt.vector3d(0.89855, 0.969231, 1) opacity: 0.5 rotationOrder: Node.YZX @@ -140,7 +140,7 @@ Rectangle { Model { id: cone - rotation: Qt.vector3d(-47.4815, 2.69907, 11.9215) + rotation: Qt.vector3d(47.4815, -2.69907, 11.9215) rotationOrder: Node.YZX source: "#Cone" diff --git a/tests/auto/quick3d_lancelot/data/defaultmaterial/Defaultmaterial_normal.qml b/tests/auto/quick3d_lancelot/data/defaultmaterial/Defaultmaterial_normal.qml index 9db1f112c..1874c3a8b 100644 --- a/tests/auto/quick3d_lancelot/data/defaultmaterial/Defaultmaterial_normal.qml +++ b/tests/auto/quick3d_lancelot/data/defaultmaterial/Defaultmaterial_normal.qml @@ -74,8 +74,8 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, -40, -600) - rotation: Qt.vector3d(-10, 0, -10) + position: Qt.vector3d(0, -40, 600) + rotation: Qt.vector3d(10, 0, -10) rotationOrder: Node.YZX clipFar: 5000 } @@ -88,8 +88,8 @@ Rectangle { Model { id: sphere - position: Qt.vector3d(-479.719, 208.826, 220.558) - rotation: Qt.vector3d(-20.8358, 34.3489, -62.5045) + position: Qt.vector3d(-479.719, 208.826, -220.558) + rotation: Qt.vector3d(20.8358, -34.3489, -62.5045) opacity: 0.5 rotationOrder: Node.YZX source: "#Sphere" @@ -113,8 +113,8 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(211.66, 54.7973, -123.049) - rotation: Qt.vector3d(-29.16, 22.9975, -41.0578) + position: Qt.vector3d(211.66, 54.7973, 123.049) + rotation: Qt.vector3d(29.16, -22.9975, -41.0578) scale: Qt.vector3d(0.89855, 0.969231, 1) opacity: 0.5 rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/defaultmaterial/Defaultmaterial_screen.qml b/tests/auto/quick3d_lancelot/data/defaultmaterial/Defaultmaterial_screen.qml index 435619a72..3556455e0 100644 --- a/tests/auto/quick3d_lancelot/data/defaultmaterial/Defaultmaterial_screen.qml +++ b/tests/auto/quick3d_lancelot/data/defaultmaterial/Defaultmaterial_screen.qml @@ -74,8 +74,8 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, -40, -600) - rotation: Qt.vector3d(-10, 0, -10) + position: Qt.vector3d(0, -40, 600) + rotation: Qt.vector3d(10, 0, -10) rotationOrder: Node.YZX clipFar: 5000 } @@ -88,8 +88,8 @@ Rectangle { Model { id: sphere - position: Qt.vector3d(-479.719, 208.826, 220.558) - rotation: Qt.vector3d(-20.8358, 34.3489, -62.5045) + position: Qt.vector3d(-479.719, 208.826, -220.558) + rotation: Qt.vector3d(20.8358, -34.3489, -62.5045) opacity: 0.5 rotationOrder: Node.YZX source: "#Sphere" @@ -114,8 +114,8 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(211.66, 54.7973, -123.049) - rotation: Qt.vector3d(-29.16, 22.9975, -41.0578) + position: Qt.vector3d(211.66, 54.7973, 123.049) + rotation: Qt.vector3d(29.16, -22.9975, -41.0578) scale: Qt.vector3d(0.89855, 0.969231, 1) opacity: 0.5 rotationOrder: Node.YZX diff --git a/tests/auto/quick3d_lancelot/data/defaultmaterial/Primitives.qml b/tests/auto/quick3d_lancelot/data/defaultmaterial/Primitives.qml index 4747188ff..53a2feb05 100644 --- a/tests/auto/quick3d_lancelot/data/defaultmaterial/Primitives.qml +++ b/tests/auto/quick3d_lancelot/data/defaultmaterial/Primitives.qml @@ -74,7 +74,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } diff --git a/tests/auto/quick3d_lancelot/data/layers/Ambient_occlusion.qml b/tests/auto/quick3d_lancelot/data/layers/Ambient_occlusion.qml index ed2b0bca1..b4c7c87e3 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Ambient_occlusion.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Ambient_occlusion.qml @@ -76,7 +76,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -133,7 +133,7 @@ Rectangle { Model { id: cube position: Qt.vector3d(349.297, -228.053, 0) - rotation: Qt.vector3d(-28.0299, -33.3145, 17.1637) + rotation: Qt.vector3d(28.0299, 33.3145, 17.1637) scale: Qt.vector3d(2.00606, 1, 1) rotationOrder: Node.YZX source: "#Cube" @@ -155,7 +155,7 @@ Rectangle { Node { id: barrel - position: Qt.vector3d(-292.216, -304.023, 434) + position: Qt.vector3d(-292.216, -304.023, -434) rotation: Qt.vector3d(0, 0, -41.5) scale: Qt.vector3d(10, 10, 10) rotationOrder: Node.YZX @@ -165,7 +165,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "../shared/models/barrel/meshes/Barrel.mesh" @@ -187,7 +186,7 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(255.743, -27.1591, -185) + position: Qt.vector3d(255.743, -27.1591, 185) scale: Qt.vector3d(1.5, 1.5, 1.5) rotationOrder: Node.YZX source: "#Cylinder" diff --git a/tests/auto/quick3d_lancelot/data/layers/Background_solidcolor.qml b/tests/auto/quick3d_lancelot/data/layers/Background_solidcolor.qml index 70fd8ffee..6422ae4ca 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Background_solidcolor.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Background_solidcolor.qml @@ -75,7 +75,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -132,7 +132,7 @@ Rectangle { Model { id: cube position: Qt.vector3d(349.297, -228.053, 0) - rotation: Qt.vector3d(-28.0299, -33.3145, 17.1637) + rotation: Qt.vector3d(28.0299, 33.3145, 17.1637) scale: Qt.vector3d(2.00606, 1, 1) rotationOrder: Node.YZX source: "#Cube" @@ -154,7 +154,7 @@ Rectangle { Node { id: barrel - position: Qt.vector3d(-292.216, -304.023, 434) + position: Qt.vector3d(-292.216, -304.023, -434) rotation: Qt.vector3d(0, 0, -41.5) scale: Qt.vector3d(10, 10, 10) rotationOrder: Node.YZX @@ -164,7 +164,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "../shared/models/barrel/meshes/Barrel.mesh" @@ -186,7 +185,7 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(255.743, -27.1591, -185) + position: Qt.vector3d(255.743, -27.1591, 185) scale: Qt.vector3d(1.5, 1.5, 1.5) rotationOrder: Node.YZX source: "#Cylinder" diff --git a/tests/auto/quick3d_lancelot/data/layers/Defaults.qml b/tests/auto/quick3d_lancelot/data/layers/Defaults.qml index 120bffd86..c939ce90a 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Defaults.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Defaults.qml @@ -77,7 +77,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -134,7 +134,7 @@ Rectangle { Model { id: cube position: Qt.vector3d(349.297, -228.053, 0) - rotation: Qt.vector3d(-28.0299, -33.3145, 17.1637) + rotation: Qt.vector3d(28.0299, 33.3145, 17.1637) scale: Qt.vector3d(2.00606, 1, 1) rotationOrder: Node.YZX source: "#Cube" @@ -156,7 +156,7 @@ Rectangle { Node { id: barrel - position: Qt.vector3d(-292.216, -304.023, 434) + position: Qt.vector3d(-292.216, -304.023, -434) rotation: Qt.vector3d(0, 0, -41.5) scale: Qt.vector3d(10, 10, 10) rotationOrder: Node.YZX @@ -166,7 +166,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "../shared/models/barrel/meshes/Barrel.mesh" @@ -188,7 +187,7 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(255.743, -27.1591, -185) + position: Qt.vector3d(255.743, -27.1591, 185) scale: Qt.vector3d(1.5, 1.5, 1.5) rotationOrder: Node.YZX source: "#Cylinder" diff --git a/tests/auto/quick3d_lancelot/data/layers/Disable_depth_prepass.qml b/tests/auto/quick3d_lancelot/data/layers/Disable_depth_prepass.qml index 7d323d55e..abb9c889b 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Disable_depth_prepass.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Disable_depth_prepass.qml @@ -73,7 +73,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -130,7 +130,7 @@ Rectangle { Model { id: cube position: Qt.vector3d(349.297, -228.053, 0) - rotation: Qt.vector3d(-28.0299, -33.3145, 17.1637) + rotation: Qt.vector3d(28.0299, 33.3145, 17.1637) scale: Qt.vector3d(2.00606, 1, 1) rotationOrder: Node.YZX source: "#Cube" @@ -152,7 +152,7 @@ Rectangle { Node { id: barrel - position: Qt.vector3d(-292.216, -304.023, 434) + position: Qt.vector3d(-292.216, -304.023, -434) rotation: Qt.vector3d(0, 0, -41.5) scale: Qt.vector3d(10, 10, 10) rotationOrder: Node.YZX @@ -162,7 +162,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "../shared/models/barrel/meshes/Barrel.mesh" @@ -184,7 +183,7 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(255.743, -27.1591, -185) + position: Qt.vector3d(255.743, -27.1591, 185) scale: Qt.vector3d(1.5, 1.5, 1.5) rotationOrder: Node.YZX source: "#Cylinder" diff --git a/tests/auto/quick3d_lancelot/data/layers/Disable_depth_test.qml b/tests/auto/quick3d_lancelot/data/layers/Disable_depth_test.qml index b7fb99f6f..faeb38c6d 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Disable_depth_test.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Disable_depth_test.qml @@ -76,7 +76,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -133,7 +133,7 @@ Rectangle { Model { id: cube position: Qt.vector3d(349.297, -228.053, 0) - rotation: Qt.vector3d(-28.0299, -33.3145, 17.1637) + rotation: Qt.vector3d(28.0299, 33.3145, 17.1637) scale: Qt.vector3d(2.00606, 1, 1) rotationOrder: Node.YZX source: "#Cube" @@ -155,7 +155,7 @@ Rectangle { Node { id: barrel - position: Qt.vector3d(-292.216, -304.023, 434) + position: Qt.vector3d(-292.216, -304.023, -434) rotation: Qt.vector3d(0, 0, -41.5) scale: Qt.vector3d(10, 10, 10) rotationOrder: Node.YZX @@ -165,7 +165,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "../shared/models/barrel/meshes/Barrel.mesh" @@ -187,7 +186,7 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(255.743, -27.1591, -185) + position: Qt.vector3d(255.743, -27.1591, 185) scale: Qt.vector3d(1.5, 1.5, 1.5) rotationOrder: Node.YZX source: "#Cylinder" diff --git a/tests/auto/quick3d_lancelot/data/layers/Geometry_1.qml b/tests/auto/quick3d_lancelot/data/layers/Geometry_1.qml index e39f911c4..8bb06c5df 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Geometry_1.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Geometry_1.qml @@ -77,7 +77,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -91,7 +91,7 @@ Rectangle { Model { id: rectangle position: Qt.vector3d(-5.77344, -34.641, 0) - rotation: Qt.vector3d(53.5, 0, 0) + rotation: Qt.vector3d(-53.5, 0, 0) scale: Qt.vector3d(6.30691, 5.36799, 1) rotationOrder: Node.YZX source: "#Rectangle" @@ -129,7 +129,7 @@ Rectangle { PerspectiveCamera { id: camera_001 - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -142,7 +142,7 @@ Rectangle { Model { id: sphere - position: Qt.vector3d(12.67, 168.035, 34.9131) + position: Qt.vector3d(12.67, 168.035, -34.9131) rotationOrder: Node.YZX source: "#Sphere" diff --git a/tests/auto/quick3d_lancelot/data/layers/Geometry_2.qml b/tests/auto/quick3d_lancelot/data/layers/Geometry_2.qml index ace60e64e..23b6de4b8 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Geometry_2.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Geometry_2.qml @@ -78,7 +78,7 @@ Rectangle { PerspectiveCamera { id: camera_001 - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -91,7 +91,7 @@ Rectangle { Model { id: sphere - position: Qt.vector3d(12.67, 168.035, 34.9131) + position: Qt.vector3d(12.67, 168.035, -34.9131) rotationOrder: Node.YZX source: "#Sphere" @@ -127,7 +127,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -141,7 +141,7 @@ Rectangle { Model { id: rectangle position: Qt.vector3d(-5.77344, -34.641, 0) - rotation: Qt.vector3d(53.5, 0, 0) + rotation: Qt.vector3d(-53.5, 0, 0) scale: Qt.vector3d(6.30691, 5.36799, 1) rotationOrder: Node.YZX source: "#Rectangle" diff --git a/tests/auto/quick3d_lancelot/data/layers/Geometry_3.qml b/tests/auto/quick3d_lancelot/data/layers/Geometry_3.qml index 115d7cba2..d5e6599fd 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Geometry_3.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Geometry_3.qml @@ -78,7 +78,7 @@ Rectangle { PerspectiveCamera { id: camera_001 - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -91,7 +91,7 @@ Rectangle { Model { id: sphere - position: Qt.vector3d(12.67, 168.035, 34.9131) + position: Qt.vector3d(12.67, 168.035, -34.9131) rotationOrder: Node.YZX source: "#Sphere" @@ -127,7 +127,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -141,7 +141,7 @@ Rectangle { Model { id: rectangle position: Qt.vector3d(-5.77344, -34.641, 0) - rotation: Qt.vector3d(53.5, 0, 0) + rotation: Qt.vector3d(-53.5, 0, 0) scale: Qt.vector3d(6.30691, 5.36799, 1) rotationOrder: Node.YZX source: "#Rectangle" diff --git a/tests/auto/quick3d_lancelot/data/layers/Geometry_4.qml b/tests/auto/quick3d_lancelot/data/layers/Geometry_4.qml index c64c7d6de..859b73b58 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Geometry_4.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Geometry_4.qml @@ -78,7 +78,7 @@ Rectangle { PerspectiveCamera { id: camera_001 - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -91,7 +91,7 @@ Rectangle { Model { id: sphere - position: Qt.vector3d(12.67, 168.035, 34.9131) + position: Qt.vector3d(12.67, 168.035, -34.9131) rotationOrder: Node.YZX source: "#Sphere" @@ -127,7 +127,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -141,7 +141,7 @@ Rectangle { Model { id: rectangle position: Qt.vector3d(-5.77344, -34.641, 0) - rotation: Qt.vector3d(53.5, 0, 0) + rotation: Qt.vector3d(-53.5, 0, 0) scale: Qt.vector3d(6.30691, 5.36799, 1) rotationOrder: Node.YZX source: "#Rectangle" diff --git a/tests/auto/quick3d_lancelot/data/layers/Geometry_5.qml b/tests/auto/quick3d_lancelot/data/layers/Geometry_5.qml index a52dbfea0..3df73f2c1 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Geometry_5.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Geometry_5.qml @@ -77,7 +77,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -91,7 +91,7 @@ Rectangle { Model { id: rectangle position: Qt.vector3d(-5.77344, -34.641, 0) - rotation: Qt.vector3d(53.5, 0, 0) + rotation: Qt.vector3d(-53.5, 0, 0) scale: Qt.vector3d(6.30691, 5.36799, 1) rotationOrder: Node.YZX source: "#Rectangle" @@ -130,7 +130,7 @@ Rectangle { PerspectiveCamera { id: camera_001 - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -143,7 +143,7 @@ Rectangle { Model { id: sphere - position: Qt.vector3d(12.67, 168.035, 34.9131) + position: Qt.vector3d(12.67, 168.035, -34.9131) rotationOrder: Node.YZX source: "#Sphere" diff --git a/tests/auto/quick3d_lancelot/data/layers/Geometry_6.qml b/tests/auto/quick3d_lancelot/data/layers/Geometry_6.qml index 02cc31e72..f5689b91a 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Geometry_6.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Geometry_6.qml @@ -79,7 +79,7 @@ Rectangle { PerspectiveCamera { id: camera_001 - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -92,7 +92,7 @@ Rectangle { Model { id: sphere - position: Qt.vector3d(12.67, 168.035, 34.9131) + position: Qt.vector3d(12.67, 168.035, -34.9131) rotationOrder: Node.YZX source: "#Sphere" @@ -128,7 +128,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -140,7 +140,7 @@ Rectangle { Model { id: rectangle position: Qt.vector3d(-5.77344, -34.641, 0) - rotation: Qt.vector3d(53.5, 0, 0) + rotation: Qt.vector3d(-53.5, 0, 0) scale: Qt.vector3d(6.30691, 5.36799, 1) rotationOrder: Node.YZX source: "#Rectangle" diff --git a/tests/auto/quick3d_lancelot/data/layers/Light_probe.qml b/tests/auto/quick3d_lancelot/data/layers/Light_probe.qml index d2b2cab70..bdb8eea5a 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Light_probe.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Light_probe.qml @@ -79,7 +79,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -130,7 +130,7 @@ Rectangle { Model { id: cube position: Qt.vector3d(349.297, -228.053, 0) - rotation: Qt.vector3d(-28.0299, -33.3145, 17.1637) + rotation: Qt.vector3d(28.0299, 33.3145, 17.1637) scale: Qt.vector3d(2.00606, 1, 1) rotationOrder: Node.YZX source: "#Cube" @@ -152,7 +152,7 @@ Rectangle { Node { id: barrel - position: Qt.vector3d(-292.216, -304.023, 434) + position: Qt.vector3d(-292.216, -304.023, -434) rotation: Qt.vector3d(0, 0, -41.5) scale: Qt.vector3d(10, 10, 10) rotationOrder: Node.YZX @@ -162,7 +162,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "../shared/models/barrel/meshes/Barrel.mesh" @@ -184,7 +183,7 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(255.743, -27.1591, -185) + position: Qt.vector3d(255.743, -27.1591, 185) scale: Qt.vector3d(1.5, 1.5, 1.5) rotationOrder: Node.YZX source: "#Cylinder" diff --git a/tests/auto/quick3d_lancelot/data/layers/Multisample_aa_2x.qml b/tests/auto/quick3d_lancelot/data/layers/Multisample_aa_2x.qml index 6e8823e4b..dd20a8bf3 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Multisample_aa_2x.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Multisample_aa_2x.qml @@ -78,7 +78,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -135,7 +135,7 @@ Rectangle { Model { id: cube position: Qt.vector3d(349.297, -228.053, 0) - rotation: Qt.vector3d(-28.0299, -33.3145, 17.1637) + rotation: Qt.vector3d(28.0299, 33.3145, 17.1637) scale: Qt.vector3d(2.00606, 1, 1) rotationOrder: Node.YZX source: "#Cube" @@ -157,7 +157,7 @@ Rectangle { Node { id: barrel - position: Qt.vector3d(-292.216, -304.023, 434) + position: Qt.vector3d(-292.216, -304.023, -434) rotation: Qt.vector3d(0, 0, -41.5) scale: Qt.vector3d(10, 10, 10) rotationOrder: Node.YZX @@ -167,7 +167,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "../shared/models/barrel/meshes/Barrel.mesh" @@ -189,7 +188,7 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(255.743, -27.1591, -185) + position: Qt.vector3d(255.743, -27.1591, 185) scale: Qt.vector3d(1.5, 1.5, 1.5) rotationOrder: Node.YZX source: "#Cylinder" diff --git a/tests/auto/quick3d_lancelot/data/layers/Multisample_aa_4x.qml b/tests/auto/quick3d_lancelot/data/layers/Multisample_aa_4x.qml index 0aaccc963..ada9a6796 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Multisample_aa_4x.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Multisample_aa_4x.qml @@ -78,7 +78,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -135,7 +135,7 @@ Rectangle { Model { id: cube position: Qt.vector3d(349.297, -228.053, 0) - rotation: Qt.vector3d(-28.0299, -33.3145, 17.1637) + rotation: Qt.vector3d(28.0299, 33.3145, 17.1637) scale: Qt.vector3d(2.00606, 1, 1) rotationOrder: Node.YZX source: "#Cube" @@ -157,7 +157,7 @@ Rectangle { Node { id: barrel - position: Qt.vector3d(-292.216, -304.023, 434) + position: Qt.vector3d(-292.216, -304.023, -434) rotation: Qt.vector3d(0, 0, -41.5) scale: Qt.vector3d(10, 10, 10) rotationOrder: Node.YZX @@ -167,7 +167,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "../shared/models/barrel/meshes/Barrel.mesh" @@ -189,7 +188,7 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(255.743, -27.1591, -185) + position: Qt.vector3d(255.743, -27.1591, 185) scale: Qt.vector3d(1.5, 1.5, 1.5) rotationOrder: Node.YZX source: "#Cylinder" diff --git a/tests/auto/quick3d_lancelot/data/layers/Multisample_aa_ssaa.qml b/tests/auto/quick3d_lancelot/data/layers/Multisample_aa_ssaa.qml index 59b64bb3e..b66435e9d 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Multisample_aa_ssaa.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Multisample_aa_ssaa.qml @@ -78,7 +78,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -135,7 +135,7 @@ Rectangle { Model { id: cube position: Qt.vector3d(349.297, -228.053, 0) - rotation: Qt.vector3d(-28.0299, -33.3145, 17.1637) + rotation: Qt.vector3d(28.0299, 33.3145, 17.1637) scale: Qt.vector3d(2.00606, 1, 1) rotationOrder: Node.YZX source: "#Cube" @@ -157,7 +157,7 @@ Rectangle { Node { id: barrel - position: Qt.vector3d(-292.216, -304.023, 434) + position: Qt.vector3d(-292.216, -304.023, -434) rotation: Qt.vector3d(0, 0, -41.5) scale: Qt.vector3d(10, 10, 10) rotationOrder: Node.YZX @@ -167,7 +167,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "../shared/models/barrel/meshes/Barrel.mesh" @@ -189,7 +188,7 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(255.743, -27.1591, -185) + position: Qt.vector3d(255.743, -27.1591, 185) scale: Qt.vector3d(1.5, 1.5, 1.5) rotationOrder: Node.YZX source: "#Cylinder" diff --git a/tests/auto/quick3d_lancelot/data/layers/Ssaa.qml b/tests/auto/quick3d_lancelot/data/layers/Ssaa.qml index bb96bf10c..c1b9cd932 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Ssaa.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Ssaa.qml @@ -77,7 +77,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -91,7 +91,7 @@ Rectangle { Model { id: cube position: Qt.vector3d(297.335, -44.7446, 0) - rotation: Qt.vector3d(-37.8299, -21.9861, 9.13355) + rotation: Qt.vector3d(37.8299, 21.9861, 9.13355) rotationOrder: Node.YZX source: "#Cube" @@ -129,7 +129,7 @@ Rectangle { PerspectiveCamera { id: camera_001 - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -142,7 +142,7 @@ Rectangle { Model { id: sphere - position: Qt.vector3d(12.67, 168.035, 34.9131) + position: Qt.vector3d(12.67, 168.035, -34.9131) rotationOrder: Node.YZX source: "#Sphere" diff --git a/tests/auto/quick3d_lancelot/data/layers/Temporal_aa.qml b/tests/auto/quick3d_lancelot/data/layers/Temporal_aa.qml index 0e433bccf..9d1cbdf96 100644 --- a/tests/auto/quick3d_lancelot/data/layers/Temporal_aa.qml +++ b/tests/auto/quick3d_lancelot/data/layers/Temporal_aa.qml @@ -77,7 +77,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -134,7 +134,7 @@ Rectangle { Model { id: cube position: Qt.vector3d(349.297, -228.053, 0) - rotation: Qt.vector3d(-28.0299, -33.3145, 17.1637) + rotation: Qt.vector3d(28.0299, 33.3145, 17.1637) scale: Qt.vector3d(2.00606, 1, 1) rotationOrder: Node.YZX source: "#Cube" @@ -156,7 +156,7 @@ Rectangle { Node { id: barrel - position: Qt.vector3d(-292.216, -304.023, 434) + position: Qt.vector3d(-292.216, -304.023, -434) rotation: Qt.vector3d(0, 0, -41.5) scale: Qt.vector3d(10, 10, 10) rotationOrder: Node.YZX @@ -166,7 +166,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "../shared/models/barrel/meshes/Barrel.mesh" @@ -188,7 +187,7 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(255.743, -27.1591, -185) + position: Qt.vector3d(255.743, -27.1591, 185) scale: Qt.vector3d(1.5, 1.5, 1.5) rotationOrder: Node.YZX source: "#Cylinder" diff --git a/tests/auto/quick3d_lancelot/data/lighting/Imagebasedlighting.qml b/tests/auto/quick3d_lancelot/data/lighting/Imagebasedlighting.qml index 378bb751e..a84e95de5 100644 --- a/tests/auto/quick3d_lancelot/data/lighting/Imagebasedlighting.qml +++ b/tests/auto/quick3d_lancelot/data/lighting/Imagebasedlighting.qml @@ -78,7 +78,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -1000) + position: Qt.vector3d(0, 0, 1000) rotationOrder: Node.YZX clipFar: 5000 fieldOfViewOrientation: PerspectiveCamera.Horizontal @@ -316,7 +316,7 @@ Rectangle { PerspectiveCamera { id: camera_001 - position: Qt.vector3d(0, 0, -1000) + position: Qt.vector3d(0, 0, 1000) rotationOrder: Node.YZX clipFar: 5000 fieldOfViewOrientation: PerspectiveCamera.Horizontal diff --git a/tests/auto/quick3d_lancelot/data/lighting/Lightmaps_default_material.qml b/tests/auto/quick3d_lancelot/data/lighting/Lightmaps_default_material.qml index 7bfeae72e..8973547e0 100644 --- a/tests/auto/quick3d_lancelot/data/lighting/Lightmaps_default_material.qml +++ b/tests/auto/quick3d_lancelot/data/lighting/Lightmaps_default_material.qml @@ -74,15 +74,15 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } Node { id: testCube2 - position: Qt.vector3d(8.92529, -33.3906, -88.9147) - rotation: Qt.vector3d(38.717, 127.514, -31.7476) + position: Qt.vector3d(8.92529, -33.3906, 88.9147) + rotation: Qt.vector3d(-38.717, -127.514, -31.7476) rotationOrder: Node.YZX Model { @@ -90,7 +90,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "models/testCube/meshes/Cube.mesh" @@ -136,8 +135,8 @@ Rectangle { Node { id: noShadow - position: Qt.vector3d(-270.428, 9.34266, -88.9069) - rotation: Qt.vector3d(38.717, 127.514, -31.7476) + position: Qt.vector3d(-270.428, 9.34266, 88.9069) + rotation: Qt.vector3d(-38.717, -127.514, -31.7476) rotationOrder: Node.YZX Model { @@ -145,7 +144,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "models/testCube/meshes/Cube.mesh" @@ -185,8 +183,8 @@ Rectangle { Node { id: indirectOnly - position: Qt.vector3d(266.005, 81.2868, -88.9395) - rotation: Qt.vector3d(-1.05041, -78.4043, -264.953) + position: Qt.vector3d(266.005, 81.2868, 88.9395) + rotation: Qt.vector3d(1.05041, 78.4043, -264.953) rotationOrder: Node.YZX Model { @@ -194,7 +192,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "models/testCube/meshes/Cube.mesh" @@ -228,8 +225,8 @@ Rectangle { Node { id: radiosityOnly - position: Qt.vector3d(223.385, -186.454, -88.9396) - rotation: Qt.vector3d(38.717, 127.514, -31.7476) + position: Qt.vector3d(223.385, -186.454, 88.9396) + rotation: Qt.vector3d(-38.717, -127.514, -31.7476) rotationOrder: Node.YZX Model { @@ -237,7 +234,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "models/testCube/meshes/Cube.mesh" @@ -271,8 +267,8 @@ Rectangle { Node { id: unLit - position: Qt.vector3d(-131.581, -186.634, -245.316) - rotation: Qt.vector3d(38.717, 127.514, -31.7476) + position: Qt.vector3d(-131.581, -186.634, 245.316) + rotation: Qt.vector3d(-38.717, -127.514, -31.7476) rotationOrder: Node.YZX Model { @@ -280,7 +276,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "models/testCube/meshes/Cube.mesh" diff --git a/tests/auto/quick3d_lancelot/data/lighting/Lightmaps_referenced_material.qml b/tests/auto/quick3d_lancelot/data/lighting/Lightmaps_referenced_material.qml index 2108dd6d0..605007db4 100644 --- a/tests/auto/quick3d_lancelot/data/lighting/Lightmaps_referenced_material.qml +++ b/tests/auto/quick3d_lancelot/data/lighting/Lightmaps_referenced_material.qml @@ -75,15 +75,15 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } Node { id: testCube2 - position: Qt.vector3d(-189.977, 8.13851, -88.9147) - rotation: Qt.vector3d(38.717, 127.514, -31.7476) + position: Qt.vector3d(-189.977, 8.13851, 88.9147) + rotation: Qt.vector3d(-38.717, -127.514, -31.7476) rotationOrder: Node.YZX Model { @@ -91,7 +91,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "models/testCube/meshes/Cube.mesh" @@ -124,8 +123,8 @@ Rectangle { Node { id: everything - position: Qt.vector3d(157.556, -3.88307, -88.9147) - rotation: Qt.vector3d(38.717, 127.514, -31.7476) + position: Qt.vector3d(157.556, -3.88307, 88.9147) + rotation: Qt.vector3d(-38.717, -127.514, -31.7476) rotationOrder: Node.YZX Model { @@ -133,7 +132,6 @@ Rectangle { rotation: Qt.vector3d(-90, 0, 0) scale: Qt.vector3d(100, 100, 100) rotationOrder: Node.XYZr - orientation: Node.RightHanded source: "models/testCube/meshes/Cube.mesh" diff --git a/tests/auto/quick3d_lancelot/data/lighting/ScopedLights.qml b/tests/auto/quick3d_lancelot/data/lighting/ScopedLights.qml index 65916bdf1..248c1130e 100644 --- a/tests/auto/quick3d_lancelot/data/lighting/ScopedLights.qml +++ b/tests/auto/quick3d_lancelot/data/lighting/ScopedLights.qml @@ -74,7 +74,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -155,7 +155,7 @@ Rectangle { PerspectiveCamera { id: camera_001 - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } diff --git a/tests/auto/quick3d_lancelot/data/qml/presentations/Qmlstream.qml b/tests/auto/quick3d_lancelot/data/qml/presentations/Qmlstream.qml index ff939f9e2..5bf798792 100644 --- a/tests/auto/quick3d_lancelot/data/qml/presentations/Qmlstream.qml +++ b/tests/auto/quick3d_lancelot/data/qml/presentations/Qmlstream.qml @@ -75,7 +75,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -89,7 +89,7 @@ Rectangle { Model { id: cube position: Qt.vector3d(-27.7308, 14.1974, 0) - rotation: Qt.vector3d(-7, -72, 127) + rotation: Qt.vector3d(7, 72, 127) rotationOrder: Node.YZX source: "#Cube" diff --git a/tests/auto/quick3d_lancelot/data/qml/presentations/Qmlstreamlayer.qml b/tests/auto/quick3d_lancelot/data/qml/presentations/Qmlstreamlayer.qml index f819ae7fe..07e0382c2 100644 --- a/tests/auto/quick3d_lancelot/data/qml/presentations/Qmlstreamlayer.qml +++ b/tests/auto/quick3d_lancelot/data/qml/presentations/Qmlstreamlayer.qml @@ -85,7 +85,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -99,7 +99,7 @@ Rectangle { Model { id: cube position: Qt.vector3d(-7.21698, 4.33, 0) - rotation: Qt.vector3d(-7, -72, 127) + rotation: Qt.vector3d(7, 72, 127) rotationOrder: Node.YZX source: "#Cube" diff --git a/tests/auto/quick3d_lancelot/data/shadows/Arealight.qml b/tests/auto/quick3d_lancelot/data/shadows/Arealight.qml index 5ee5f5377..d0efac861 100644 --- a/tests/auto/quick3d_lancelot/data/shadows/Arealight.qml +++ b/tests/auto/quick3d_lancelot/data/shadows/Arealight.qml @@ -75,7 +75,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -88,8 +88,8 @@ Rectangle { Model { id: rectangle - position: Qt.vector3d(-5.77344, -34.641, 0.5) - rotation: Qt.vector3d(53.5, 0, 0) + position: Qt.vector3d(-5.77344, -34.641, -0.5) + rotation: Qt.vector3d(-53.5, 0, 0) scale: Qt.vector3d(6.30691, 5.36799, 1) rotationOrder: Node.YZX source: "#Rectangle" @@ -111,8 +111,8 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(-85.1731, -1.2706, -124.483) - rotation: Qt.vector3d(-26.6212, 25.6451, -7.03436) + position: Qt.vector3d(-85.1731, -1.2706, 124.483) + rotation: Qt.vector3d(26.6212, -25.6451, -7.03436) scale: Qt.vector3d(1.16992, 0.986966, 1) rotationOrder: Node.YZX source: "#Cylinder" @@ -135,7 +135,7 @@ Rectangle { AreaLight { id: shadowcaster_area - position: Qt.vector3d(-97.5717, -48.1053, -179.905) + position: Qt.vector3d(-97.5717, -48.1053, 179.905) rotationOrder: Node.YZX width: 100 height: 100 diff --git a/tests/auto/quick3d_lancelot/data/shadows/Directionallight.qml b/tests/auto/quick3d_lancelot/data/shadows/Directionallight.qml index 592bddcde..b7b881748 100644 --- a/tests/auto/quick3d_lancelot/data/shadows/Directionallight.qml +++ b/tests/auto/quick3d_lancelot/data/shadows/Directionallight.qml @@ -74,7 +74,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -87,8 +87,8 @@ Rectangle { Model { id: rectangle - position: Qt.vector3d(-5.77344, -34.641, 0.5) - rotation: Qt.vector3d(53.5, 0, 0) + position: Qt.vector3d(-5.77344, -34.641, -0.5) + rotation: Qt.vector3d(-53.5, 0, 0) scale: Qt.vector3d(6.30691, 5.36799, 1) rotationOrder: Node.YZX source: "#Rectangle" @@ -110,7 +110,7 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(-28.4985, 11.4019, -70.381) + position: Qt.vector3d(-28.4985, 11.4019, 70.381) rotationOrder: Node.YZX source: "#Cylinder" @@ -132,7 +132,7 @@ Rectangle { DirectionalLight { id: shadowcaster_area - rotation: Qt.vector3d(46.101, 128.424, 60.9979) + rotation: Qt.vector3d(-46.101, -128.424, 60.9979) rotationOrder: Node.YZX castsShadow: true shadowFactor: 100 diff --git a/tests/auto/quick3d_lancelot/data/shadows/Pointlight.qml b/tests/auto/quick3d_lancelot/data/shadows/Pointlight.qml index 3fe40e4f2..aefd76592 100644 --- a/tests/auto/quick3d_lancelot/data/shadows/Pointlight.qml +++ b/tests/auto/quick3d_lancelot/data/shadows/Pointlight.qml @@ -74,7 +74,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -88,7 +88,7 @@ Rectangle { Model { id: rectangle position: Qt.vector3d(-5.77344, -34.641, 0) - rotation: Qt.vector3d(53.5, 0, 0) + rotation: Qt.vector3d(-53.5, 0, 0) scale: Qt.vector3d(6.30691, 5.36799, 1) rotationOrder: Node.YZX source: "#Rectangle" @@ -110,8 +110,8 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(26.809, 49.9481, 25.2529) - rotation: Qt.vector3d(-52.8354, 30.8347, -4.94139) + position: Qt.vector3d(26.809, 49.9481, -25.2529) + rotation: Qt.vector3d(52.8354, -30.8347, -4.94139) scale: Qt.vector3d(1.16992, 0.986966, 1) rotationOrder: Node.YZX source: "#Cylinder" @@ -134,7 +134,7 @@ Rectangle { PointLight { id: shadowcaster - position: Qt.vector3d(392.861, 210.03, -93.254) + position: Qt.vector3d(392.861, 210.03, 93.254) rotationOrder: Node.YZX color: Qt.rgba(1, 0.662745, 0.501961, 1) castsShadow: true diff --git a/tests/auto/quick3d_lancelot/data/shadows/Pointlight_2.qml b/tests/auto/quick3d_lancelot/data/shadows/Pointlight_2.qml index d41b0e910..7c09985d7 100644 --- a/tests/auto/quick3d_lancelot/data/shadows/Pointlight_2.qml +++ b/tests/auto/quick3d_lancelot/data/shadows/Pointlight_2.qml @@ -74,7 +74,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -88,7 +88,7 @@ Rectangle { Model { id: rectangle position: Qt.vector3d(-5.77344, -34.641, 0) - rotation: Qt.vector3d(53.5, 0, 0) + rotation: Qt.vector3d(-53.5, 0, 0) scale: Qt.vector3d(6.30691, 5.36799, 1) rotationOrder: Node.YZX source: "#Rectangle" @@ -110,8 +110,8 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(26.809, 49.9481, 25.2529) - rotation: Qt.vector3d(-52.8354, 30.8347, -4.94139) + position: Qt.vector3d(26.809, 49.9481, -25.2529) + rotation: Qt.vector3d(52.8354, -30.8347, -4.94139) scale: Qt.vector3d(1.16992, 0.986966, 1) rotationOrder: Node.YZX source: "#Cylinder" @@ -134,7 +134,7 @@ Rectangle { PointLight { id: shadowcaster_001 - position: Qt.vector3d(392.861, 210.03, -93.254) + position: Qt.vector3d(392.861, 210.03, 93.254) rotationOrder: Node.YZX color: Qt.rgba(1, 0.662745, 0.501961, 1) castsShadow: true diff --git a/tests/auto/quick3d_lancelot/data/shadows/Pointlight_nodepthprepass.qml b/tests/auto/quick3d_lancelot/data/shadows/Pointlight_nodepthprepass.qml index 9d6d2d815..98d4161bb 100644 --- a/tests/auto/quick3d_lancelot/data/shadows/Pointlight_nodepthprepass.qml +++ b/tests/auto/quick3d_lancelot/data/shadows/Pointlight_nodepthprepass.qml @@ -73,7 +73,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -87,7 +87,7 @@ Rectangle { Model { id: rectangle position: Qt.vector3d(-5.77344, -34.641, 0) - rotation: Qt.vector3d(53.5, 0, 0) + rotation: Qt.vector3d(-53.5, 0, 0) scale: Qt.vector3d(6.30691, 5.36799, 1) rotationOrder: Node.YZX source: "#Rectangle" @@ -109,8 +109,8 @@ Rectangle { Model { id: cylinder - position: Qt.vector3d(26.809, 49.9481, 25.2529) - rotation: Qt.vector3d(-52.8354, 30.8347, -4.94139) + position: Qt.vector3d(26.809, 49.9481, -25.2529) + rotation: Qt.vector3d(52.8354, -30.8347, -4.94139) scale: Qt.vector3d(1.16992, 0.986966, 1) rotationOrder: Node.YZX source: "#Cylinder" @@ -133,7 +133,7 @@ Rectangle { PointLight { id: shadowcaster - position: Qt.vector3d(392.861, 210.03, -93.254) + position: Qt.vector3d(392.861, 210.03, 93.254) rotationOrder: Node.YZX color: Qt.rgba(1, 0.662745, 0.501961, 1) castsShadow: true diff --git a/tests/auto/quick3d_lancelot/data/textures/Envmap.qml b/tests/auto/quick3d_lancelot/data/textures/Envmap.qml index a0d4632a9..6977be31d 100644 --- a/tests/auto/quick3d_lancelot/data/textures/Envmap.qml +++ b/tests/auto/quick3d_lancelot/data/textures/Envmap.qml @@ -74,7 +74,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } diff --git a/tests/auto/quick3d_lancelot/data/textures/Image_params_1.qml b/tests/auto/quick3d_lancelot/data/textures/Image_params_1.qml index 7307f4341..279f4ddf3 100644 --- a/tests/auto/quick3d_lancelot/data/textures/Image_params_1.qml +++ b/tests/auto/quick3d_lancelot/data/textures/Image_params_1.qml @@ -75,7 +75,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } diff --git a/tests/auto/quick3d_lancelot/data/textures/Image_params_2.qml b/tests/auto/quick3d_lancelot/data/textures/Image_params_2.qml index a46b421ee..d954e1ef9 100644 --- a/tests/auto/quick3d_lancelot/data/textures/Image_params_2.qml +++ b/tests/auto/quick3d_lancelot/data/textures/Image_params_2.qml @@ -75,7 +75,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } diff --git a/tests/auto/quick3d_lancelot/data/textures/Image_params_control.qml b/tests/auto/quick3d_lancelot/data/textures/Image_params_control.qml index 4e7f8e376..cda10f2cd 100644 --- a/tests/auto/quick3d_lancelot/data/textures/Image_params_control.qml +++ b/tests/auto/quick3d_lancelot/data/textures/Image_params_control.qml @@ -75,7 +75,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } diff --git a/tests/auto/quick3d_lancelot/data/textures/Opacitymap.qml b/tests/auto/quick3d_lancelot/data/textures/Opacitymap.qml index c924c7ac1..2ea6506ae 100644 --- a/tests/auto/quick3d_lancelot/data/textures/Opacitymap.qml +++ b/tests/auto/quick3d_lancelot/data/textures/Opacitymap.qml @@ -74,7 +74,7 @@ Rectangle { PerspectiveCamera { id: camera - position: Qt.vector3d(0, 0, -600) + position: Qt.vector3d(0, 0, 600) rotationOrder: Node.YZX clipFar: 5000 } @@ -87,8 +87,8 @@ Rectangle { Model { id: rectangle - position: Qt.vector3d(15.6206, 1.91976, -21.2664) - rotation: Qt.vector3d(62.5, 0, 0) + position: Qt.vector3d(15.6206, 1.91976, 21.2664) + rotation: Qt.vector3d(-62.5, 0, 0) scale: Qt.vector3d(6.24243, 4.98461, 1) rotationOrder: Node.YZX source: "#Rectangle" @@ -111,7 +111,7 @@ Rectangle { Model { id: sphere - position: Qt.vector3d(3.93619, 42.917, -251.294) + position: Qt.vector3d(3.93619, 42.917, 251.294) rotationOrder: Node.YZX source: "#Sphere" @@ -139,8 +139,8 @@ Rectangle { Model { id: cube - position: Qt.vector3d(-259.951, 176.081, -5.02271) - rotation: Qt.vector3d(-30.5, -34, 0) + position: Qt.vector3d(-259.951, 176.081, 5.02271) + rotation: Qt.vector3d(30.5, 34, 0) rotationOrder: Node.YZX source: "#Cube" diff --git a/tests/auto/quick3d_lancelot/data/view3d/ActiveCamera.qml b/tests/auto/quick3d_lancelot/data/view3d/ActiveCamera.qml index 0d17c2951..eea9e0092 100644 --- a/tests/auto/quick3d_lancelot/data/view3d/ActiveCamera.qml +++ b/tests/auto/quick3d_lancelot/data/view3d/ActiveCamera.qml @@ -72,8 +72,8 @@ Rectangle { id: camera2 x: -300 - z: -300 - rotation: Qt.vector3d(0, 45, 0) + z: 300 + rotation: Qt.vector3d(0, -45, 0) } DirectionalLight { diff --git a/tests/auto/quick3d_lancelot/data/view3d/RenderModeOverlay.qml b/tests/auto/quick3d_lancelot/data/view3d/RenderModeOverlay.qml index 89863a84d..76332e600 100644 --- a/tests/auto/quick3d_lancelot/data/view3d/RenderModeOverlay.qml +++ b/tests/auto/quick3d_lancelot/data/view3d/RenderModeOverlay.qml @@ -77,8 +77,8 @@ Rectangle { id: camera2 x: -300 - z: -300 - rotation: Qt.vector3d(0, 45, 0) + z: 300 + rotation: Qt.vector3d(0, -45, 0) } DirectionalLight { diff --git a/tests/auto/quick3d_lancelot/data/view3d/RenderModeRenderNode.qml b/tests/auto/quick3d_lancelot/data/view3d/RenderModeRenderNode.qml index cfa26b313..eb31c7680 100644 --- a/tests/auto/quick3d_lancelot/data/view3d/RenderModeRenderNode.qml +++ b/tests/auto/quick3d_lancelot/data/view3d/RenderModeRenderNode.qml @@ -77,8 +77,8 @@ Rectangle { id: camera2 x: -300 - z: -300 - rotation: Qt.vector3d(0, 45, 0) + z: 300 + rotation: Qt.vector3d(0, -45, 0) } DirectionalLight { diff --git a/tests/auto/quick3d_lancelot/data/view3d/RenderModeTexture.qml b/tests/auto/quick3d_lancelot/data/view3d/RenderModeTexture.qml index 9168d6c8a..34d4a442d 100644 --- a/tests/auto/quick3d_lancelot/data/view3d/RenderModeTexture.qml +++ b/tests/auto/quick3d_lancelot/data/view3d/RenderModeTexture.qml @@ -77,8 +77,8 @@ Rectangle { id: camera2 x: -300 - z: -300 - rotation: Qt.vector3d(0, 45, 0) + z: 300 + rotation: Qt.vector3d(0, -45, 0) } DirectionalLight { diff --git a/tests/auto/quick3d_lancelot/data/view3d/RenderModeUnderlay.qml b/tests/auto/quick3d_lancelot/data/view3d/RenderModeUnderlay.qml index f9e3a4be9..82c9acd7d 100644 --- a/tests/auto/quick3d_lancelot/data/view3d/RenderModeUnderlay.qml +++ b/tests/auto/quick3d_lancelot/data/view3d/RenderModeUnderlay.qml @@ -74,8 +74,8 @@ Rectangle { id: camera2 x: -300 - z: -300 - rotation: Qt.vector3d(0, 45, 0) + z: 300 + rotation: Qt.vector3d(0, -45, 0) } DirectionalLight { diff --git a/tests/auto/quick3d_lancelot/quick3d/tst_quick3d.cpp b/tests/auto/quick3d_lancelot/quick3d/tst_quick3d.cpp index 075d2fb7a..89ee786a3 100644 --- a/tests/auto/quick3d_lancelot/quick3d/tst_quick3d.cpp +++ b/tests/auto/quick3d_lancelot/quick3d/tst_quick3d.cpp @@ -182,6 +182,7 @@ bool tst_Quick3D::renderAndGrab(const QString& qmlFile, const QStringList& extra { bool usePipe = true; // Whether to transport the grabbed image using temp. file or pipe. TBD: cmdline option QProcess grabber; + grabber.setProcessChannelMode(QProcess::ForwardedErrorChannel); QString cmd = QCoreApplication::applicationDirPath() + "/qmlscenegrabber"; QStringList args = extraArgs; QString tmpfile = usePipe ? QString("-") : QString("/tmp/qmlscenegrabber-%1-out.ppm").arg(QCoreApplication::applicationPid()); diff --git a/tests/auto/quick3d_lancelot/scenegrabber/main.cpp b/tests/auto/quick3d_lancelot/scenegrabber/main.cpp index 6da0799bb..c2a57071f 100644 --- a/tests/auto/quick3d_lancelot/scenegrabber/main.cpp +++ b/tests/auto/quick3d_lancelot/scenegrabber/main.cpp @@ -36,6 +36,8 @@ #include <QtQuick/QQuickView> #include <QtQuick/QQuickItem> +#include <QtQuick3D/private/qquick3dviewport_p.h> + // Timeout values: // A valid screen grab requires the scene to not change @@ -141,6 +143,8 @@ int main(int argc, char *argv[]) QGuiApplication a(argc, argv); + QSurfaceFormat::setDefaultFormat(QQuick3DViewport::idealSurfaceFormat(4)); + // Parse command line QString ifile, ofile; bool noText = false; diff --git a/tests/auto/quick3d_lancelot/scenegrabber/scenegrabber.pro b/tests/auto/quick3d_lancelot/scenegrabber/scenegrabber.pro index 02e6d864f..0ec249135 100644 --- a/tests/auto/quick3d_lancelot/scenegrabber/scenegrabber.pro +++ b/tests/auto/quick3d_lancelot/scenegrabber/scenegrabber.pro @@ -3,6 +3,6 @@ DESTDIR=.. macos:CONFIG -= app_bundle CONFIG += console -QT += quick +QT += quick quick3d-private SOURCES += main.cpp -- GitLab