From 68ead5b04fb3e271524c19cc0b6d12a4c9c8a3c2 Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Sun, 21 Jun 2015 16:25:48 +0100 Subject: Map keyevents to correct signal names with namespaced arguments Task-number: QTBUG-46752 Change-Id: I5e331849cbde6ca24cfd6dca3b019e6e8377dd3f Reviewed-by: Paul Lemire --- src/input/qkeyboardinput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input/qkeyboardinput.cpp b/src/input/qkeyboardinput.cpp index bf80abecf..1ad9342f4 100644 --- a/src/input/qkeyboardinput.cpp +++ b/src/input/qkeyboardinput.cpp @@ -167,7 +167,7 @@ void QKeyboardInput::keyEvent(Q3DKeyEvent *event) QByteArray keySignal = keyToSignal(event->key()); if (!keySignal.isEmpty()) { - keySignal += "(Q3DKeyEvent*)"; + keySignal += "(Qt3D::Q3DKeyEvent*)"; // TO DO: Finding if the signal is connected to anything before doing the invocation // could be an improvement // That's what QQ2 does but since it accesses QML private classes to do so, that may not be -- cgit v1.2.3 From 520e2d32421f86958847b1bf9ee369606e0a83df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Thu, 11 Jun 2015 07:59:26 +0300 Subject: Planets QML example for Qt3D MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit + Improved earth clouds - Some weirdness with alpha, easily visible with rings. Might be the textures, although the alpha on them seems fine with image viewer. - Earth clouds seem to have the alpha issue as well. Change-Id: Ibdfa49472790d3fc797e269b52986b71d93876f2 Reviewed-by: Pasi Keränen Reviewed-by: Miikka Heikkinen (cherry picked from commit 30f9015933957eaf9533229f94b1bcd48a8ce3ed) --- examples/qt3d/planets-qml/CloudEffectDS.qml | 83 + examples/qt3d/planets-qml/FpsDisplay.qml | 102 + examples/qt3d/planets-qml/InfoSheet.qml | 108 + examples/qt3d/planets-qml/Light.qml | 63 + examples/qt3d/planets-qml/Planet.qml | 51 + examples/qt3d/planets-qml/PlanetButton.qml | 88 + examples/qt3d/planets-qml/PlanetEffectD.qml | 104 + examples/qt3d/planets-qml/PlanetEffectDB.qml | 104 + examples/qt3d/planets-qml/PlanetEffectDS.qml | 99 + examples/qt3d/planets-qml/PlanetEffectDSB.qml | 99 + examples/qt3d/planets-qml/PlanetMaterial.qml | 122 + examples/qt3d/planets-qml/PlanetsMain.qml | 346 ++ examples/qt3d/planets-qml/Ring.qml | 145 + examples/qt3d/planets-qml/ShadowMapFrameGraph.qml | 103 + examples/qt3d/planets-qml/SolarSystem.qml | 993 +++++ examples/qt3d/planets-qml/StyledSlider.qml | 76 + examples/qt3d/planets-qml/doc/src/planets-qml.qdoc | 44 + examples/qt3d/planets-qml/images/earth.png | Bin 0 -> 45904 bytes .../planets-qml/images/earthcloudmapcolortrans.png | Bin 0 -> 1041258 bytes .../qt3d/planets-qml/images/earthcloudmapspec.jpg | Bin 0 -> 102821 bytes examples/qt3d/planets-qml/images/earthmap1k.jpg | Bin 0 -> 341782 bytes examples/qt3d/planets-qml/images/earthnormal1k.jpg | Bin 0 -> 176666 bytes examples/qt3d/planets-qml/images/earthspec1k.jpg | Bin 0 -> 100936 bytes .../qt3d/planets-qml/images/galaxy_starfield.png | Bin 0 -> 673311 bytes examples/qt3d/planets-qml/images/jupiter.png | Bin 0 -> 30298 bytes examples/qt3d/planets-qml/images/jupitermap.jpg | Bin 0 -> 157780 bytes examples/qt3d/planets-qml/images/mars.png | Bin 0 -> 35278 bytes examples/qt3d/planets-qml/images/marsmap1k.jpg | Bin 0 -> 501328 bytes examples/qt3d/planets-qml/images/marsnormal1k.jpg | Bin 0 -> 226859 bytes examples/qt3d/planets-qml/images/mercury.png | Bin 0 -> 62354 bytes examples/qt3d/planets-qml/images/mercurymap.jpg | Bin 0 -> 285975 bytes examples/qt3d/planets-qml/images/mercurynormal.jpg | Bin 0 -> 961068 bytes examples/qt3d/planets-qml/images/moonmap1k.jpg | Bin 0 -> 389305 bytes examples/qt3d/planets-qml/images/moonnormal1k.jpg | Bin 0 -> 847618 bytes examples/qt3d/planets-qml/images/neptune.png | Bin 0 -> 23206 bytes examples/qt3d/planets-qml/images/neptunemap.jpg | Bin 0 -> 48069 bytes examples/qt3d/planets-qml/images/saturn.png | Bin 0 -> 39191 bytes examples/qt3d/planets-qml/images/saturnmap.jpg | Bin 0 -> 40837 bytes .../planets-qml/images/saturnringcolortrans.png | Bin 0 -> 346482 bytes examples/qt3d/planets-qml/images/sun.png | Bin 0 -> 55203 bytes examples/qt3d/planets-qml/images/sunmap.jpg | Bin 0 -> 281479 bytes examples/qt3d/planets-qml/images/uranus.png | Bin 0 -> 32131 bytes examples/qt3d/planets-qml/images/uranusmap.jpg | Bin 0 -> 8942 bytes .../planets-qml/images/uranusringcolortrans.png | Bin 0 -> 318560 bytes examples/qt3d/planets-qml/images/venus.png | Bin 0 -> 45622 bytes examples/qt3d/planets-qml/images/venusmap.jpg | Bin 0 -> 255067 bytes examples/qt3d/planets-qml/images/venusnormal.jpg | Bin 0 -> 742335 bytes examples/qt3d/planets-qml/main.cpp | 51 + examples/qt3d/planets-qml/meshes/ring.obj | 841 ++++ examples/qt3d/planets-qml/meshes/starfield.obj | 4055 ++++++++++++++++++++ examples/qt3d/planets-qml/planets-qml-images.qrc | 34 + examples/qt3d/planets-qml/planets-qml.pro | 20 + examples/qt3d/planets-qml/planets-qml.qrc | 31 + examples/qt3d/planets-qml/planets.js | 166 + examples/qt3d/planets-qml/shaders/planetD.frag | 105 + examples/qt3d/planets-qml/shaders/planetD.vert | 71 + examples/qt3d/planets-qml/shaders/planetDB.frag | 107 + examples/qt3d/planets-qml/shaders/planetDB.vert | 96 + examples/qt3d/planets-qml/shaders/planetDS.frag | 104 + examples/qt3d/planets-qml/shaders/planetDSB.frag | 110 + examples/qt3d/planets-qml/shaders/shadowmap.frag | 41 + examples/qt3d/planets-qml/shaders/shadowmap.vert | 46 + examples/qt3d/qt3d.pro | 3 +- 63 files changed, 8610 insertions(+), 1 deletion(-) create mode 100644 examples/qt3d/planets-qml/CloudEffectDS.qml create mode 100644 examples/qt3d/planets-qml/FpsDisplay.qml create mode 100644 examples/qt3d/planets-qml/InfoSheet.qml create mode 100644 examples/qt3d/planets-qml/Light.qml create mode 100644 examples/qt3d/planets-qml/Planet.qml create mode 100644 examples/qt3d/planets-qml/PlanetButton.qml create mode 100644 examples/qt3d/planets-qml/PlanetEffectD.qml create mode 100644 examples/qt3d/planets-qml/PlanetEffectDB.qml create mode 100644 examples/qt3d/planets-qml/PlanetEffectDS.qml create mode 100644 examples/qt3d/planets-qml/PlanetEffectDSB.qml create mode 100644 examples/qt3d/planets-qml/PlanetMaterial.qml create mode 100644 examples/qt3d/planets-qml/PlanetsMain.qml create mode 100644 examples/qt3d/planets-qml/Ring.qml create mode 100644 examples/qt3d/planets-qml/ShadowMapFrameGraph.qml create mode 100644 examples/qt3d/planets-qml/SolarSystem.qml create mode 100644 examples/qt3d/planets-qml/StyledSlider.qml create mode 100644 examples/qt3d/planets-qml/doc/src/planets-qml.qdoc create mode 100644 examples/qt3d/planets-qml/images/earth.png create mode 100644 examples/qt3d/planets-qml/images/earthcloudmapcolortrans.png create mode 100644 examples/qt3d/planets-qml/images/earthcloudmapspec.jpg create mode 100644 examples/qt3d/planets-qml/images/earthmap1k.jpg create mode 100644 examples/qt3d/planets-qml/images/earthnormal1k.jpg create mode 100644 examples/qt3d/planets-qml/images/earthspec1k.jpg create mode 100644 examples/qt3d/planets-qml/images/galaxy_starfield.png create mode 100644 examples/qt3d/planets-qml/images/jupiter.png create mode 100644 examples/qt3d/planets-qml/images/jupitermap.jpg create mode 100644 examples/qt3d/planets-qml/images/mars.png create mode 100644 examples/qt3d/planets-qml/images/marsmap1k.jpg create mode 100644 examples/qt3d/planets-qml/images/marsnormal1k.jpg create mode 100644 examples/qt3d/planets-qml/images/mercury.png create mode 100644 examples/qt3d/planets-qml/images/mercurymap.jpg create mode 100644 examples/qt3d/planets-qml/images/mercurynormal.jpg create mode 100644 examples/qt3d/planets-qml/images/moonmap1k.jpg create mode 100644 examples/qt3d/planets-qml/images/moonnormal1k.jpg create mode 100644 examples/qt3d/planets-qml/images/neptune.png create mode 100644 examples/qt3d/planets-qml/images/neptunemap.jpg create mode 100644 examples/qt3d/planets-qml/images/saturn.png create mode 100644 examples/qt3d/planets-qml/images/saturnmap.jpg create mode 100644 examples/qt3d/planets-qml/images/saturnringcolortrans.png create mode 100644 examples/qt3d/planets-qml/images/sun.png create mode 100644 examples/qt3d/planets-qml/images/sunmap.jpg create mode 100644 examples/qt3d/planets-qml/images/uranus.png create mode 100644 examples/qt3d/planets-qml/images/uranusmap.jpg create mode 100644 examples/qt3d/planets-qml/images/uranusringcolortrans.png create mode 100644 examples/qt3d/planets-qml/images/venus.png create mode 100644 examples/qt3d/planets-qml/images/venusmap.jpg create mode 100644 examples/qt3d/planets-qml/images/venusnormal.jpg create mode 100644 examples/qt3d/planets-qml/main.cpp create mode 100644 examples/qt3d/planets-qml/meshes/ring.obj create mode 100644 examples/qt3d/planets-qml/meshes/starfield.obj create mode 100644 examples/qt3d/planets-qml/planets-qml-images.qrc create mode 100644 examples/qt3d/planets-qml/planets-qml.pro create mode 100644 examples/qt3d/planets-qml/planets-qml.qrc create mode 100644 examples/qt3d/planets-qml/planets.js create mode 100644 examples/qt3d/planets-qml/shaders/planetD.frag create mode 100644 examples/qt3d/planets-qml/shaders/planetD.vert create mode 100644 examples/qt3d/planets-qml/shaders/planetDB.frag create mode 100644 examples/qt3d/planets-qml/shaders/planetDB.vert create mode 100644 examples/qt3d/planets-qml/shaders/planetDS.frag create mode 100644 examples/qt3d/planets-qml/shaders/planetDSB.frag create mode 100644 examples/qt3d/planets-qml/shaders/shadowmap.frag create mode 100644 examples/qt3d/planets-qml/shaders/shadowmap.vert diff --git a/examples/qt3d/planets-qml/CloudEffectDS.qml b/examples/qt3d/planets-qml/CloudEffectDS.qml new file mode 100644 index 000000000..3088f996a --- /dev/null +++ b/examples/qt3d/planets-qml/CloudEffectDS.qml @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt3D 2.0 +import Qt3D.Render 2.0 + +Effect { + id: root + + property Texture2D shadowTexture + property Light light + + parameters: [ + Parameter { name: "lightPosition"; value: root.light.lightPosition }, + Parameter { name: "lightIntensity"; value: root.light.lightIntensity } + ] + + techniques: [ + Technique { + openGLFilter { + api: OpenGLFilter.Desktop + profile: OpenGLFilter.Core + majorVersion: 3 + minorVersion: 2 + } + + renderPasses: [ + RenderPass { + annotations: [ Annotation { name : "pass"; value : "forward" } ] + bindings: [ + // Uniforms (those provided by the user) + ParameterMapping { + parameterName: "ambient"; + shaderVariableName: "ka"; + bindingType: ParameterMapping.Uniform + } + ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/planetD.vert") + fragmentShaderCode: loadSource("qrc:/shaders/planetDS.frag") + } + + // no special render state set => use the default set of states + } + ] + } + ] +} diff --git a/examples/qt3d/planets-qml/FpsDisplay.qml b/examples/qt3d/planets-qml/FpsDisplay.qml new file mode 100644 index 000000000..6dc5d7f3a --- /dev/null +++ b/examples/qt3d/planets-qml/FpsDisplay.qml @@ -0,0 +1,102 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: fpsDisplayControl + property bool hidden: true + property real fps: 0.0 + + onHiddenChanged: { + if (fpsDisplayControl.hidden) + fpsDisplay.color = "transparent" + else + fpsDisplay.color = "#000000FF" + } + + onFpsChanged: { + fpsDisplay.updateFps() + } + + Rectangle { + anchors.fill: parent + id: fpsDisplay + color: "transparent" + + property real maxFps: 60.0 + property color maxFpsColor: "#5500FF00" + property color minFpsColor: "#55FF0000" + + function updateFps() { + var scale = (fps > maxFps)?1.0:(fps/maxFps) + var r = (1 - scale) * minFpsColor.r + scale * maxFpsColor.r + var g = (1 - scale) * minFpsColor.g + scale * maxFpsColor.g + var b = (1 - scale) * minFpsColor.b + scale * maxFpsColor.b + var a = (1 - scale) * minFpsColor.a + scale * maxFpsColor.a + fpsCauge.height = scale * fpsDisplay.height + fpsCauge.color = Qt.rgba(r, g, b, a) + } + + Rectangle { + id: fpsCauge + width: parent.width + anchors.bottom: parent.bottom + visible: !fpsDisplayControl.hidden + } + + Text { + id: fpsText + text: ""+(fps | 0) + font.family: "Helvetica" + font.pixelSize: 16 + font.weight: Font.Light + color: "white" + anchors.fill: parent + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + visible: !fpsDisplayControl.hidden + } + } + + MouseArea { + anchors.fill: parent + onClicked: { + fpsDisplayControl.hidden = !fpsDisplayControl.hidden + } + } +} + diff --git a/examples/qt3d/planets-qml/InfoSheet.qml b/examples/qt3d/planets-qml/InfoSheet.qml new file mode 100644 index 000000000..53aabf63e --- /dev/null +++ b/examples/qt3d/planets-qml/InfoSheet.qml @@ -0,0 +1,108 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + id: infoSheet + + width: 200 + height: 450 + anchors.verticalCenter: parent.verticalCenter + + property alias planet: planetText.planet + property alias radius: infoText.radius + property alias temperature: infoText.temperature + property alias orbitalPeriod: infoText.orbitalPeriod + property alias distance: infoText.distance + property alias exampleDetails: infoText.exampleDetails + + Behavior on opacity { PropertyAnimation {} } + + color: "black" + + Text { + id: planetText + anchors.top: parent.top + anchors.topMargin: 20 + anchors.horizontalCenter: parent.horizontalCenter + + property string planet: "" + + font.family: "Helvetica" + font.pixelSize: 32 + font.weight: Font.Light + color: "white" + + text: "

" + planet + "

" + } + + Text { + id: infoText + anchors.top: planetText.bottom + anchors.horizontalCenter: parent.horizontalCenter + + property string radius: "" + property string temperature: "" + property string orbitalPeriod: "" + property string distance: "" + property string exampleDetails: "" + + font.family: "Helvetica" + font.pixelSize: 16 + font.weight: Font.Light + lineHeight: 1.625 * 16 + lineHeightMode: Text.FixedHeight + color: "white" + + text: { + if (planet == "Solar System") { + "

" + exampleDetails + "

" + } else if (planet == "Sun") { + "

Equatorial Diameter:

" + radius + "


" + + "

Surface Temperature:

" + temperature + "

" + } else { + "

Equatorial Diameter:

" + radius + "


" + + "

Surface Temperature:

" + temperature + "


" + + "

Solar Orbit Period:

" + orbitalPeriod + "


" + + "

Distance from Sun:

" + distance + "

" + } + } + + onLinkActivated: Qt.openUrlExternally(link) + } +} + diff --git a/examples/qt3d/planets-qml/Light.qml b/examples/qt3d/planets-qml/Light.qml new file mode 100644 index 000000000..ab63bf1e0 --- /dev/null +++ b/examples/qt3d/planets-qml/Light.qml @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt3D 2.0 +import Qt3D.Render 2.0 + +Entity { + id: root + + property vector3d lightPosition: Qt.vector3d(0.0, 0.0, 0.0) + property vector3d lightIntensity: Qt.vector3d(1.0, 1.0, 1.0) + + readonly property Camera lightCamera: lightCamera + readonly property matrix4x4 lightViewProjection: + lightCamera.projectionMatrix.times(lightCamera.matrix) + + Camera { + id: lightCamera + objectName: "lightCameraLens" + projectionType: CameraLens.PerspectiveProjection + fieldOfView: 45 + aspectRatio: 1 + nearPlane : 0.1 + farPlane : 20000000.0 + position: root.lightPosition + viewCenter: Qt.vector3d(0.0, 0.0, 0.0) + upVector: Qt.vector3d(0.0, 1.0, 0.0) + } +} diff --git a/examples/qt3d/planets-qml/Planet.qml b/examples/qt3d/planets-qml/Planet.qml new file mode 100644 index 000000000..005312b5d --- /dev/null +++ b/examples/qt3d/planets-qml/Planet.qml @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt3D.Render 2.0 + +SphereMesh { + property real r: 0 + property real x: 0 + property real y: 0 + property real z: 0 + property real roll: 0 + property real tilt: 0 + + radius: 1.0 + generateTangents: true + rings: 64 + slices: 64 +} diff --git a/examples/qt3d/planets-qml/PlanetButton.qml b/examples/qt3d/planets-qml/PlanetButton.qml new file mode 100644 index 000000000..f68c70052 --- /dev/null +++ b/examples/qt3d/planets-qml/PlanetButton.qml @@ -0,0 +1,88 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + id: planetButton + + property alias text: planetText.text + property alias source: planetImage.source + property alias focusPlanet: planetImage.focusPlanet + property Item planetSelector: parent.parent + property int buttonSize: 70 + + width: buttonSize + height: buttonSize + color: "transparent" + + Image { + id: planetImage + anchors.fill: parent + property int focusPlanet + + MouseArea { + anchors.fill: parent + hoverEnabled: true + onClicked: { planetSelector.focusedPlanet = focusPlanet } + onEntered: PropertyAnimation { target: planetText; property: "opacity"; to: 1 } + onExited: PropertyAnimation { target: planetText; + property: "opacity" + to: { + if (planetText.text != "Solar System") + 0 + else + 1 + } + } + } + } + + Text { + id: planetText + anchors.centerIn: parent + font.family: "Helvetica" + font.pixelSize: 16 + font.weight: Font.Light + color: "white" + opacity: { + if (text == "Solar System") + opacity = 1 + else + opacity = 0 + } + } +} diff --git a/examples/qt3d/planets-qml/PlanetEffectD.qml b/examples/qt3d/planets-qml/PlanetEffectD.qml new file mode 100644 index 000000000..5d3f64f89 --- /dev/null +++ b/examples/qt3d/planets-qml/PlanetEffectD.qml @@ -0,0 +1,104 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt3D 2.0 +import Qt3D.Render 2.0 + +Effect { + id: root + + property Texture2D shadowTexture + property Light light + + parameters: [ + Parameter { name: "lightViewProjection"; value: root.light.lightViewProjection }, + Parameter { name: "lightPosition"; value: root.light.lightPosition }, + Parameter { name: "lightIntensity"; value: root.light.lightIntensity }, + Parameter { name: "shadowMapTexture"; value: root.shadowTexture } + ] + + techniques: [ + Technique { + openGLFilter { + api: OpenGLFilter.Desktop + profile: OpenGLFilter.Core + majorVersion: 3 + minorVersion: 2 + } + + renderPasses: [ + RenderPass { + annotations: [ Annotation { name: "pass"; value: "shadowmap" } ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/shadowmap.vert") + fragmentShaderCode: loadSource("qrc:/shaders/shadowmap.frag") + } + + renderStates: [ + PolygonOffset { factor: 4; units: 4 }, + DepthTest { func: DepthTest.Less } + ] + }, + RenderPass { + annotations: [ Annotation { name : "pass"; value : "forward" } ] + + bindings: [ + // Uniforms (those provided by the user) + ParameterMapping { + parameterName: "ambient"; + shaderVariableName: "ka"; + bindingType: ParameterMapping.Uniform + }, + ParameterMapping { + parameterName: "specular"; + shaderVariableName: "ks"; + bindingType: ParameterMapping.Uniform + } + ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/planetD.vert") + fragmentShaderCode: loadSource("qrc:/shaders/planetD.frag") + } + + // no special render state set => use the default set of states + } + ] + } + ] +} diff --git a/examples/qt3d/planets-qml/PlanetEffectDB.qml b/examples/qt3d/planets-qml/PlanetEffectDB.qml new file mode 100644 index 000000000..a36cdf427 --- /dev/null +++ b/examples/qt3d/planets-qml/PlanetEffectDB.qml @@ -0,0 +1,104 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt3D 2.0 +import Qt3D.Render 2.0 + +Effect { + id: root + + property Texture2D shadowTexture + property Light light + + parameters: [ + Parameter { name: "lightViewProjection"; value: root.light.lightViewProjection }, + Parameter { name: "lightPosition"; value: root.light.lightPosition }, + Parameter { name: "lightIntensity"; value: root.light.lightIntensity }, + Parameter { name: "shadowMapTexture"; value: root.shadowTexture } + ] + + techniques: [ + Technique { + openGLFilter { + api: OpenGLFilter.Desktop + profile: OpenGLFilter.Core + majorVersion: 3 + minorVersion: 2 + } + + renderPasses: [ + RenderPass { + annotations: [ Annotation { name: "pass"; value: "shadowmap" } ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/shadowmap.vert") + fragmentShaderCode: loadSource("qrc:/shaders/shadowmap.frag") + } + + renderStates: [ + PolygonOffset { factor: 4; units: 4 }, + DepthTest { func: DepthTest.Less } + ] + }, + RenderPass { + annotations: [ Annotation { name : "pass"; value : "forward" } ] + + bindings: [ + // Uniforms (those provided by the user) + ParameterMapping { + parameterName: "ambient"; + shaderVariableName: "ka"; + bindingType: ParameterMapping.Uniform + }, + ParameterMapping { + parameterName: "specular"; + shaderVariableName: "ks"; + bindingType: ParameterMapping.Uniform + } + ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/planetDB.vert") + fragmentShaderCode: loadSource("qrc:/shaders/planetDB.frag") + } + + // no special render state set => use the default set of states + } + ] + } + ] +} diff --git a/examples/qt3d/planets-qml/PlanetEffectDS.qml b/examples/qt3d/planets-qml/PlanetEffectDS.qml new file mode 100644 index 000000000..670fccc15 --- /dev/null +++ b/examples/qt3d/planets-qml/PlanetEffectDS.qml @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt3D 2.0 +import Qt3D.Render 2.0 + +Effect { + id: root + + property Texture2D shadowTexture + property Light light + + parameters: [ + Parameter { name: "lightViewProjection"; value: root.light.lightViewProjection }, + Parameter { name: "lightPosition"; value: root.light.lightPosition }, + Parameter { name: "lightIntensity"; value: root.light.lightIntensity }, + Parameter { name: "shadowMapTexture"; value: root.shadowTexture } + ] + + techniques: [ + Technique { + openGLFilter { + api: OpenGLFilter.Desktop + profile: OpenGLFilter.Core + majorVersion: 3 + minorVersion: 2 + } + + renderPasses: [ + RenderPass { + annotations: [ Annotation { name: "pass"; value: "shadowmap" } ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/shadowmap.vert") + fragmentShaderCode: loadSource("qrc:/shaders/shadowmap.frag") + } + + renderStates: [ + PolygonOffset { factor: 4; units: 4 }, + DepthTest { func: DepthTest.Less } + ] + }, + RenderPass { + annotations: [ Annotation { name : "pass"; value : "forward" } ] + + bindings: [ + // Uniforms (those provided by the user) + ParameterMapping { + parameterName: "ambient"; + shaderVariableName: "ka"; + bindingType: ParameterMapping.Uniform + } + ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/planetD.vert") + fragmentShaderCode: loadSource("qrc:/shaders/planetDS.frag") + } + + // no special render state set => use the default set of states + } + ] + } + ] +} diff --git a/examples/qt3d/planets-qml/PlanetEffectDSB.qml b/examples/qt3d/planets-qml/PlanetEffectDSB.qml new file mode 100644 index 000000000..1b035406a --- /dev/null +++ b/examples/qt3d/planets-qml/PlanetEffectDSB.qml @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt3D 2.0 +import Qt3D.Render 2.0 + +Effect { + id: root + + property Texture2D shadowTexture + property Light light + + parameters: [ + Parameter { name: "lightViewProjection"; value: root.light.lightViewProjection }, + Parameter { name: "lightPosition"; value: root.light.lightPosition }, + Parameter { name: "lightIntensity"; value: root.light.lightIntensity }, + Parameter { name: "shadowMapTexture"; value: root.shadowTexture } + ] + + techniques: [ + Technique { + openGLFilter { + api: OpenGLFilter.Desktop + profile: OpenGLFilter.Core + majorVersion: 3 + minorVersion: 2 + } + + renderPasses: [ + RenderPass { + annotations: [ Annotation { name: "pass"; value: "shadowmap" } ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/shadowmap.vert") + fragmentShaderCode: loadSource("qrc:/shaders/shadowmap.frag") + } + + renderStates: [ + PolygonOffset { factor: 4; units: 4 }, + DepthTest { func: DepthTest.Less } + ] + }, + RenderPass { + annotations: [ Annotation { name : "pass"; value : "forward" } ] + + bindings: [ + // Uniforms (those provided by the user) + ParameterMapping { + parameterName: "ambient"; + shaderVariableName: "ka"; + bindingType: ParameterMapping.Uniform + } + ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/planetDB.vert") + fragmentShaderCode: loadSource("qrc:/shaders/planetDSB.frag") + } + + // no special render state set => use the default set of states + } + ] + } + ] +} diff --git a/examples/qt3d/planets-qml/PlanetMaterial.qml b/examples/qt3d/planets-qml/PlanetMaterial.qml new file mode 100644 index 000000000..5fd259e45 --- /dev/null +++ b/examples/qt3d/planets-qml/PlanetMaterial.qml @@ -0,0 +1,122 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt3D 2.0 +import Qt3D.Render 2.0 +import QtQuick 2.1 + +Material { + id: root + property color ambientLight: Qt.rgba(0.1, 0.1, 0.1, 1.0) + property color diffuseColor: Qt.rgba(0.7, 0.7, 0.7, 1.0) + property color specularColor: Qt.rgba(0.5, 0.5, 0.5, 1.0) + property real shininess: 150.0 + property alias diffuseMap: diffuseTextureImage.source + property alias specularMap: specularTextureImage.source + property alias normalMap: normalTextureImage.source + property real textureScale: 1.0 + property real opacity: 1.0 + + parameters: [ + Parameter { + name: "ambient"; + value: Qt.vector3d(root.ambientLight.r, root.ambientLight.g, root.ambientLight.b) + }, + Parameter { + name: "diffuse"; + value: Qt.vector3d(root.diffuseColor.r, root.diffuseColor.g, root.diffuseColor.b) + }, + Parameter { + name: "specular"; + value: Qt.vector3d(root.specularColor.r, root.specularColor.g, root.specularColor.b) + }, + Parameter { + name: "shininess"; + value: root.shininess + }, + Parameter { + name: "diffuseTexture" + value: Texture2D { + id: diffuseTexture + minificationFilter: Texture.LinearMipMapLinear + magnificationFilter: Texture.Linear + wrapMode { + x: WrapMode.Repeat + y: WrapMode.Repeat + } + generateMipMaps: true + maximumAnisotropy: 16.0 + TextureImage { id: diffuseTextureImage; } + } + }, + Parameter { name: "specularTexture"; + value: Texture2D { + id: specularTexture + minificationFilter: Texture.LinearMipMapLinear + magnificationFilter: Texture.Linear + wrapMode { + x: WrapMode.Repeat + y: WrapMode.Repeat + } + generateMipMaps: true + maximumAnisotropy: 16.0 + TextureImage { id: specularTextureImage; } + } + }, + Parameter { name: "normalTexture"; + value: Texture2D { + id: normalTexture + minificationFilter: Texture.Linear + magnificationFilter: Texture.Linear + wrapMode { + x: WrapMode.Repeat + y: WrapMode.Repeat + } + maximumAnisotropy: 16.0 + TextureImage { id: normalTextureImage; } + } + }, + Parameter { + name: "texCoordScale"; + value: textureScale + }, + Parameter { + name: "opacity"; + value: opacity + } + ] +} diff --git a/examples/qt3d/planets-qml/PlanetsMain.qml b/examples/qt3d/planets-qml/PlanetsMain.qml new file mode 100644 index 000000000..3c8ab417b --- /dev/null +++ b/examples/qt3d/planets-qml/PlanetsMain.qml @@ -0,0 +1,346 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Scene3D 2.0 + +Item { + id: mainview + width: 1280 + height: 768 + visible: true + property int focusedPlanet: 100 + property int oldPlanet: 0 + property int frames: 0 + + Rectangle { + anchors.fill: parent + color: "black" + + Scene3D { + anchors.fill: parent + anchors.margins: 10 + focus: true + aspects: "input" + + SolarSystem { id: solarsystem } + } + + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.LeftButton + onClicked: { + solarsystem.setFreeCamera(false) + focusedPlanet = 100 + } + onDoubleClicked: + solarsystem.setFreeCamera(true) + } + } + + onFocusedPlanetChanged: { + solarsystem.setFreeCamera(false) + if (focusedPlanet == 100) { + info.opacity = 0 + updatePlanetInfo() + } else { + updatePlanetInfo() + info.opacity = 0.5 + } + + solarsystem.changePlanetFocus(oldPlanet, focusedPlanet) + oldPlanet = focusedPlanet + } + + ListModel { + id: planetModel + + ListElement { + name: "Sun" + radius: "109 x Earth" + temperature: "5 778 K" + orbitalPeriod: "" + distance: "" + planetImageSource: "qrc:/images/sun.png" + planetNumber: 0 + } + ListElement { + name: "Mercury" + radius: "0.3829 x Earth" + temperature: "80-700 K" + orbitalPeriod: "87.969 d" + distance: "0.387 098 AU" + planetImageSource: "qrc:/images/mercury.png" + planetNumber: 1 + } + ListElement { + name: "Venus" + radius: "0.9499 x Earth" + temperature: "737 K" + orbitalPeriod: "224.701 d" + distance: "0.723 327 AU" + planetImageSource: "qrc:/images/venus.png" + planetNumber: 2 + } + ListElement { + name: "Earth" + radius: "6 378.1 km" + temperature: "184-330 K" + orbitalPeriod: "365.256 d" + distance: "149598261 km (1 AU)" + planetImageSource: "qrc:/images/earth.png" + planetNumber: 3 + } + ListElement { + name: "Mars" + radius: "0.533 x Earth" + temperature: "130-308 K" + orbitalPeriod: "686.971 d" + distance: "1.523679 AU" + planetImageSource: "qrc:/images/mars.png" + planetNumber: 4 + } + ListElement { + name: "Jupiter" + radius: "11.209 x Earth" + temperature: "112-165 K" + orbitalPeriod: "4332.59 d" + distance: "5.204267 AU" + planetImageSource: "qrc:/images/jupiter.png" + planetNumber: 5 + } + ListElement { + name: "Saturn" + radius: "9.4492 x Earth" + temperature: "84-134 K" + orbitalPeriod: "10759.22 d" + distance: "9.5820172 AU" + planetImageSource: "qrc:/images/saturn.png" + planetNumber: 6 + } + ListElement { + name: "Uranus" + radius: "4.007 x Earth" + temperature: "49-76 K" + orbitalPeriod: "30687.15 d" + distance: "19.189253 AU" + planetImageSource: "qrc:/images/uranus.png" + planetNumber: 7 + } + ListElement { + name: "Neptune" + radius: "3.883 x Earth" + temperature: "55-72 K" + orbitalPeriod: "60190.03 d" + distance: "30.070900 AU" + planetImageSource: "qrc:/images/neptune.png" + planetNumber: 8 + } + ListElement { + name: "Solar System" + planetImageSource: "" + planetNumber: 100 // Defaults to solar system + } + } + + Component { + id: planetButtonDelegate + PlanetButton { + source: planetImageSource + text: name + focusPlanet: planetNumber + planetSelector: mainview + } + } + + ListView { + id: planetButtonView + anchors.top: parent.top + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.rightMargin: 15 + anchors.bottomMargin: 10 + spacing: 10 + width: 100 + interactive: false + model: planetModel + delegate: planetButtonDelegate + } + + InfoSheet { + id: info + width: 400 + anchors.right: planetButtonView.left + anchors.rightMargin: 10 + opacity: 0.5 + + // Set initial information for Solar System + planet: "Solar System" + exampleDetails: "This example shows a 3D model of the Solar

" + + "

System comprised of the Sun and the eight

" + + "

planets orbiting the Sun.


" + + "

The example is implemented using Qt3D.

" + + "

The textures and images used in the example

" + + "

are Copyright (c) by James Hastings-Trew,

" + + "" + + "http://planetpixelemporium.com/planets.html" + } + + function updatePlanetInfo() { + info.width = 200 + + if (focusedPlanet !== 100) { + info.planet = planetModel.get(focusedPlanet).name + info.radius = planetModel.get(focusedPlanet).radius + info.temperature = planetModel.get(focusedPlanet).temperature + info.orbitalPeriod = planetModel.get(focusedPlanet).orbitalPeriod + info.distance = planetModel.get(focusedPlanet).distance + } + } + + StyledSlider { + id: speedSlider + anchors.top: parent.top + anchors.topMargin: 10 + anchors.horizontalCenter: parent.horizontalCenter + width: 400 + value: 0.2 + minimumValue: 0 + maximumValue: 1 + onValueChanged: solarsystem.changeSpeed(value) + } + Text { + anchors.right: speedSlider.left + anchors.verticalCenter: speedSlider.verticalCenter + anchors.rightMargin: 10 + font.family: "Helvetica" + font.pixelSize: 16 + font.weight: Font.Light + color: "white" + text: "Rotation Speed" + } + + StyledSlider { + id: scaleSlider + anchors.bottom: parent.bottom + anchors.bottomMargin: 10 + anchors.horizontalCenter: parent.horizontalCenter + width: 400 + value: 1200 + minimumValue: 1 + maximumValue: 2000 + onValueChanged: solarsystem.changeScale(value, false) + } + Text { + anchors.right: scaleSlider.left + anchors.verticalCenter: scaleSlider.verticalCenter + anchors.rightMargin: 10 + font.family: "Helvetica" + font.pixelSize: 16 + font.weight: Font.Light + color: "white" + text: "Planet Size" + } + + StyledSlider { + id: distanceSlider + anchors.left: parent.left + anchors.leftMargin: 10 + anchors.verticalCenter: parent.verticalCenter + orientation: Qt.Vertical + height: 400 + value: 1 + minimumValue: 1 + maximumValue: 2 + onValueChanged: solarsystem.changeCameraDistance(value) + } + Text { + y: distanceSlider.y + distanceSlider.height + width + 10 + x: distanceSlider.x + 12 + transform: Rotation { + origin.x: 0 + origin.y: 0 + angle: -90 + } + font.family: "Helvetica" + font.pixelSize: 16 + font.weight: Font.Light + color: "white" + text: "Viewing Distance" + } + + // FPS display, initially hidden, clicking will show it + FpsDisplay { + id: fpsDisplay + anchors.left: parent.left + anchors.top: parent.top + width: 32 + height: 64 + hidden: true + } + + Timer { + interval: 1000 + repeat: true + running: !fpsDisplay.hidden + onTriggered: { + fpsDisplay.fps = frames + frames = 0 + } + onRunningChanged: frames = 0 + } + + // Animate solar system with a "beautiful" hack + Rectangle { + id: dummyAnimator + width: 0 + height: 0 + visible: false + onRotationChanged: { + solarsystem.animate(focusedPlanet) + frames++ + } + } + + NumberAnimation { + target: dummyAnimator + property: "rotation" + from: 0 + to: 360 + loops: Animation.Infinite + running: true + } +} diff --git a/examples/qt3d/planets-qml/Ring.qml b/examples/qt3d/planets-qml/Ring.qml new file mode 100644 index 000000000..7bf585805 --- /dev/null +++ b/examples/qt3d/planets-qml/Ring.qml @@ -0,0 +1,145 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt3D.Render 2.0 + +// TODO: Once support for meshes from arrays is implemented, replace ring.obj with that +Mesh { + property real innerRadius + property real outerRadius + /* + property real ringSegments + + property var vertices: [] + property var faces: [] + property var faceVertexUvs: [] + */ + + source: "qrc:/meshes/ring.obj" + + // Converted from the _RingGeometry() method in the threex.planets.js extension. + /* + function makeRing() { + innerRadius = innerRadius || 0 + outerRadius = outerRadius || 50 + var thetaSegments = ringSegments || 8 + console.log(innerRadius + "," + outerRadius + "," + thetaSegments) + + var normal = Qt.vector3d(0, 0, 1) + + for (var i = 0; i < thetaSegments; i++) { + var angleLo = (i / thetaSegments) * Math.PI * 2 + var angleHi = ((i + 1) / thetaSegments) * Math.PI * 2 + + var vertex1 = Qt.vector3d(innerRadius * Math.cos(angleLo), + innerRadius * Math.sin(angleLo), + 0) + var vertex2 = Qt.vector3d(outerRadius * Math.cos(angleLo), + outerRadius * Math.sin(angleLo), + 0) + var vertex3 = Qt.vector3d(innerRadius * Math.cos(angleHi), + innerRadius * Math.sin(angleHi), + 0) + var vertex4 = Qt.vector3d(outerRadius * Math.cos(angleHi), + outerRadius * Math.sin(angleHi), + 0) + + vertices.push(vertex1) + vertices.push(vertex2) + vertices.push(vertex3) + vertices.push(vertex4) + + var vertexIdx = i * 4 + + // Create the first triangle + var face = Qt.vector4d(vertexIdx + 0, vertexIdx + 1, vertexIdx + 2, normal) + var uvs = [] + + var uv = Qt.vector2d(0, 0) + uvs.push(uv) + uv = Qt.vector2d(1, 0) + uvs.push(uv) + uv = Qt.vector2d(0, 1) + uvs.push(uv) + + faces.push(face) + //faceVertexUvs[0].push(uvs) + faceVertexUvs.push(uvs) + + // Create the second triangle + face = Qt.vector4d(vertexIdx + 2, vertexIdx + 1, vertexIdx + 3, normal) + uvs = [] + + uv = Qt.vector2d(0, 1) + uvs.push(uv) + uv = Qt.vector2d(1, 0) + uvs.push(uv) + uv = Qt.vector2d(1, 1) + uvs.push(uv) + + faces.push(face) + //faceVertexUvs[0].push(uvs) + faceVertexUvs.push(uvs) + } + + computeFaceNormals() + } + + // Converted from the computeFaceNormals() method in the three.js extension. + function computeFaceNormals() { + var cb = Qt.vector3d(0, 0, 0) + var ab = Qt.vector3d(0, 0, 0) + + for (var f = 0, fl = faces.length; f < fl; f ++) { + var face = faces[f] + + var vA = vertices[face.x] + var vB = vertices[face.y] + var vC = vertices[face.z] + + cb = vC.minus(vB) + ab = vA.minus(vB) + cb = cb.crossProduct(ab) + + cb = cb.normalized() + + face.w = cb + } + } + */ +} + + diff --git a/examples/qt3d/planets-qml/ShadowMapFrameGraph.qml b/examples/qt3d/planets-qml/ShadowMapFrameGraph.qml new file mode 100644 index 000000000..8b52e42d4 --- /dev/null +++ b/examples/qt3d/planets-qml/ShadowMapFrameGraph.qml @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt3D 2.0 +import Qt3D.Render 2.0 +import QtQuick 2.2 as QQ2 + +FrameGraph { + id: root + + property alias viewCamera: viewCameraSelector.camera + property alias lightCamera: lightCameraSelector.camera + readonly property Texture2D shadowTexture: depthTexture + + activeFrameGraph: Viewport { + rect: Qt.rect(0.0, 0.0, 1.0, 1.0) + clearColor: Qt.rgba(0.0, 0.0, 0.0, 1.0) + + RenderPassFilter { + includes: [ Annotation { name: "pass"; value: "shadowmap" } ] + + RenderTargetSelector { + target: RenderTarget { + attachments: [ + RenderAttachment { + name: "depth" + type: RenderAttachment.DepthAttachment + texture: Texture2D { + id: depthTexture + width: mainview.width + height: mainview.height + format: Texture.DepthFormat + generateMipMaps: false + magnificationFilter: Texture.Linear + minificationFilter: Texture.Linear + wrapMode { + x: WrapMode.ClampToEdge + y: WrapMode.ClampToEdge + } + comparisonFunction: Texture.CompareLessEqual + comparisonMode: Texture.CompareRefToTexture + } + } + ] + } + + ClearBuffer { + buffers: ClearBuffer.DepthBuffer + + CameraSelector { + id: lightCameraSelector + } + } + } + } + + RenderPassFilter { + includes: [ Annotation { name: "pass"; value: "forward" } ] + + ClearBuffer { + buffers: ClearBuffer.ColorDepthBuffer + + CameraSelector { + id: viewCameraSelector + } + } + } + } +} diff --git a/examples/qt3d/planets-qml/SolarSystem.qml b/examples/qt3d/planets-qml/SolarSystem.qml new file mode 100644 index 000000000..339643235 --- /dev/null +++ b/examples/qt3d/planets-qml/SolarSystem.qml @@ -0,0 +1,993 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt3D 2.0 +import Qt3D.Render 2.0 +import QtQuick 2.0 as QQ2 + +import "planets.js" as Planets + +Entity { + id: sceneRoot + + property bool ready: false + property bool freeCamera: false + + property real cameraNear: 0 + property real xLookAtOffset: 0 + property real yLookAtOffset: 0 + property real zLookAtOffset: 0 + property real xCameraOffset: 0 + property real yCameraOffset: 0 + property real zCameraOffset: 0 + + property var planetData + property var planets: [] + + property vector3d defaultUp: Qt.vector3d(0, 1, 0) + property vector3d defaultCameraPosition: Qt.vector3d(Planets.solarDistance, + Planets.solarDistance, + Planets.solarDistance) + property vector3d tiltAxis: Qt.vector3d(0, 0, 1) + property vector3d rollAxis: Qt.vector3d(0, 1, 0) + property real cameraDistance: 1 + property vector3d oldCameraPosition + property vector3d oldFocusedPlanetPosition + + property color ambientStrengthStarfield: "#000000" + property color ambientStrengthSun: "#ffffff" + property color ambientStrengthClouds: "#000000" + property color ambientStrengthRing: "#111111" + property color ambientStrengthPlanet: "#222222" + property real shininessSpecularMap: 50.0 + property real shininessClouds: 10.0 + property real shininessBasic: 1.0 + + property real saturnRingInnerRadius + property real saturnRingOuterRadius + property real uranusRingInnerRadius + property real uranusRingOuterRadius + + // Time variables + property int year: 2000 + property int month: 1 + property int day: 1 + // Time scale formula based on http://www.stjarnhimlen.se/comp/ppcomp.html + property real startD: 367 * year - 7 * (year + (month + 9) / 12) / 4 + 275 * month / 9 + day - 730530 + property real oldTimeD: startD + property real currTimeD: startD + property real deltaTimeD: 0 + property real daysPerFrame + property real daysPerFrameScale + + property real planetScale + + property bool focusedScaling: false + property int focusedMinimumScale: 20 + property real actualScale + + Light { + id: light + } + + Camera { + id: camera + projectionType: CameraLens.PerspectiveProjection + fieldOfView: 45 + aspectRatio: width / height + nearPlane : 2500000.0 + farPlane : 20000000.0 + position: defaultCameraPosition + upVector: defaultUp + viewCenter: Qt.vector3d( xLookAtOffset, yLookAtOffset, zLookAtOffset ) + } + + Configuration { + controlledCamera: camera + } + + components: [ + ShadowMapFrameGraph { + id: framegraph + viewCamera: camera + lightCamera: light.lightCamera + } + ] + + CloudEffectDS { + id: effectDS + light: light + } + + PlanetEffectD { + id: shadowMapEffectD + shadowTexture: framegraph.shadowTexture + light: light + } + + PlanetEffectDS { + id: shadowMapEffectDS + shadowTexture: framegraph.shadowTexture + light: light + } + + PlanetEffectDB { + id: shadowMapEffectDB + shadowTexture: framegraph.shadowTexture + light: light + } + + PlanetEffectDSB { + id: shadowMapEffectDSB + shadowTexture: framegraph.shadowTexture + light: light + } + + QQ2.Component.onCompleted: { + planetData = Planets.loadPlanetData() + // Push in the correct order + planets.push(sun) + planets.push(mercury) + planets.push(venus) + planets.push(earth) + planets.push(mars) + planets.push(jupiter) + planets.push(saturn) + planets.push(uranus) + planets.push(neptune) + planets.push(moon) + // TODO: Once support for creating meshes from arrays is implemented take these into use + //saturnRing.makeRing() + //uranusRing.makeRing() + saturnRingOuterRadius = planetData[Planets.SATURN].radius + Planets.saturnOuterRadius + saturnRingInnerRadius = planetData[Planets.SATURN].radius + 6.630 + uranusRingOuterRadius = planetData[Planets.URANUS].radius + Planets.uranusOuterRadius + uranusRingInnerRadius = planetData[Planets.URANUS].radius + 2 + ready = true + changeScale(1200) + changeSpeed(0.2) + setLookAtOffset(Planets.SUN) + } + + QQ2.NumberAnimation { + id: lookAtOffsetAnimation + target: sceneRoot + properties: "xLookAtOffset, yLookAtOffset, zLookAtOffset" + to: 0 + easing.type: Easing.InOutQuint + duration: 1250 + } + + QQ2.NumberAnimation { + id: cameraOffsetAnimation + target: sceneRoot + properties: "xCameraOffset, yCameraOffset, zCameraOffset" + to: 0 + easing.type: Easing.InOutQuint + duration: 2500 + } + + QQ2.Behavior on cameraNear { + QQ2.PropertyAnimation { + easing.type: Easing.InOutQuint + duration: 2500 + } + } + + function changePlanetFocus(oldPlanet, focusedPlanet) { + setOldPlanet(oldPlanet, focusedPlanet) + setLookAtOffset(focusedPlanet) + setCameraOffset(oldPlanet, focusedPlanet) + lookAtOffsetAnimation.restart() + cameraOffsetAnimation.restart() + } + + function setOldPlanet(oldPlanet, focusedPlanet) { + oldCameraPosition = camera.position + + var planet = 0 + if (oldPlanet !== Planets.SOLAR_SYSTEM) + planet = oldPlanet + oldFocusedPlanetPosition = Qt.vector3d(planets[planet].x, + planets[planet].y, + planets[planet].z) + checkScaling(focusedPlanet) + } + + function setFreeCamera(free) { + freeCamera = free + } + + function setScale(value, focused) { + // Save actual scale + if (!focused) + actualScale = value + + // Limit minimum scaling in focus mode to avoid jitter caused by rounding errors + if (value <= focusedMinimumScale && (focusedScaling || focused)) + planetScale = focusedMinimumScale + else + planetScale = actualScale + return planetScale + } + + function checkScaling(focusedPlanet) { + if (focusedPlanet !== Planets.SOLAR_SYSTEM) { + // Limit minimum scaling in focus mode to avoid jitter caused by rounding errors + if (actualScale <= focusedMinimumScale) { + planetScale = focusedMinimumScale + changeScale(focusedMinimumScale, true) + } + focusedScaling = true + } else if (focusedScaling === true) { + // Restore normal scaling + focusedScaling = false + changeScale(actualScale, false) + } + } + + function setLookAtOffset(focusedPlanet) { + var offset = oldFocusedPlanetPosition + + var planet = 0 + if (focusedPlanet !== Planets.SOLAR_SYSTEM) + planet = focusedPlanet + + var focusedPlanetPosition = Qt.vector3d(planets[planet].x, + planets[planet].y, + planets[planet].z) + offset = offset.minus(focusedPlanetPosition) + + xLookAtOffset = offset.x + yLookAtOffset = offset.y + zLookAtOffset = offset.z + } + + function setCameraOffset(oldPlanet, focusedPlanet) { + var offset = oldCameraPosition + + var planet = 0 + if (focusedPlanet !== Planets.SOLAR_SYSTEM) + planet = focusedPlanet + + var newCameraPosition = getNewCameraPosition(focusedPlanet, Planets.getOuterRadius(planet)) + + if (focusedPlanet !== Planets.SUN) + offset = offset.minus(newCameraPosition) + + if (oldPlanet === Planets.SOLAR_SYSTEM && focusedPlanet === Planets.SUN) { + xCameraOffset = Math.abs(offset.x) + yCameraOffset = Math.abs(offset.y) + zCameraOffset = Math.abs(offset.z) + } else { // from a planet to another + xCameraOffset = offset.x + yCameraOffset = offset.y + zCameraOffset = offset.z + } + } + + function getNewCameraPosition(focusedPlanet, radius) { + var position + if (focusedPlanet === Planets.SOLAR_SYSTEM) { + position = defaultCameraPosition + position = position.times(cameraDistance) + } else if (focusedPlanet === Planets.SUN) { + position = Qt.vector3d(radius * planetScale * 2, + radius * planetScale * 2, + radius * planetScale * 2) + position = position.times(cameraDistance) + } else { + var vec1 = Qt.vector3d(planets[focusedPlanet].x, + planets[focusedPlanet].y, + planets[focusedPlanet].z) + var vec2 = defaultUp + vec1 = vec1.normalized() + vec2 = vec2.crossProduct(vec1) + vec2 = vec2.times(radius * planetScale * cameraDistance * 4) + vec2 = vec2.plus(Qt.vector3d(planets[focusedPlanet].x, + planets[focusedPlanet].y, + planets[focusedPlanet].z)) + vec1 = Qt.vector3d(0, radius * planetScale, 0) + vec2 = vec2.plus(vec1) + position = vec2 + } + return position + } + + function advanceTime(focusedPlanet) { + if (focusedPlanet === Planets.SOLAR_SYSTEM) + daysPerFrame = daysPerFrameScale * 10 + else + daysPerFrame = daysPerFrameScale * planetData[focusedPlanet].period / 100.0 + + // Advance the time in days + oldTimeD = currTimeD + currTimeD = currTimeD + daysPerFrame + deltaTimeD = currTimeD - oldTimeD + } + + function positionPlanet(i) { + var planet = planetData[i] + var target = planets[i] + + if (i !== Planets.SUN) { + // Calculate the planet orbital elements from the current time in days + var N = (planet.N1 + planet.N2 * currTimeD) * Math.PI / 180 + var iPlanet = (planet.i1 + planet.i2 * currTimeD) * Math.PI / 180 + var w = (planet.w1 + planet.w2 * currTimeD) * Math.PI / 180 + var a = planet.a1 + planet.a2 * currTimeD + var e = planet.e1 + planet.e2 * currTimeD + var M = (planet.M1 + planet.M2 * currTimeD) * Math.PI / 180 + var E = M + e * Math.sin(M) * (1.0 + e * Math.cos(M)) + + var xv = a * (Math.cos(E) - e) + var yv = a * (Math.sqrt(1.0 - e * e) * Math.sin(E)) + var v = Math.atan2(yv, xv) + + // Calculate the distance (radius) + var r = Math.sqrt(xv * xv + yv * yv) + + // From http://www.davidcolarusso.com/astro/ + // Modified to compensate for the right handed coordinate system of OpenGL + var xh = r * (Math.cos(N) * Math.cos(v + w) + - Math.sin(N) * Math.sin(v + w) * Math.cos(iPlanet)) + var zh = -r * (Math.sin(N) * Math.cos(v + w) + + Math.cos(N) * Math.sin(v + w) * Math.cos(iPlanet)) + var yh = r * (Math.sin(w + v) * Math.sin(iPlanet)) + + // Apply the position offset from the center of orbit to the bodies + var centerOfOrbit = planet.centerOfOrbit + target.x = planets[centerOfOrbit].x + xh * Planets.auScale + target.y = planets[centerOfOrbit].y + yh * Planets.auScale + target.z = planets[centerOfOrbit].z + zh * Planets.auScale + } + // Calculate the rotation (roll) of the bodies. Tilt does not change. + target.roll += (deltaTimeD / planet.period) * 360 // In degrees + } + + function changeScale(scale, focused) { + if (!ready) + return + + var scaling = setScale(scale, focused) + sun.r = planetData[Planets.SUN].radius * scaling / 100 + mercury.r = planetData[Planets.MERCURY].radius * scaling + venus.r = planetData[Planets.VENUS].radius * scaling + earth.r = planetData[Planets.EARTH].radius * scaling + earthClouds.r = planetData[Planets.EARTH].radius * scaling * 1.02 + moon.r = planetData[Planets.MOON].radius * scaling + mars.r = planetData[Planets.MARS].radius * scaling + jupiter.r = planetData[Planets.JUPITER].radius * scaling + saturn.r = planetData[Planets.SATURN].radius * scaling + saturnRing.outerRadius = saturnRingOuterRadius * scaling + saturnRing.innerRadius = saturnRingInnerRadius * scaling + uranus.r = planetData[Planets.URANUS].radius * scaling + uranusRing.outerRadius = uranusRingOuterRadius * scaling + uranusRing.innerRadius = uranusRingInnerRadius * scaling + neptune.r = planetData[Planets.NEPTUNE].radius * scaling + } + + function changeSpeed(speed) { + daysPerFrameScale = speed + } + + function changeCameraDistance(distance) { + cameraDistance = distance + } + + function animate(focusedPlanet) { + if (!ready || freeCamera) + return + + advanceTime(focusedPlanet) + for (var i = 0; i <= Planets.NUM_SELECTABLE_PLANETS; i++) + positionPlanet(i) + + updateCamera(focusedPlanet) + } + + function updateCamera(focusedPlanet) { + // Get the appropriate near plane position for the camera and animate it with QML animations + var outerRadius = Planets.getOuterRadius(focusedPlanet) + cameraNear = outerRadius + camera.nearPlane = cameraNear + + // Calculate position + var cameraPosition = getNewCameraPosition(focusedPlanet, outerRadius) + var cameraOffset = Qt.vector3d(xCameraOffset, yCameraOffset, zCameraOffset) + cameraPosition = cameraPosition.plus(cameraOffset) + + // Calculate look-at point + var lookAtPlanet = Planets.SUN + if (focusedPlanet !== Planets.SOLAR_SYSTEM) + lookAtPlanet = focusedPlanet + var cameraLookAt = Qt.vector3d(planets[lookAtPlanet].x, + planets[lookAtPlanet].y, + planets[lookAtPlanet].z) + var lookAtOffset = Qt.vector3d(xLookAtOffset, yLookAtOffset, zLookAtOffset) + cameraLookAt = cameraLookAt.plus(lookAtOffset) + + // Set position and look-at + camera.viewCenter = cameraLookAt + camera.position = Qt.vector3d(cameraPosition.x, cameraPosition.y, cameraPosition.z) + camera.upVector = defaultUp + } + + // + // STARFIELD + // + + Mesh { + id: starfield + source: "qrc:/meshes/starfield.obj" + } + + Entity { + id: starfieldEntity + + property Material materialStarfield: PlanetMaterial { + effect: shadowMapEffectD + ambientLight: ambientStrengthStarfield + specularColor: Qt.rgba(0.0, 0.0, 0.0, 1.0) + diffuseMap: "qrc:/images/galaxy_starfield.png" + shininess: 1000000.0 + } + + property Transform transformStarfield: Transform { + Scale { + scale: 8500000 + } + Translate { + translation: Qt.vector3d(0, 0, 0) + } + } + + components: [ starfield, materialStarfield, transformStarfield ] + } + + // + // SUN + // + + Planet { + id: sun + tilt: planetData[Planets.SUN].tilt + } + + Entity { + id: sunEntity + + property Material materialSun: PlanetMaterial { + effect: shadowMapEffectD + ambientLight: ambientStrengthSun + specularColor: Qt.rgba(0.0, 0.0, 0.0, 1.0) + diffuseMap: "qrc:/images/sunmap.jpg" + shininess: 1000000.0 + } + + property Transform transformSun: Transform { + Scale { + scale: sun.r + } + Rotate { + axis: rollAxis + angle: sun.roll + } + Rotate { + axis: tiltAxis + angle: sun.tilt + } + Translate { + translation: Qt.vector3d(sun.x, sun.y, sun.z) + } + } + + components: [ sun, materialSun, transformSun ] + } + + // + // PLANETS + // + + // MERCURY + + Planet { + id: mercury + tilt: planetData[Planets.MERCURY].tilt + } + + Entity { + id: mercuryEntity + + property Material materialMercury: PlanetMaterial { + effect: shadowMapEffectDB + ambientLight: ambientStrengthPlanet + specularColor: Qt.rgba(0.2, 0.2, 0.2, 1.0) + diffuseMap: "qrc:/images/mercurymap.jpg" + normalMap: "qrc:/images/mercurynormal.jpg" + shininess: shininessSpecularMap + } + + property Transform transformMercury: Transform { + Scale { + scale: mercury.r + } + Rotate { + axis: rollAxis + angle: mercury.roll + } + Rotate { + axis: tiltAxis + angle: mercury.tilt + } + Translate { + translation: Qt.vector3d(mercury.x, mercury.y, mercury.z) + } + } + + components: [ mercury, materialMercury, transformMercury ] + } + + // VENUS + + Planet { + id: venus + tilt: planetData[Planets.VENUS].tilt + } + + Entity { + id: venusEntity + + property Material materialVenus: PlanetMaterial { + effect: shadowMapEffectDB + ambientLight: ambientStrengthPlanet + specularColor: Qt.rgba(0.2, 0.2, 0.2, 1.0) + diffuseMap: "qrc:/images/venusmap.jpg" + normalMap: "qrc:/images/venusnormal.jpg" + shininess: shininessSpecularMap + } + + property Transform transformVenus: Transform { + Scale { + scale: venus.r + } + Rotate { + axis: rollAxis + angle: venus.roll + } + Rotate { + axis: tiltAxis + angle: venus.tilt + } + Translate { + translation: Qt.vector3d(venus.x, venus.y, venus.z) + } + } + + components: [ venus, materialVenus, transformVenus ] + } + + // EARTH + + Planet { + id: earth + tilt: planetData[Planets.EARTH].tilt + } + + Entity { + id: earthEntity + + property Material materialEarth: PlanetMaterial { + effect: shadowMapEffectDSB + ambientLight: ambientStrengthPlanet + diffuseMap: "qrc:/images/earthmap1k.jpg" + specularMap: "qrc:/images/earthspec1k.jpg" + normalMap: "qrc:/images/earthnormal1k.jpg" + shininess: shininessSpecularMap + } + + property Transform transformEarth: Transform { + Scale { + scale: earth.r + } + Rotate { + axis: rollAxis + angle: earth.roll + } + Rotate { + axis: tiltAxis + angle: earth.tilt + } + Translate { + id: translationEarth + translation: Qt.vector3d(earth.x, earth.y, earth.z) + } + } + + components: [ earth, materialEarth, transformEarth ] + } + + // EARTH CLOUDS + + Planet { + id: earthClouds + tilt: planetData[Planets.EARTH].tilt + } + + Entity { + id: earthCloudsEntity + + property Material materialEarthClouds: PlanetMaterial { + effect: effectDS + ambientLight: ambientStrengthClouds + diffuseMap: "qrc:/images/earthcloudmapcolortrans.png" + specularMap: "qrc:/images/earthcloudmapspec.jpg" + shininess: shininessClouds + opacity: 0.2 + } + + property Transform transformEarthClouds: Transform { + Scale { + scale: earthClouds.r + } + Rotate { + axis: rollAxis + angle: earth.roll / 1.2 + } + Rotate { + axis: tiltAxis + angle: earth.tilt + } + Translate { + translation: translationEarth.translation + } + } + + components: [ earthClouds, materialEarthClouds, transformEarthClouds ] + } + + // MOON + + Planet { + id: moon + tilt: planetData[Planets.MOON].tilt + } + + Entity { + id: moonEntity + + property Material materialMoon: PlanetMaterial { + effect: shadowMapEffectDB + ambientLight: ambientStrengthPlanet + specularColor: Qt.rgba(0.2, 0.2, 0.2, 1.0) + diffuseMap: "qrc:/images/moonmap1k.jpg" + normalMap: "qrc:/images/moonnormal1k.jpg" + shininess: shininessSpecularMap + } + + property Transform transformMoon: Transform { + Scale { + scale: moon.r + } + Rotate { + axis: rollAxis + angle: moon.roll + } + Rotate { + axis: tiltAxis + angle: moon.tilt + } + Translate { + translation: Qt.vector3d(moon.x, moon.y, moon.z) + } + } + + components: [ moon, materialMoon, transformMoon ] + } + + // MARS + + Planet { + id: mars + tilt: planetData[Planets.MARS].tilt + } + + Entity { + id: marsEntity + + property Material materialMars: PlanetMaterial { + effect: shadowMapEffectDB + ambientLight: ambientStrengthPlanet + specularColor: Qt.rgba(0.2, 0.2, 0.2, 1.0) + diffuseMap: "qrc:/images/marsmap1k.jpg" + normalMap: "qrc:/images/marsnormal1k.jpg" + shininess: shininessSpecularMap + } + + property Transform transformMars: Transform { + Scale { + scale: mars.r + } + Rotate { + axis: rollAxis + angle: mars.roll + } + Rotate { + axis: tiltAxis + angle: mars.tilt + } + Translate { + translation: Qt.vector3d(mars.x, mars.y, mars.z) + } + } + + components: [ mars, materialMars, transformMars ] + } + + // JUPITER + + Planet { + id: jupiter + tilt: planetData[Planets.JUPITER].tilt + } + + Entity { + id: jupiterEntity + + property Material materialJupiter: PlanetMaterial { + effect: shadowMapEffectD + ambientLight: ambientStrengthPlanet + specularColor: Qt.rgba(0.2, 0.2, 0.2, 1.0) + diffuseMap: "qrc:/images/jupitermap.jpg" + shininess: shininessBasic + } + + property Transform transformJupiter: Transform { + Scale { + scale: jupiter.r + } + Rotate { + axis: rollAxis + angle: jupiter.roll + } + Rotate { + axis: tiltAxis + angle: jupiter.tilt + } + Translate { + translation: Qt.vector3d(jupiter.x, jupiter.y, jupiter.z) + } + } + + components: [ jupiter, materialJupiter, transformJupiter ] + } + + // SATURN + + Planet { + id: saturn + tilt: planetData[Planets.SATURN].tilt + } + + Entity { + id: saturnEntity + + property Material materialSaturn: PlanetMaterial { + effect: shadowMapEffectD + ambientLight: ambientStrengthPlanet + specularColor: Qt.rgba(0.2, 0.2, 0.2, 1.0) + diffuseMap: "qrc:/images/saturnmap.jpg" + shininess: shininessBasic + } + + property Transform transformSaturn: Transform { + Scale { + scale: saturn.r + } + Rotate { + axis: rollAxis + angle: saturn.roll + } + Rotate { + axis: tiltAxis + angle: saturn.tilt + } + Translate { + id: translationSaturn + translation: Qt.vector3d(saturn.x, saturn.y, saturn.z) + } + } + + components: [ saturn, materialSaturn, transformSaturn ] + } + + // SATURN RING + + Ring { + id: saturnRing + innerRadius: saturnRingInnerRadius + outerRadius: saturnRingOuterRadius + } + + Entity { + id: saturnRingEntity + + property Material materialSaturnRing: PlanetMaterial { + effect: shadowMapEffectD + ambientLight: ambientStrengthRing + specularColor: Qt.rgba(0.01, 0.01, 0.01, 1.0) + diffuseMap: "qrc:/images/saturnringcolortrans.png" + shininess: shininessBasic + opacity: 0.4 + } + + property Transform transformSaturnRing: Transform { + Scale { + scale: (saturnRing.innerRadius + saturnRing.outerRadius) / 1.75 + } + Rotate { + axis: rollAxis + angle: saturn.roll / 10 + } + Rotate { + axis: tiltAxis + angle: saturn.tilt + } + Translate { + translation: translationSaturn.translation + } + } + + components: [ saturnRing, materialSaturnRing, transformSaturnRing ] + } + + // URANUS + + Planet { + id: uranus + tilt: planetData[Planets.URANUS].tilt + } + + Entity { + id: uranusEntity + + property Material materialUranus: PlanetMaterial { + effect: shadowMapEffectD + ambientLight: ambientStrengthPlanet + specularColor: Qt.rgba(0.2, 0.2, 0.2, 1.0) + diffuseMap: "qrc:/images/uranusmap.jpg" + shininess: shininessBasic + } + + property Transform transformUranus: Transform { + Scale { + scale: uranus.r + } + Rotate { + axis: rollAxis + angle: uranus.roll + } + Rotate { + axis: tiltAxis + angle: uranus.tilt + } + Translate { + id: translationUranus + translation: Qt.vector3d(uranus.x, uranus.y, uranus.z) + } + } + + components: [ uranus, materialUranus, transformUranus ] + } + + // URANUS RING + + Ring { + id: uranusRing + innerRadius: uranusRingInnerRadius + outerRadius: uranusRingOuterRadius + } + + Entity { + id: uranusRingEntity + + property Material materialUranusRing: PlanetMaterial { + effect: shadowMapEffectD + ambientLight: ambientStrengthRing + specularColor: Qt.rgba(0.01, 0.01, 0.01, 1.0) + diffuseMap: "qrc:/images/uranusringcolortrans.png" + shininess: shininessBasic + opacity: 0.4 + } + + property Transform transformUranusRing: Transform { + Scale { + scale: (uranusRing.innerRadius + uranusRing.outerRadius) / 1.75 + } + Rotate { + axis: rollAxis + angle: uranus.roll / 10 + } + Rotate { + axis: tiltAxis + angle: uranus.tilt + } + Translate { + translation: translationUranus.translation + } + } + + components: [ uranusRing, materialUranusRing, transformUranusRing ] + } + + // NEPTUNE + + Planet { + id: neptune + tilt: planetData[Planets.NEPTUNE].tilt + } + + Entity { + id: neptuneEntity + + property Material materialNeptune: PlanetMaterial { + effect: shadowMapEffectD + ambientLight: ambientStrengthPlanet + specularColor: Qt.rgba(0.2, 0.2, 0.2, 1.0) + diffuseMap: "qrc:/images/neptunemap.jpg" + shininess: shininessBasic + } + + property Transform transformNeptune: Transform { + Scale { + scale: neptune.r + } + Rotate { + axis: rollAxis + angle: neptune.roll + } + Rotate { + axis: tiltAxis + angle: neptune.tilt + } + Translate { + translation: Qt.vector3d(neptune.x, neptune.y, neptune.z) + } + } + + components: [ neptune, materialNeptune, transformNeptune ] + } +} diff --git a/examples/qt3d/planets-qml/StyledSlider.qml b/examples/qt3d/planets-qml/StyledSlider.qml new file mode 100644 index 000000000..b56f4d803 --- /dev/null +++ b/examples/qt3d/planets-qml/StyledSlider.qml @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Controls 1.2 +import QtQuick.Controls.Styles 1.3 + +Slider { + id: styledSlider + + style: SliderStyle { + groove: Rectangle { + implicitWidth: 200 + implicitHeight: 5 + color: "#5d5b59" + Rectangle { + anchors.verticalCenter: parent.verticalCenter + width: styleData.handlePosition + height: 5 + gradient: Gradient { + GradientStop { position: 0.0; color: "#80c342" } + GradientStop { position: 1.0; color: "#328930" } + } + } + } + handle: Rectangle { + Rectangle { + anchors.centerIn: parent + color: "#aeadac" + border.color: "#1e1b18" + border.width: 1 + implicitWidth: 8 + implicitHeight: 20 + } + anchors.centerIn: parent + color: "transparent" + border.width: 0 + implicitWidth: 50 + implicitHeight: 50 + } + } +} + diff --git a/examples/qt3d/planets-qml/doc/src/planets-qml.qdoc b/examples/qt3d/planets-qml/doc/src/planets-qml.qdoc new file mode 100644 index 000000000..d03e11325 --- /dev/null +++ b/examples/qt3d/planets-qml/doc/src/planets-qml.qdoc @@ -0,0 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example planets-qml + \title Qt3D: Planets QML Example + \ingroup qt3d-examples-qml + + TODO + +*/ diff --git a/examples/qt3d/planets-qml/images/earth.png b/examples/qt3d/planets-qml/images/earth.png new file mode 100644 index 000000000..7bfef7cc7 Binary files /dev/null and b/examples/qt3d/planets-qml/images/earth.png differ diff --git a/examples/qt3d/planets-qml/images/earthcloudmapcolortrans.png b/examples/qt3d/planets-qml/images/earthcloudmapcolortrans.png new file mode 100644 index 000000000..ee2a89732 Binary files /dev/null and b/examples/qt3d/planets-qml/images/earthcloudmapcolortrans.png differ diff --git a/examples/qt3d/planets-qml/images/earthcloudmapspec.jpg b/examples/qt3d/planets-qml/images/earthcloudmapspec.jpg new file mode 100644 index 000000000..9970a3839 Binary files /dev/null and b/examples/qt3d/planets-qml/images/earthcloudmapspec.jpg differ diff --git a/examples/qt3d/planets-qml/images/earthmap1k.jpg b/examples/qt3d/planets-qml/images/earthmap1k.jpg new file mode 100644 index 000000000..e1de9d3a9 Binary files /dev/null and b/examples/qt3d/planets-qml/images/earthmap1k.jpg differ diff --git a/examples/qt3d/planets-qml/images/earthnormal1k.jpg b/examples/qt3d/planets-qml/images/earthnormal1k.jpg new file mode 100644 index 000000000..491d430a1 Binary files /dev/null and b/examples/qt3d/planets-qml/images/earthnormal1k.jpg differ diff --git a/examples/qt3d/planets-qml/images/earthspec1k.jpg b/examples/qt3d/planets-qml/images/earthspec1k.jpg new file mode 100644 index 000000000..3de6fe7af Binary files /dev/null and b/examples/qt3d/planets-qml/images/earthspec1k.jpg differ diff --git a/examples/qt3d/planets-qml/images/galaxy_starfield.png b/examples/qt3d/planets-qml/images/galaxy_starfield.png new file mode 100644 index 000000000..67d808aa6 Binary files /dev/null and b/examples/qt3d/planets-qml/images/galaxy_starfield.png differ diff --git a/examples/qt3d/planets-qml/images/jupiter.png b/examples/qt3d/planets-qml/images/jupiter.png new file mode 100644 index 000000000..b0cc4cfc2 Binary files /dev/null and b/examples/qt3d/planets-qml/images/jupiter.png differ diff --git a/examples/qt3d/planets-qml/images/jupitermap.jpg b/examples/qt3d/planets-qml/images/jupitermap.jpg new file mode 100644 index 000000000..69107dfe6 Binary files /dev/null and b/examples/qt3d/planets-qml/images/jupitermap.jpg differ diff --git a/examples/qt3d/planets-qml/images/mars.png b/examples/qt3d/planets-qml/images/mars.png new file mode 100644 index 000000000..187560b70 Binary files /dev/null and b/examples/qt3d/planets-qml/images/mars.png differ diff --git a/examples/qt3d/planets-qml/images/marsmap1k.jpg b/examples/qt3d/planets-qml/images/marsmap1k.jpg new file mode 100644 index 000000000..64ebc538c Binary files /dev/null and b/examples/qt3d/planets-qml/images/marsmap1k.jpg differ diff --git a/examples/qt3d/planets-qml/images/marsnormal1k.jpg b/examples/qt3d/planets-qml/images/marsnormal1k.jpg new file mode 100644 index 000000000..af910cab4 Binary files /dev/null and b/examples/qt3d/planets-qml/images/marsnormal1k.jpg differ diff --git a/examples/qt3d/planets-qml/images/mercury.png b/examples/qt3d/planets-qml/images/mercury.png new file mode 100644 index 000000000..418d49f64 Binary files /dev/null and b/examples/qt3d/planets-qml/images/mercury.png differ diff --git a/examples/qt3d/planets-qml/images/mercurymap.jpg b/examples/qt3d/planets-qml/images/mercurymap.jpg new file mode 100644 index 000000000..9bb2c0be0 Binary files /dev/null and b/examples/qt3d/planets-qml/images/mercurymap.jpg differ diff --git a/examples/qt3d/planets-qml/images/mercurynormal.jpg b/examples/qt3d/planets-qml/images/mercurynormal.jpg new file mode 100644 index 000000000..d64512489 Binary files /dev/null and b/examples/qt3d/planets-qml/images/mercurynormal.jpg differ diff --git a/examples/qt3d/planets-qml/images/moonmap1k.jpg b/examples/qt3d/planets-qml/images/moonmap1k.jpg new file mode 100644 index 000000000..509d3f5a4 Binary files /dev/null and b/examples/qt3d/planets-qml/images/moonmap1k.jpg differ diff --git a/examples/qt3d/planets-qml/images/moonnormal1k.jpg b/examples/qt3d/planets-qml/images/moonnormal1k.jpg new file mode 100644 index 000000000..b478ed484 Binary files /dev/null and b/examples/qt3d/planets-qml/images/moonnormal1k.jpg differ diff --git a/examples/qt3d/planets-qml/images/neptune.png b/examples/qt3d/planets-qml/images/neptune.png new file mode 100644 index 000000000..07794c6f9 Binary files /dev/null and b/examples/qt3d/planets-qml/images/neptune.png differ diff --git a/examples/qt3d/planets-qml/images/neptunemap.jpg b/examples/qt3d/planets-qml/images/neptunemap.jpg new file mode 100644 index 000000000..0d0d3f06a Binary files /dev/null and b/examples/qt3d/planets-qml/images/neptunemap.jpg differ diff --git a/examples/qt3d/planets-qml/images/saturn.png b/examples/qt3d/planets-qml/images/saturn.png new file mode 100644 index 000000000..003363cd7 Binary files /dev/null and b/examples/qt3d/planets-qml/images/saturn.png differ diff --git a/examples/qt3d/planets-qml/images/saturnmap.jpg b/examples/qt3d/planets-qml/images/saturnmap.jpg new file mode 100644 index 000000000..767be39e4 Binary files /dev/null and b/examples/qt3d/planets-qml/images/saturnmap.jpg differ diff --git a/examples/qt3d/planets-qml/images/saturnringcolortrans.png b/examples/qt3d/planets-qml/images/saturnringcolortrans.png new file mode 100644 index 000000000..ad0073382 Binary files /dev/null and b/examples/qt3d/planets-qml/images/saturnringcolortrans.png differ diff --git a/examples/qt3d/planets-qml/images/sun.png b/examples/qt3d/planets-qml/images/sun.png new file mode 100644 index 000000000..9a62c5f1d Binary files /dev/null and b/examples/qt3d/planets-qml/images/sun.png differ diff --git a/examples/qt3d/planets-qml/images/sunmap.jpg b/examples/qt3d/planets-qml/images/sunmap.jpg new file mode 100644 index 000000000..3e0b520e4 Binary files /dev/null and b/examples/qt3d/planets-qml/images/sunmap.jpg differ diff --git a/examples/qt3d/planets-qml/images/uranus.png b/examples/qt3d/planets-qml/images/uranus.png new file mode 100644 index 000000000..8678b9aa5 Binary files /dev/null and b/examples/qt3d/planets-qml/images/uranus.png differ diff --git a/examples/qt3d/planets-qml/images/uranusmap.jpg b/examples/qt3d/planets-qml/images/uranusmap.jpg new file mode 100644 index 000000000..aad43fb47 Binary files /dev/null and b/examples/qt3d/planets-qml/images/uranusmap.jpg differ diff --git a/examples/qt3d/planets-qml/images/uranusringcolortrans.png b/examples/qt3d/planets-qml/images/uranusringcolortrans.png new file mode 100644 index 000000000..5a7a4a3a6 Binary files /dev/null and b/examples/qt3d/planets-qml/images/uranusringcolortrans.png differ diff --git a/examples/qt3d/planets-qml/images/venus.png b/examples/qt3d/planets-qml/images/venus.png new file mode 100644 index 000000000..fdbb45d32 Binary files /dev/null and b/examples/qt3d/planets-qml/images/venus.png differ diff --git a/examples/qt3d/planets-qml/images/venusmap.jpg b/examples/qt3d/planets-qml/images/venusmap.jpg new file mode 100644 index 000000000..699f2804e Binary files /dev/null and b/examples/qt3d/planets-qml/images/venusmap.jpg differ diff --git a/examples/qt3d/planets-qml/images/venusnormal.jpg b/examples/qt3d/planets-qml/images/venusnormal.jpg new file mode 100644 index 000000000..fea52cb47 Binary files /dev/null and b/examples/qt3d/planets-qml/images/venusnormal.jpg differ diff --git a/examples/qt3d/planets-qml/main.cpp b/examples/qt3d/planets-qml/main.cpp new file mode 100644 index 000000000..2d38334e0 --- /dev/null +++ b/examples/qt3d/planets-qml/main.cpp @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +int main(int argc, char **argv) +{ + QGuiApplication app(argc, argv); + + QQuickView view; + + view.setResizeMode(QQuickView::SizeRootObjectToView); + view.setSource(QUrl("qrc:/PlanetsMain.qml")); + view.show(); + + return app.exec(); +} diff --git a/examples/qt3d/planets-qml/meshes/ring.obj b/examples/qt3d/planets-qml/meshes/ring.obj new file mode 100644 index 000000000..8069d95d4 --- /dev/null +++ b/examples/qt3d/planets-qml/meshes/ring.obj @@ -0,0 +1,841 @@ +# Blender v2.70 (sub 0) OBJ File: 'ring_wider.blend' +# www.blender.org +v 1.250000 0.000000 0.000000 +v 0.687583 0.001701 0.000000 +v 0.687583 -0.001701 0.000000 +v 1.244968 0.000000 -0.112049 +v 0.684815 0.001701 -0.061635 +v 0.684815 -0.001701 -0.061635 +v 1.229912 0.000000 -0.223196 +v 0.676533 0.001701 -0.122773 +v 0.676533 -0.001701 -0.122773 +v 1.204954 0.000000 -0.332546 +v 0.662805 0.001701 -0.182922 +v 0.662805 -0.001701 -0.182922 +v 1.170293 0.000000 -0.439218 +v 0.643739 0.001701 -0.241599 +v 0.643739 -0.001701 -0.241599 +v 1.126211 0.000000 -0.542355 +v 0.619491 0.001701 -0.298331 +v 0.619491 -0.001701 -0.298331 +v 1.073061 0.000000 -0.641124 +v 0.590255 0.001701 -0.352661 +v 0.590255 -0.001701 -0.352661 +v 1.011271 0.000000 -0.734732 +v 0.556267 0.001701 -0.404151 +v 0.556267 -0.001701 -0.404151 +v 0.941339 0.000000 -0.822423 +v 0.517799 0.001701 -0.452388 +v 0.517799 -0.001701 -0.452388 +v 0.863828 0.000000 -0.903494 +v 0.475163 0.001701 -0.496982 +v 0.475163 -0.001701 -0.496982 +v 0.779362 0.000000 -0.977289 +v 0.428701 0.001701 -0.537574 +v 0.428701 -0.001701 -0.537574 +v 0.688621 0.000000 -1.043217 +v 0.378787 0.001701 -0.573839 +v 0.378787 -0.001701 -0.573839 +v 0.592336 0.000000 -1.100744 +v 0.325824 0.001701 -0.605483 +v 0.325824 -0.001701 -0.605483 +v 0.491282 0.000000 -1.149410 +v 0.270238 0.001701 -0.632252 +v 0.270238 -0.001701 -0.632252 +v 0.386272 0.000000 -1.188821 +v 0.212475 0.001701 -0.653930 +v 0.212475 -0.001701 -0.653930 +v 0.278151 0.000000 -1.218660 +v 0.153002 0.001701 -0.670344 +v 0.153002 -0.001701 -0.670344 +v 0.167792 0.000000 -1.238687 +v 0.092297 0.001701 -0.681360 +v 0.092297 -0.001701 -0.681360 +v 0.056081 0.000000 -1.248741 +v 0.030848 0.001701 -0.686891 +v 0.030848 -0.001701 -0.686891 +v -0.056081 0.000000 -1.248741 +v -0.030848 0.001701 -0.686891 +v -0.030848 -0.001701 -0.686891 +v -0.167792 0.000000 -1.238687 +v -0.092297 0.001701 -0.681360 +v -0.092297 -0.001701 -0.681360 +v -0.278151 0.000000 -1.218660 +v -0.153002 0.001701 -0.670344 +v -0.153002 -0.001701 -0.670344 +v -0.386271 0.000000 -1.188821 +v -0.212475 0.001701 -0.653930 +v -0.212475 -0.001701 -0.653930 +v -0.491281 0.000000 -1.149410 +v -0.270237 0.001701 -0.632252 +v -0.270237 -0.001701 -0.632252 +v -0.592336 0.000000 -1.100744 +v -0.325824 0.001701 -0.605483 +v -0.325824 -0.001701 -0.605483 +v -0.688621 0.000000 -1.043216 +v -0.378788 0.001701 -0.573838 +v -0.378788 -0.001701 -0.573838 +v -0.779362 0.000000 -0.977289 +v -0.428701 0.001701 -0.537574 +v -0.428701 -0.001701 -0.537574 +v -0.863829 0.000000 -0.903493 +v -0.475163 0.001701 -0.496982 +v -0.475163 -0.001701 -0.496982 +v -0.941339 0.000000 -0.822423 +v -0.517799 0.001701 -0.452387 +v -0.517799 -0.001701 -0.452387 +v -1.011271 0.000000 -0.734731 +v -0.556267 0.001701 -0.404151 +v -0.556267 -0.001701 -0.404151 +v -1.073061 0.000000 -0.641124 +v -0.590255 0.001701 -0.352661 +v -0.590255 -0.001701 -0.352661 +v -1.126211 0.000000 -0.542355 +v -0.619491 0.001701 -0.298331 +v -0.619491 -0.001701 -0.298331 +v -1.170293 0.000000 -0.439219 +v -0.643739 0.001701 -0.241599 +v -0.643739 -0.001701 -0.241599 +v -1.204954 0.000000 -0.332546 +v -0.662805 0.001701 -0.182922 +v -0.662805 -0.001701 -0.182922 +v -1.229912 0.000000 -0.223196 +v -0.676533 0.001701 -0.122773 +v -0.676533 -0.001701 -0.122773 +v -1.244968 0.000000 -0.112049 +v -0.684815 0.001701 -0.061634 +v -0.684815 -0.001701 -0.061634 +v -1.250000 0.000000 -0.000000 +v -0.687583 0.001701 -0.000000 +v -0.687583 -0.001701 -0.000000 +v -1.244968 0.000000 0.112048 +v -0.684815 0.001701 0.061634 +v -0.684815 -0.001701 0.061634 +v -1.229912 0.000000 0.223196 +v -0.676533 0.001701 0.122772 +v -0.676533 -0.001701 0.122772 +v -1.204954 0.000000 0.332546 +v -0.662805 0.001701 0.182922 +v -0.662805 -0.001701 0.182922 +v -1.170294 0.000000 0.439218 +v -0.643740 0.001701 0.241599 +v -0.643740 -0.001701 0.241599 +v -1.126211 0.000000 0.542354 +v -0.619491 0.001701 0.298331 +v -0.619491 -0.001701 0.298331 +v -1.073061 0.000000 0.641124 +v -0.590255 0.001701 0.352661 +v -0.590255 -0.001701 0.352661 +v -1.011271 0.000000 0.734731 +v -0.556267 0.001701 0.404151 +v -0.556267 -0.001701 0.404151 +v -0.941339 0.000000 0.822423 +v -0.517799 0.001701 0.452387 +v -0.517799 -0.001701 0.452387 +v -0.863829 0.000000 0.903493 +v -0.475163 0.001701 0.496982 +v -0.475163 -0.001701 0.496982 +v -0.779362 0.000000 0.977289 +v -0.428701 0.001701 0.537574 +v -0.428701 -0.001701 0.537574 +v -0.688621 0.000000 1.043216 +v -0.378788 0.001701 0.573838 +v -0.378788 -0.001701 0.573838 +v -0.592336 0.000000 1.100744 +v -0.325824 0.001701 0.605483 +v -0.325824 -0.001701 0.605483 +v -0.491281 0.000000 1.149410 +v -0.270237 0.001701 0.632252 +v -0.270237 -0.001701 0.632252 +v -0.386271 0.000000 1.188821 +v -0.212475 0.001701 0.653930 +v -0.212475 -0.001701 0.653930 +v -0.278151 0.000000 1.218660 +v -0.153002 0.001701 0.670344 +v -0.153002 -0.001701 0.670344 +v -0.167792 0.000000 1.238687 +v -0.092297 0.001701 0.681360 +v -0.092297 -0.001701 0.681360 +v -0.056081 0.000000 1.248741 +v -0.030848 0.001701 0.686891 +v -0.030848 -0.001701 0.686891 +v 0.056081 0.000000 1.248741 +v 0.030848 0.001701 0.686891 +v 0.030848 -0.001701 0.686891 +v 0.167792 0.000000 1.238687 +v 0.092297 0.001701 0.681360 +v 0.092297 -0.001701 0.681360 +v 0.278151 0.000000 1.218660 +v 0.153002 0.001701 0.670344 +v 0.153002 -0.001701 0.670344 +v 0.386272 0.000000 1.188821 +v 0.212475 0.001701 0.653930 +v 0.212475 -0.001701 0.653930 +v 0.491282 0.000000 1.149410 +v 0.270238 0.001701 0.632252 +v 0.270238 -0.001701 0.632252 +v 0.592336 0.000000 1.100744 +v 0.325824 0.001701 0.605483 +v 0.325824 -0.001701 0.605483 +v 0.688621 0.000000 1.043217 +v 0.378787 0.001701 0.573839 +v 0.378787 -0.001701 0.573839 +v 0.779362 0.000000 0.977290 +v 0.428701 0.001701 0.537574 +v 0.428701 -0.001701 0.537574 +v 0.863828 0.000000 0.903494 +v 0.475163 0.001701 0.496982 +v 0.475163 -0.001701 0.496982 +v 0.941339 0.000000 0.822424 +v 0.517799 0.001701 0.452388 +v 0.517799 -0.001701 0.452388 +v 1.011271 0.000000 0.734732 +v 0.556266 0.001701 0.404152 +v 0.556266 -0.001701 0.404152 +v 1.073061 0.000000 0.641125 +v 0.590255 0.001701 0.352661 +v 0.590255 -0.001701 0.352661 +v 1.126211 0.000000 0.542355 +v 0.619491 0.001701 0.298331 +v 0.619491 -0.001701 0.298331 +v 1.170293 0.000000 0.439219 +v 0.643739 0.001701 0.241600 +v 0.643739 -0.001701 0.241600 +v 1.204953 0.000000 0.332547 +v 0.662805 0.001701 0.182923 +v 0.662805 -0.001701 0.182923 +v 1.229912 0.000000 0.223197 +v 0.676533 0.001701 0.122773 +v 0.676533 -0.001701 0.122773 +v 1.244968 0.000000 0.112049 +v 0.684815 0.001701 0.061635 +v 0.684815 -0.001701 0.061635 +vt 0.480114 0.696513 +vt 0.470371 0.736934 +vt 0.371219 0.630330 +vt 0.376578 0.608095 +vt 0.662068 0.031882 +vt 0.701631 0.242504 +vt 0.690274 0.252204 +vt 0.641420 0.049515 +vt 0.458854 0.775449 +vt 0.364883 0.651515 +vt 0.679397 0.263898 +vt 0.621646 0.070776 +vt 0.445655 0.811745 +vt 0.357623 0.671480 +vt 0.669088 0.277493 +vt 0.602906 0.095491 +vt 0.430881 0.845531 +vt 0.349496 0.690065 +vt 0.659431 0.292880 +vt 0.585350 0.123464 +vt 0.414650 0.876536 +vt 0.340569 0.707120 +vt 0.650503 0.309935 +vt 0.569119 0.154469 +vt 0.397094 0.904509 +vt 0.330912 0.722507 +vt 0.642377 0.328519 +vt 0.554345 0.188255 +vt 0.378354 0.929224 +vt 0.320603 0.736102 +vt 0.635117 0.348485 +vt 0.541146 0.224551 +vt 0.358580 0.950484 +vt 0.309726 0.747796 +vt 0.628781 0.369670 +vt 0.529629 0.263066 +vt 0.337932 0.968117 +vt 0.298369 0.757496 +vt 0.623422 0.391905 +vt 0.519886 0.303487 +vt 0.316576 0.981981 +vt 0.286621 0.765122 +vt 0.619082 0.415010 +vt 0.511996 0.345491 +vt 0.294684 0.991965 +vt 0.274579 0.770613 +vt 0.615796 0.438799 +vt 0.506022 0.388740 +vt 0.272432 0.997987 +vt 0.262339 0.773926 +vt 0.613591 0.463081 +vt 0.502013 0.432883 +vt 0.250000 1.000000 +vt 0.250000 0.775033 +vt 0.612483 0.487661 +vt 0.500000 0.477567 +vt 0.227568 0.997987 +vt 0.237661 0.773926 +vt 0.612483 0.512339 +vt 0.500000 0.522432 +vt 0.205316 0.991965 +vt 0.225421 0.770613 +vt 0.613590 0.536918 +vt 0.502013 0.567116 +vt 0.183424 0.981981 +vt 0.213379 0.765122 +vt 0.615796 0.561201 +vt 0.506022 0.611260 +vt 0.162068 0.968117 +vt 0.201631 0.757496 +vt 0.619082 0.584990 +vt 0.511996 0.654508 +vt 0.141420 0.950484 +vt 0.190274 0.747796 +vt 0.623422 0.608095 +vt 0.519886 0.696512 +vt 0.121646 0.929224 +vt 0.179397 0.736102 +vt 0.628781 0.630330 +vt 0.529629 0.736934 +vt 0.102906 0.904508 +vt 0.169088 0.722507 +vt 0.635117 0.651515 +vt 0.541146 0.775448 +vt 0.085349 0.876536 +vt 0.159431 0.707120 +vt 0.642377 0.671480 +vt 0.554345 0.811745 +vt 0.069119 0.845531 +vt 0.150503 0.690065 +vt 0.650503 0.690065 +vt 0.569119 0.845531 +vt 0.054345 0.811745 +vt 0.142377 0.671480 +vt 0.659431 0.707120 +vt 0.585350 0.876536 +vt 0.041146 0.775448 +vt 0.135117 0.651515 +vt 0.669088 0.722507 +vt 0.602906 0.904508 +vt 0.029629 0.736934 +vt 0.128781 0.630330 +vt 0.679397 0.736102 +vt 0.621646 0.929224 +vt 0.019886 0.696512 +vt 0.123422 0.608095 +vt 0.690274 0.747796 +vt 0.641420 0.950484 +vt 0.011996 0.654508 +vt 0.119082 0.584990 +vt 0.701631 0.757496 +vt 0.662068 0.968117 +vt 0.006022 0.611260 +vt 0.115796 0.561200 +vt 0.713379 0.765122 +vt 0.683424 0.981981 +vt 0.002013 0.567116 +vt 0.113591 0.536918 +vt 0.725421 0.770613 +vt 0.705316 0.991965 +vt 0.000000 0.522432 +vt 0.112483 0.512339 +vt 0.737661 0.773926 +vt 0.727567 0.997987 +vt 0.000000 0.477568 +vt 0.112483 0.487661 +vt 0.750000 0.775033 +vt 0.750000 1.000000 +vt 0.002013 0.432883 +vt 0.113591 0.463081 +vt 0.762339 0.773926 +vt 0.772432 0.997987 +vt 0.006022 0.388739 +vt 0.115796 0.438799 +vt 0.774579 0.770613 +vt 0.794684 0.991965 +vt 0.011996 0.345491 +vt 0.119082 0.415010 +vt 0.786621 0.765122 +vt 0.816576 0.981981 +vt 0.019886 0.303487 +vt 0.123422 0.391905 +vt 0.798369 0.757496 +vt 0.837932 0.968117 +vt 0.029629 0.263066 +vt 0.128781 0.369670 +vt 0.809726 0.747797 +vt 0.858580 0.950485 +vt 0.041146 0.224552 +vt 0.135117 0.348485 +vt 0.820603 0.736102 +vt 0.878354 0.929224 +vt 0.054345 0.188255 +vt 0.142377 0.328520 +vt 0.830912 0.722507 +vt 0.897094 0.904509 +vt 0.069119 0.154469 +vt 0.150503 0.309935 +vt 0.840569 0.707120 +vt 0.914650 0.876536 +vt 0.085349 0.123464 +vt 0.159431 0.292880 +vt 0.849496 0.690065 +vt 0.930881 0.845532 +vt 0.102906 0.095492 +vt 0.169088 0.277493 +vt 0.857623 0.671481 +vt 0.945655 0.811745 +vt 0.121646 0.070776 +vt 0.179397 0.263898 +vt 0.864883 0.651515 +vt 0.958853 0.775449 +vt 0.141420 0.049516 +vt 0.190274 0.252204 +vt 0.871219 0.630330 +vt 0.970371 0.736934 +vt 0.162068 0.031883 +vt 0.201631 0.242504 +vt 0.876578 0.608095 +vt 0.980114 0.696513 +vt 0.183424 0.018019 +vt 0.213379 0.234878 +vt 0.880918 0.584990 +vt 0.988004 0.654509 +vt 0.205316 0.008035 +vt 0.225421 0.229387 +vt 0.884204 0.561201 +vt 0.993978 0.611261 +vt 0.227568 0.002013 +vt 0.237661 0.226074 +vt 0.886409 0.536919 +vt 0.997987 0.567117 +vt 0.250000 0.000000 +vt 0.250000 0.224967 +vt 0.887517 0.512339 +vt 1.000000 0.522433 +vt 0.272432 0.002013 +vt 0.262339 0.226074 +vt 0.887517 0.487661 +vt 1.000000 0.477568 +vt 0.294684 0.008035 +vt 0.274579 0.229387 +vt 0.886409 0.463081 +vt 0.997987 0.432883 +vt 0.316576 0.018019 +vt 0.286621 0.234878 +vt 0.884204 0.438799 +vt 0.993978 0.388740 +vt 0.337932 0.031883 +vt 0.298369 0.242504 +vt 0.880918 0.415010 +vt 0.988004 0.345491 +vt 0.358580 0.049516 +vt 0.309726 0.252204 +vt 0.876578 0.391905 +vt 0.980114 0.303487 +vt 0.378354 0.070776 +vt 0.320603 0.263898 +vt 0.871219 0.369670 +vt 0.970371 0.263066 +vt 0.397094 0.095492 +vt 0.330912 0.277493 +vt 0.864883 0.348485 +vt 0.958854 0.224551 +vt 0.414651 0.123464 +vt 0.340569 0.292880 +vt 0.857623 0.328519 +vt 0.945655 0.188255 +vt 0.430881 0.154469 +vt 0.349497 0.309935 +vt 0.849496 0.309935 +vt 0.930881 0.154469 +vt 0.445655 0.188255 +vt 0.357623 0.328520 +vt 0.840569 0.292880 +vt 0.914650 0.123464 +vt 0.458854 0.224551 +vt 0.364883 0.348485 +vt 0.830912 0.277493 +vt 0.897095 0.095492 +vt 0.470371 0.263065 +vt 0.371219 0.369670 +vt 0.820603 0.263898 +vt 0.878354 0.070776 +vt 0.480114 0.303487 +vt 0.376578 0.391905 +vt 0.809726 0.252204 +vt 0.858580 0.049516 +vt 0.488004 0.345491 +vt 0.380918 0.415010 +vt 0.798369 0.242504 +vt 0.837932 0.031883 +vt 0.493978 0.388739 +vt 0.384204 0.438799 +vt 0.786621 0.234878 +vt 0.816576 0.018019 +vt 0.497987 0.432883 +vt 0.386409 0.463081 +vt 0.774579 0.229387 +vt 0.794684 0.008035 +vt 0.387517 0.487661 +vt 0.762339 0.226074 +vt 0.772433 0.002013 +vt 0.387517 0.512339 +vt 0.750000 0.224967 +vt 0.750000 0.000000 +vt 0.497987 0.567117 +vt 0.386409 0.536919 +vt 0.737661 0.226074 +vt 0.727568 0.002013 +vt 0.493978 0.611260 +vt 0.384204 0.561201 +vt 0.725421 0.229387 +vt 0.705316 0.008035 +vt 0.488004 0.654508 +vt 0.380918 0.584990 +vt 0.713379 0.234878 +vt 0.683424 0.018018 +vn 1.000000 0.000000 0.000000 +vn 0.995972 0.000000 -0.089633 +vn 0.003013 0.999995 -0.000271 +vn 0.003025 0.999995 -0.000000 +vn 0.003025 -0.999995 -0.000000 +vn 0.003013 -0.999995 -0.000271 +vn 0.983917 0.000000 -0.178533 +vn 0.002976 0.999995 -0.000540 +vn 0.002976 -0.999995 -0.000540 +vn 0.963958 0.000000 -0.266030 +vn 0.002916 0.999995 -0.000805 +vn 0.002916 -0.999995 -0.000805 +vn 0.936216 0.000000 -0.351360 +vn 0.002832 0.999995 -0.001063 +vn 0.002832 -0.999995 -0.001063 +vn 0.900967 0.000000 -0.433882 +vn 0.002725 0.999995 -0.001313 +vn 0.002725 -0.999995 -0.001313 +vn 0.858425 0.000000 -0.512894 +vn 0.002597 0.999995 -0.001552 +vn 0.002597 -0.999995 -0.001552 +vn 0.809015 0.000000 -0.587756 +vn 0.002447 0.999995 -0.001778 +vn 0.002447 -0.999995 -0.001778 +vn 0.753044 0.000000 -0.657918 +vn 0.002278 0.999995 -0.001990 +vn 0.002278 -0.999995 -0.001990 +vn 0.691061 0.000000 -0.722770 +vn 0.002090 0.999995 -0.002186 +vn 0.002090 -0.999995 -0.002186 +vn 0.623463 0.000000 -0.781823 +vn 0.001886 0.999995 -0.002365 +vn 0.001886 -0.999995 -0.002365 +vn 0.550890 0.000000 -0.834559 +vn 0.001666 0.999995 -0.002525 +vn 0.001666 -0.999995 -0.002525 +vn 0.473861 0.000000 -0.880581 +vn 0.001433 0.999995 -0.002664 +vn 0.001433 -0.999995 -0.002664 +vn 0.393017 0.000000 -0.919523 +vn 0.001189 0.999995 -0.002782 +vn 0.001189 -0.999995 -0.002782 +vn 0.309000 0.000000 -0.951048 +vn 0.000935 0.999995 -0.002877 +vn 0.000935 -0.999995 -0.002877 +vn 0.222510 0.000000 -0.974914 +vn 0.000673 0.999995 -0.002949 +vn 0.000673 -0.999995 -0.002949 +vn 0.134220 0.000000 -0.990936 +vn 0.000406 0.999995 -0.002998 +vn 0.000406 -0.999995 -0.002998 +vn 0.044862 0.000000 -0.998993 +vn 0.000136 0.999995 -0.003022 +vn 0.000136 -0.999995 -0.003022 +vn -0.044862 0.000000 -0.998993 +vn -0.000136 0.999995 -0.003022 +vn -0.000136 -0.999995 -0.003022 +vn -0.134220 0.000000 -0.990936 +vn -0.000406 0.999995 -0.002998 +vn -0.000406 -0.999995 -0.002998 +vn -0.222510 0.000000 -0.974914 +vn -0.000673 0.999995 -0.002949 +vn -0.000673 -0.999995 -0.002949 +vn -0.309000 0.000000 -0.951048 +vn -0.000935 0.999995 -0.002877 +vn -0.000935 -0.999995 -0.002877 +vn -0.393017 0.000000 -0.919523 +vn -0.001189 0.999995 -0.002782 +vn -0.001189 -0.999995 -0.002782 +vn -0.473861 0.000000 -0.880581 +vn -0.001433 0.999995 -0.002664 +vn -0.001433 -0.999995 -0.002664 +vn -0.550890 0.000000 -0.834559 +vn -0.001666 0.999995 -0.002525 +vn -0.001666 -0.999995 -0.002525 +vn -0.623463 0.000000 -0.781823 +vn -0.001886 0.999995 -0.002365 +vn -0.001886 -0.999995 -0.002365 +vn -0.691061 0.000000 -0.722770 +vn -0.002090 0.999995 -0.002186 +vn -0.002090 -0.999995 -0.002186 +vn -0.753044 0.000000 -0.657918 +vn -0.002278 0.999995 -0.001990 +vn -0.002278 -0.999995 -0.001990 +vn -0.809015 0.000000 -0.587756 +vn -0.002447 0.999995 -0.001778 +vn -0.002447 -0.999995 -0.001778 +vn -0.858425 0.000000 -0.512894 +vn -0.002597 0.999995 -0.001552 +vn -0.002597 -0.999995 -0.001552 +vn -0.900967 0.000000 -0.433882 +vn -0.002725 0.999995 -0.001313 +vn -0.002725 -0.999995 -0.001313 +vn -0.936216 0.000000 -0.351360 +vn -0.002832 0.999995 -0.001063 +vn -0.002832 -0.999995 -0.001063 +vn -0.963958 0.000000 -0.266030 +vn -0.002916 0.999995 -0.000805 +vn -0.002916 -0.999995 -0.000805 +vn -0.983917 0.000000 -0.178533 +vn -0.002976 0.999995 -0.000540 +vn -0.002976 -0.999995 -0.000540 +vn -0.995972 0.000000 -0.089633 +vn -0.003013 0.999995 -0.000271 +vn -0.003013 -0.999995 -0.000271 +vn -0.999969 0.000000 0.000000 +vn -0.003025 0.999995 -0.000000 +vn -0.003025 -0.999995 -0.000000 +vn -0.995972 0.000000 0.089633 +vn -0.003013 0.999995 0.000271 +vn -0.003013 -0.999995 0.000271 +vn -0.983917 0.000000 0.178533 +vn -0.002976 0.999995 0.000540 +vn -0.002976 -0.999995 0.000540 +vn -0.963958 0.000000 0.266030 +vn -0.002916 0.999995 0.000805 +vn -0.002916 -0.999995 0.000805 +vn -0.936216 0.000000 0.351360 +vn -0.002832 0.999995 0.001063 +vn -0.002832 -0.999995 0.001063 +vn -0.900967 0.000000 0.433882 +vn -0.002725 0.999995 0.001313 +vn -0.002725 -0.999995 0.001313 +vn -0.858425 0.000000 0.512894 +vn -0.002597 0.999995 0.001552 +vn -0.002597 -0.999995 0.001552 +vn -0.809015 0.000000 0.587756 +vn -0.002447 0.999995 0.001778 +vn -0.002447 -0.999995 0.001778 +vn -0.753044 0.000000 0.657918 +vn -0.002278 0.999995 0.001990 +vn -0.002278 -0.999995 0.001990 +vn -0.691061 0.000000 0.722770 +vn -0.002090 0.999995 0.002186 +vn -0.002090 -0.999995 0.002186 +vn -0.623463 0.000000 0.781823 +vn -0.001886 0.999995 0.002365 +vn -0.001886 -0.999995 0.002365 +vn -0.550890 0.000000 0.834559 +vn -0.001666 0.999995 0.002525 +vn -0.001666 -0.999995 0.002525 +vn -0.473861 0.000000 0.880581 +vn -0.001433 0.999995 0.002664 +vn -0.001433 -0.999995 0.002664 +vn -0.393017 0.000000 0.919523 +vn -0.001189 0.999995 0.002782 +vn -0.001189 -0.999995 0.002782 +vn -0.309000 0.000000 0.951048 +vn -0.000935 0.999995 0.002877 +vn -0.000935 -0.999995 0.002877 +vn -0.222510 0.000000 0.974914 +vn -0.000673 0.999995 0.002949 +vn -0.000673 -0.999995 0.002949 +vn -0.134220 0.000000 0.990936 +vn -0.000406 0.999995 0.002998 +vn -0.000406 -0.999995 0.002998 +vn -0.044862 0.000000 0.998993 +vn -0.000136 0.999995 0.003022 +vn -0.000136 -0.999995 0.003022 +vn 0.044862 0.000000 0.998993 +vn 0.000136 0.999995 0.003022 +vn 0.000136 -0.999995 0.003022 +vn 0.134220 0.000000 0.990936 +vn 0.000406 0.999995 0.002998 +vn 0.000406 -0.999995 0.002998 +vn 0.222510 0.000000 0.974914 +vn 0.000673 0.999995 0.002949 +vn 0.000673 -0.999995 0.002949 +vn 0.309000 0.000000 0.951048 +vn 0.000935 0.999995 0.002877 +vn 0.000935 -0.999995 0.002877 +vn 0.393017 0.000000 0.919523 +vn 0.001189 0.999995 0.002782 +vn 0.001189 -0.999995 0.002782 +vn 0.473861 0.000000 0.880581 +vn 0.001433 0.999995 0.002664 +vn 0.001433 -0.999995 0.002664 +vn 0.550890 0.000000 0.834559 +vn 0.001666 0.999995 0.002525 +vn 0.001666 -0.999995 0.002525 +vn 0.623463 0.000000 0.781823 +vn 0.001886 0.999995 0.002365 +vn 0.001886 -0.999995 0.002365 +vn 0.691061 0.000000 0.722770 +vn 0.002090 0.999995 0.002186 +vn 0.002090 -0.999995 0.002186 +vn 0.753044 0.000000 0.657918 +vn 0.002278 0.999995 0.001990 +vn 0.002278 -0.999995 0.001990 +vn 0.809015 0.000000 0.587756 +vn 0.002447 0.999995 0.001778 +vn 0.002447 -0.999995 0.001778 +vn 0.858425 0.000000 0.512894 +vn 0.002597 0.999995 0.001552 +vn 0.002597 -0.999995 0.001552 +vn 0.900967 0.000000 0.433882 +vn 0.002725 0.999995 0.001313 +vn 0.002725 -0.999995 0.001313 +vn 0.936216 0.000000 0.351360 +vn 0.002832 0.999995 0.001063 +vn 0.002832 -0.999995 0.001063 +vn 0.963958 0.000000 0.266030 +vn 0.002916 0.999995 0.000805 +vn 0.002916 -0.999995 0.000805 +vn 0.983917 0.000000 0.178533 +vn 0.002976 0.999995 0.000540 +vn 0.002976 -0.999995 0.000540 +vn 0.995972 0.000000 0.089633 +vn 0.003013 0.999995 0.000271 +vn 0.003013 -0.999995 0.000271 +s 1 +f 1/1/1 4/2/2 5/3/3 2/4/4 +f 1/5/1 3/6/5 6/7/6 4/8/2 +f 4/2/2 7/9/7 8/10/8 5/3/3 +f 6/7/6 9/11/9 7/12/7 4/8/2 +f 7/9/7 10/13/10 11/14/11 8/10/8 +f 9/11/9 12/15/12 10/16/10 7/12/7 +f 10/13/10 13/17/13 14/18/14 11/14/11 +f 12/15/12 15/19/15 13/20/13 10/16/10 +f 13/17/13 16/21/16 17/22/17 14/18/14 +f 15/19/15 18/23/18 16/24/16 13/20/13 +f 16/21/16 19/25/19 20/26/20 17/22/17 +f 18/23/18 21/27/21 19/28/19 16/24/16 +f 19/25/19 22/29/22 23/30/23 20/26/20 +f 21/27/21 24/31/24 22/32/22 19/28/19 +f 22/29/22 25/33/25 26/34/26 23/30/23 +f 24/31/24 27/35/27 25/36/25 22/32/22 +f 25/33/25 28/37/28 29/38/29 26/34/26 +f 27/35/27 30/39/30 28/40/28 25/36/25 +f 28/37/28 31/41/31 32/42/32 29/38/29 +f 30/39/30 33/43/33 31/44/31 28/40/28 +f 31/41/31 34/45/34 35/46/35 32/42/32 +f 33/43/33 36/47/36 34/48/34 31/44/31 +f 34/45/34 37/49/37 38/50/38 35/46/35 +f 36/47/36 39/51/39 37/52/37 34/48/34 +f 37/49/37 40/53/40 41/54/41 38/50/38 +f 39/51/39 42/55/42 40/56/40 37/52/37 +f 40/53/40 43/57/43 44/58/44 41/54/41 +f 42/55/42 45/59/45 43/60/43 40/56/40 +f 43/57/43 46/61/46 47/62/47 44/58/44 +f 45/59/45 48/63/48 46/64/46 43/60/43 +f 46/61/46 49/65/49 50/66/50 47/62/47 +f 48/63/48 51/67/51 49/68/49 46/64/46 +f 49/65/49 52/69/52 53/70/53 50/66/50 +f 51/67/51 54/71/54 52/72/52 49/68/49 +f 52/69/52 55/73/55 56/74/56 53/70/53 +f 54/71/54 57/75/57 55/76/55 52/72/52 +f 55/73/55 58/77/58 59/78/59 56/74/56 +f 57/75/57 60/79/60 58/80/58 55/76/55 +f 58/77/58 61/81/61 62/82/62 59/78/59 +f 60/79/60 63/83/63 61/84/61 58/80/58 +f 61/81/61 64/85/64 65/86/65 62/82/62 +f 63/83/63 66/87/66 64/88/64 61/84/61 +f 64/85/64 67/89/67 68/90/68 65/86/65 +f 66/87/66 69/91/69 67/92/67 64/88/64 +f 67/89/67 70/93/70 71/94/71 68/90/68 +f 69/91/69 72/95/72 70/96/70 67/92/67 +f 70/93/70 73/97/73 74/98/74 71/94/71 +f 72/95/72 75/99/75 73/100/73 70/96/70 +f 73/97/73 76/101/76 77/102/77 74/98/74 +f 75/99/75 78/103/78 76/104/76 73/100/73 +f 76/101/76 79/105/79 80/106/80 77/102/77 +f 78/103/78 81/107/81 79/108/79 76/104/76 +f 79/105/79 82/109/82 83/110/83 80/106/80 +f 81/107/81 84/111/84 82/112/82 79/108/79 +f 82/109/82 85/113/85 86/114/86 83/110/83 +f 84/111/84 87/115/87 85/116/85 82/112/82 +f 85/113/85 88/117/88 89/118/89 86/114/86 +f 87/115/87 90/119/90 88/120/88 85/116/85 +f 88/117/88 91/121/91 92/122/92 89/118/89 +f 90/119/90 93/123/93 91/124/91 88/120/88 +f 91/121/91 94/125/94 95/126/95 92/122/92 +f 93/123/93 96/127/96 94/128/94 91/124/91 +f 94/125/94 97/129/97 98/130/98 95/126/95 +f 96/127/96 99/131/99 97/132/97 94/128/94 +f 97/129/97 100/133/100 101/134/101 98/130/98 +f 99/131/99 102/135/102 100/136/100 97/132/97 +f 100/133/100 103/137/103 104/138/104 101/134/101 +f 102/135/102 105/139/105 103/140/103 100/136/100 +f 103/137/103 106/141/106 107/142/107 104/138/104 +f 105/139/105 108/143/108 106/144/106 103/140/103 +f 106/141/106 109/145/109 110/146/110 107/142/107 +f 108/143/108 111/147/111 109/148/109 106/144/106 +f 109/145/109 112/149/112 113/150/113 110/146/110 +f 111/147/111 114/151/114 112/152/112 109/148/109 +f 112/149/112 115/153/115 116/154/116 113/150/113 +f 114/151/114 117/155/117 115/156/115 112/152/112 +f 115/153/115 118/157/118 119/158/119 116/154/116 +f 117/155/117 120/159/120 118/160/118 115/156/115 +f 118/157/118 121/161/121 122/162/122 119/158/119 +f 120/159/120 123/163/123 121/164/121 118/160/118 +f 121/161/121 124/165/124 125/166/125 122/162/122 +f 123/163/123 126/167/126 124/168/124 121/164/121 +f 124/165/124 127/169/127 128/170/128 125/166/125 +f 126/167/126 129/171/129 127/172/127 124/168/124 +f 127/169/127 130/173/130 131/174/131 128/170/128 +f 129/171/129 132/175/132 130/176/130 127/172/127 +f 130/173/130 133/177/133 134/178/134 131/174/131 +f 132/175/132 135/179/135 133/180/133 130/176/130 +f 133/177/133 136/181/136 137/182/137 134/178/134 +f 135/179/135 138/183/138 136/184/136 133/180/133 +f 136/181/136 139/185/139 140/186/140 137/182/137 +f 138/183/138 141/187/141 139/188/139 136/184/136 +f 139/185/139 142/189/142 143/190/143 140/186/140 +f 141/187/141 144/191/144 142/192/142 139/188/139 +f 142/189/142 145/193/145 146/194/146 143/190/143 +f 144/191/144 147/195/147 145/196/145 142/192/142 +f 145/193/145 148/197/148 149/198/149 146/194/146 +f 147/195/147 150/199/150 148/200/148 145/196/145 +f 148/197/148 151/201/151 152/202/152 149/198/149 +f 150/199/150 153/203/153 151/204/151 148/200/148 +f 151/201/151 154/205/154 155/206/155 152/202/152 +f 153/203/153 156/207/156 154/208/154 151/204/151 +f 154/205/154 157/209/157 158/210/158 155/206/155 +f 156/207/156 159/211/159 157/212/157 154/208/154 +f 157/209/157 160/213/160 161/214/161 158/210/158 +f 159/211/159 162/215/162 160/216/160 157/212/157 +f 160/213/160 163/217/163 164/218/164 161/214/161 +f 162/215/162 165/219/165 163/220/163 160/216/160 +f 163/217/163 166/221/166 167/222/167 164/218/164 +f 165/219/165 168/223/168 166/224/166 163/220/163 +f 166/221/166 169/225/169 170/226/170 167/222/167 +f 168/223/168 171/227/171 169/228/169 166/224/166 +f 169/225/169 172/229/172 173/230/173 170/226/170 +f 171/227/171 174/231/174 172/232/172 169/228/169 +f 172/229/172 175/233/175 176/234/176 173/230/173 +f 174/231/174 177/235/177 175/236/175 172/232/172 +f 175/233/175 178/237/178 179/238/179 176/234/176 +f 177/235/177 180/239/180 178/240/178 175/236/175 +f 178/237/178 181/241/181 182/242/182 179/238/179 +f 180/239/180 183/243/183 181/244/181 178/240/178 +f 181/241/181 184/245/184 185/246/185 182/242/182 +f 183/243/183 186/247/186 184/248/184 181/244/181 +f 184/245/184 187/249/187 188/250/188 185/246/185 +f 186/247/186 189/251/189 187/252/187 184/248/184 +f 187/249/187 190/253/190 191/254/191 188/250/188 +f 189/251/189 192/255/192 190/256/190 187/252/187 +f 190/253/190 193/257/193 194/258/194 191/254/191 +f 192/255/192 195/259/195 193/260/193 190/256/190 +f 193/257/193 196/56/196 197/261/197 194/258/194 +f 195/259/195 198/262/198 196/263/196 193/260/193 +f 196/56/196 199/60/199 200/264/200 197/261/197 +f 198/262/198 201/265/201 199/266/199 196/263/196 +f 199/60/199 202/267/202 203/268/203 200/264/200 +f 201/265/201 204/269/204 202/270/202 199/266/199 +f 202/267/202 205/271/205 206/272/206 203/268/203 +f 204/269/204 207/273/207 205/274/205 202/270/202 +f 205/271/205 208/275/208 209/276/209 206/272/206 +f 207/273/207 210/277/210 208/278/208 205/274/205 +f 208/275/208 1/1/1 2/4/4 209/276/209 +f 210/277/210 3/6/5 1/5/1 208/278/208 diff --git a/examples/qt3d/planets-qml/meshes/starfield.obj b/examples/qt3d/planets-qml/meshes/starfield.obj new file mode 100644 index 000000000..31f70d06b --- /dev/null +++ b/examples/qt3d/planets-qml/meshes/starfield.obj @@ -0,0 +1,4055 @@ +# Blender v2.70 (sub 0) OBJ File: '' +# www.blender.org +v -0.098017 0.995185 0.000000 +v -0.195090 0.980785 0.000000 +v -0.290285 0.956940 0.000000 +v -0.382683 0.923880 0.000000 +v -0.471397 0.881921 0.000000 +v -0.555570 0.831470 0.000000 +v -0.634393 0.773010 0.000000 +v -0.707107 0.707107 0.000000 +v -0.773010 0.634393 0.000000 +v -0.831470 0.555570 0.000000 +v -0.881921 0.471397 0.000000 +v -0.923880 0.382683 0.000000 +v -0.956940 0.290285 0.000000 +v -0.980785 0.195090 0.000000 +v -0.995185 0.098017 0.000000 +v -1.000000 -0.000000 0.000000 +v -0.995185 -0.098017 0.000000 +v -0.980785 -0.195091 0.000000 +v -0.956940 -0.290285 0.000000 +v -0.923879 -0.382684 0.000000 +v -0.881921 -0.471397 0.000000 +v -0.831469 -0.555571 0.000000 +v -0.773010 -0.634394 0.000000 +v -0.707106 -0.707107 0.000000 +v -0.634393 -0.773011 0.000000 +v -0.555570 -0.831470 0.000000 +v -0.471396 -0.881922 0.000000 +v -0.382683 -0.923880 0.000000 +v -0.290284 -0.956941 0.000000 +v -0.195090 -0.980785 0.000000 +v -0.098016 -0.995185 0.000000 +v -0.096134 0.995185 -0.019122 +v -0.191342 0.980785 -0.038060 +v -0.284707 0.956940 -0.056632 +v -0.375330 0.923880 -0.074658 +v -0.462339 0.881921 -0.091965 +v -0.544895 0.831470 -0.108387 +v -0.622204 0.773010 -0.123764 +v -0.693520 0.707107 -0.137950 +v -0.758157 0.634393 -0.150807 +v -0.815493 0.555570 -0.162212 +v -0.864975 0.471397 -0.172054 +v -0.906127 0.382683 -0.180240 +v -0.938553 0.290285 -0.186690 +v -0.961940 0.195090 -0.191342 +v -0.976062 0.098017 -0.194151 +v -0.980785 -0.000000 -0.195090 +v -0.976062 -0.098017 -0.194151 +v -0.961940 -0.195091 -0.191342 +v -0.938553 -0.290285 -0.186690 +v -0.906127 -0.382684 -0.180240 +v -0.864975 -0.471397 -0.172054 +v -0.815493 -0.555571 -0.162212 +v -0.758157 -0.634394 -0.150807 +v -0.693520 -0.707107 -0.137950 +v -0.622203 -0.773011 -0.123764 +v -0.544895 -0.831470 -0.108386 +v -0.462338 -0.881922 -0.091965 +v -0.375330 -0.923880 -0.074658 +v -0.284706 -0.956941 -0.056632 +v -0.191341 -0.980785 -0.038060 +v -0.096133 -0.995185 -0.019122 +v -0.090556 0.995185 -0.037510 +v -0.180240 0.980785 -0.074658 +v -0.268188 0.956940 -0.111087 +v -0.353553 0.923880 -0.146447 +v -0.435514 0.881921 -0.180396 +v -0.513280 0.831470 -0.212608 +v -0.586103 0.773010 -0.242772 +v -0.653281 0.707107 -0.270598 +v -0.714168 0.634393 -0.295819 +v -0.768178 0.555570 -0.318190 +v -0.814789 0.471397 -0.337497 +v -0.853553 0.382683 -0.353554 +v -0.884098 0.290285 -0.366206 +v -0.906127 0.195090 -0.375331 +v -0.919431 0.098017 -0.380841 +v -0.923879 -0.000000 -0.382684 +v -0.919431 -0.098017 -0.380841 +v -0.906127 -0.195091 -0.375331 +v -0.884097 -0.290285 -0.366205 +v -0.853553 -0.382684 -0.353554 +v -0.814789 -0.471397 -0.337497 +v -0.768178 -0.555571 -0.318190 +v -0.714168 -0.634394 -0.295819 +v -0.653281 -0.707107 -0.270598 +v -0.586102 -0.773011 -0.242772 +v -0.513279 -0.831470 -0.212608 +v -0.435513 -0.881922 -0.180396 +v -0.353553 -0.923880 -0.146447 +v -0.268187 -0.956941 -0.111087 +v -0.180239 -0.980785 -0.074658 +v -0.090555 -0.995185 -0.037510 +v -0.081498 0.995185 -0.054456 +v -0.162212 0.980785 -0.108387 +v -0.241363 0.956940 -0.161274 +v -0.318189 0.923880 -0.212608 +v -0.391952 0.881921 -0.261894 +v -0.461940 0.831470 -0.308659 +v -0.527479 0.773010 -0.352450 +v -0.587938 0.707107 -0.392848 +v -0.642735 0.634393 -0.429462 +v -0.691342 0.555570 -0.461940 +v -0.733291 0.471397 -0.489970 +v -0.768178 0.382683 -0.513280 +v -0.795667 0.290285 -0.531648 +v -0.815493 0.195090 -0.544896 +v -0.827466 0.098017 -0.552895 +v -0.831469 -0.000000 -0.555571 +v -0.827466 -0.098017 -0.552895 +v -0.815493 -0.195091 -0.544895 +v -0.795667 -0.290285 -0.531648 +v -0.768177 -0.382684 -0.513280 +v -0.733290 -0.471397 -0.489970 +v -0.691341 -0.555571 -0.461940 +v -0.642734 -0.634394 -0.429462 +v -0.587937 -0.707107 -0.392848 +v -0.527478 -0.773011 -0.352450 +v -0.461939 -0.831470 -0.308658 +v -0.391951 -0.881922 -0.261894 +v -0.318189 -0.923880 -0.212608 +v -0.241362 -0.956941 -0.161274 +v -0.162211 -0.980785 -0.108386 +v -0.081498 -0.995185 -0.054455 +v -0.069308 0.995185 -0.069309 +v -0.137949 0.980785 -0.137950 +v -0.205262 0.956940 -0.205263 +v -0.270598 0.923880 -0.270599 +v -0.333328 0.881921 -0.333328 +v -0.392847 0.831470 -0.392848 +v -0.448584 0.773010 -0.448584 +v -0.500000 0.707107 -0.500001 +v -0.546601 0.634393 -0.546602 +v -0.587937 0.555570 -0.587938 +v -0.623612 0.471397 -0.623613 +v -0.653281 0.382683 -0.653282 +v -0.676659 0.290285 -0.676660 +v -0.693520 0.195090 -0.693521 +v -0.703702 0.098017 -0.703702 +v -0.707106 -0.000000 -0.707107 +v -0.703702 -0.098017 -0.703702 +v -0.693520 -0.195091 -0.693520 +v -0.676659 -0.290285 -0.676660 +v -0.653281 -0.382684 -0.653282 +v -0.623612 -0.471397 -0.623613 +v -0.587937 -0.555571 -0.587938 +v -0.546601 -0.634394 -0.546601 +v -0.499999 -0.707107 -0.500000 +v -0.448583 -0.773011 -0.448584 +v -0.392847 -0.831470 -0.392848 +v -0.333327 -0.881922 -0.333328 +v -0.270597 -0.923880 -0.270598 +v -0.205261 -0.956941 -0.205262 +v -0.137949 -0.980785 -0.137950 +v -0.069308 -0.995185 -0.069309 +v -0.054455 0.995185 -0.081499 +v -0.108386 0.980785 -0.162212 +v -0.161273 0.956940 -0.241364 +v -0.212607 0.923880 -0.318190 +v -0.261894 0.881921 -0.391953 +v -0.308658 0.831470 -0.461940 +v -0.352450 0.773010 -0.527479 +v -0.392847 0.707107 -0.587938 +v -0.429461 0.634393 -0.642735 +v -0.461939 0.555570 -0.691342 +v -0.489969 0.471397 -0.733291 +v -0.513280 0.382683 -0.768178 +v -0.531647 0.290285 -0.795668 +v -0.544895 0.195090 -0.815494 +v -0.552895 0.098017 -0.827466 +v -0.555570 -0.000000 -0.831470 +v -0.552895 -0.098017 -0.827466 +v -0.544895 -0.195091 -0.815494 +v -0.531647 -0.290285 -0.795667 +v -0.513279 -0.382684 -0.768178 +v -0.489969 -0.471397 -0.733291 +v -0.461939 -0.555571 -0.691342 +v -0.429461 -0.634394 -0.642735 +v -0.392847 -0.707107 -0.587938 +v -0.352449 -0.773011 -0.527479 +v -0.308658 -0.831470 -0.461940 +v -0.261893 -0.881922 -0.391952 +v -0.212607 -0.923880 -0.318190 +v -0.161273 -0.956941 -0.241363 +v -0.108386 -0.980785 -0.162212 +v -0.054455 -0.995185 -0.081498 +v -0.037509 0.995185 -0.090557 +v -0.074657 0.980785 -0.180241 +v -0.111087 0.956940 -0.268189 +v -0.146446 0.923880 -0.353554 +v -0.180395 0.881921 -0.435514 +v -0.212607 0.831470 -0.513281 +v -0.242771 0.773010 -0.586104 +v -0.270597 0.707107 -0.653282 +v -0.295818 0.634393 -0.714169 +v -0.318189 0.555570 -0.768178 +v -0.337496 0.471397 -0.814790 +v -0.353553 0.382683 -0.853554 +v -0.366205 0.290285 -0.884098 +v -0.375330 0.195090 -0.906128 +v -0.380840 0.098017 -0.919431 +v -0.382683 -0.000000 -0.923880 +v -0.380840 -0.098017 -0.919431 +v -0.375330 -0.195091 -0.906128 +v -0.366205 -0.290285 -0.884098 +v -0.353553 -0.382684 -0.853554 +v -0.337496 -0.471397 -0.814790 +v -0.318189 -0.555571 -0.768178 +v -0.295818 -0.634394 -0.714169 +v -0.270597 -0.707107 -0.653282 +v -0.242771 -0.773011 -0.586103 +v -0.212607 -0.831470 -0.513280 +v -0.180395 -0.881922 -0.435514 +v -0.146446 -0.923880 -0.353554 +v -0.111086 -0.956941 -0.268188 +v -0.074657 -0.980785 -0.180240 +v -0.037509 -0.995185 -0.090556 +v 0.000001 -1.000000 0.000000 +v -0.019122 0.995185 -0.096135 +v -0.038060 0.980785 -0.191342 +v -0.056631 0.956940 -0.284708 +v -0.074657 0.923880 -0.375331 +v -0.091964 0.881921 -0.462340 +v -0.108386 0.831470 -0.544896 +v -0.123763 0.773010 -0.622204 +v -0.137949 0.707107 -0.693521 +v -0.150806 0.634393 -0.758158 +v -0.162211 0.555570 -0.815494 +v -0.172054 0.471397 -0.864976 +v -0.180239 0.382683 -0.906128 +v -0.186689 0.290285 -0.938554 +v -0.191341 0.195090 -0.961941 +v -0.194150 0.098017 -0.976063 +v -0.195090 -0.000000 -0.980786 +v -0.194150 -0.098017 -0.976063 +v -0.191341 -0.195091 -0.961940 +v -0.186689 -0.290285 -0.938554 +v -0.180239 -0.382684 -0.906128 +v -0.172054 -0.471397 -0.864976 +v -0.162211 -0.555571 -0.815494 +v -0.150806 -0.634394 -0.758158 +v -0.137949 -0.707107 -0.693520 +v -0.123763 -0.773011 -0.622204 +v -0.108386 -0.831470 -0.544895 +v -0.091964 -0.881922 -0.462339 +v -0.074657 -0.923880 -0.375330 +v -0.056631 -0.956941 -0.284707 +v -0.038059 -0.980785 -0.191342 +v -0.019121 -0.995185 -0.096134 +v 0.000001 0.995185 -0.098018 +v 0.000001 0.980785 -0.195091 +v 0.000001 0.956940 -0.290285 +v 0.000001 0.923880 -0.382684 +v 0.000001 0.881921 -0.471397 +v 0.000001 0.831470 -0.555571 +v 0.000001 0.773010 -0.634394 +v 0.000001 0.707107 -0.707108 +v 0.000001 0.634393 -0.773011 +v 0.000001 0.555570 -0.831470 +v 0.000001 0.471397 -0.881922 +v 0.000001 0.382683 -0.923880 +v 0.000001 0.290285 -0.956941 +v 0.000001 0.195090 -0.980786 +v 0.000001 0.098017 -0.995185 +v 0.000001 -0.000000 -1.000001 +v 0.000001 -0.098017 -0.995185 +v 0.000001 -0.195091 -0.980786 +v 0.000001 -0.290285 -0.956941 +v 0.000001 -0.382684 -0.923880 +v 0.000001 -0.471397 -0.881922 +v 0.000001 -0.555571 -0.831470 +v 0.000001 -0.634394 -0.773011 +v 0.000001 -0.707107 -0.707107 +v 0.000001 -0.773011 -0.634394 +v 0.000001 -0.831470 -0.555570 +v 0.000001 -0.881922 -0.471397 +v 0.000001 -0.923880 -0.382683 +v 0.000001 -0.956941 -0.290285 +v 0.000001 -0.980785 -0.195090 +v 0.000001 -0.995185 -0.098017 +v 0.019123 0.995185 -0.096135 +v 0.038061 0.980785 -0.191342 +v 0.056633 0.956940 -0.284708 +v 0.074659 0.923880 -0.375331 +v 0.091966 0.881921 -0.462340 +v 0.108387 0.831470 -0.544896 +v 0.123765 0.773010 -0.622204 +v 0.137951 0.707107 -0.693521 +v 0.150808 0.634393 -0.758158 +v 0.162213 0.555570 -0.815494 +v 0.172055 0.471397 -0.864976 +v 0.180241 0.382683 -0.906128 +v 0.186691 0.290285 -0.938554 +v 0.191343 0.195090 -0.961940 +v 0.194152 0.098017 -0.976063 +v 0.195091 -0.000000 -0.980786 +v 0.194152 -0.098017 -0.976063 +v 0.191343 -0.195091 -0.961940 +v 0.186691 -0.290285 -0.938554 +v 0.180241 -0.382684 -0.906128 +v 0.172055 -0.471397 -0.864976 +v 0.162213 -0.555571 -0.815494 +v 0.150808 -0.634394 -0.758158 +v 0.137951 -0.707107 -0.693520 +v 0.123765 -0.773011 -0.622204 +v 0.108387 -0.831470 -0.544895 +v 0.091966 -0.881922 -0.462339 +v 0.074659 -0.923880 -0.375330 +v 0.056633 -0.956941 -0.284707 +v 0.038061 -0.980785 -0.191342 +v 0.019123 -0.995185 -0.096134 +v 0.037511 0.995185 -0.090557 +v 0.074659 0.980785 -0.180241 +v 0.111088 0.956940 -0.268189 +v 0.146448 0.923880 -0.353554 +v 0.180397 0.881921 -0.435514 +v 0.212609 0.831470 -0.513281 +v 0.242773 0.773010 -0.586104 +v 0.270599 0.707107 -0.653282 +v 0.295819 0.634393 -0.714169 +v 0.318191 0.555570 -0.768178 +v 0.337498 0.471397 -0.814790 +v 0.353555 0.382683 -0.853554 +v 0.366206 0.290285 -0.884098 +v 0.375331 0.195090 -0.906128 +v 0.380842 0.098017 -0.919431 +v 0.382685 -0.000000 -0.923880 +v 0.380842 -0.098017 -0.919431 +v 0.375331 -0.195091 -0.906128 +v 0.366206 -0.290285 -0.884098 +v 0.353555 -0.382684 -0.853554 +v 0.337498 -0.471397 -0.814790 +v 0.318191 -0.555571 -0.768178 +v 0.295819 -0.634394 -0.714169 +v 0.270599 -0.707107 -0.653282 +v 0.242773 -0.773011 -0.586103 +v 0.212609 -0.831470 -0.513280 +v 0.180397 -0.881922 -0.435514 +v 0.146447 -0.923880 -0.353553 +v 0.111088 -0.956941 -0.268188 +v 0.074659 -0.980785 -0.180240 +v 0.037510 -0.995185 -0.090556 +v 0.054457 0.995185 -0.081499 +v 0.108388 0.980785 -0.162212 +v 0.161275 0.956940 -0.241363 +v 0.212609 0.923880 -0.318190 +v 0.261895 0.881921 -0.391952 +v 0.308660 0.831470 -0.461940 +v 0.352451 0.773010 -0.527479 +v 0.392849 0.707107 -0.587938 +v 0.429463 0.634393 -0.642735 +v 0.461941 0.555570 -0.691342 +v 0.489971 0.471397 -0.733291 +v 0.513281 0.382683 -0.768178 +v 0.531649 0.290285 -0.795667 +v 0.544896 0.195090 -0.815494 +v 0.552896 0.098017 -0.827466 +v 0.555572 -0.000000 -0.831470 +v 0.552896 -0.098017 -0.827466 +v 0.544896 -0.195091 -0.815494 +v 0.531649 -0.290285 -0.795667 +v 0.513281 -0.382684 -0.768178 +v 0.489970 -0.471397 -0.733291 +v 0.461941 -0.555571 -0.691342 +v 0.429463 -0.634394 -0.642735 +v 0.392849 -0.707107 -0.587938 +v 0.352451 -0.773011 -0.527479 +v 0.308659 -0.831470 -0.461940 +v 0.261895 -0.881922 -0.391952 +v 0.212608 -0.923880 -0.318190 +v 0.161274 -0.956941 -0.241363 +v 0.108387 -0.980785 -0.162212 +v 0.054456 -0.995185 -0.081498 +v 0.069310 0.995185 -0.069309 +v 0.137951 0.980785 -0.137950 +v 0.205264 0.956940 -0.205263 +v 0.270599 0.923880 -0.270598 +v 0.333329 0.881921 -0.333328 +v 0.392849 0.831470 -0.392848 +v 0.448585 0.773010 -0.448584 +v 0.500001 0.707107 -0.500000 +v 0.546602 0.634393 -0.546601 +v 0.587939 0.555570 -0.587938 +v 0.623614 0.471397 -0.623613 +v 0.653283 0.382683 -0.653282 +v 0.676660 0.290285 -0.676659 +v 0.693521 0.195090 -0.693520 +v 0.703703 0.098017 -0.703702 +v 0.707108 -0.000000 -0.707107 +v 0.703703 -0.098017 -0.703702 +v 0.693521 -0.195091 -0.693520 +v 0.676660 -0.290285 -0.676659 +v 0.653283 -0.382684 -0.653282 +v 0.623614 -0.471397 -0.623613 +v 0.587939 -0.555571 -0.587938 +v 0.546602 -0.634394 -0.546601 +v 0.500001 -0.707107 -0.500000 +v 0.448585 -0.773011 -0.448584 +v 0.392849 -0.831470 -0.392848 +v 0.333329 -0.881922 -0.333328 +v 0.270599 -0.923880 -0.270598 +v 0.205263 -0.956941 -0.205262 +v 0.137951 -0.980785 -0.137950 +v 0.069309 -0.995185 -0.069309 +v 0.081500 0.995185 -0.054456 +v 0.162213 0.980785 -0.108387 +v 0.241364 0.956940 -0.161274 +v 0.318191 0.923880 -0.212608 +v 0.391953 0.881921 -0.261894 +v 0.461941 0.831470 -0.308659 +v 0.527480 0.773010 -0.352450 +v 0.587939 0.707107 -0.392848 +v 0.642736 0.634393 -0.429462 +v 0.691343 0.555570 -0.461940 +v 0.733292 0.471397 -0.489969 +v 0.768179 0.382683 -0.513280 +v 0.795668 0.290285 -0.531648 +v 0.815495 0.195090 -0.544895 +v 0.827467 0.098017 -0.552895 +v 0.831471 -0.000000 -0.555571 +v 0.827467 -0.098017 -0.552895 +v 0.815494 -0.195091 -0.544895 +v 0.795668 -0.290285 -0.531648 +v 0.768179 -0.382684 -0.513280 +v 0.733292 -0.471397 -0.489969 +v 0.691343 -0.555571 -0.461940 +v 0.642736 -0.634394 -0.429462 +v 0.587939 -0.707107 -0.392848 +v 0.527480 -0.773011 -0.352450 +v 0.461941 -0.831470 -0.308658 +v 0.391953 -0.881922 -0.261894 +v 0.318191 -0.923880 -0.212607 +v 0.241364 -0.956941 -0.161273 +v 0.162213 -0.980785 -0.108386 +v 0.081499 -0.995185 -0.054455 +v 0.090558 0.995185 -0.037510 +v 0.180241 0.980785 -0.074658 +v 0.268189 0.956940 -0.111087 +v 0.353555 0.923880 -0.146447 +v 0.435515 0.881921 -0.180396 +v 0.513281 0.831470 -0.212608 +v 0.586104 0.773010 -0.242772 +v 0.653283 0.707107 -0.270598 +v 0.714170 0.634393 -0.295818 +v 0.768179 0.555570 -0.318190 +v 0.814790 0.471397 -0.337497 +v 0.853555 0.382683 -0.353554 +v 0.884099 0.290285 -0.366205 +v 0.906129 0.195090 -0.375330 +v 0.919432 0.098017 -0.380841 +v 0.923881 -0.000000 -0.382684 +v 0.919432 -0.098017 -0.380841 +v 0.906129 -0.195091 -0.375331 +v 0.884099 -0.290285 -0.366205 +v 0.853555 -0.382684 -0.353554 +v 0.814790 -0.471397 -0.337497 +v 0.768179 -0.555571 -0.318190 +v 0.714170 -0.634394 -0.295818 +v 0.653283 -0.707107 -0.270598 +v 0.586104 -0.773011 -0.242772 +v 0.513281 -0.831470 -0.212607 +v 0.435515 -0.881922 -0.180396 +v 0.353554 -0.923880 -0.146447 +v 0.268189 -0.956941 -0.111087 +v 0.180241 -0.980785 -0.074658 +v 0.090557 -0.995185 -0.037510 +v 0.096135 0.995185 -0.019122 +v 0.191343 0.980785 -0.038060 +v 0.284708 0.956940 -0.056632 +v 0.375332 0.923880 -0.074658 +v 0.462340 0.881921 -0.091965 +v 0.544897 0.831470 -0.108386 +v 0.622205 0.773010 -0.123764 +v 0.693521 0.707107 -0.137950 +v 0.758159 0.634393 -0.150807 +v 0.815494 0.555570 -0.162212 +v 0.864977 0.471397 -0.172054 +v 0.906129 0.382683 -0.180240 +v 0.938554 0.290285 -0.186690 +v 0.961941 0.195090 -0.191342 +v 0.976064 0.098017 -0.194151 +v 0.980787 -0.000000 -0.195090 +v 0.976064 -0.098017 -0.194151 +v 0.961941 -0.195091 -0.191342 +v 0.938554 -0.290285 -0.186690 +v 0.906129 -0.382684 -0.180240 +v 0.864977 -0.471397 -0.172054 +v 0.815494 -0.555571 -0.162212 +v 0.758158 -0.634394 -0.150807 +v 0.693521 -0.707107 -0.137950 +v 0.622205 -0.773011 -0.123764 +v 0.544896 -0.831470 -0.108386 +v 0.462340 -0.881922 -0.091965 +v 0.375331 -0.923880 -0.074658 +v 0.284708 -0.956941 -0.056632 +v 0.191343 -0.980785 -0.038060 +v 0.096135 -0.995185 -0.019122 +v 0.098019 0.995185 -0.000000 +v 0.195092 0.980785 0.000000 +v 0.290286 0.956940 0.000000 +v 0.382685 0.923880 0.000000 +v 0.471398 0.881921 0.000000 +v 0.555572 0.831470 0.000000 +v 0.634395 0.773010 0.000000 +v 0.707108 0.707107 0.000000 +v 0.773012 0.634393 0.000000 +v 0.831471 0.555570 0.000000 +v 0.881923 0.471397 0.000000 +v 0.923881 0.382683 0.000000 +v 0.956942 0.290285 0.000000 +v 0.980787 0.195090 0.000000 +v 0.995186 0.098017 0.000000 +v 1.000001 -0.000000 0.000000 +v 0.995186 -0.098017 0.000000 +v 0.980787 -0.195091 -0.000000 +v 0.956941 -0.290285 0.000000 +v 0.923881 -0.382684 0.000000 +v 0.881922 -0.471397 0.000000 +v 0.831471 -0.555571 0.000000 +v 0.773012 -0.634394 0.000000 +v 0.707108 -0.707107 0.000000 +v 0.634394 -0.773011 -0.000000 +v 0.555571 -0.831470 0.000000 +v 0.471398 -0.881922 0.000000 +v 0.382684 -0.923880 0.000000 +v 0.290285 -0.956941 0.000000 +v 0.195091 -0.980785 0.000000 +v 0.098018 -0.995185 0.000000 +v 0.096135 0.995185 0.019122 +v 0.191343 0.980785 0.038060 +v 0.284708 0.956940 0.056632 +v 0.375332 0.923880 0.074658 +v 0.462340 0.881921 0.091965 +v 0.544897 0.831470 0.108387 +v 0.622205 0.773010 0.123764 +v 0.693521 0.707107 0.137950 +v 0.758159 0.634393 0.150807 +v 0.815494 0.555570 0.162212 +v 0.864977 0.471397 0.172055 +v 0.906129 0.382683 0.180240 +v 0.938554 0.290285 0.186690 +v 0.961941 0.195090 0.191342 +v 0.976064 0.098017 0.194151 +v 0.980787 -0.000000 0.195090 +v 0.976064 -0.098017 0.194151 +v 0.961941 -0.195091 0.191342 +v 0.938554 -0.290285 0.186690 +v 0.906129 -0.382684 0.180240 +v 0.864977 -0.471397 0.172055 +v 0.815494 -0.555571 0.162212 +v 0.758158 -0.634394 0.150807 +v 0.693521 -0.707107 0.137950 +v 0.622205 -0.773011 0.123764 +v 0.544896 -0.831470 0.108387 +v 0.462340 -0.881922 0.091965 +v 0.375331 -0.923880 0.074658 +v 0.284708 -0.956941 0.056632 +v 0.191343 -0.980785 0.038060 +v 0.096135 -0.995185 0.019122 +v 0.090558 0.995185 0.037510 +v 0.180241 0.980785 0.074658 +v 0.268190 0.956940 0.111087 +v 0.353555 0.923880 0.146447 +v 0.435515 0.881921 0.180396 +v 0.513281 0.831470 0.212608 +v 0.586104 0.773010 0.242772 +v 0.653283 0.707107 0.270598 +v 0.714170 0.634393 0.295819 +v 0.768179 0.555570 0.318190 +v 0.814790 0.471397 0.337497 +v 0.853554 0.382683 0.353554 +v 0.884099 0.290285 0.366205 +v 0.906129 0.195090 0.375331 +v 0.919432 0.098017 0.380841 +v 0.923881 -0.000000 0.382684 +v 0.919432 -0.098017 0.380841 +v 0.906129 -0.195091 0.375330 +v 0.884099 -0.290285 0.366205 +v 0.853555 -0.382684 0.353554 +v 0.814790 -0.471397 0.337497 +v 0.768179 -0.555571 0.318190 +v 0.714170 -0.634394 0.295818 +v 0.653282 -0.707107 0.270598 +v 0.586104 -0.773011 0.242772 +v 0.513281 -0.831470 0.212608 +v 0.435515 -0.881922 0.180396 +v 0.353554 -0.923880 0.146447 +v 0.268189 -0.956941 0.111087 +v 0.180241 -0.980785 0.074658 +v 0.090557 -0.995185 0.037510 +v 0.081500 0.995185 0.054456 +v 0.162213 0.980785 0.108387 +v 0.241364 0.956940 0.161274 +v 0.318191 0.923880 0.212608 +v 0.391953 0.881921 0.261894 +v 0.461941 0.831470 0.308659 +v 0.527480 0.773010 0.352450 +v 0.587939 0.707107 0.392848 +v 0.642736 0.634393 0.429462 +v 0.691343 0.555570 0.461940 +v 0.733292 0.471397 0.489970 +v 0.768179 0.382683 0.513280 +v 0.795668 0.290285 0.531648 +v 0.815494 0.195090 0.544895 +v 0.827467 0.098017 0.552895 +v 0.831471 -0.000000 0.555571 +v 0.827467 -0.098017 0.552895 +v 0.815494 -0.195091 0.544895 +v 0.795668 -0.290285 0.531648 +v 0.768179 -0.382684 0.513280 +v 0.733292 -0.471397 0.489970 +v 0.691343 -0.555571 0.461940 +v 0.642736 -0.634394 0.429462 +v 0.587939 -0.707107 0.392848 +v 0.527480 -0.773011 0.352450 +v 0.461941 -0.831470 0.308659 +v 0.391953 -0.881922 0.261894 +v 0.318190 -0.923880 0.212608 +v 0.241364 -0.956941 0.161274 +v 0.162213 -0.980785 0.108386 +v 0.081499 -0.995185 0.054455 +v 0.069310 0.995185 0.069309 +v 0.137951 0.980785 0.137950 +v 0.205264 0.956940 0.205263 +v 0.270599 0.923880 0.270599 +v 0.333329 0.881921 0.333328 +v 0.392849 0.831470 0.392848 +v 0.448585 0.773010 0.448584 +v 0.500001 0.707107 0.500000 +v 0.546602 0.634393 0.546601 +v 0.587939 0.555570 0.587938 +v 0.623613 0.471397 0.623613 +v 0.653282 0.382683 0.653282 +v 0.676660 0.290285 0.676659 +v 0.693521 0.195090 0.693520 +v 0.703703 0.098017 0.703702 +v 0.707108 -0.000000 0.707107 +v 0.703703 -0.098017 0.703702 +v 0.693521 -0.195091 0.693520 +v 0.676660 -0.290285 0.676659 +v 0.653282 -0.382684 0.653282 +v 0.623613 -0.471397 0.623613 +v 0.587939 -0.555571 0.587938 +v 0.546602 -0.634394 0.546601 +v 0.500001 -0.707107 0.500000 +v 0.448585 -0.773011 0.448584 +v 0.392848 -0.831470 0.392848 +v 0.333329 -0.881922 0.333328 +v 0.270599 -0.923880 0.270598 +v 0.205263 -0.956941 0.205262 +v 0.137951 -0.980785 0.137950 +v 0.069309 -0.995185 0.069309 +v 0.054457 0.995185 0.081499 +v 0.108388 0.980785 0.162212 +v 0.161275 0.956940 0.241363 +v 0.212609 0.923880 0.318190 +v 0.261895 0.881921 0.391953 +v 0.308659 0.831470 0.461940 +v 0.352451 0.773010 0.527479 +v 0.392848 0.707107 0.587938 +v 0.429463 0.634393 0.642735 +v 0.461940 0.555570 0.691342 +v 0.489970 0.471397 0.733291 +v 0.513281 0.382683 0.768178 +v 0.531648 0.290285 0.795667 +v 0.544896 0.195090 0.815494 +v 0.552896 0.098017 0.827466 +v 0.555571 -0.000000 0.831470 +v 0.552896 -0.098017 0.827466 +v 0.544896 -0.195091 0.815493 +v 0.531648 -0.290285 0.795667 +v 0.513281 -0.382684 0.768178 +v 0.489970 -0.471397 0.733291 +v 0.461940 -0.555571 0.691342 +v 0.429462 -0.634394 0.642735 +v 0.392848 -0.707107 0.587938 +v 0.352451 -0.773011 0.527479 +v 0.308659 -0.831470 0.461940 +v 0.261895 -0.881922 0.391952 +v 0.212608 -0.923880 0.318190 +v 0.161274 -0.956941 0.241363 +v 0.108387 -0.980785 0.162212 +v 0.054456 -0.995185 0.081498 +v 0.037511 0.995185 0.090557 +v 0.074659 0.980785 0.180241 +v 0.111088 0.956940 0.268189 +v 0.146448 0.923880 0.353554 +v 0.180397 0.881921 0.435514 +v 0.212608 0.831470 0.513281 +v 0.242773 0.773010 0.586103 +v 0.270599 0.707107 0.653282 +v 0.295819 0.634393 0.714169 +v 0.318190 0.555570 0.768178 +v 0.337497 0.471397 0.814789 +v 0.353554 0.382683 0.853554 +v 0.366206 0.290285 0.884098 +v 0.375331 0.195090 0.906128 +v 0.380842 0.098017 0.919431 +v 0.382684 -0.000000 0.923880 +v 0.380842 -0.098017 0.919431 +v 0.375331 -0.195091 0.906127 +v 0.366206 -0.290285 0.884098 +v 0.353554 -0.382684 0.853554 +v 0.337497 -0.471397 0.814789 +v 0.318190 -0.555571 0.768178 +v 0.295819 -0.634394 0.714169 +v 0.270599 -0.707107 0.653282 +v 0.242773 -0.773011 0.586103 +v 0.212608 -0.831470 0.513280 +v 0.180396 -0.881922 0.435514 +v 0.146447 -0.923880 0.353553 +v 0.111088 -0.956941 0.268188 +v 0.074659 -0.980785 0.180240 +v 0.037510 -0.995185 0.090556 +v 0.019123 0.995185 0.096135 +v 0.038061 0.980785 0.191342 +v 0.056633 0.956940 0.284708 +v 0.074659 0.923880 0.375331 +v 0.091966 0.881921 0.462340 +v 0.108387 0.831470 0.544896 +v 0.123765 0.773010 0.622204 +v 0.137950 0.707107 0.693520 +v 0.150808 0.634393 0.758158 +v 0.162212 0.555570 0.815493 +v 0.172055 0.471397 0.864976 +v 0.180241 0.382683 0.906128 +v 0.186691 0.290285 0.938553 +v 0.191343 0.195090 0.961940 +v 0.194152 0.098017 0.976063 +v 0.195091 -0.000000 0.980786 +v 0.194152 -0.098017 0.976063 +v 0.191343 -0.195091 0.961940 +v 0.186691 -0.290285 0.938553 +v 0.180241 -0.382684 0.906128 +v 0.172055 -0.471397 0.864976 +v 0.162212 -0.555571 0.815493 +v 0.150808 -0.634394 0.758157 +v 0.137950 -0.707107 0.693520 +v 0.123765 -0.773011 0.622204 +v 0.108387 -0.831470 0.544895 +v 0.091966 -0.881922 0.462339 +v 0.074659 -0.923880 0.375330 +v 0.056632 -0.956941 0.284707 +v 0.038061 -0.980785 0.191342 +v 0.019123 -0.995185 0.096134 +v 0.000001 0.995185 0.098018 +v 0.000001 0.980785 0.195091 +v 0.000001 0.956940 0.290285 +v 0.000001 0.923880 0.382684 +v 0.000001 0.881921 0.471397 +v 0.000001 0.831470 0.555571 +v 0.000001 0.773010 0.634394 +v 0.000001 0.707107 0.707107 +v 0.000001 0.634393 0.773011 +v 0.000001 0.555570 0.831470 +v 0.000001 0.471397 0.881922 +v 0.000001 0.382683 0.923880 +v 0.000001 0.290285 0.956941 +v 0.000001 0.195090 0.980785 +v 0.000001 0.098017 0.995185 +v 0.000001 -0.000000 1.000000 +v 0.000001 -0.098017 0.995185 +v 0.000001 -0.195091 0.980785 +v 0.000001 -0.290285 0.956940 +v 0.000001 -0.382684 0.923880 +v 0.000001 -0.471397 0.881921 +v 0.000001 -0.555571 0.831470 +v 0.000001 -0.634394 0.773010 +v 0.000001 -0.707107 0.707107 +v 0.000001 -0.773011 0.634393 +v 0.000001 -0.831470 0.555570 +v 0.000001 -0.881922 0.471397 +v 0.000001 -0.923880 0.382683 +v 0.000001 -0.956941 0.290285 +v 0.000001 -0.980785 0.195090 +v 0.000001 -0.995185 0.098017 +v -0.019122 0.995185 0.096134 +v -0.038060 0.980785 0.191342 +v -0.056631 0.956940 0.284708 +v -0.074657 0.923880 0.375331 +v -0.091964 0.881921 0.462339 +v -0.108386 0.831470 0.544896 +v -0.123763 0.773010 0.622204 +v -0.137949 0.707107 0.693520 +v -0.150806 0.634393 0.758157 +v -0.162211 0.555570 0.815493 +v -0.172054 0.471397 0.864976 +v -0.180239 0.382683 0.906128 +v -0.186689 0.290285 0.938553 +v -0.191341 0.195090 0.961940 +v -0.194150 0.098017 0.976063 +v -0.195090 -0.000000 0.980785 +v -0.194150 -0.098017 0.976063 +v -0.191341 -0.195091 0.961940 +v -0.186689 -0.290285 0.938553 +v -0.180239 -0.382684 0.906128 +v -0.172054 -0.471397 0.864975 +v -0.162211 -0.555571 0.815493 +v -0.150806 -0.634394 0.758157 +v -0.137949 -0.707107 0.693520 +v -0.123763 -0.773011 0.622203 +v -0.108386 -0.831470 0.544895 +v -0.091964 -0.881922 0.462339 +v -0.074657 -0.923880 0.375330 +v -0.056631 -0.956941 0.284707 +v -0.038059 -0.980785 0.191342 +v -0.019121 -0.995185 0.096134 +v -0.037509 0.995185 0.090557 +v -0.074657 0.980785 0.180241 +v -0.111087 0.956940 0.268189 +v -0.146446 0.923880 0.353554 +v -0.180395 0.881921 0.435514 +v -0.212607 0.831470 0.513280 +v -0.242771 0.773010 0.586103 +v -0.270597 0.707107 0.653282 +v -0.295818 0.634393 0.714169 +v -0.318189 0.555570 0.768178 +v -0.337496 0.471397 0.814789 +v -0.353553 0.382683 0.853553 +v -0.366205 0.290285 0.884098 +v -0.375330 0.195090 0.906127 +v -0.380840 0.098017 0.919431 +v -0.382683 -0.000000 0.923880 +v -0.380840 -0.098017 0.919431 +v -0.375329 -0.195091 0.906127 +v -0.366204 -0.290285 0.884098 +v -0.353553 -0.382684 0.853553 +v -0.337496 -0.471397 0.814789 +v -0.318189 -0.555571 0.768178 +v -0.295817 -0.634394 0.714168 +v -0.270597 -0.707107 0.653281 +v -0.242771 -0.773011 0.586103 +v -0.212607 -0.831470 0.513280 +v -0.180395 -0.881922 0.435514 +v -0.146446 -0.923880 0.353553 +v -0.111086 -0.956941 0.268188 +v -0.074657 -0.980785 0.180240 +v -0.037509 -0.995185 0.090556 +v -0.054455 0.995185 0.081499 +v -0.108386 0.980785 0.162212 +v -0.161273 0.956940 0.241363 +v -0.212607 0.923880 0.318190 +v -0.261894 0.881921 0.391952 +v -0.308658 0.831470 0.461940 +v -0.352450 0.773010 0.527479 +v -0.392847 0.707107 0.587938 +v -0.429461 0.634393 0.642735 +v -0.461939 0.555570 0.691341 +v -0.489969 0.471397 0.733291 +v -0.513279 0.382683 0.768178 +v -0.531647 0.290285 0.795667 +v -0.544894 0.195090 0.815493 +v -0.552894 0.098017 0.827466 +v -0.555570 -0.000000 0.831470 +v -0.552894 -0.098017 0.827466 +v -0.544894 -0.195091 0.815493 +v -0.531647 -0.290285 0.795667 +v -0.513279 -0.382684 0.768178 +v -0.489968 -0.471397 0.733291 +v -0.461939 -0.555571 0.691341 +v -0.429461 -0.634394 0.642735 +v -0.392847 -0.707107 0.587938 +v -0.352449 -0.773011 0.527479 +v -0.308658 -0.831470 0.461940 +v -0.261893 -0.881922 0.391952 +v -0.212607 -0.923880 0.318190 +v -0.161273 -0.956941 0.241363 +v -0.108386 -0.980785 0.162212 +v -0.054455 -0.995185 0.081498 +v 0.000000 1.000000 0.000001 +v -0.069308 0.995185 0.069309 +v -0.137949 0.980785 0.137950 +v -0.205262 0.956940 0.205263 +v -0.270598 0.923880 0.270598 +v -0.333327 0.881921 0.333328 +v -0.392847 0.831470 0.392848 +v -0.448583 0.773010 0.448584 +v -0.499999 0.707107 0.500000 +v -0.546600 0.634393 0.546601 +v -0.587937 0.555570 0.587937 +v -0.623612 0.471397 0.623612 +v -0.653281 0.382683 0.653281 +v -0.676658 0.290285 0.676659 +v -0.693519 0.195090 0.693520 +v -0.703701 0.098017 0.703702 +v -0.707106 -0.000000 0.707107 +v -0.703701 -0.098017 0.703702 +v -0.693519 -0.195091 0.693520 +v -0.676658 -0.290285 0.676659 +v -0.653281 -0.382684 0.653281 +v -0.623612 -0.471397 0.623612 +v -0.587937 -0.555571 0.587937 +v -0.546600 -0.634394 0.546601 +v -0.499999 -0.707107 0.500000 +v -0.448583 -0.773011 0.448584 +v -0.392847 -0.831470 0.392847 +v -0.333327 -0.881922 0.333328 +v -0.270597 -0.923880 0.270598 +v -0.205261 -0.956941 0.205262 +v -0.137949 -0.980785 0.137950 +v -0.069308 -0.995185 0.069309 +v -0.081498 0.995185 0.054456 +v -0.162211 0.980785 0.108387 +v -0.241363 0.956940 0.161274 +v -0.318189 0.923880 0.212608 +v -0.391952 0.881921 0.261894 +v -0.461939 0.831470 0.308658 +v -0.527478 0.773010 0.352450 +v -0.587937 0.707107 0.392847 +v -0.642734 0.634393 0.429461 +v -0.691341 0.555570 0.461939 +v -0.733290 0.471397 0.489969 +v -0.768177 0.382683 0.513280 +v -0.795666 0.290285 0.531647 +v -0.815492 0.195090 0.544895 +v -0.827465 0.098017 0.552895 +v -0.831469 -0.000000 0.555570 +v -0.827465 -0.098017 0.552895 +v -0.815492 -0.195091 0.544895 +v -0.795666 -0.290285 0.531647 +v -0.768177 -0.382684 0.513280 +v -0.733290 -0.471397 0.489969 +v -0.691341 -0.555571 0.461939 +v -0.642734 -0.634394 0.429461 +v -0.587937 -0.707107 0.392847 +v -0.527478 -0.773011 0.352450 +v -0.461939 -0.831470 0.308658 +v -0.391951 -0.881922 0.261894 +v -0.318189 -0.923880 0.212607 +v -0.241362 -0.956941 0.161273 +v -0.162211 -0.980785 0.108386 +v -0.081497 -0.995185 0.054455 +v -0.090556 0.995185 0.037510 +v -0.180240 0.980785 0.074658 +v -0.268188 0.956940 0.111087 +v -0.353553 0.923880 0.146447 +v -0.435513 0.881921 0.180396 +v -0.513280 0.831470 0.212608 +v -0.586102 0.773010 0.242772 +v -0.653281 0.707107 0.270598 +v -0.714168 0.634393 0.295818 +v -0.768177 0.555570 0.318189 +v -0.814788 0.471397 0.337496 +v -0.853553 0.382683 0.353553 +v -0.884097 0.290285 0.366205 +v -0.906127 0.195090 0.375330 +v -0.919430 0.098017 0.380840 +v -0.923879 -0.000000 0.382683 +v -0.919430 -0.098017 0.380840 +v -0.906126 -0.195091 0.375330 +v -0.884097 -0.290285 0.366205 +v -0.853553 -0.382684 0.353553 +v -0.814788 -0.471397 0.337496 +v -0.768177 -0.555571 0.318189 +v -0.714168 -0.634394 0.295818 +v -0.653281 -0.707107 0.270598 +v -0.586102 -0.773011 0.242772 +v -0.513279 -0.831470 0.212607 +v -0.435513 -0.881922 0.180396 +v -0.353553 -0.923880 0.146447 +v -0.268187 -0.956941 0.111087 +v -0.180239 -0.980785 0.074658 +v -0.090555 -0.995185 0.037510 +v -0.096134 0.995185 0.019122 +v -0.191342 0.980785 0.038060 +v -0.284707 0.956940 0.056632 +v -0.375330 0.923880 0.074658 +v -0.462339 0.881921 0.091965 +v -0.544895 0.831470 0.108386 +v -0.622203 0.773010 0.123764 +v -0.693519 0.707107 0.137950 +v -0.758156 0.634393 0.150807 +v -0.815492 0.555570 0.162211 +v -0.864975 0.471397 0.172054 +v -0.906127 0.382683 0.180240 +v -0.938552 0.290285 0.186689 +v -0.961939 0.195090 0.191341 +v -0.976061 0.098017 0.194151 +v -0.980784 -0.000000 0.195090 +v -0.976061 -0.098017 0.194151 +v -0.961939 -0.195091 0.191342 +v -0.938552 -0.290285 0.186690 +v -0.906127 -0.382684 0.180240 +v -0.864974 -0.471397 0.172054 +v -0.815492 -0.555571 0.162211 +v -0.758156 -0.634394 0.150807 +v -0.693519 -0.707107 0.137950 +v -0.622203 -0.773011 0.123764 +v -0.544894 -0.831470 0.108386 +v -0.462338 -0.881922 0.091965 +v -0.375329 -0.923880 0.074658 +v -0.284706 -0.956941 0.056632 +v -0.191341 -0.980785 0.038060 +v -0.096133 -0.995185 0.019122 +vt 0.048386 0.386583 +vt 0.025234 0.393773 +vt 0.027128 0.424811 +vt 0.051722 0.417180 +vt 0.448527 0.905466 +vt 0.466638 0.912069 +vt 0.484410 0.882871 +vt 0.476781 0.880291 +vt 0.086675 0.722835 +vt 0.047714 0.735006 +vt 0.051220 0.765862 +vt 0.092315 0.752973 +vt 0.054891 0.447811 +vt 0.028936 0.455858 +vt 0.030694 0.486912 +vt 0.057960 0.478461 +vt 0.099157 0.782869 +vt 0.055570 0.796623 +vt 0.061220 0.827236 +vt 0.107782 0.812401 +vt 0.008192 0.175780 +vt 0.002639 0.177560 +vt 0.008043 0.208201 +vt 0.017784 0.205113 +vt 0.060989 0.509118 +vt 0.032439 0.517967 +vt 0.034202 0.549019 +vt 0.064035 0.539773 +vt 0.119162 0.841363 +vt 0.069012 0.857605 +vt 0.080647 0.887528 +vt 0.135028 0.869370 +vt 0.025262 0.234880 +vt 0.012236 0.238980 +vt 0.015638 0.269848 +vt 0.031336 0.264931 +vt 0.067156 0.570413 +vt 0.036021 0.580066 +vt 0.037933 0.611102 +vt 0.070415 0.601025 +vt 0.158630 0.895647 +vt 0.100093 0.916525 +vt 0.138246 0.943159 +vt 0.196016 0.918498 +vt 0.036443 0.295175 +vt 0.018502 0.300777 +vt 0.020989 0.331748 +vt 0.040867 0.325557 +vt 0.255549 0.934245 +vt 0.224868 0.962070 +vt 0.356456 0.960107 +vt 0.333915 0.937286 +vt 0.073887 0.631595 +vt 0.039986 0.642122 +vt 0.042240 0.673119 +vt 0.077666 0.662105 +vt 0.044802 0.356035 +vt 0.023207 0.362750 +vt 0.403086 0.926035 +vt 0.432743 0.939261 +vt 0.081872 0.692529 +vt 0.044778 0.704085 +vt 0.001511 0.365736 +vt 0.001965 0.396975 +vt 0.479740 0.946215 +vt 0.488610 0.915189 +vt 0.006404 0.709363 +vt 0.007085 0.740596 +vt 0.002390 0.428214 +vt 0.002796 0.459454 +vt 0.007906 0.771825 +vt 0.008937 0.803049 +vt 0.003192 0.490694 +vt 0.003585 0.521934 +vt 0.010297 0.834265 +vt 0.012221 0.865467 +vt 1.008043 0.208201 +vt 0.998129 0.209571 +vt 0.999064 0.240798 +vt 1.012236 0.238980 +vt 0.003984 0.553174 +vt 0.004397 0.584414 +vt 0.015221 0.896641 +vt 0.020690 0.927753 +vt 1.015638 0.269848 +vt 0.999822 0.272029 +vt 1.000460 0.303263 +vt 1.018502 0.300777 +vt 0.004832 0.615653 +vt 0.005301 0.646891 +vt 0.034176 0.958662 +vt 0.116368 0.987720 +vt 0.001015 0.334499 +vt 0.447683 0.976645 +vt 0.005818 0.678128 +vt 0.492795 0.884044 +vt 1.002639 0.177560 +vt 0.996922 0.178352 +vt 0.000460 0.303263 +vt 1.001015 0.334499 +vt 0.981020 0.333755 +vt 0.979792 0.364929 +vt 1.001511 0.365736 +vt 0.595878 0.971215 +vt 0.532576 0.944247 +vt 1.005818 0.678128 +vt 0.969157 0.676767 +vt 0.967719 0.707927 +vt 1.006404 0.709363 +vt 1.001965 0.396975 +vt 0.978668 0.396109 +vt 0.977617 0.427293 +vt 1.002390 0.428214 +vt 0.511577 0.914333 +vt 0.501357 0.883725 +vt 1.007085 0.740596 +vt 0.966048 0.739073 +vt 0.964039 0.770198 +vt 1.007906 0.771825 +vt 1.002796 0.459454 +vt 0.976612 0.458481 +vt 0.975633 0.489670 +vt 1.003192 0.490694 +vt 1.008937 0.803049 +vt 0.961528 0.801291 +vt 0.958226 0.832335 +vt 1.010297 0.834265 +vt 0.991167 0.178137 +vt 0.988176 0.209201 +vt 1.003585 0.521934 +vt 0.974660 0.520859 +vt 0.973675 0.552048 +vt 1.003984 0.553174 +vt 1.012221 0.865467 +vt 0.953591 0.863296 +vt 0.946455 0.894099 +vt 1.015221 0.896641 +vt 0.985859 0.240306 +vt 0.983979 0.271439 +vt 1.004397 0.584414 +vt 0.972657 0.583235 +vt 0.971584 0.614418 +vt 1.004832 0.615653 +vt 1.020690 0.927753 +vt 0.933791 0.924551 +vt 0.904978 0.953949 +vt 1.034176 0.958662 +vt 0.982396 0.302591 +vt 1.116368 0.987720 +vt 0.802012 0.977654 +vt 1.005301 0.646891 +vt 0.970429 0.645596 +vt 0.964388 0.298773 +vt 0.961079 0.329532 +vt 0.750357 0.950264 +vt 0.647808 0.950687 +vt 0.936013 0.638321 +vt 0.933077 0.669136 +vt 0.958131 0.360345 +vt 0.955439 0.391196 +vt 0.572544 0.934207 +vt 0.532175 0.909643 +vt 0.929787 0.699898 +vt 0.925998 0.730586 +vt 0.952928 0.422075 +vt 0.950535 0.452971 +vt 0.921503 0.761167 +vt 0.915973 0.791592 +vt 0.948212 0.483877 +vt 0.945911 0.514786 +vt 0.908873 0.821779 +vt 0.899253 0.851580 +vt 0.978319 0.207096 +vt 0.972735 0.237513 +vt 0.943589 0.545693 +vt 0.941200 0.576589 +vt 0.885287 0.880701 +vt 0.863100 0.908490 +vt 0.968202 0.268089 +vt 0.938695 0.607468 +vt 0.823807 0.933258 +vt 0.509485 0.881938 +vt 0.985504 0.176922 +vt 0.952583 0.262030 +vt 0.946512 0.291873 +vt 0.906587 0.595195 +vt 0.902582 0.625524 +vt 0.777305 0.907037 +vt 0.725530 0.922454 +vt 0.941260 0.321910 +vt 0.936596 0.352086 +vt 0.659037 0.927175 +vt 0.595241 0.919299 +vt 0.898247 0.655777 +vt 0.893448 0.685920 +vt 0.932358 0.382361 +vt 0.928422 0.412706 +vt 0.548166 0.901813 +vt 0.516647 0.878810 +vt 0.888008 0.715913 +vt 0.881675 0.745694 +vt 0.924693 0.443100 +vt 0.921090 0.473523 +vt 0.874077 0.775173 +vt 0.864639 0.804207 +vt 0.980061 0.174734 +vt 0.968694 0.203293 +vt 0.917545 0.503960 +vt 0.913991 0.534395 +vt 0.852434 0.832558 +vt 0.835902 0.859805 +vt 0.959806 0.232461 +vt 0.910362 0.564812 +vt 0.812344 0.885155 +vt 0.947194 0.225227 +vt 0.937209 0.253354 +vt 0.880347 0.548455 +vt 0.875513 0.578234 +vt 0.774598 0.858570 +vt 0.745300 0.879338 +vt 0.928832 0.282007 +vt 0.921611 0.311033 +vt 0.706220 0.895079 +vt 0.657607 0.903302 +vt 0.870446 0.607941 +vt 0.865033 0.637539 +vt 0.915233 0.340327 +vt 0.909472 0.369816 +vt 0.605515 0.902091 +vt 0.558962 0.891763 +vt 0.859136 0.666985 +vt 0.852572 0.696220 +vt 0.904157 0.399445 +vt 0.899158 0.429173 +vt 0.845097 0.725165 +vt 0.836368 0.753704 +vt 0.894366 0.458966 +vt 0.889689 0.488794 +vt 0.825891 0.781668 +vt 0.812932 0.808795 +vt 0.959449 0.197859 +vt 0.885044 0.518632 +vt 0.796385 0.834663 +vt 0.522459 0.874552 +vt 0.974972 0.171626 +vt 0.950742 0.190891 +vt 0.935024 0.215919 +vt 0.856782 0.499022 +vt 0.851201 0.528217 +vt 0.763610 0.807482 +vt 0.744276 0.830842 +vt 0.922167 0.242191 +vt 0.911394 0.269332 +vt 0.845529 0.557376 +vt 0.839664 0.586461 +vt 0.719784 0.851588 +vt 0.688803 0.868469 +vt 0.902153 0.297095 +vt 0.894043 0.325308 +vt 0.650900 0.879836 +vt 0.608064 0.884052 +vt 0.833492 0.615429 +vt 0.826879 0.644227 +vt 0.886774 0.353851 +vt 0.880126 0.382636 +vt 0.565047 0.880357 +vt 0.526716 0.869422 +vt 0.819658 0.672789 +vt 0.811613 0.701028 +vt 0.873929 0.411594 +vt 0.868047 0.440673 +vt 0.802458 0.728825 +vt 0.791803 0.756015 +vt 0.970378 0.167675 +vt 0.862365 0.469829 +vt 0.779106 0.782355 +vt 0.966426 0.162982 +vt 0.942759 0.182514 +vt 0.835477 0.447684 +vt 0.829105 0.476260 +vt 0.749262 0.754713 +vt 0.735147 0.779653 +vt 0.923444 0.204677 +vt 0.907539 0.228698 +vt 0.822818 0.504873 +vt 0.816514 0.533478 +vt 0.718181 0.803112 +vt 0.697492 0.824480 +vt 0.894226 0.254040 +vt 0.882867 0.280332 +vt 0.672136 0.842888 +vt 0.641452 0.857178 +vt 0.810089 0.562030 +vt 0.803432 0.590481 +vt 0.872978 0.307318 +vt 0.864196 0.334814 +vt 0.605795 0.866019 +vt 0.567268 0.868303 +vt 0.796418 0.618773 +vt 0.788899 0.646840 +vt 0.856248 0.362688 +vt 0.848919 0.390841 +vt 0.780693 0.674598 +vt 0.771569 0.701938 +vt 0.842042 0.419194 +vt 0.761225 0.728711 +vt 0.529369 0.863700 +vt 0.816157 0.395125 +vt 0.808822 0.423029 +vt 0.733104 0.700875 +vt 0.722067 0.726926 +vt 0.935719 0.172890 +vt 0.912628 0.191668 +vt 0.801799 0.451083 +vt 0.794966 0.479228 +vt 0.709376 0.752105 +vt 0.694528 0.776099 +vt 0.893414 0.213060 +vt 0.877330 0.236347 +vt 0.788211 0.507411 +vt 0.781429 0.535580 +vt 0.676891 0.798465 +vt 0.655729 0.818587 +vt 0.863688 0.261010 +vt 0.851921 0.286680 +vt 0.630338 0.835623 +vt 0.600383 0.848519 +vt 0.774511 0.563685 +vt 0.767340 0.591667 +vt 0.841590 0.313094 +vt 0.832352 0.340062 +vt 0.566457 0.856148 +vt 0.530481 0.857657 +vt 0.759786 0.619465 +vt 0.751695 0.647000 +vt 0.823944 0.367441 +vt 0.742880 0.674178 +vt 0.963275 0.157675 +vt 0.798714 0.341964 +vt 0.790091 0.369104 +vt 0.715662 0.646481 +vt 0.706593 0.673391 +vt 0.961095 0.151908 +vt 0.929896 0.162212 +vt 0.782092 0.396562 +vt 0.774547 0.424249 +vt 0.696552 0.699794 +vt 0.685241 0.725518 +vt 0.902802 0.177085 +vt 0.879896 0.195479 +vt 0.767315 0.452093 +vt 0.760273 0.480033 +vt 0.672277 0.750331 +vt 0.657173 0.773912 +vt 0.860681 0.216489 +vt 0.844487 0.239416 +vt 0.639332 0.795815 +vt 0.618082 0.815427 +vt 0.753309 0.508010 +vt 0.746314 0.535973 +vt 0.830674 0.263748 +vt 0.818709 0.289116 +vt 0.592813 0.831927 +vt 0.563300 0.844314 +vt 0.739177 0.563865 +vt 0.731782 0.591627 +vt 0.808166 0.315253 +vt 0.723996 0.619193 +vt 0.530183 0.851546 +vt 0.783291 0.288800 +vt 0.772822 0.315021 +vt 0.697047 0.592015 +vt 0.689317 0.619641 +vt 0.763440 0.341809 +vt 0.754885 0.369020 +vt 0.681040 0.646993 +vt 0.672028 0.673970 +vt 0.925640 0.150719 +vt 0.894282 0.161153 +vt 0.746950 0.396543 +vt 0.739467 0.424292 +vt 0.662044 0.700446 +vt 0.650787 0.726249 +vt 0.867123 0.176171 +vt 0.844220 0.194710 +vt 0.732295 0.452196 +vt 0.725311 0.480192 +vt 0.637870 0.751148 +vt 0.622801 0.774822 +vt 0.825051 0.215853 +vt 0.808921 0.238900 +vt 0.604972 0.796825 +vt 0.583692 0.816539 +vt 0.718404 0.508227 +vt 0.711466 0.536245 +vt 0.795182 0.263338 +vt 0.558329 0.833135 +vt 0.528639 0.845595 +vt 0.704386 0.564194 +vt 0.960059 0.145864 +vt 0.770454 0.236269 +vt 0.757161 0.261303 +vt 0.551952 0.822878 +vt 0.526026 0.840003 +vt 0.677155 0.537971 +vt 0.670392 0.566230 +vt 0.745716 0.287291 +vt 0.735678 0.313982 +vt 0.663371 0.594370 +vt 0.655961 0.622326 +vt 0.960342 0.139752 +vt 0.923407 0.138703 +vt 0.726705 0.341193 +vt 0.718539 0.368791 +vt 0.648007 0.650026 +vt 0.639317 0.677374 +vt 0.887539 0.144135 +vt 0.855307 0.155367 +vt 0.710973 0.396675 +vt 0.703843 0.424763 +vt 0.629652 0.704248 +vt 0.618699 0.730483 +vt 0.827842 0.171258 +vt 0.805029 0.190637 +vt 0.606053 0.755855 +vt 0.591182 0.780044 +vt 0.697011 0.452990 +vt 0.690358 0.481301 +vt 0.786170 0.212545 +vt 0.573413 0.802599 +vt 0.683774 0.509644 +vt 0.761639 0.185155 +vt 0.743695 0.208508 +vt 0.562248 0.790318 +vt 0.544481 0.813763 +vt 0.655731 0.484878 +vt 0.649724 0.513728 +vt 0.728977 0.233468 +vt 0.716667 0.259562 +vt 0.643669 0.542558 +vt 0.637465 0.571326 +vt 0.706150 0.286468 +vt 0.696970 0.313966 +vt 0.631000 0.599984 +vt 0.624145 0.628479 +vt 0.923791 0.126533 +vt 0.883311 0.126356 +vt 0.688793 0.341898 +vt 0.681363 0.370149 +vt 0.616747 0.656744 +vt 0.608610 0.684693 +vt 0.844816 0.133311 +vt 0.811364 0.146382 +vt 0.674486 0.398635 +vt 0.668005 0.427287 +vt 0.599486 0.712215 +vt 0.589042 0.739154 +vt 0.783837 0.164110 +vt 0.576832 0.765294 +vt 0.661791 0.456050 +vt 0.522515 0.834940 +vt 0.962096 0.133813 +vt 0.760428 0.136665 +vt 0.734028 0.157321 +vt 0.562017 0.752770 +vt 0.550398 0.779880 +vt 0.632389 0.433338 +vt 0.627046 0.462757 +vt 0.713639 0.180821 +vt 0.697627 0.206188 +vt 0.536166 0.805967 +vt 0.518271 0.830548 +vt 0.621819 0.492217 +vt 0.616615 0.521685 +vt 0.684737 0.232805 +vt 0.674080 0.260281 +vt 0.611345 0.551130 +vt 0.605914 0.580518 +vt 0.965428 0.128309 +vt 0.927547 0.114679 +vt 0.665037 0.288362 +vt 0.657175 0.316877 +vt 0.600218 0.609812 +vt 0.594131 0.638967 +vt 0.882828 0.108243 +vt 0.836350 0.110271 +vt 0.650183 0.345708 +vt 0.643831 0.374768 +vt 0.587502 0.667928 +vt 0.580132 0.696621 +vt 0.794461 0.120333 +vt 0.571758 0.724949 +vt 0.637946 0.403995 +vt 0.776448 0.093364 +vt 0.732723 0.108828 +vt 0.554213 0.713446 +vt 0.546824 0.742646 +vt 0.606595 0.384057 +vt 0.601947 0.414034 +vt 0.701058 0.129901 +vt 0.678348 0.154298 +vt 0.538024 0.771438 +vt 0.527209 0.799637 +vt 0.597536 0.444077 +vt 0.593270 0.474160 +vt 0.661610 0.180674 +vt 0.648805 0.208274 +vt 0.589070 0.504263 +vt 0.584859 0.534361 +vt 0.638638 0.236665 +vt 0.630288 0.265588 +vt 0.580561 0.564436 +vt 0.576092 0.594463 +vt 0.935538 0.103753 +vt 0.888209 0.090429 +vt 0.623219 0.294879 +vt 0.617071 0.324434 +vt 0.571358 0.624416 +vt 0.566241 0.654262 +vt 0.831424 0.086572 +vt 0.611590 0.354177 +vt 0.560593 0.683957 +vt 0.513448 0.826944 +vt 0.970361 0.123516 +vt 0.833915 0.062714 +vt 0.755548 0.065755 +vt 0.577666 0.337895 +vt 0.573887 0.368405 +vt 0.540867 0.674443 +vt 0.536443 0.704824 +vt 0.696016 0.081502 +vt 0.658630 0.104353 +vt 0.531336 0.735069 +vt 0.525262 0.765119 +vt 0.570415 0.398975 +vt 0.567156 0.429587 +vt 0.635028 0.130630 +vt 0.619162 0.158637 +vt 0.517784 0.794886 +vt 0.508192 0.824219 +vt 0.564035 0.460227 +vt 0.560989 0.490881 +vt 0.607782 0.187599 +vt 0.599157 0.217131 +vt 0.557960 0.521539 +vt 0.554891 0.552189 +vt 0.976781 0.119709 +vt 0.948527 0.094534 +vt 0.592315 0.247027 +vt 0.586675 0.277165 +vt 0.551722 0.582819 +vt 0.548386 0.613416 +vt 0.903085 0.073965 +vt 0.581872 0.307471 +vt 0.544802 0.643964 +vt 0.984410 0.117129 +vt 0.966637 0.087931 +vt 0.551220 0.234138 +vt 0.547714 0.264994 +vt 0.523207 0.637250 +vt 0.520989 0.668251 +vt 0.932742 0.060739 +vt 0.856455 0.039893 +vt 0.544778 0.295915 +vt 0.542240 0.326881 +vt 0.518502 0.699223 +vt 0.515638 0.730152 +vt 0.539986 0.357878 +vt 0.537933 0.388898 +vt 0.724867 0.037930 +vt 0.638246 0.056841 +vt 0.512236 0.761020 +vt 0.508043 0.791799 +vt 0.536021 0.419934 +vt 0.534202 0.450981 +vt 0.600093 0.083475 +vt 0.580647 0.112472 +vt 0.532439 0.482033 +vt 0.530694 0.513088 +vt 0.569012 0.142396 +vt 0.561220 0.172764 +vt 0.528936 0.544141 +vt 0.527129 0.575189 +vt 0.555570 0.203377 +vt 0.525234 0.606227 +vt 0.502639 0.822440 +vt 0.508937 0.196951 +vt 0.507907 0.228175 +vt 0.502796 0.540546 +vt 0.502390 0.571786 +vt 0.988610 0.084811 +vt 0.979740 0.053785 +vt 0.507086 0.259404 +vt 0.506404 0.290637 +vt 0.501965 0.603025 +vt 0.501511 0.634263 +vt 0.947681 0.023355 +vt 0.616368 0.012280 +vt 0.505819 0.321872 +vt 0.505301 0.353109 +vt 0.501016 0.665501 +vt 0.500461 0.696737 +vt 0.534176 0.041338 +vt 0.520690 0.072247 +vt 0.499822 0.727971 +vt 0.499064 0.759202 +vt 0.504832 0.384347 +vt 0.504397 0.415586 +vt 0.515221 0.103359 +vt 0.512221 0.134533 +vt 0.498129 0.790428 +vt 0.496922 0.821648 +vt 0.503985 0.446826 +vt 0.503586 0.478066 +vt 0.510297 0.165735 +vt 0.503192 0.509306 +vt 0.992795 0.115956 +vt 0.458226 0.167665 +vt 0.461528 0.198709 +vt 0.475633 0.510330 +vt 0.476612 0.541519 +vt 1.001356 0.116274 +vt 1.011577 0.085667 +vt 0.464040 0.229802 +vt 0.466048 0.260927 +vt 0.477617 0.572706 +vt 0.478668 0.603891 +vt 1.032575 0.055753 +vt 1.095877 0.028785 +vt 0.467719 0.292073 +vt 0.469157 0.323233 +vt 0.479792 0.635071 +vt 0.481020 0.666245 +vt 0.302013 0.022346 +vt 0.404979 0.046051 +vt 0.482396 0.697409 +vt 0.483979 0.728560 +vt 0.470429 0.354404 +vt 0.471585 0.385582 +vt 0.433792 0.075450 +vt 0.446455 0.105901 +vt 0.485859 0.759693 +vt 0.488176 0.790799 +vt 0.472657 0.416765 +vt 0.473675 0.447952 +vt 0.453591 0.136705 +vt 0.474661 0.479141 +vt 1.302013 0.022346 +vt 0.491168 0.821862 +vt 0.399253 0.148420 +vt 0.408873 0.178221 +vt 0.445911 0.485214 +vt 0.448212 0.516123 +vt 0.415973 0.208408 +vt 0.421503 0.238833 +vt 0.450536 0.547029 +vt 0.452928 0.577925 +vt 0.011577 0.085667 +vt 0.032175 0.090357 +vt 0.072544 0.065793 +vt 0.032575 0.055753 +vt 0.425999 0.269414 +vt 0.429787 0.300102 +vt 0.455439 0.608803 +vt 0.458131 0.639655 +vt 0.095877 0.028785 +vt 0.147808 0.049312 +vt 0.250357 0.049736 +vt 0.433078 0.330864 +vt 0.436013 0.361679 +vt 0.461079 0.670468 +vt 0.464388 0.701227 +vt 0.323807 0.066742 +vt 0.363100 0.091510 +vt 0.468202 0.731911 +vt 0.472735 0.762486 +vt 0.438695 0.392531 +vt 0.441201 0.423411 +vt 0.385287 0.119299 +vt 0.478319 0.792903 +vt 0.485504 0.823077 +vt 0.443589 0.454307 +vt 0.001356 0.116274 +vt 0.009485 0.118062 +vt 0.335902 0.140195 +vt 0.352435 0.167442 +vt 0.468695 0.796706 +vt 0.480062 0.825265 +vt 0.413991 0.465605 +vt 0.417545 0.496040 +vt 0.364639 0.195793 +vt 0.374077 0.224827 +vt 0.421090 0.526476 +vt 0.424693 0.556900 +vt 0.016646 0.121190 +vt 0.048166 0.098187 +vt 0.381676 0.254305 +vt 0.388009 0.284087 +vt 0.428422 0.587293 +vt 0.432358 0.617639 +vt 0.095241 0.080701 +vt 0.159037 0.072825 +vt 0.393448 0.314080 +vt 0.398247 0.344223 +vt 0.436597 0.647914 +vt 0.441260 0.678089 +vt 0.225530 0.077545 +vt 0.277305 0.092963 +vt 0.446512 0.708126 +vt 0.452583 0.737970 +vt 0.402583 0.374475 +vt 0.406587 0.404805 +vt 0.312344 0.114845 +vt 0.459807 0.767538 +vt 0.410362 0.435188 +vt 0.274598 0.141429 +vt 0.296386 0.165337 +vt 0.447194 0.774773 +vt 0.459449 0.802140 +vt 0.380347 0.451545 +vt 0.385044 0.481367 +vt 0.312933 0.191205 +vt 0.325892 0.218332 +vt 0.389690 0.511205 +vt 0.394366 0.541034 +vt 0.336369 0.246296 +vt 0.345098 0.274835 +vt 0.399158 0.570827 +vt 0.404157 0.600554 +vt 0.058962 0.108237 +vt 0.105515 0.097909 +vt 0.352573 0.303779 +vt 0.359136 0.333015 +vt 0.409472 0.630184 +vt 0.415233 0.659672 +vt 0.157607 0.096698 +vt 0.206220 0.104921 +vt 0.365034 0.362461 +vt 0.370446 0.392059 +vt 0.421611 0.688966 +vt 0.428832 0.717992 +vt 0.245300 0.120661 +vt 0.437209 0.746645 +vt 0.375513 0.421766 +vt 0.474973 0.828373 +vt 0.022458 0.125448 +vt 0.219785 0.148411 +vt 0.244276 0.169157 +vt 0.422167 0.757809 +vt 0.435025 0.784080 +vt 0.345529 0.442624 +vt 0.351201 0.471783 +vt 0.263610 0.192518 +vt 0.279107 0.217645 +vt 0.450742 0.809109 +vt 0.470378 0.832324 +vt 0.356782 0.500978 +vt 0.362365 0.530171 +vt 0.291803 0.243984 +vt 0.302458 0.271174 +vt 0.368048 0.559326 +vt 0.373930 0.588406 +vt 0.026715 0.130577 +vt 0.065046 0.119642 +vt 0.311613 0.298972 +vt 0.319658 0.327211 +vt 0.380126 0.617364 +vt 0.386774 0.646148 +vt 0.108064 0.115948 +vt 0.150900 0.120164 +vt 0.326879 0.355772 +vt 0.333492 0.384570 +vt 0.394043 0.674691 +vt 0.402153 0.702905 +vt 0.188803 0.131531 +vt 0.411394 0.730667 +vt 0.339664 0.413538 +vt 0.172136 0.157112 +vt 0.197492 0.175520 +vt 0.394226 0.745960 +vt 0.407539 0.771302 +vt 0.310089 0.437969 +vt 0.316514 0.466522 +vt 0.218181 0.196888 +vt 0.235147 0.220346 +vt 0.423444 0.795322 +vt 0.442759 0.817485 +vt 0.322818 0.495127 +vt 0.329105 0.523740 +vt 0.249262 0.245287 +vt 0.261226 0.271289 +vt 0.335478 0.552315 +vt 0.342043 0.580806 +vt 0.271570 0.298062 +vt 0.280694 0.325401 +vt 0.348920 0.609159 +vt 0.356248 0.637311 +vt 0.067268 0.131696 +vt 0.105795 0.133981 +vt 0.288899 0.353160 +vt 0.296418 0.381227 +vt 0.364197 0.665186 +vt 0.372978 0.692682 +vt 0.141452 0.142821 +vt 0.303432 0.409519 +vt 0.382867 0.719668 +vt 0.466426 0.837017 +vt 0.029369 0.136300 +vt 0.130338 0.164376 +vt 0.155730 0.181412 +vt 0.274511 0.436315 +vt 0.281429 0.464419 +vt 0.363688 0.738990 +vt 0.377331 0.763653 +vt 0.176891 0.201534 +vt 0.194529 0.223901 +vt 0.393414 0.786940 +vt 0.412628 0.808332 +vt 0.288212 0.492589 +vt 0.294966 0.520772 +vt 0.209376 0.247895 +vt 0.222067 0.273074 +vt 0.435719 0.827110 +vt 0.463275 0.842324 +vt 0.301799 0.548917 +vt 0.308822 0.576971 +vt 0.233105 0.299124 +vt 0.242880 0.325821 +vt 0.316157 0.604875 +vt 0.323944 0.632559 +vt 0.030481 0.142343 +vt 0.066457 0.143852 +vt 0.251696 0.352999 +vt 0.259786 0.380535 +vt 0.332352 0.659938 +vt 0.341590 0.686906 +vt 0.100383 0.151481 +vt 0.267340 0.408332 +vt 0.351921 0.713320 +vt 0.092813 0.168072 +vt 0.118082 0.184573 +vt 0.239178 0.436135 +vt 0.246314 0.464027 +vt 0.330675 0.736251 +vt 0.344487 0.760583 +vt 0.139332 0.204184 +vt 0.157173 0.226087 +vt 0.360682 0.783511 +vt 0.379896 0.804521 +vt 0.253309 0.491989 +vt 0.260273 0.519967 +vt 0.172277 0.249668 +vt 0.185241 0.274481 +vt 0.402802 0.822915 +vt 0.429896 0.837788 +vt 0.267315 0.547906 +vt 0.274547 0.575751 +vt 0.196552 0.300206 +vt 0.206593 0.326609 +vt 0.282092 0.603438 +vt 0.290092 0.630896 +vt 0.215662 0.353519 +vt 0.223996 0.380807 +vt 0.298714 0.658036 +vt 0.308167 0.684747 +vt 0.063300 0.155685 +vt 0.231783 0.408372 +vt 0.318709 0.710884 +vt 0.461095 0.848091 +vt 0.030183 0.148454 +vt 0.058329 0.166864 +vt 0.083692 0.183461 +vt 0.204386 0.435805 +vt 0.211466 0.463754 +vt 0.295182 0.736662 +vt 0.308922 0.761100 +vt 0.104972 0.203174 +vt 0.122801 0.225177 +vt 0.218404 0.491773 +vt 0.225311 0.519808 +vt 0.325051 0.784147 +vt 0.344221 0.805290 +vt 0.137870 0.248851 +vt 0.150787 0.273750 +vt 0.367123 0.823828 +vt 0.394283 0.838847 +vt 0.232295 0.547804 +vt 0.239467 0.575708 +vt 0.162044 0.299553 +vt 0.172028 0.326029 +vt 0.425640 0.849281 +vt 0.460060 0.854136 +vt 0.246950 0.603457 +vt 0.254885 0.630980 +vt 0.181041 0.353007 +vt 0.189317 0.380358 +vt 0.263440 0.658191 +vt 0.272822 0.684979 +vt 0.028639 0.154404 +vt 0.197047 0.407985 +vt 0.283292 0.711200 +vt 0.026025 0.159996 +vt 0.051952 0.177121 +vt 0.170392 0.433769 +vt 0.177155 0.462029 +vt 0.257161 0.738697 +vt 0.270454 0.763731 +vt 0.073413 0.197401 +vt 0.091182 0.219955 +vt 0.183774 0.490355 +vt 0.190358 0.518699 +vt 0.286171 0.787455 +vt 0.305029 0.809363 +vt 0.106052 0.244144 +vt 0.118699 0.269516 +vt 0.327842 0.828742 +vt 0.355308 0.844632 +vt 0.197011 0.547009 +vt 0.203843 0.575237 +vt 0.129652 0.295752 +vt 0.139317 0.322626 +vt 0.387539 0.855864 +vt 0.423407 0.861296 +vt 0.210973 0.603325 +vt 0.218539 0.631209 +vt 0.148007 0.349974 +vt 0.155961 0.377673 +vt 0.226706 0.658807 +vt 0.235678 0.686018 +vt 0.163371 0.405630 +vt 0.245717 0.712709 +vt 0.460342 0.860247 +vt 0.137465 0.428674 +vt 0.143669 0.457442 +vt 0.216668 0.740438 +vt 0.228978 0.766532 +vt 0.044481 0.186237 +vt 0.062248 0.209681 +vt 0.149724 0.486272 +vt 0.155731 0.515122 +vt 0.243695 0.791492 +vt 0.261640 0.814845 +vt 0.076832 0.234705 +vt 0.089042 0.260845 +vt 0.161791 0.543950 +vt 0.168005 0.572713 +vt 0.283838 0.835890 +vt 0.311365 0.853618 +vt 0.099486 0.287784 +vt 0.108610 0.315306 +vt 0.344817 0.866689 +vt 0.383311 0.873644 +vt 0.174486 0.601365 +vt 0.181363 0.629851 +vt 0.116747 0.343256 +vt 0.124145 0.371520 +vt 0.423791 0.873467 +vt 0.462096 0.866187 +vt 0.188793 0.658102 +vt 0.196970 0.686034 +vt 0.131000 0.400015 +vt 0.206150 0.713532 +vt 0.022514 0.165060 +vt 0.105914 0.419482 +vt 0.111345 0.448870 +vt 0.174080 0.739719 +vt 0.184737 0.767195 +vt 0.018270 0.169451 +vt 0.036166 0.194032 +vt 0.116615 0.478315 +vt 0.121819 0.507783 +vt 0.197627 0.793813 +vt 0.213639 0.819179 +vt 0.050398 0.220120 +vt 0.062017 0.247229 +vt 0.127046 0.537243 +vt 0.132389 0.566662 +vt 0.234028 0.842679 +vt 0.260429 0.863335 +vt 0.071758 0.275050 +vt 0.080132 0.303378 +vt 0.294461 0.879667 +vt 0.336350 0.889729 +vt 0.137946 0.596005 +vt 0.143831 0.625232 +vt 0.087502 0.332072 +vt 0.094131 0.361033 +vt 0.382829 0.891756 +vt 0.427547 0.885321 +vt 0.150183 0.654292 +vt 0.157175 0.683123 +vt 0.100218 0.390188 +vt 0.165037 0.711638 +vt 0.465429 0.871691 +vt 0.076092 0.405536 +vt 0.080561 0.435563 +vt 0.130288 0.734413 +vt 0.138638 0.763335 +vt 0.084859 0.465638 +vt 0.089070 0.495737 +vt 0.148805 0.791726 +vt 0.161611 0.819326 +vt 0.027209 0.200362 +vt 0.038024 0.228561 +vt 0.093270 0.525839 +vt 0.097536 0.555923 +vt 0.178349 0.845702 +vt 0.201058 0.870099 +vt 0.046824 0.257353 +vt 0.054213 0.286553 +vt 0.101947 0.585966 +vt 0.106595 0.615943 +vt 0.232723 0.891172 +vt 0.276449 0.906636 +vt 0.060593 0.316042 +vt 0.066241 0.345738 +vt 0.331424 0.913428 +vt 0.388210 0.909571 +vt 0.111590 0.645823 +vt 0.117071 0.675566 +vt 0.071358 0.375583 +vt 0.435539 0.896247 +vt 0.470361 0.876483 +vt 0.123219 0.705121 +vt 0.013448 0.173055 +vt 0.495265 0.852856 +vt 0.995265 0.147143 +vt 1.008192 0.175780 +vt 1.009485 0.118062 +vt 1.016646 0.121190 +vt 1.022458 0.125448 +vt 1.026716 0.130577 +vt 1.029369 0.136300 +vt 1.030481 0.142343 +vt 1.030183 0.148454 +vt 1.028639 0.154404 +vt 1.026025 0.159996 +vt 1.022514 0.165060 +vt 1.018270 0.169451 +vt 1.013448 0.173055 +vn 0.708609 0.705557 0.000000 +vn 0.694998 0.705557 0.138218 +vn 0.759331 0.632893 0.151036 +vn 0.774224 0.632893 0.000000 +vn 0.198035 -0.980193 0.000000 +vn 0.194220 -0.980193 0.038606 +vn 0.099094 -0.994873 0.019684 +vn 0.101047 -0.994873 0.000000 +vn 0.957183 -0.289438 0.000000 +vn 0.938780 -0.289438 0.186712 +vn 0.906552 -0.381603 0.180303 +vn 0.924314 -0.381603 0.000000 +vn 0.832392 0.554155 0.000000 +vn 0.816401 0.554155 0.162389 +vn 0.865627 0.470107 0.172185 +vn 0.882595 0.470107 0.000000 +vn 0.882595 -0.470107 0.000000 +vn 0.865627 -0.470107 0.172185 +vn 0.816401 -0.554155 0.162389 +vn 0.832392 -0.554155 0.000000 +vn 0.101047 0.994873 0.000000 +vn 0.099094 0.994873 0.019684 +vn 0.194220 0.980193 0.038606 +vn 0.198035 0.980193 0.000000 +vn 0.924314 0.381603 0.000000 +vn 0.906552 0.381603 0.180303 +vn 0.938780 0.289438 0.186712 +vn 0.957183 0.289438 0.000000 +vn 0.774224 -0.632893 0.000000 +vn 0.759331 -0.632893 0.151036 +vn 0.694998 -0.705557 0.138218 +vn 0.708609 -0.705557 0.000000 +vn 0.293069 0.956084 0.000000 +vn 0.287454 0.956084 0.057161 +vn 0.377880 0.922788 0.075167 +vn 0.385266 0.922788 0.000000 +vn 0.980895 0.194494 0.000000 +vn 0.962035 0.194494 0.191351 +vn 0.976074 0.097690 0.194128 +vn 0.995209 0.097690 0.000000 +vn 0.636189 -0.771508 0.000000 +vn 0.623981 -0.771508 0.124119 +vn 0.546953 -0.830042 0.108798 +vn 0.557665 -0.830042 0.000000 +vn 0.473769 0.880642 0.000000 +vn 0.464644 0.880642 0.092410 +vn 0.546953 0.830042 0.108768 +vn 0.557665 0.830042 0.000000 +vn 0.473769 -0.880642 0.000000 +vn 0.464644 -0.880642 0.092410 +vn 0.377880 -0.922788 0.075137 +vn 0.385266 -0.922788 0.000000 +vn 1.000000 0.000000 0.000000 +vn 0.980773 0.000000 0.195074 +vn 0.976074 -0.097690 0.194128 +vn 0.995209 -0.097690 0.000000 +vn 0.636189 0.771508 0.000000 +vn 0.623981 0.771508 0.124119 +vn 0.293069 -0.956084 0.000000 +vn 0.287454 -0.956084 0.057161 +vn 0.980895 -0.194494 0.000000 +vn 0.962035 -0.194494 0.191351 +vn 0.587786 0.771508 0.243446 +vn 0.654683 0.705557 0.271157 +vn 0.270760 -0.956084 0.112156 +vn 0.182958 -0.980193 0.075777 +vn 0.906217 -0.194494 0.375347 +vn 0.884304 -0.289438 0.366283 +vn 0.715293 0.632893 0.296274 +vn 0.769036 0.554155 0.318522 +vn 0.853938 -0.381603 0.353710 +vn 0.815394 -0.470107 0.337748 +vn 0.815394 0.470107 0.337748 +vn 0.853938 0.381603 0.353710 +vn 0.769036 -0.554155 0.318522 +vn 0.715293 -0.632893 0.296274 +vn 0.182958 0.980193 0.075777 +vn 0.270760 0.956084 0.112156 +vn 0.884304 0.289438 0.366283 +vn 0.906217 0.194494 0.375347 +vn 0.654683 -0.705557 0.271157 +vn 0.587786 -0.771508 0.243446 +vn 0.355937 0.922788 0.147435 +vn 0.437696 0.880642 0.181280 +vn 0.919431 0.097690 0.380840 +vn 0.923856 0.000000 0.382672 +vn 0.515213 -0.830042 0.213385 +vn 0.437696 -0.880642 0.181280 +vn 0.515213 0.830042 0.213385 +vn 0.355937 -0.922788 0.147435 +vn 0.919431 -0.097690 0.380840 +vn 0.093356 -0.994873 0.038667 +vn 0.093356 0.994873 0.038667 +vn 0.463668 0.830042 0.309824 +vn 0.528977 0.771508 0.353435 +vn 0.320353 -0.922788 0.214057 +vn 0.243690 -0.956084 0.162816 +vn 0.827479 -0.097690 0.552904 +vn 0.815577 -0.194494 0.544939 +vn 0.589190 0.705557 0.393689 +vn 0.643727 0.632893 0.430128 +vn 0.164647 -0.980193 0.110019 +vn 0.084017 -0.994873 0.056124 +vn 0.795862 -0.289438 0.531785 +vn 0.768548 -0.381603 0.513504 +vn 0.692099 0.554155 0.462447 +vn 0.733848 0.470107 0.490341 +vn 0.733848 -0.470107 0.490341 +vn 0.692099 -0.554155 0.462447 +vn 0.084017 0.994873 0.056124 +vn 0.164647 0.980193 0.110019 +vn 0.768548 0.381603 0.513504 +vn 0.795862 0.289438 0.531785 +vn 0.643727 -0.632893 0.430128 +vn 0.589190 -0.705557 0.393689 +vn 0.243690 0.956084 0.162816 +vn 0.320353 0.922788 0.214057 +vn 0.815577 0.194494 0.544939 +vn 0.827479 0.097690 0.552904 +vn 0.528977 -0.771508 0.353435 +vn 0.463668 -0.830042 0.309824 +vn 0.393902 0.880642 0.263192 +vn 0.393902 -0.880642 0.263192 +vn 0.831446 0.000000 0.555559 +vn 0.335002 0.880642 0.335002 +vn 0.394330 0.830042 0.394330 +vn 0.335002 -0.880642 0.335002 +vn 0.272439 -0.922788 0.272439 +vn 0.707083 0.000000 0.707083 +vn 0.703696 -0.097690 0.703696 +vn 0.449873 0.771508 0.449873 +vn 0.501053 0.705557 0.501053 +vn 0.207221 -0.956084 0.207221 +vn 0.140019 -0.980193 0.140019 +vn 0.693594 -0.194494 0.693594 +vn 0.676840 -0.289438 0.676840 +vn 0.547441 0.632893 0.547441 +vn 0.588580 0.554155 0.588580 +vn 0.653584 -0.381603 0.653584 +vn 0.624073 -0.470107 0.624073 +vn 0.624073 0.470107 0.624073 +vn 0.653584 0.381603 0.653584 +vn 0.588580 -0.554155 0.588580 +vn 0.547441 -0.632893 0.547441 +vn 0.140019 0.980193 0.140019 +vn 0.207221 0.956084 0.207221 +vn 0.676840 0.289438 0.676840 +vn 0.693594 0.194494 0.693594 +vn 0.501053 -0.705557 0.501053 +vn 0.449873 -0.771508 0.449873 +vn 0.272439 0.922788 0.272439 +vn 0.703696 0.097690 0.703696 +vn 0.394330 -0.830042 0.394330 +vn 0.071444 -0.994873 0.071444 +vn 0.071444 0.994873 0.071444 +vn 0.214057 0.922788 0.320353 +vn 0.263192 0.880642 0.393902 +vn 0.552904 0.097690 0.827479 +vn 0.555559 0.000000 0.831446 +vn 0.309824 -0.830042 0.463668 +vn 0.263192 -0.880642 0.393902 +vn 0.309824 0.830042 0.463668 +vn 0.353435 0.771508 0.528977 +vn 0.214057 -0.922788 0.320353 +vn 0.162816 -0.956084 0.243690 +vn 0.552904 -0.097690 0.827479 +vn 0.544939 -0.194494 0.815577 +vn 0.393689 0.705557 0.589190 +vn 0.430128 0.632893 0.643727 +vn 0.110019 -0.980193 0.164647 +vn 0.056124 -0.994873 0.084017 +vn 0.531785 -0.289438 0.795862 +vn 0.513504 -0.381603 0.768548 +vn 0.462447 0.554155 0.692099 +vn 0.490341 0.470107 0.733848 +vn 0.490341 -0.470107 0.733848 +vn 0.462447 -0.554155 0.692099 +vn 0.056124 0.994873 0.084017 +vn 0.110019 0.980193 0.164647 +vn 0.513504 0.381603 0.768548 +vn 0.531785 0.289438 0.795862 +vn 0.430128 -0.632893 0.643727 +vn 0.393689 -0.705557 0.589190 +vn 0.162816 0.956084 0.243690 +vn 0.544939 0.194494 0.815577 +vn 0.353435 -0.771508 0.528977 +vn 0.112156 0.956084 0.270760 +vn 0.147435 0.922788 0.355937 +vn 0.375347 0.194494 0.906217 +vn 0.380840 0.097690 0.919431 +vn 0.243446 -0.771508 0.587786 +vn 0.213385 -0.830042 0.515213 +vn 0.181280 0.880642 0.437696 +vn 0.213385 0.830042 0.515213 +vn 0.181280 -0.880642 0.437696 +vn 0.147435 -0.922788 0.355937 +vn 0.382672 0.000000 0.923856 +vn 0.380840 -0.097690 0.919431 +vn 0.243446 0.771508 0.587786 +vn 0.271157 0.705557 0.654683 +vn 0.112156 -0.956084 0.270760 +vn 0.075777 -0.980193 0.182958 +vn 0.375347 -0.194494 0.906217 +vn 0.366283 -0.289438 0.884304 +vn 0.296274 0.632893 0.715293 +vn 0.318522 0.554155 0.769036 +vn 0.353710 -0.381603 0.853938 +vn 0.337748 -0.470107 0.815394 +vn 0.337748 0.470107 0.815394 +vn 0.353710 0.381603 0.853938 +vn 0.318522 -0.554155 0.769036 +vn 0.296274 -0.632893 0.715293 +vn 0.075777 0.980193 0.182958 +vn 0.366283 0.289438 0.884304 +vn 0.271157 -0.705557 0.654683 +vn 0.038667 -0.994873 0.093356 +vn 0.038667 0.994873 0.093356 +vn 0.038606 0.980193 0.194220 +vn 0.057161 0.956084 0.287454 +vn 0.186712 0.289438 0.938780 +vn 0.191351 0.194494 0.962035 +vn 0.138218 -0.705557 0.694998 +vn 0.124119 -0.771508 0.623981 +vn 0.075137 0.922788 0.377880 +vn 0.092410 0.880642 0.464644 +vn 0.194128 0.097690 0.976074 +vn 0.195074 0.000000 0.980773 +vn 0.108768 -0.830042 0.546953 +vn 0.092410 -0.880642 0.464644 +vn 0.108768 0.830042 0.546953 +vn 0.124119 0.771508 0.623981 +vn 0.075167 -0.922788 0.377880 +vn 0.057161 -0.956084 0.287454 +vn 0.194128 -0.097690 0.976074 +vn 0.191351 -0.194494 0.962035 +vn 0.138218 0.705557 0.694998 +vn 0.151036 0.632893 0.759331 +vn 0.038606 -0.980193 0.194220 +vn 0.019684 -0.994873 0.099094 +vn 0.186712 -0.289438 0.938780 +vn 0.180303 -0.381603 0.906552 +vn 0.162389 0.554155 0.816401 +vn 0.172185 0.470107 0.865627 +vn 0.172185 -0.470107 0.865627 +vn 0.162389 -0.554155 0.816401 +vn 0.019684 0.994873 0.099094 +vn 0.180303 0.381603 0.906552 +vn 0.151036 -0.632893 0.759331 +vn 0.000000 0.994873 0.101047 +vn 0.000000 0.980193 0.198035 +vn 0.000000 0.381603 0.924314 +vn 0.000000 0.289438 0.957183 +vn 0.000000 -0.632893 0.774224 +vn 0.000000 -0.705557 0.708609 +vn 0.000000 0.956084 0.293069 +vn 0.000000 0.922788 0.385266 +vn 0.000000 0.194494 0.980895 +vn 0.000000 0.097690 0.995209 +vn 0.000000 -0.771508 0.636189 +vn 0.000000 -0.830042 0.557665 +vn 0.000000 0.880642 0.473769 +vn 0.000000 0.830042 0.557665 +vn 0.000000 -0.880642 0.473769 +vn 0.000000 -0.922788 0.385266 +vn 0.000000 0.000000 0.999969 +vn 0.000000 -0.097690 0.995209 +vn 0.000000 0.771508 0.636189 +vn 0.000000 0.705557 0.708609 +vn 0.000000 -0.956084 0.293069 +vn 0.000000 -0.980193 0.198035 +vn 0.000000 -0.194494 0.980895 +vn 0.000000 -0.289438 0.957183 +vn 0.000000 0.632893 0.774224 +vn 0.000000 0.554155 0.832392 +vn 0.000000 -0.381603 0.924314 +vn 0.000000 -0.470107 0.882595 +vn 0.000000 0.470107 0.882595 +vn 0.000000 -0.554155 0.832392 +vn 0.000000 -0.994873 0.101047 +vn -0.172185 0.470107 0.865627 +vn -0.180303 0.381603 0.906552 +vn -0.162389 -0.554155 0.816401 +vn -0.151036 -0.632893 0.759331 +vn -0.038606 0.980193 0.194220 +vn -0.057161 0.956084 0.287454 +vn -0.186712 0.289438 0.938780 +vn -0.191351 0.194494 0.962035 +vn -0.138218 -0.705557 0.694998 +vn -0.124119 -0.771508 0.623981 +vn -0.075167 0.922788 0.377880 +vn -0.092410 0.880642 0.464644 +vn -0.194128 0.097690 0.976074 +vn -0.195074 0.000000 0.980773 +vn -0.108768 -0.830042 0.546953 +vn -0.092410 -0.880642 0.464644 +vn -0.108768 0.830042 0.546953 +vn -0.124119 0.771508 0.623981 +vn -0.075167 -0.922788 0.377880 +vn -0.057161 -0.956084 0.287454 +vn -0.194128 -0.097690 0.976074 +vn -0.191351 -0.194494 0.962035 +vn -0.138218 0.705557 0.694998 +vn -0.151036 0.632893 0.759331 +vn -0.038606 -0.980193 0.194220 +vn -0.019684 -0.994873 0.099094 +vn -0.186712 -0.289438 0.938780 +vn -0.180303 -0.381603 0.906552 +vn -0.162389 0.554155 0.816401 +vn -0.172185 -0.470107 0.865627 +vn -0.019684 0.994873 0.099094 +vn -0.318522 0.554155 0.769036 +vn -0.337748 0.470107 0.815394 +vn -0.337748 -0.470107 0.815394 +vn -0.318522 -0.554155 0.769036 +vn -0.038667 0.994873 0.093356 +vn -0.075777 0.980193 0.182958 +vn -0.353710 0.381603 0.853938 +vn -0.366283 0.289438 0.884304 +vn -0.296274 -0.632893 0.715293 +vn -0.271157 -0.705557 0.654683 +vn -0.112156 0.956084 0.270760 +vn -0.147435 0.922788 0.355937 +vn -0.375347 0.194494 0.906217 +vn -0.380840 0.097690 0.919431 +vn -0.243446 -0.771508 0.587786 +vn -0.213385 -0.830042 0.515213 +vn -0.181280 0.880642 0.437696 +vn -0.213385 0.830042 0.515213 +vn -0.181280 -0.880642 0.437696 +vn -0.147435 -0.922788 0.355937 +vn -0.382672 0.000000 0.923856 +vn -0.380840 -0.097690 0.919431 +vn -0.243446 0.771508 0.587786 +vn -0.271157 0.705557 0.654683 +vn -0.112156 -0.956084 0.270760 +vn -0.075777 -0.980193 0.182958 +vn -0.375347 -0.194494 0.906217 +vn -0.366283 -0.289438 0.884304 +vn -0.296274 0.632893 0.715293 +vn -0.353710 -0.381603 0.853938 +vn -0.038667 -0.994873 0.093356 +vn -0.430128 0.632893 0.643727 +vn -0.462447 0.554155 0.692099 +vn -0.513504 -0.381603 0.768548 +vn -0.490341 -0.470107 0.733848 +vn -0.490341 0.470107 0.733848 +vn -0.513504 0.381603 0.768548 +vn -0.462447 -0.554155 0.692099 +vn -0.430128 -0.632893 0.643727 +vn -0.110019 0.980193 0.164647 +vn -0.162816 0.956084 0.243690 +vn -0.531785 0.289438 0.795862 +vn -0.544939 0.194494 0.815577 +vn -0.393689 -0.705557 0.589190 +vn -0.353435 -0.771508 0.528977 +vn -0.214057 0.922788 0.320353 +vn -0.263192 0.880642 0.393902 +vn -0.552904 0.097690 0.827479 +vn -0.555559 0.000000 0.831446 +vn -0.309824 -0.830042 0.463668 +vn -0.263192 -0.880642 0.393902 +vn -0.309824 0.830042 0.463668 +vn -0.353435 0.771508 0.528977 +vn -0.214057 -0.922788 0.320353 +vn -0.162816 -0.956084 0.243690 +vn -0.552904 -0.097690 0.827479 +vn -0.544939 -0.194494 0.815577 +vn -0.393689 0.705557 0.589190 +vn -0.110019 -0.980193 0.164647 +vn -0.056124 -0.994873 0.084017 +vn -0.531785 -0.289438 0.795862 +vn -0.056124 0.994873 0.084017 +vn -0.501053 0.705557 0.501053 +vn -0.547441 0.632893 0.547441 +vn -0.140019 -0.980193 0.140019 +vn -0.071444 -0.994873 0.071444 +vn -0.676840 -0.289438 0.676840 +vn -0.653584 -0.381603 0.653584 +vn -0.588580 0.554155 0.588580 +vn -0.624073 0.470107 0.624073 +vn -0.624073 -0.470107 0.624073 +vn -0.588580 -0.554155 0.588580 +vn -0.071444 0.994873 0.071444 +vn -0.140019 0.980193 0.140019 +vn -0.653584 0.381603 0.653584 +vn -0.676840 0.289407 0.676840 +vn -0.547441 -0.632893 0.547441 +vn -0.501053 -0.705557 0.501053 +vn -0.207221 0.956084 0.207221 +vn -0.272439 0.922788 0.272439 +vn -0.693594 0.194494 0.693594 +vn -0.703696 0.097690 0.703696 +vn -0.449873 -0.771508 0.449873 +vn -0.394330 -0.830042 0.394330 +vn -0.335002 0.880642 0.335002 +vn -0.394330 0.830042 0.394330 +vn -0.335002 -0.880642 0.335002 +vn -0.272439 -0.922788 0.272439 +vn -0.707083 0.000000 0.707083 +vn -0.703696 -0.097690 0.703696 +vn -0.449873 0.771508 0.449873 +vn -0.207221 -0.956084 0.207221 +vn -0.693594 -0.194494 0.693594 +vn -0.528977 0.771508 0.353435 +vn -0.589190 0.705557 0.393689 +vn -0.243690 -0.956084 0.162816 +vn -0.164647 -0.980193 0.110019 +vn -0.815577 -0.194494 0.544939 +vn -0.795862 -0.289438 0.531785 +vn -0.643727 0.632893 0.430128 +vn -0.692099 0.554155 0.462447 +vn -0.768548 -0.381603 0.513504 +vn -0.733848 -0.470107 0.490341 +vn -0.733848 0.470107 0.490341 +vn -0.768548 0.381603 0.513504 +vn -0.692099 -0.554155 0.462447 +vn -0.643727 -0.632893 0.430128 +vn -0.164647 0.980193 0.110019 +vn -0.243690 0.956084 0.162816 +vn -0.795862 0.289438 0.531785 +vn -0.815577 0.194494 0.544939 +vn -0.589190 -0.705557 0.393689 +vn -0.528977 -0.771508 0.353435 +vn -0.320353 0.922788 0.214057 +vn -0.393902 0.880642 0.263192 +vn -0.827479 0.097720 0.552904 +vn -0.831446 0.000000 0.555559 +vn -0.463668 -0.830042 0.309824 +vn -0.393902 -0.880642 0.263192 +vn -0.463668 0.830042 0.309824 +vn -0.320353 -0.922788 0.214057 +vn -0.827479 -0.097690 0.552904 +vn -0.084017 -0.994873 0.056124 +vn -0.084017 0.994873 0.056124 +vn -0.515213 0.830042 0.213385 +vn -0.587786 0.771508 0.243446 +vn -0.355937 -0.922788 0.147435 +vn -0.270760 -0.956084 0.112156 +vn -0.919431 -0.097690 0.380840 +vn -0.906217 -0.194494 0.375347 +vn -0.654683 0.705557 0.271157 +vn -0.715293 0.632893 0.296274 +vn -0.182958 -0.980193 0.075777 +vn -0.093356 -0.994873 0.038667 +vn -0.884304 -0.289438 0.366283 +vn -0.853938 -0.381603 0.353710 +vn -0.769036 0.554155 0.318522 +vn -0.815394 0.470107 0.337748 +vn -0.815394 -0.470107 0.337748 +vn -0.769036 -0.554155 0.318522 +vn -0.093356 0.994873 0.038667 +vn -0.182958 0.980193 0.075777 +vn -0.853938 0.381603 0.353710 +vn -0.884304 0.289407 0.366283 +vn -0.715293 -0.632893 0.296274 +vn -0.654683 -0.705557 0.271157 +vn -0.270760 0.956084 0.112156 +vn -0.355937 0.922788 0.147435 +vn -0.906217 0.194494 0.375347 +vn -0.919431 0.097720 0.380840 +vn -0.587786 -0.771508 0.243446 +vn -0.515213 -0.830042 0.213385 +vn -0.437696 0.880642 0.181280 +vn -0.437696 -0.880642 0.181280 +vn -0.923856 0.000000 0.382672 +vn -0.464644 0.880642 0.092410 +vn -0.546953 0.830042 0.108768 +vn -0.464644 -0.880642 0.092410 +vn -0.377880 -0.922788 0.075167 +vn -0.980773 0.000000 0.195074 +vn -0.976074 -0.097690 0.194128 +vn -0.623981 0.771508 0.124119 +vn -0.694998 0.705557 0.138218 +vn -0.287454 -0.956084 0.057161 +vn -0.194220 -0.980193 0.038606 +vn -0.962035 -0.194494 0.191351 +vn -0.938780 -0.289438 0.186712 +vn -0.759331 0.632893 0.151036 +vn -0.816401 0.554155 0.162389 +vn -0.906552 -0.381603 0.180303 +vn -0.865627 -0.470107 0.172185 +vn -0.865627 0.470107 0.172185 +vn -0.906552 0.381603 0.180303 +vn -0.816401 -0.554155 0.162389 +vn -0.759331 -0.632893 0.151036 +vn -0.194220 0.980193 0.038606 +vn -0.287454 0.956084 0.057161 +vn -0.938780 0.289407 0.186712 +vn -0.962035 0.194494 0.191351 +vn -0.694998 -0.705557 0.138218 +vn -0.623981 -0.771508 0.124119 +vn -0.377880 0.922788 0.075137 +vn -0.976074 0.097690 0.194128 +vn -0.546953 -0.830042 0.108768 +vn -0.099094 -0.994873 0.019684 +vn -0.099094 0.994873 0.019684 +vn -0.385266 0.922788 0.000000 +vn -0.473769 0.880642 0.000000 +vn -0.995209 0.097720 0.000000 +vn -1.000000 0.000000 0.000000 +vn -0.557665 -0.830042 0.000000 +vn -0.473769 -0.880642 0.000000 +vn -0.557665 0.830042 0.000000 +vn -0.636189 0.771508 0.000000 +vn -0.385266 -0.922788 0.000000 +vn -0.293069 -0.956084 0.000000 +vn -0.995209 -0.097690 0.000000 +vn -0.980895 -0.194494 0.000000 +vn -0.708609 0.705557 0.000000 +vn -0.774224 0.632893 0.000000 +vn -0.198035 -0.980193 0.000000 +vn -0.101047 -0.994873 0.000000 +vn -0.957183 -0.289438 0.000000 +vn -0.924314 -0.381603 0.000000 +vn -0.832392 0.554155 0.000000 +vn -0.882595 0.470107 0.000000 +vn -0.882595 -0.470107 0.000000 +vn -0.832392 -0.554155 0.000000 +vn -0.101047 0.994873 0.000000 +vn -0.198035 0.980193 0.000000 +vn -0.924314 0.381603 0.000000 +vn -0.957183 0.289407 0.000000 +vn -0.774224 -0.632893 0.000000 +vn -0.708609 -0.705557 0.000000 +vn -0.293069 0.956084 0.000000 +vn -0.980895 0.194494 0.000000 +vn -0.636189 -0.771508 0.000000 +vn -0.099094 0.994873 -0.019684 +vn -0.194220 0.980193 -0.038606 +vn -0.906552 0.381603 -0.180303 +vn -0.938780 0.289407 -0.186712 +vn -0.623981 -0.771508 -0.124119 +vn -0.546953 -0.830042 -0.108768 +vn -0.287454 0.956084 -0.057161 +vn -0.377880 0.922788 -0.075167 +vn -0.962035 0.194494 -0.191351 +vn -0.976074 0.097720 -0.194128 +vn -0.464644 -0.880642 -0.092410 +vn -0.377880 -0.922788 -0.075167 +vn -0.980773 0.000000 -0.195074 +vn -0.976074 -0.097690 -0.194128 +vn -0.464644 0.880642 -0.092410 +vn -0.546953 0.830042 -0.108798 +vn -0.287454 -0.956084 -0.057161 +vn -0.194220 -0.980193 -0.038606 +vn -0.962035 -0.194494 -0.191351 +vn -0.938780 -0.289438 -0.186712 +vn -0.623981 0.771508 -0.124119 +vn -0.694998 0.705557 -0.138218 +vn -0.906552 -0.381603 -0.180303 +vn -0.865627 -0.470107 -0.172185 +vn -0.759331 0.632893 -0.151036 +vn -0.816401 0.554155 -0.162389 +vn -0.816401 -0.554155 -0.162389 +vn -0.759331 -0.632893 -0.151036 +vn -0.865627 0.470107 -0.172185 +vn -0.694998 -0.705557 -0.138218 +vn -0.099094 -0.994873 -0.019684 +vn -0.815394 0.470107 -0.337748 +vn -0.853938 0.381603 -0.353710 +vn -0.769036 -0.554155 -0.318522 +vn -0.715293 -0.632893 -0.296274 +vn -0.182958 0.980193 -0.075777 +vn -0.270760 0.956084 -0.112156 +vn -0.884304 0.289407 -0.366283 +vn -0.906217 0.194494 -0.375347 +vn -0.654683 -0.705557 -0.271157 +vn -0.587786 -0.771508 -0.243446 +vn -0.355937 0.922788 -0.147435 +vn -0.437696 0.880642 -0.181280 +vn -0.919431 0.097720 -0.380840 +vn -0.923856 0.000000 -0.382672 +vn -0.515213 -0.830042 -0.213385 +vn -0.437696 -0.880642 -0.181280 +vn -0.515213 0.830042 -0.213416 +vn -0.587786 0.771508 -0.243446 +vn -0.355937 -0.922788 -0.147435 +vn -0.270760 -0.956084 -0.112156 +vn -0.919431 -0.097690 -0.380840 +vn -0.906217 -0.194494 -0.375347 +vn -0.654683 0.705557 -0.271157 +vn -0.715293 0.632893 -0.296274 +vn -0.182958 -0.980193 -0.075777 +vn -0.093356 -0.994873 -0.038667 +vn -0.884304 -0.289438 -0.366283 +vn -0.853938 -0.381603 -0.353710 +vn -0.769036 0.554155 -0.318522 +vn -0.815394 -0.470107 -0.337748 +vn -0.093356 0.994873 -0.038667 +vn -0.692099 0.554155 -0.462447 +vn -0.733848 0.470107 -0.490341 +vn -0.733848 -0.470107 -0.490341 +vn -0.692099 -0.554155 -0.462447 +vn -0.084017 0.994873 -0.056124 +vn -0.164647 0.980193 -0.110019 +vn -0.768548 0.381603 -0.513504 +vn -0.795862 0.289407 -0.531785 +vn -0.643727 -0.632893 -0.430128 +vn -0.589190 -0.705557 -0.393689 +vn -0.243690 0.956084 -0.162816 +vn -0.320353 0.922788 -0.214057 +vn -0.815577 0.194494 -0.544939 +vn -0.827479 0.097720 -0.552904 +vn -0.528977 -0.771508 -0.353435 +vn -0.463668 -0.830042 -0.309824 +vn -0.393902 0.880642 -0.263192 +vn -0.463668 0.830042 -0.309824 +vn -0.393902 -0.880642 -0.263192 +vn -0.320353 -0.922788 -0.214057 +vn -0.831446 0.000000 -0.555559 +vn -0.827479 -0.097690 -0.552904 +vn -0.528977 0.771508 -0.353435 +vn -0.589190 0.705557 -0.393689 +vn -0.243690 -0.956084 -0.162816 +vn -0.164647 -0.980193 -0.110019 +vn -0.815577 -0.194494 -0.544939 +vn -0.795862 -0.289438 -0.531785 +vn -0.643727 0.632893 -0.430128 +vn -0.768548 -0.381603 -0.513504 +vn -0.084017 -0.994873 -0.056124 +vn -0.547441 0.632893 -0.547441 +vn -0.588580 0.554155 -0.588580 +vn -0.653584 -0.381603 -0.653584 +vn -0.624073 -0.470107 -0.624073 +vn -0.624073 0.470107 -0.624073 +vn -0.653584 0.381603 -0.653584 +vn -0.588580 -0.554155 -0.588580 +vn -0.547441 -0.632893 -0.547441 +vn -0.140019 0.980193 -0.140019 +vn -0.207221 0.956084 -0.207221 +vn -0.676840 0.289407 -0.676840 +vn -0.693594 0.194494 -0.693594 +vn -0.501053 -0.705557 -0.501053 +vn -0.449873 -0.771508 -0.449873 +vn -0.272439 0.922788 -0.272439 +vn -0.335002 0.880642 -0.335002 +vn -0.703696 0.097720 -0.703696 +vn -0.707083 0.000000 -0.707083 +vn -0.394330 -0.830042 -0.394330 +vn -0.335002 -0.880642 -0.335002 +vn -0.394330 0.830042 -0.394330 +vn -0.449873 0.771508 -0.449873 +vn -0.272439 -0.922788 -0.272439 +vn -0.207221 -0.956084 -0.207221 +vn -0.703696 -0.097690 -0.703696 +vn -0.693594 -0.194494 -0.693594 +vn -0.501053 0.705557 -0.501053 +vn -0.140019 -0.980193 -0.140019 +vn -0.071444 -0.994873 -0.071444 +vn -0.676840 -0.289438 -0.676840 +vn -0.071444 0.994873 -0.071444 +vn -0.393689 0.705557 -0.589190 +vn -0.430128 0.632893 -0.643727 +vn -0.110019 -0.980193 -0.164647 +vn -0.056124 -0.994873 -0.084017 +vn -0.531785 -0.289438 -0.795862 +vn -0.513504 -0.381603 -0.768548 +vn -0.462447 0.554155 -0.692099 +vn -0.490341 0.470107 -0.733848 +vn -0.490341 -0.470107 -0.733848 +vn -0.462447 -0.554155 -0.692099 +vn -0.056124 0.994873 -0.084017 +vn -0.110019 0.980193 -0.164647 +vn -0.513504 0.381603 -0.768548 +vn -0.531785 0.289407 -0.795862 +vn -0.430128 -0.632893 -0.643727 +vn -0.393689 -0.705557 -0.589190 +vn -0.162816 0.956084 -0.243690 +vn -0.214057 0.922788 -0.320353 +vn -0.544939 0.194494 -0.815577 +vn -0.552904 0.097720 -0.827479 +vn -0.353435 -0.771508 -0.528977 +vn -0.309824 -0.830042 -0.463668 +vn -0.263192 0.880642 -0.393902 +vn -0.309824 0.830042 -0.463668 +vn -0.263192 -0.880642 -0.393902 +vn -0.214057 -0.922788 -0.320353 +vn -0.555559 0.000000 -0.831446 +vn -0.552904 -0.097690 -0.827479 +vn -0.353435 0.771508 -0.528977 +vn -0.162816 -0.956084 -0.243690 +vn -0.544939 -0.194494 -0.815577 +vn -0.243446 0.771508 -0.587786 +vn -0.271157 0.705557 -0.654683 +vn -0.112156 -0.956084 -0.270760 +vn -0.075777 -0.980193 -0.182958 +vn -0.375347 -0.194494 -0.906217 +vn -0.366283 -0.289438 -0.884304 +vn -0.296274 0.632893 -0.715293 +vn -0.318522 0.554155 -0.769036 +vn -0.353710 -0.381603 -0.853938 +vn -0.337748 -0.470107 -0.815394 +vn -0.337748 0.470107 -0.815394 +vn -0.353710 0.381603 -0.853938 +vn -0.318522 -0.554155 -0.769036 +vn -0.296274 -0.632893 -0.715293 +vn -0.075777 0.980193 -0.182958 +vn -0.112156 0.956084 -0.270760 +vn -0.366283 0.289407 -0.884335 +vn -0.375347 0.194494 -0.906217 +vn -0.271157 -0.705557 -0.654683 +vn -0.243446 -0.771508 -0.587786 +vn -0.147435 0.922788 -0.355937 +vn -0.181280 0.880642 -0.437696 +vn -0.380840 0.097720 -0.919431 +vn -0.382672 0.000000 -0.923856 +vn -0.213385 -0.830042 -0.515213 +vn -0.181280 -0.880642 -0.437696 +vn -0.213385 0.830042 -0.515213 +vn -0.147435 -0.922788 -0.355937 +vn -0.380840 -0.097690 -0.919431 +vn -0.038667 -0.994873 -0.093356 +vn -0.038667 0.994873 -0.093356 +vn -0.108768 0.830042 -0.546953 +vn -0.124119 0.771508 -0.623981 +vn -0.075167 -0.922788 -0.377880 +vn -0.057161 -0.956084 -0.287454 +vn -0.194128 -0.097690 -0.976074 +vn -0.191351 -0.194494 -0.962035 +vn -0.138218 0.705557 -0.694998 +vn -0.151036 0.632893 -0.759331 +vn -0.038606 -0.980193 -0.194220 +vn -0.019684 -0.994873 -0.099094 +vn -0.186712 -0.289438 -0.938780 +vn -0.180303 -0.381603 -0.906552 +vn -0.162389 0.554155 -0.816401 +vn -0.172185 0.470107 -0.865627 +vn -0.172185 -0.470107 -0.865627 +vn -0.162389 -0.554155 -0.816401 +vn -0.019684 0.994873 -0.099094 +vn -0.038606 0.980193 -0.194220 +vn -0.180303 0.381603 -0.906552 +vn -0.186712 0.289407 -0.938780 +vn -0.151036 -0.632893 -0.759362 +vn -0.138218 -0.705557 -0.694998 +vn -0.057161 0.956084 -0.287454 +vn -0.075167 0.922788 -0.377880 +vn -0.191351 0.194494 -0.962035 +vn -0.194128 0.097720 -0.976074 +vn -0.124119 -0.771508 -0.623981 +vn -0.108768 -0.830042 -0.546953 +vn -0.092410 0.880642 -0.464644 +vn -0.092410 -0.880642 -0.464644 +vn -0.195074 0.000000 -0.980773 +vn 0.000000 0.880642 -0.473769 +vn 0.000000 0.830042 -0.557665 +vn 0.000000 -0.880642 -0.473769 +vn 0.000000 -0.922788 -0.385266 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 -0.097690 -0.995209 +vn 0.000000 0.771508 -0.636189 +vn 0.000000 0.705557 -0.708609 +vn 0.000000 -0.956084 -0.293069 +vn 0.000000 -0.980193 -0.198035 +vn 0.000000 -0.194494 -0.980895 +vn 0.000000 -0.289438 -0.957183 +vn 0.000000 0.632893 -0.774224 +vn 0.000000 0.554155 -0.832392 +vn 0.000000 -0.381603 -0.924314 +vn 0.000000 -0.470107 -0.882595 +vn 0.000000 0.470107 -0.882595 +vn 0.000000 0.381603 -0.924314 +vn 0.000000 -0.554155 -0.832392 +vn 0.000000 -0.632893 -0.774224 +vn 0.000000 0.980193 -0.198035 +vn 0.000000 0.956084 -0.293069 +vn 0.000000 0.289407 -0.957183 +vn 0.000000 0.194494 -0.980895 +vn 0.000000 -0.705557 -0.708609 +vn 0.000000 -0.771508 -0.636189 +vn 0.000000 0.922788 -0.385266 +vn 0.000000 0.097720 -0.995209 +vn 0.000000 -0.830042 -0.557665 +vn 0.000000 -0.994873 -0.101047 +vn 0.000000 0.994873 -0.101047 +vn 0.075167 0.922788 -0.377880 +vn 0.092410 0.880642 -0.464644 +vn 0.194128 0.097720 -0.976074 +vn 0.195074 0.000000 -0.980773 +vn 0.108798 -0.830042 -0.546953 +vn 0.092410 -0.880642 -0.464644 +vn 0.108798 0.830042 -0.546953 +vn 0.124119 0.771508 -0.623981 +vn 0.075167 -0.922788 -0.377880 +vn 0.057161 -0.956084 -0.287454 +vn 0.194128 -0.097690 -0.976074 +vn 0.191351 -0.194494 -0.962035 +vn 0.138218 0.705557 -0.694998 +vn 0.151036 0.632893 -0.759331 +vn 0.038606 -0.980193 -0.194220 +vn 0.019684 -0.994873 -0.099094 +vn 0.186712 -0.289438 -0.938780 +vn 0.180303 -0.381603 -0.906552 +vn 0.162389 0.554155 -0.816401 +vn 0.172185 0.470107 -0.865627 +vn 0.172185 -0.470107 -0.865627 +vn 0.162389 -0.554155 -0.816401 +vn 0.019684 0.994873 -0.099094 +vn 0.038606 0.980193 -0.194220 +vn 0.180303 0.381603 -0.906552 +vn 0.186712 0.289407 -0.938780 +vn 0.151036 -0.632893 -0.759331 +vn 0.138218 -0.705557 -0.694998 +vn 0.057161 0.956084 -0.287454 +vn 0.191351 0.194494 -0.962035 +vn 0.124119 -0.771508 -0.623981 +vn 0.112156 0.956084 -0.270760 +vn 0.147435 0.922788 -0.355937 +vn 0.375347 0.194494 -0.906217 +vn 0.380840 0.097720 -0.919431 +vn 0.243446 -0.771508 -0.587786 +vn 0.213416 -0.830042 -0.515213 +vn 0.181280 0.880642 -0.437696 +vn 0.213416 0.830042 -0.515213 +vn 0.181280 -0.880642 -0.437696 +vn 0.147435 -0.922788 -0.355937 +vn 0.382672 0.000000 -0.923856 +vn 0.380840 -0.097690 -0.919431 +vn 0.243446 0.771508 -0.587786 +vn 0.271157 0.705557 -0.654683 +vn 0.112156 -0.956084 -0.270760 +vn 0.075777 -0.980193 -0.182958 +vn 0.375347 -0.194494 -0.906217 +vn 0.366283 -0.289407 -0.884304 +vn 0.296274 0.632893 -0.715293 +vn 0.318522 0.554155 -0.769036 +vn 0.353710 -0.381603 -0.853938 +vn 0.337748 -0.470107 -0.815394 +vn 0.337748 0.470107 -0.815394 +vn 0.353710 0.381603 -0.853938 +vn 0.318522 -0.554155 -0.769036 +vn 0.296274 -0.632893 -0.715293 +vn 0.075777 0.980193 -0.182958 +vn 0.366283 0.289407 -0.884304 +vn 0.271157 -0.705557 -0.654683 +vn 0.038667 -0.994873 -0.093356 +vn 0.038667 0.994873 -0.093356 +vn 0.110019 0.980193 -0.164647 +vn 0.162816 0.956084 -0.243690 +vn 0.531785 0.289407 -0.795862 +vn 0.544939 0.194494 -0.815577 +vn 0.393689 -0.705557 -0.589190 +vn 0.353435 -0.771508 -0.528977 +vn 0.214057 0.922788 -0.320353 +vn 0.263192 0.880642 -0.393902 +vn 0.552904 0.097720 -0.827479 +vn 0.555559 0.000000 -0.831446 +vn 0.309824 -0.830042 -0.463668 +vn 0.263192 -0.880642 -0.393902 +vn 0.309824 0.830042 -0.463668 +vn 0.353435 0.771508 -0.528977 +vn 0.214057 -0.922788 -0.320353 +vn 0.162816 -0.956084 -0.243690 +vn 0.552904 -0.097690 -0.827479 +vn 0.544939 -0.194494 -0.815577 +vn 0.393689 0.705557 -0.589190 +vn 0.430128 0.632893 -0.643727 +vn 0.110019 -0.980193 -0.164647 +vn 0.056124 -0.994873 -0.084017 +vn 0.531785 -0.289407 -0.795862 +vn 0.513504 -0.381603 -0.768548 +vn 0.462447 0.554155 -0.692099 +vn 0.490341 0.470107 -0.733848 +vn 0.490341 -0.470107 -0.733848 +vn 0.462447 -0.554155 -0.692099 +vn 0.056124 0.994873 -0.084017 +vn 0.513504 0.381603 -0.768548 +vn 0.430128 -0.632893 -0.643727 +vn 0.071444 0.994873 -0.071444 +vn 0.140019 0.980193 -0.140019 +vn 0.653584 0.381603 -0.653584 +vn 0.676840 0.289407 -0.676840 +vn 0.547441 -0.632893 -0.547441 +vn 0.501053 -0.705557 -0.501053 +vn 0.207221 0.956084 -0.207221 +vn 0.272439 0.922788 -0.272439 +vn 0.693594 0.194494 -0.693594 +vn 0.703696 0.097720 -0.703696 +vn 0.449873 -0.771508 -0.449873 +vn 0.394330 -0.830042 -0.394330 +vn 0.335002 0.880642 -0.335002 +vn 0.394330 0.830042 -0.394330 +vn 0.335002 -0.880642 -0.335002 +vn 0.272439 -0.922788 -0.272439 +vn 0.707083 0.000000 -0.707083 +vn 0.703696 -0.097690 -0.703696 +vn 0.449873 0.771508 -0.449873 +vn 0.501053 0.705557 -0.501053 +vn 0.207221 -0.956084 -0.207221 +vn 0.140019 -0.980193 -0.140019 +vn 0.693594 -0.194494 -0.693594 +vn 0.676840 -0.289407 -0.676840 +vn 0.547441 0.632893 -0.547441 +vn 0.588580 0.554155 -0.588580 +vn 0.653584 -0.381603 -0.653584 +vn 0.624073 -0.470107 -0.624073 +vn 0.624073 0.470107 -0.624073 +vn 0.588580 -0.554155 -0.588580 +vn 0.071444 -0.994873 -0.071444 +vn 0.733848 0.470107 -0.490341 +vn 0.768548 0.381603 -0.513504 +vn 0.692099 -0.554155 -0.462447 +vn 0.643727 -0.632893 -0.430128 +vn 0.164647 0.980193 -0.110019 +vn 0.243690 0.956084 -0.162816 +vn 0.795862 0.289407 -0.531785 +vn 0.815577 0.194494 -0.544939 +vn 0.589190 -0.705557 -0.393689 +vn 0.528977 -0.771508 -0.353435 +vn 0.320353 0.922788 -0.214057 +vn 0.393902 0.880642 -0.263192 +vn 0.827479 0.097720 -0.552904 +vn 0.831446 0.000000 -0.555559 +vn 0.463668 -0.830042 -0.309824 +vn 0.393902 -0.880642 -0.263192 +vn 0.463668 0.830042 -0.309824 +vn 0.528977 0.771508 -0.353435 +vn 0.320353 -0.922788 -0.214057 +vn 0.243690 -0.956084 -0.162816 +vn 0.827479 -0.097690 -0.552904 +vn 0.815577 -0.194494 -0.544939 +vn 0.589190 0.705557 -0.393689 +vn 0.643727 0.632893 -0.430128 +vn 0.164647 -0.980193 -0.110019 +vn 0.084017 -0.994873 -0.056124 +vn 0.795862 -0.289407 -0.531785 +vn 0.768548 -0.381603 -0.513504 +vn 0.692099 0.554155 -0.462447 +vn 0.733848 -0.470107 -0.490341 +vn 0.084017 0.994873 -0.056124 +vn 0.769036 0.554155 -0.318522 +vn 0.815394 0.470107 -0.337748 +vn 0.815394 -0.470107 -0.337748 +vn 0.769036 -0.554155 -0.318522 +vn 0.093356 0.994873 -0.038667 +vn 0.182958 0.980193 -0.075777 +vn 0.853938 0.381603 -0.353710 +vn 0.884335 0.289407 -0.366283 +vn 0.715293 -0.632893 -0.296274 +vn 0.654683 -0.705557 -0.271157 +vn 0.270760 0.956084 -0.112156 +vn 0.355937 0.922788 -0.147435 +vn 0.906217 0.194494 -0.375347 +vn 0.919431 0.097720 -0.380840 +vn 0.587786 -0.771508 -0.243446 +vn 0.515213 -0.830042 -0.213385 +vn 0.437696 0.880642 -0.181280 +vn 0.515213 0.830042 -0.213385 +vn 0.437696 -0.880642 -0.181280 +vn 0.355937 -0.922788 -0.147435 +vn 0.923856 0.000000 -0.382672 +vn 0.919431 -0.097690 -0.380840 +vn 0.587786 0.771508 -0.243446 +vn 0.654683 0.705557 -0.271157 +vn 0.270760 -0.956084 -0.112156 +vn 0.182958 -0.980193 -0.075777 +vn 0.906217 -0.194494 -0.375347 +vn 0.884335 -0.289407 -0.366283 +vn 0.715293 0.632893 -0.296274 +vn 0.853938 -0.381603 -0.353710 +vn 0.093356 -0.994873 -0.038667 +vn 0.759331 0.632893 -0.151036 +vn 0.816401 0.554155 -0.162389 +vn 0.906552 -0.381603 -0.180303 +vn 0.865627 -0.470107 -0.172185 +vn 0.865627 0.470107 -0.172185 +vn 0.906552 0.381603 -0.180303 +vn 0.816401 -0.554155 -0.162389 +vn 0.759331 -0.632893 -0.151036 +vn 0.194220 0.980193 -0.038606 +vn 0.287454 0.956084 -0.057161 +vn 0.938780 0.289407 -0.186712 +vn 0.962035 0.194494 -0.191351 +vn 0.694998 -0.705557 -0.138249 +vn 0.623981 -0.771508 -0.124119 +vn 0.377880 0.922788 -0.075167 +vn 0.464644 0.880642 -0.092410 +vn 0.976074 0.097720 -0.194159 +vn 0.980773 0.000000 -0.195074 +vn 0.546953 -0.830042 -0.108798 +vn 0.464644 -0.880642 -0.092410 +vn 0.546953 0.830042 -0.108798 +vn 0.623981 0.771508 -0.124119 +vn 0.377880 -0.922788 -0.075167 +vn 0.287454 -0.956084 -0.057161 +vn 0.976074 -0.097690 -0.194159 +vn 0.962035 -0.194494 -0.191351 +vn 0.694998 0.705557 -0.138249 +vn 0.194220 -0.980193 -0.038606 +vn 0.099094 -0.994873 -0.019684 +vn 0.938780 -0.289407 -0.186712 +vn 0.099094 0.994873 -0.019684 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 1.000000 0.000000 +s 1 +f 24/1/1 55/2/2 54/3/3 23/4/4 +f 2/5/5 33/6/6 32/7/7 1/8/8 +f 13/9/9 44/10/10 43/11/11 12/12/12 +f 22/13/13 53/14/14 52/15/15 21/16/16 +f 11/17/17 42/18/18 41/19/19 10/20/20 +f 31/21/21 62/22/22 61/23/23 30/24/24 +f 20/25/25 51/26/26 50/27/27 19/28/28 +f 9/29/29 40/30/30 39/31/31 8/32/32 +f 29/33/33 60/34/34 59/35/35 28/36/36 +f 18/37/37 49/38/38 48/39/39 17/40/40 +f 7/41/41 38/42/42 37/43/43 6/44/44 +f 27/45/45 58/46/46 57/47/47 26/48/48 +f 5/49/49 36/50/50 35/51/51 4/52/52 +f 16/53/53 47/54/54 46/55/55 15/56/56 +f 25/57/57 56/58/58 55/2/2 24/1/1 +f 3/59/59 34/60/60 33/6/6 2/5/5 +f 14/61/61 45/62/62 44/10/10 13/9/9 +f 23/4/4 54/3/3 53/14/14 22/13/13 +f 12/12/12 43/11/11 42/18/18 11/17/17 +f 21/16/16 52/15/15 51/26/26 20/25/25 +f 10/20/20 41/19/19 40/30/30 9/29/29 +f 30/24/24 61/23/23 60/34/34 29/33/33 +f 19/28/28 50/27/27 49/38/38 18/37/37 +f 8/32/32 39/31/31 38/42/42 7/41/41 +f 28/36/36 59/35/35 58/46/46 27/45/45 +f 17/40/40 48/39/39 47/54/54 16/53/53 +f 6/44/44 37/43/43 36/50/50 5/49/49 +f 26/48/48 57/47/47 56/58/58 25/57/57 +f 4/52/52 35/51/51 34/60/60 3/59/59 +f 15/56/56 46/55/55 45/62/62 14/61/61 +f 56/58/58 87/63/63 86/64/64 55/2/2 +f 34/60/60 65/65/65 64/66/66 33/6/6 +f 45/62/62 76/67/67 75/68/68 44/10/10 +f 54/3/3 85/69/69 84/70/70 53/14/14 +f 43/11/11 74/71/71 73/72/72 42/18/18 +f 52/15/15 83/73/73 82/74/74 51/26/26 +f 41/19/19 72/75/75 71/76/76 40/30/30 +f 61/77/23 92/78/77 91/79/78 60/80/34 +f 50/27/27 81/81/79 80/82/80 49/38/38 +f 39/31/31 70/83/81 69/84/82 38/42/42 +f 59/85/35 90/86/83 89/87/84 58/88/46 +f 48/39/39 79/89/85 78/90/86 47/54/54 +f 37/43/43 68/91/87 67/92/88 36/50/50 +f 57/47/47 88/93/89 87/63/63 56/58/58 +f 35/51/51 66/94/90 65/65/65 34/60/60 +f 46/55/55 77/95/91 76/67/67 45/62/62 +f 55/2/2 86/64/64 85/69/69 54/3/3 +f 33/6/6 64/66/66 63/96/92 32/7/7 +f 44/10/10 75/68/68 74/71/71 43/11/11 +f 53/14/14 84/70/70 83/73/73 52/15/15 +f 42/18/18 73/72/72 72/75/75 41/19/19 +f 62/97/22 93/98/93 92/78/77 61/77/23 +f 51/26/26 82/74/74 81/81/79 50/27/27 +f 40/30/30 71/76/76 70/83/81 39/31/31 +f 60/80/34 91/79/78 90/86/83 59/85/35 +f 49/38/38 80/82/80 79/89/85 48/39/39 +f 38/42/42 69/84/82 68/91/87 37/43/43 +f 58/46/46 89/99/84 88/93/89 57/47/47 +f 36/50/50 67/92/88 66/94/90 35/51/51 +f 47/54/54 78/90/86 77/95/91 46/55/55 +f 88/100/89 119/101/94 118/102/95 87/103/63 +f 66/94/90 97/104/96 96/105/97 65/65/65 +f 77/106/91 108/107/98 107/108/99 76/109/67 +f 86/110/64 117/111/100 116/112/101 85/113/69 +f 64/66/66 95/114/102 94/115/103 63/96/92 +f 75/116/68 106/117/104 105/118/105 74/119/71 +f 84/120/70 115/121/106 114/122/107 83/123/73 +f 73/124/72 104/125/108 103/126/109 72/127/75 +f 93/98/93 124/128/110 123/129/111 92/78/77 +f 82/130/74 113/131/112 112/132/113 81/133/79 +f 71/134/76 102/135/114 101/136/115 70/137/81 +f 91/79/78 122/138/116 121/139/117 90/86/83 +f 80/140/80 111/141/118 110/142/119 79/143/85 +f 69/144/82 100/145/120 99/146/121 68/147/87 +f 89/87/84 120/148/122 119/101/94 88/100/89 +f 67/149/88 98/150/123 97/104/96 66/94/90 +f 78/151/86 109/152/124 108/107/98 77/106/91 +f 87/103/63 118/102/95 117/111/100 86/110/64 +f 65/65/65 96/105/97 95/114/102 64/66/66 +f 76/109/67 107/108/99 106/117/104 75/116/68 +f 85/113/69 116/112/101 115/121/106 84/120/70 +f 74/119/71 105/118/105 104/125/108 73/124/72 +f 83/123/73 114/122/107 113/131/112 82/130/74 +f 72/127/75 103/126/109 102/135/114 71/134/76 +f 92/78/77 123/129/111 122/138/116 91/79/78 +f 81/133/79 112/132/113 111/141/118 80/140/80 +f 70/137/81 101/136/115 100/145/120 69/144/82 +f 90/86/83 121/139/117 120/148/122 89/87/84 +f 79/143/85 110/142/119 109/152/124 78/151/86 +f 68/147/87 99/146/121 98/150/123 67/149/88 +f 120/148/122 151/153/125 150/154/126 119/101/94 +f 98/150/123 129/155/127 128/156/128 97/104/96 +f 109/152/124 140/157/129 139/158/130 108/107/98 +f 118/102/95 149/159/131 148/160/132 117/111/100 +f 96/105/97 127/161/133 126/162/134 95/114/102 +f 107/108/99 138/163/135 137/164/136 106/117/104 +f 116/112/101 147/165/137 146/166/138 115/121/106 +f 105/118/105 136/167/139 135/168/140 104/125/108 +f 114/122/107 145/169/141 144/170/142 113/131/112 +f 103/126/109 134/171/143 133/172/144 102/135/114 +f 123/129/111 154/173/145 153/174/146 122/138/116 +f 112/132/113 143/175/147 142/176/148 111/141/118 +f 101/136/115 132/177/149 131/178/150 100/145/120 +f 121/139/117 152/179/151 151/153/125 120/148/122 +f 110/142/119 141/180/152 140/157/129 109/152/124 +f 99/146/121 130/181/153 129/155/127 98/150/123 +f 119/101/94 150/154/126 149/159/131 118/102/95 +f 97/104/96 128/156/128 127/161/133 96/105/97 +f 108/107/98 139/158/130 138/163/135 107/108/99 +f 117/111/100 148/160/132 147/165/137 116/112/101 +f 95/114/102 126/162/134 125/182/154 94/115/103 +f 106/117/104 137/164/136 136/167/139 105/118/105 +f 115/121/106 146/166/138 145/169/141 114/122/107 +f 104/125/108 135/168/140 134/171/143 103/126/109 +f 124/128/110 155/183/155 154/173/145 123/129/111 +f 113/131/112 144/170/142 143/175/147 112/132/113 +f 102/135/114 133/172/144 132/177/149 101/136/115 +f 122/138/116 153/174/146 152/179/151 121/139/117 +f 111/141/118 142/176/148 141/180/152 110/142/119 +f 100/145/120 131/178/150 130/181/153 99/146/121 +f 152/179/151 183/184/156 182/185/157 151/153/125 +f 141/180/152 172/186/158 171/187/159 140/157/129 +f 130/181/153 161/188/160 160/189/161 129/155/127 +f 150/154/126 181/190/162 180/191/163 149/159/131 +f 128/156/128 159/192/164 158/193/165 127/161/133 +f 139/158/130 170/194/166 169/195/167 138/163/135 +f 148/160/132 179/196/168 178/197/169 147/165/137 +f 126/162/134 157/198/170 156/199/171 125/182/154 +f 137/164/136 168/200/172 167/201/173 136/167/139 +f 146/166/138 177/202/174 176/203/175 145/169/141 +f 135/168/140 166/204/176 165/205/177 134/171/143 +f 155/183/155 186/206/178 185/207/179 154/173/145 +f 144/170/142 175/208/180 174/209/181 143/175/147 +f 133/172/144 164/210/182 163/211/183 132/177/149 +f 153/174/146 184/212/184 183/184/156 152/179/151 +f 142/176/148 173/213/185 172/186/158 141/180/152 +f 131/178/150 162/214/186 161/188/160 130/181/153 +f 151/153/125 182/185/157 181/190/162 150/154/126 +f 129/155/127 160/189/161 159/192/164 128/156/128 +f 140/157/129 171/187/159 170/194/166 139/158/130 +f 149/159/131 180/191/163 179/196/168 148/160/132 +f 127/161/133 158/193/165 157/198/170 126/162/134 +f 138/163/135 169/195/167 168/200/172 137/164/136 +f 147/165/137 178/197/169 177/202/174 146/166/138 +f 136/167/139 167/201/173 166/204/176 135/168/140 +f 145/169/141 176/203/175 175/208/180 144/170/142 +f 134/171/143 165/205/177 164/210/182 133/172/144 +f 154/173/145 185/207/179 184/212/184 153/174/146 +f 143/175/147 174/209/181 173/213/185 142/176/148 +f 132/177/149 163/211/183 162/214/186 131/178/150 +f 184/212/184 215/215/187 214/216/188 183/184/156 +f 173/213/185 204/217/189 203/218/190 172/186/158 +f 162/214/186 193/219/191 192/220/192 161/188/160 +f 182/185/157 213/221/193 212/222/194 181/190/162 +f 160/189/161 191/223/195 190/224/196 159/192/164 +f 171/187/159 202/225/197 201/226/198 170/194/166 +f 180/191/163 211/227/199 210/228/200 179/196/168 +f 158/193/165 189/229/201 188/230/202 157/198/170 +f 169/195/167 200/231/203 199/232/204 168/200/172 +f 178/197/169 209/233/205 208/234/206 177/202/174 +f 167/201/173 198/235/207 197/236/208 166/204/176 +f 176/203/175 207/237/209 206/238/210 175/208/180 +f 165/205/177 196/239/211 195/240/212 164/210/182 +f 185/207/179 216/241/213 215/215/187 184/212/184 +f 174/209/181 205/242/214 204/217/189 173/213/185 +f 163/211/183 194/243/215 193/219/191 162/214/186 +f 183/184/156 214/216/188 213/221/193 182/185/157 +f 172/186/158 203/218/190 202/225/197 171/187/159 +f 161/188/160 192/220/192 191/223/195 160/189/161 +f 181/190/162 212/222/194 211/227/199 180/191/163 +f 159/192/164 190/224/196 189/229/201 158/193/165 +f 170/194/166 201/226/198 200/231/203 169/195/167 +f 179/196/168 210/228/200 209/233/205 178/197/169 +f 157/198/170 188/230/202 187/244/216 156/199/171 +f 168/200/172 199/232/204 198/235/207 167/201/173 +f 177/202/174 208/234/206 207/237/209 176/203/175 +f 166/204/176 197/236/208 196/239/211 165/205/177 +f 186/206/178 217/245/217 216/241/213 185/207/179 +f 175/208/180 206/238/210 205/242/214 174/209/181 +f 164/210/182 195/240/212 194/243/215 163/211/183 +f 216/241/213 248/246/218 247/247/219 215/215/187 +f 205/242/214 237/248/220 236/249/221 204/217/189 +f 194/243/215 226/250/222 225/251/223 193/219/191 +f 214/216/188 246/252/224 245/253/225 213/221/193 +f 203/218/190 235/254/226 234/255/227 202/225/197 +f 192/220/192 224/256/228 223/257/229 191/223/195 +f 212/222/194 244/258/230 243/259/231 211/227/199 +f 190/224/196 222/260/232 221/261/233 189/229/201 +f 201/226/198 233/262/234 232/263/235 200/231/203 +f 210/228/200 242/264/236 241/265/237 209/233/205 +f 188/230/202 220/266/238 219/267/239 187/244/216 +f 199/232/204 231/268/240 230/269/241 198/235/207 +f 208/234/206 240/270/242 239/271/243 207/237/209 +f 197/236/208 229/272/244 228/273/245 196/239/211 +f 217/245/217 249/274/246 248/246/218 216/241/213 +f 206/238/210 238/275/247 237/248/220 205/242/214 +f 195/240/212 227/276/248 226/250/222 194/243/215 +f 215/215/187 247/247/219 246/252/224 214/216/188 +f 204/217/189 236/249/221 235/254/226 203/218/190 +f 193/219/191 225/251/223 224/256/228 192/220/192 +f 213/221/193 245/253/225 244/258/230 212/222/194 +f 191/223/195 223/257/229 222/260/232 190/224/196 +f 202/225/197 234/255/227 233/262/234 201/226/198 +f 211/227/199 243/259/231 242/264/236 210/228/200 +f 189/229/201 221/261/233 220/266/238 188/230/202 +f 200/231/203 232/263/235 231/268/240 199/232/204 +f 209/233/205 241/265/237 240/270/242 208/234/206 +f 198/235/207 230/269/241 229/272/244 197/236/208 +f 207/237/209 239/271/243 238/275/247 206/238/210 +f 196/239/211 228/273/245 227/276/248 195/240/212 +f 249/274/246 280/277/249 279/278/250 248/246/218 +f 238/275/247 269/279/251 268/280/252 237/248/220 +f 227/276/248 258/281/253 257/282/254 226/250/222 +f 247/247/219 278/283/255 277/284/256 246/252/224 +f 236/249/221 267/285/257 266/286/258 235/254/226 +f 225/251/223 256/287/259 255/288/260 224/256/228 +f 245/253/225 276/289/261 275/290/262 244/258/230 +f 223/257/229 254/291/263 253/292/264 222/260/232 +f 234/255/227 265/293/265 264/294/266 233/262/234 +f 243/259/231 274/295/267 273/296/268 242/264/236 +f 221/261/233 252/297/269 251/298/270 220/266/238 +f 232/263/235 263/299/271 262/300/272 231/268/240 +f 241/265/237 272/301/273 271/302/274 240/270/242 +f 230/269/241 261/303/275 260/304/276 229/272/244 +f 239/271/243 270/305/277 269/279/251 238/275/247 +f 228/273/245 259/306/278 258/281/253 227/276/248 +f 248/246/218 279/278/250 278/283/255 247/247/219 +f 237/248/220 268/280/252 267/285/257 236/249/221 +f 226/250/222 257/282/254 256/287/259 225/251/223 +f 246/252/224 277/284/256 276/289/261 245/253/225 +f 235/254/226 266/286/258 265/293/265 234/255/227 +f 224/256/228 255/288/260 254/291/263 223/257/229 +f 244/258/230 275/290/262 274/295/267 243/259/231 +f 222/260/232 253/292/264 252/297/269 221/261/233 +f 233/262/234 264/294/266 263/299/271 232/263/235 +f 242/264/236 273/296/268 272/301/273 241/265/237 +f 220/266/238 251/298/270 250/307/279 219/267/239 +f 231/268/240 262/300/272 261/303/275 230/269/241 +f 240/270/242 271/302/274 270/305/277 239/271/243 +f 229/272/244 260/304/276 259/306/278 228/273/245 +f 270/305/277 301/308/280 300/309/281 269/279/251 +f 259/306/278 290/310/282 289/311/283 258/281/253 +f 279/278/250 310/312/284 309/313/285 278/283/255 +f 268/280/252 299/314/286 298/315/287 267/285/257 +f 257/282/254 288/316/288 287/317/289 256/287/259 +f 277/284/256 308/318/290 307/319/291 276/289/261 +f 266/286/258 297/320/292 296/321/293 265/293/265 +f 255/288/260 286/322/294 285/323/295 254/291/263 +f 275/290/262 306/324/296 305/325/297 274/295/267 +f 253/292/264 284/326/298 283/327/299 252/297/269 +f 264/294/266 295/328/300 294/329/301 263/299/271 +f 273/296/268 304/330/302 303/331/303 272/301/273 +f 251/298/270 282/332/304 281/333/305 250/307/279 +f 262/300/272 293/334/306 292/335/307 261/303/275 +f 271/302/274 302/336/308 301/308/280 270/305/277 +f 260/304/276 291/337/309 290/310/282 259/306/278 +f 280/277/249 311/338/310 310/312/284 279/278/250 +f 269/279/251 300/309/281 299/314/286 268/280/252 +f 258/281/253 289/311/283 288/316/288 257/282/254 +f 278/283/255 309/313/285 308/318/290 277/284/256 +f 267/285/257 298/315/287 297/320/292 266/286/258 +f 256/287/259 287/317/289 286/322/294 255/288/260 +f 276/289/261 307/319/291 306/324/296 275/290/262 +f 254/291/263 285/323/295 284/326/298 253/292/264 +f 265/293/265 296/321/293 295/328/300 264/294/266 +f 274/295/267 305/325/297 304/330/302 273/296/268 +f 252/297/269 283/327/299 282/332/304 251/298/270 +f 263/299/271 294/329/301 293/334/306 262/300/272 +f 272/301/273 303/331/303 302/336/308 271/302/274 +f 261/303/275 292/335/307 291/337/309 260/304/276 +f 302/336/308 333/339/311 332/340/312 301/308/280 +f 291/337/309 322/341/313 321/342/314 290/310/282 +f 311/338/310 342/343/315 341/344/316 310/312/284 +f 300/309/281 331/345/317 330/346/318 299/314/286 +f 289/311/283 320/347/319 319/348/320 288/316/288 +f 309/313/285 340/349/321 339/350/322 308/318/290 +f 298/315/287 329/351/323 328/352/324 297/320/292 +f 287/317/289 318/353/325 317/354/326 286/322/294 +f 307/319/291 338/355/327 337/356/328 306/324/296 +f 285/323/295 316/357/329 315/358/330 284/326/298 +f 296/321/293 327/359/331 326/360/332 295/328/300 +f 305/325/297 336/361/333 335/362/334 304/330/302 +f 283/327/299 314/363/335 313/364/336 282/332/304 +f 294/329/301 325/365/337 324/366/338 293/334/306 +f 303/331/303 334/367/339 333/339/311 302/336/308 +f 292/335/307 323/368/340 322/341/313 291/337/309 +f 301/308/280 332/340/312 331/345/317 300/309/281 +f 290/310/282 321/342/314 320/347/319 289/311/283 +f 310/312/284 341/344/316 340/349/321 309/313/285 +f 299/314/286 330/346/318 329/351/323 298/315/287 +f 288/316/288 319/348/320 318/353/325 287/317/289 +f 308/318/290 339/350/322 338/355/327 307/319/291 +f 297/320/292 328/352/324 327/359/331 296/321/293 +f 286/322/294 317/354/326 316/357/329 285/323/295 +f 306/324/296 337/356/328 336/361/333 305/325/297 +f 284/326/298 315/358/330 314/363/335 283/327/299 +f 295/328/300 326/360/332 325/365/337 294/329/301 +f 304/330/302 335/362/334 334/367/339 303/331/303 +f 282/332/304 313/364/336 312/369/341 281/333/305 +f 293/334/306 324/366/338 323/368/340 292/335/307 +f 334/367/339 365/370/342 364/371/343 333/339/311 +f 323/368/340 354/372/344 353/373/345 322/341/313 +f 332/340/312 363/374/346 362/375/347 331/345/317 +f 321/342/314 352/376/348 351/377/349 320/347/319 +f 341/344/316 372/378/350 371/379/351 340/349/321 +f 330/346/318 361/380/352 360/381/353 329/351/323 +f 319/348/320 350/382/354 349/383/355 318/353/325 +f 339/350/322 370/384/356 369/385/357 338/355/327 +f 328/352/324 359/386/358 358/387/359 327/359/331 +f 317/354/326 348/388/360 347/389/361 316/357/329 +f 337/356/328 368/390/362 367/391/363 336/361/333 +f 315/358/330 346/392/364 345/393/365 314/363/335 +f 326/360/332 357/394/366 356/395/367 325/365/337 +f 335/362/334 366/396/368 365/370/342 334/367/339 +f 313/364/336 344/397/369 343/398/370 312/369/341 +f 324/366/338 355/399/371 354/372/344 323/368/340 +f 333/339/311 364/371/343 363/374/346 332/340/312 +f 322/341/313 353/373/345 352/376/348 321/342/314 +f 342/343/315 373/400/372 372/378/350 341/344/316 +f 331/345/317 362/375/347 361/380/352 330/346/318 +f 320/347/319 351/377/349 350/382/354 319/348/320 +f 340/349/321 371/379/351 370/384/356 339/350/322 +f 329/351/323 360/381/353 359/386/358 328/352/324 +f 318/353/325 349/383/355 348/388/360 317/354/326 +f 338/355/327 369/385/357 368/390/362 337/356/328 +f 316/357/329 347/389/361 346/392/364 315/358/330 +f 327/359/331 358/387/359 357/394/366 326/360/332 +f 336/361/333 367/391/363 366/396/368 335/362/334 +f 314/363/335 345/393/365 344/397/369 313/364/336 +f 325/365/337 356/395/367 355/399/371 324/366/338 +f 366/396/368 397/401/373 396/402/374 365/370/342 +f 344/397/369 375/403/375 374/404/376 343/398/370 +f 355/399/371 386/405/377 385/406/378 354/372/344 +f 364/371/343 395/407/379 394/408/380 363/374/346 +f 353/373/345 384/409/381 383/410/382 352/376/348 +f 373/400/372 404/411/383 403/412/384 372/378/350 +f 362/375/347 393/413/385 392/414/386 361/380/352 +f 351/377/349 382/415/387 381/416/388 350/382/354 +f 371/379/351 402/417/389 401/418/390 370/384/356 +f 360/381/353 391/419/391 390/420/392 359/386/358 +f 349/383/355 380/421/393 379/422/394 348/388/360 +f 369/385/357 400/423/395 399/424/396 368/390/362 +f 347/389/361 378/425/397 377/426/398 346/392/364 +f 358/387/359 389/427/399 388/428/400 357/394/366 +f 367/391/363 398/429/401 397/401/373 366/396/368 +f 345/393/365 376/430/402 375/403/375 344/397/369 +f 356/395/367 387/431/403 386/405/377 355/399/371 +f 365/370/342 396/402/374 395/407/379 364/371/343 +f 354/372/344 385/406/378 384/409/381 353/373/345 +f 363/374/346 394/408/380 393/413/385 362/375/347 +f 352/376/348 383/410/382 382/415/387 351/377/349 +f 372/378/350 403/412/384 402/417/389 371/379/351 +f 361/380/352 392/414/386 391/419/391 360/381/353 +f 350/382/354 381/416/388 380/421/393 349/383/355 +f 370/384/356 401/418/390 400/423/395 369/385/357 +f 359/386/358 390/420/392 389/427/399 358/387/359 +f 348/388/360 379/422/394 378/425/397 347/389/361 +f 368/390/362 399/424/396 398/429/401 367/391/363 +f 346/392/364 377/426/398 376/430/402 345/393/365 +f 357/394/366 388/428/400 387/431/403 356/395/367 +f 398/429/401 429/432/404 428/433/405 397/401/373 +f 376/430/402 407/434/406 406/435/407 375/403/375 +f 387/431/403 418/436/408 417/437/409 386/405/377 +f 396/402/374 427/438/410 426/439/411 395/407/379 +f 385/406/378 416/440/412 415/441/413 384/409/381 +f 394/408/380 425/442/414 424/443/415 393/413/385 +f 383/410/382 414/444/416 413/445/417 382/415/387 +f 403/412/384 434/446/418 433/447/419 402/417/389 +f 392/414/386 423/448/420 422/449/421 391/419/391 +f 381/416/388 412/450/422 411/451/423 380/421/393 +f 401/418/390 432/452/424 431/453/425 400/423/395 +f 390/420/392 421/454/426 420/455/427 389/427/399 +f 379/422/394 410/456/428 409/457/429 378/425/397 +f 399/424/396 430/458/430 429/432/404 398/429/401 +f 377/426/398 408/459/431 407/434/406 376/430/402 +f 388/428/400 419/460/432 418/436/408 387/431/403 +f 397/401/373 428/433/405 427/438/410 396/402/374 +f 375/403/375 406/435/407 405/461/433 374/404/376 +f 386/405/377 417/437/409 416/440/412 385/406/378 +f 395/407/379 426/439/411 425/442/414 394/408/380 +f 384/409/381 415/441/413 414/444/416 383/410/382 +f 404/411/383 435/462/434 434/446/418 403/412/384 +f 393/413/385 424/443/415 423/448/420 392/414/386 +f 382/415/387 413/445/417 412/450/422 381/416/388 +f 402/417/389 433/447/419 432/452/424 401/418/390 +f 391/419/391 422/449/421 421/454/426 390/420/392 +f 380/421/393 411/451/423 410/456/428 379/422/394 +f 400/423/395 431/453/425 430/458/430 399/424/396 +f 378/425/397 409/457/429 408/459/431 377/426/398 +f 389/427/399 420/455/427 419/460/432 388/428/400 +f 430/458/430 461/463/435 460/464/436 429/432/404 +f 408/459/431 439/465/437 438/466/438 407/434/406 +f 419/460/432 450/467/439 449/468/440 418/436/408 +f 428/433/405 459/469/441 458/470/442 427/438/410 +f 406/435/407 437/471/443 436/472/444 405/461/433 +f 417/437/409 448/473/445 447/474/446 416/440/412 +f 426/439/411 457/475/447 456/476/448 425/442/414 +f 415/441/413 446/477/449 445/478/450 414/444/416 +f 435/462/434 466/479/451 465/480/452 434/446/418 +f 424/443/415 455/481/453 454/482/454 423/448/420 +f 413/445/417 444/483/455 443/484/456 412/450/422 +f 433/447/419 464/485/457 463/486/458 432/452/424 +f 422/449/421 453/487/459 452/488/460 421/454/426 +f 411/451/423 442/489/461 441/490/462 410/456/428 +f 431/453/425 462/491/463 461/463/435 430/458/430 +f 409/457/429 440/492/464 439/465/437 408/459/431 +f 420/455/427 451/493/465 450/467/439 419/460/432 +f 429/432/404 460/464/436 459/469/441 428/433/405 +f 407/434/406 438/466/438 437/471/443 406/435/407 +f 418/436/408 449/468/440 448/473/445 417/437/409 +f 427/438/410 458/470/442 457/475/447 426/439/411 +f 416/440/412 447/474/446 446/477/449 415/441/413 +f 425/442/414 456/476/448 455/481/453 424/443/415 +f 414/444/416 445/478/450 444/483/455 413/445/417 +f 434/446/418 465/480/452 464/485/457 433/447/419 +f 423/448/420 454/482/454 453/487/459 422/449/421 +f 412/450/422 443/484/456 442/489/461 411/451/423 +f 432/452/424 463/486/458 462/491/463 431/453/425 +f 421/454/426 452/488/460 451/493/465 420/455/427 +f 410/456/428 441/490/462 440/492/464 409/457/429 +f 462/491/463 493/494/466 492/495/467 461/463/435 +f 440/492/464 471/496/468 470/497/469 439/465/437 +f 451/493/465 482/498/470 481/499/471 450/467/439 +f 460/464/436 491/500/472 490/501/473 459/469/441 +f 438/466/438 469/502/474 468/503/475 437/471/443 +f 449/468/440 480/504/476 479/505/477 448/473/445 +f 458/470/442 489/506/478 488/507/479 457/475/447 +f 447/474/446 478/508/480 477/509/481 446/477/449 +f 456/476/448 487/510/482 486/511/483 455/481/453 +f 445/478/450 476/512/484 475/513/485 444/483/455 +f 465/480/452 496/514/486 495/515/487 464/485/457 +f 454/482/454 485/516/488 484/517/489 453/487/459 +f 443/484/456 474/518/490 473/519/491 442/489/461 +f 463/486/458 494/520/492 493/494/466 462/491/463 +f 452/488/460 483/521/493 482/498/470 451/493/465 +f 441/490/462 472/522/494 471/496/468 440/492/464 +f 461/463/435 492/495/467 491/500/472 460/464/436 +f 439/465/437 470/497/469 469/502/474 438/466/438 +f 450/467/439 481/499/471 480/504/476 449/468/440 +f 459/469/441 490/501/473 489/506/478 458/470/442 +f 437/471/443 468/503/475 467/523/495 436/472/444 +f 448/473/445 479/505/477 478/508/480 447/474/446 +f 457/475/447 488/507/479 487/510/482 456/476/448 +f 446/477/449 477/509/481 476/512/484 445/478/450 +f 466/479/451 497/524/496 496/514/486 465/480/452 +f 455/481/453 486/511/483 485/516/488 454/482/454 +f 444/483/455 475/513/485 474/518/490 443/484/456 +f 464/485/457 495/515/487 494/520/492 463/486/458 +f 453/487/459 484/517/489 483/521/493 452/488/460 +f 442/489/461 473/519/491 472/522/494 441/490/462 +f 494/520/492 525/525/497 524/526/498 493/494/466 +f 483/521/493 514/527/499 513/528/500 482/498/470 +f 472/522/494 503/529/501 502/530/502 471/496/468 +f 492/495/467 523/531/503 522/532/504 491/500/472 +f 470/497/469 501/533/505 500/534/506 469/502/474 +f 481/499/471 512/535/507 511/536/508 480/504/476 +f 490/501/473 521/537/509 520/538/510 489/506/478 +f 468/503/475 499/539/511 498/540/512 467/523/495 +f 479/505/477 510/541/513 509/542/514 478/508/480 +f 488/507/479 519/543/515 518/544/516 487/510/482 +f 477/509/481 508/545/517 507/546/518 476/512/484 +f 497/524/496 528/547/519 527/548/520 496/514/486 +f 486/511/483 517/549/521 516/550/522 485/516/488 +f 475/513/485 506/551/523 505/552/524 474/518/490 +f 495/515/487 526/553/525 525/525/497 494/520/492 +f 484/517/489 515/554/526 514/527/499 483/521/493 +f 473/519/491 504/555/527 503/529/501 472/522/494 +f 493/494/466 524/526/498 523/531/503 492/495/467 +f 471/496/468 502/530/502 501/533/505 470/497/469 +f 482/498/470 513/528/500 512/535/507 481/499/471 +f 491/500/472 522/532/504 521/537/509 490/501/473 +f 469/502/474 500/534/506 499/539/511 468/503/475 +f 480/504/476 511/536/508 510/541/513 479/505/477 +f 489/506/478 520/538/510 519/543/515 488/507/479 +f 478/508/480 509/542/514 508/545/517 477/509/481 +f 487/510/482 518/544/516 517/549/521 486/511/483 +f 476/512/484 507/546/518 506/551/523 475/513/485 +f 496/514/486 527/548/520 526/553/525 495/515/487 +f 485/516/488 516/550/522 515/554/526 484/517/489 +f 474/518/490 505/552/524 504/555/527 473/519/491 +f 528/547/519 559/556/528 558/557/529 527/548/520 +f 517/549/521 548/558/530 547/559/531 516/550/522 +f 504/555/527 535/560/532 534/561/533 503/529/501 +f 526/553/525 557/562/534 556/563/535 525/525/497 +f 515/554/526 546/564/536 545/565/537 514/527/499 +f 502/530/502 533/566/538 532/567/539 501/533/505 +f 513/528/500 544/568/540 543/569/541 512/535/507 +f 524/526/498 555/570/542 554/571/543 523/531/503 +f 500/534/506 531/572/544 530/573/545 499/539/511 +f 511/536/508 542/574/546 541/575/547 510/541/513 +f 522/532/504 553/576/548 552/577/549 521/537/509 +f 509/542/514 540/578/550 539/579/551 508/545/517 +f 520/538/510 551/580/552 550/581/553 519/543/515 +f 507/546/518 538/582/554 537/583/555 506/551/523 +f 518/544/516 549/584/556 548/558/530 517/549/521 +f 505/552/524 536/585/557 535/560/532 504/555/527 +f 527/548/520 558/557/529 557/562/534 526/553/525 +f 516/550/522 547/559/531 546/564/536 515/554/526 +f 503/529/501 534/561/533 533/566/538 502/530/502 +f 525/525/497 556/563/535 555/570/542 524/526/498 +f 514/527/499 545/565/537 544/568/540 513/528/500 +f 501/533/505 532/567/539 531/572/544 500/534/506 +f 512/535/507 543/569/541 542/574/546 511/536/508 +f 523/531/503 554/571/543 553/576/548 522/532/504 +f 499/539/511 530/573/545 529/586/558 498/540/512 +f 510/541/513 541/575/547 540/578/550 509/542/514 +f 521/537/509 552/577/549 551/580/552 520/538/510 +f 508/545/517 539/579/551 538/582/554 507/546/518 +f 519/543/515 550/581/553 549/584/556 518/544/516 +f 506/551/523 537/583/555 536/585/557 505/552/524 +f 549/584/556 580/587/559 579/588/560 548/558/530 +f 538/582/554 569/589/561 568/590/562 537/583/555 +f 558/557/529 589/591/563 588/592/564 557/562/534 +f 547/559/531 578/593/565 577/594/566 546/564/536 +f 536/585/557 567/595/567 566/596/568 535/560/532 +f 556/563/535 587/597/569 586/598/570 555/570/542 +f 545/565/537 576/599/571 575/600/572 544/568/540 +f 534/561/533 565/601/573 564/602/574 533/566/538 +f 554/571/543 585/603/575 584/604/576 553/576/548 +f 532/567/539 563/605/577 562/606/578 531/572/544 +f 543/569/541 574/607/579 573/608/580 542/574/546 +f 552/577/549 583/609/581 582/610/582 551/580/552 +f 530/573/545 561/611/583 560/612/584 529/586/558 +f 541/575/547 572/613/585 571/614/586 540/578/550 +f 550/581/553 581/615/587 580/587/559 549/584/556 +f 539/579/551 570/616/588 569/589/561 538/582/554 +f 559/556/528 590/617/589 589/591/563 558/557/529 +f 548/558/530 579/588/560 578/593/565 547/559/531 +f 537/583/555 568/590/562 567/595/567 536/585/557 +f 557/562/534 588/592/564 587/597/569 556/563/535 +f 546/564/536 577/594/566 576/599/571 545/565/537 +f 535/560/532 566/596/568 565/601/573 534/561/533 +f 555/570/542 586/598/570 585/603/575 554/571/543 +f 533/566/538 564/602/574 563/605/577 532/567/539 +f 544/568/540 575/600/572 574/607/579 543/569/541 +f 553/576/548 584/604/576 583/609/581 552/577/549 +f 531/572/544 562/606/578 561/611/583 530/573/545 +f 542/574/546 573/608/580 572/613/585 541/575/547 +f 551/580/552 582/610/582 581/615/587 550/581/553 +f 540/578/550 571/614/586 570/616/588 539/579/551 +f 581/615/587 612/618/590 611/619/591 580/587/559 +f 570/616/588 601/620/592 600/621/593 569/589/561 +f 590/617/589 621/622/594 620/623/595 589/591/563 +f 579/588/560 610/624/596 609/625/597 578/593/565 +f 568/590/562 599/626/598 598/627/599 567/595/567 +f 588/592/564 619/628/600 618/629/601 587/597/569 +f 577/594/566 608/630/602 607/631/603 576/599/571 +f 566/596/568 597/632/604 596/633/605 565/601/573 +f 586/598/570 617/634/606 616/635/607 585/603/575 +f 564/602/574 595/636/608 594/637/609 563/605/577 +f 575/600/572 606/638/610 605/639/611 574/607/579 +f 584/604/576 615/640/612 614/641/613 583/609/581 +f 562/606/578 593/642/614 592/643/615 561/611/583 +f 573/608/580 604/644/616 603/645/617 572/613/585 +f 582/610/582 613/646/618 612/618/590 581/615/587 +f 571/614/586 602/647/619 601/620/592 570/616/588 +f 580/587/559 611/619/591 610/624/596 579/588/560 +f 569/589/561 600/621/593 599/626/598 568/590/562 +f 589/591/563 620/623/595 619/628/600 588/592/564 +f 578/593/565 609/625/597 608/630/602 577/594/566 +f 567/595/567 598/627/599 597/632/604 566/596/568 +f 587/597/569 618/629/601 617/648/606 586/598/570 +f 576/599/571 607/631/603 606/638/610 575/600/572 +f 565/601/573 596/633/605 595/636/608 564/602/574 +f 585/603/575 616/635/607 615/640/612 584/604/576 +f 563/605/577 594/637/609 593/642/614 562/606/578 +f 574/607/579 605/639/611 604/644/616 573/608/580 +f 583/609/581 614/641/613 613/646/618 582/610/582 +f 561/611/583 592/643/615 591/649/620 560/612/584 +f 572/613/585 603/645/617 602/647/619 571/614/586 +f 613/646/618 644/650/621 643/651/622 612/618/590 +f 602/647/619 633/652/623 632/653/624 601/620/592 +f 611/619/591 642/654/625 641/655/626 610/624/596 +f 600/621/593 631/656/627 630/657/628 599/626/598 +f 620/658/595 651/659/629 650/660/630 619/661/600 +f 609/625/597 640/662/631 639/663/632 608/630/602 +f 598/627/599 629/664/633 628/665/634 597/632/604 +f 618/666/601 649/667/635 648/668/636 617/634/606 +f 607/631/603 638/669/637 637/670/638 606/638/610 +f 596/633/605 627/671/639 626/672/640 595/636/608 +f 616/635/607 647/673/641 646/674/642 615/640/612 +f 594/637/609 625/675/643 624/676/644 593/642/614 +f 605/639/611 636/677/645 635/678/646 604/644/616 +f 614/641/613 645/679/647 644/650/621 613/646/618 +f 592/643/615 623/680/648 622/681/649 591/649/620 +f 603/645/617 634/682/650 633/652/623 602/647/619 +f 612/618/590 643/651/622 642/654/625 611/619/591 +f 601/620/592 632/653/624 631/656/627 600/621/593 +f 621/683/594 652/684/651 651/659/629 620/658/595 +f 610/624/596 641/655/626 640/662/631 609/625/597 +f 599/626/598 630/657/628 629/664/633 598/627/599 +f 619/661/600 650/660/630 649/667/635 618/666/601 +f 608/630/602 639/663/632 638/669/637 607/631/603 +f 597/632/604 628/665/634 627/671/639 596/633/605 +f 617/634/606 648/668/636 647/673/641 616/635/607 +f 595/636/608 626/672/640 625/675/643 594/637/609 +f 606/638/610 637/670/638 636/677/645 605/639/611 +f 615/640/612 646/674/642 645/679/647 614/641/613 +f 593/642/614 624/676/644 623/680/648 592/643/615 +f 604/644/616 635/678/646 634/682/650 603/645/617 +f 645/679/647 676/685/652 675/686/653 644/650/621 +f 623/680/648 654/687/654 653/688/655 622/681/649 +f 634/682/650 665/689/656 664/690/657 633/652/623 +f 643/651/622 674/691/658 673/692/659 642/654/625 +f 632/653/624 663/693/660 662/694/661 631/656/627 +f 652/684/651 683/695/662 682/696/663 651/659/629 +f 641/655/626 672/697/664 671/698/665 640/662/631 +f 630/657/628 661/699/666 660/700/667 629/664/633 +f 650/660/630 681/701/668 680/702/669 649/667/635 +f 639/663/632 670/703/670 669/704/671 638/669/637 +f 628/665/634 659/705/672 658/706/673 627/671/639 +f 648/668/636 679/707/674 678/708/675 647/673/641 +f 626/672/640 657/709/676 656/710/677 625/675/643 +f 637/670/638 668/711/678 667/712/679 636/677/645 +f 646/674/642 677/713/680 676/685/652 645/679/647 +f 624/676/644 655/714/681 654/687/654 623/680/648 +f 635/678/646 666/715/682 665/689/656 634/682/650 +f 644/650/621 675/686/653 674/691/658 643/651/622 +f 633/652/623 664/690/657 663/693/660 632/653/624 +f 642/654/625 673/692/659 672/697/664 641/655/626 +f 631/656/627 662/694/661 661/699/666 630/657/628 +f 651/659/629 682/696/663 681/701/668 650/660/630 +f 640/662/631 671/698/665 670/703/670 639/663/632 +f 629/664/633 660/700/667 659/705/672 628/665/634 +f 649/667/635 680/702/669 679/707/674 648/668/636 +f 638/669/637 669/704/671 668/711/678 637/670/638 +f 627/671/639 658/706/673 657/709/676 626/672/640 +f 647/673/641 678/708/675 677/713/680 646/674/642 +f 625/675/643 656/710/677 655/714/681 624/676/644 +f 636/677/645 667/712/679 666/715/682 635/678/646 +f 677/713/680 708/716/683 707/717/684 676/685/652 +f 655/714/681 686/718/685 685/719/686 654/687/654 +f 666/715/682 697/720/687 696/721/688 665/689/656 +f 675/686/653 706/722/689 705/723/690 674/691/658 +f 664/690/657 695/724/691 694/725/692 663/693/660 +f 673/692/659 704/726/693 703/727/694 672/697/664 +f 662/694/661 693/728/695 692/729/696 661/699/666 +f 682/696/663 713/730/697 712/731/698 681/701/668 +f 671/698/665 702/732/699 701/733/700 670/703/670 +f 660/700/667 691/734/701 690/735/702 659/705/672 +f 680/702/669 711/736/703 710/737/704 679/707/674 +f 669/704/671 700/738/705 699/739/706 668/711/678 +f 658/706/673 689/740/707 688/741/708 657/709/676 +f 678/708/675 709/742/709 708/716/683 677/713/680 +f 656/710/677 687/743/710 686/718/685 655/714/681 +f 667/712/679 698/744/711 697/720/687 666/715/682 +f 676/685/652 707/717/684 706/722/689 675/686/653 +f 654/687/654 685/719/686 684/745/712 653/688/655 +f 665/689/656 696/721/688 695/724/691 664/690/657 +f 674/691/658 705/723/690 704/726/693 673/692/659 +f 663/693/660 694/725/692 693/728/695 662/694/661 +f 683/695/662 714/746/713 713/730/697 682/696/663 +f 672/697/664 703/727/694 702/732/699 671/698/665 +f 661/699/666 692/729/696 691/734/701 660/700/667 +f 681/701/668 712/731/698 711/736/703 680/702/669 +f 670/703/670 701/733/700 700/738/705 669/704/671 +f 659/705/672 690/735/702 689/740/707 658/706/673 +f 679/707/674 710/737/704 709/742/709 678/708/675 +f 657/709/676 688/741/708 687/743/710 656/710/677 +f 668/711/678 699/739/706 698/744/711 667/712/679 +f 709/742/709 740/747/714 739/748/715 708/716/683 +f 687/743/710 718/749/716 717/750/717 686/718/685 +f 698/744/711 729/751/718 728/752/719 697/720/687 +f 707/717/684 738/753/720 737/754/721 706/722/689 +f 685/719/686 716/755/722 715/756/723 684/745/712 +f 696/721/688 727/757/724 726/758/725 695/724/691 +f 705/723/690 736/759/726 735/760/727 704/726/693 +f 694/725/692 725/761/728 724/762/729 693/728/695 +f 714/746/713 745/763/730 744/764/731 713/730/697 +f 703/727/694 734/765/732 733/766/733 702/732/699 +f 692/729/696 723/767/734 722/768/735 691/734/701 +f 712/731/698 743/769/736 742/770/737 711/736/703 +f 701/733/700 732/771/738 731/772/739 700/738/705 +f 690/735/702 721/773/740 720/774/741 689/740/707 +f 710/737/704 741/775/742 740/747/714 709/742/709 +f 688/741/708 719/776/743 718/749/716 687/743/710 +f 699/739/706 730/777/744 729/751/718 698/744/711 +f 708/716/683 739/748/715 738/753/720 707/717/684 +f 686/718/685 717/750/717 716/755/722 685/719/686 +f 697/720/687 728/752/719 727/757/724 696/721/688 +f 706/722/689 737/754/721 736/759/726 705/723/690 +f 695/724/691 726/758/725 725/761/728 694/725/692 +f 704/726/693 735/760/727 734/765/732 703/727/694 +f 693/728/695 724/762/729 723/767/734 692/729/696 +f 713/730/697 744/764/731 743/769/736 712/731/698 +f 702/732/699 733/766/733 732/771/738 701/733/700 +f 691/734/701 722/768/735 721/773/740 690/735/702 +f 711/736/703 742/770/737 741/775/742 710/737/704 +f 700/738/705 731/772/739 730/777/744 699/739/706 +f 689/740/707 720/774/741 719/776/743 688/741/708 +f 741/775/742 772/778/745 771/779/746 740/747/714 +f 719/776/743 750/780/747 749/781/748 718/749/716 +f 730/777/744 761/782/749 760/783/750 729/751/718 +f 739/748/715 770/784/751 769/785/752 738/753/720 +f 717/750/717 748/786/753 747/787/754 716/755/722 +f 728/752/719 759/788/755 758/789/756 727/757/724 +f 737/754/721 768/790/757 767/791/758 736/759/726 +f 726/758/725 757/792/759 756/793/760 725/761/728 +f 735/760/727 766/794/761 765/795/762 734/765/732 +f 724/762/729 755/796/763 754/797/764 723/767/734 +f 744/764/731 775/798/765 774/799/766 743/769/736 +f 733/766/733 764/800/767 763/801/768 732/771/738 +f 722/768/735 753/802/769 752/803/770 721/773/740 +f 742/770/737 773/804/771 772/778/745 741/775/742 +f 731/772/739 762/805/772 761/782/749 730/777/744 +f 720/774/741 751/806/773 750/780/747 719/776/743 +f 740/747/714 771/779/746 770/784/751 739/748/715 +f 718/749/716 749/781/748 748/786/753 717/750/717 +f 729/751/718 760/783/750 759/788/755 728/752/719 +f 738/753/720 769/785/752 768/790/757 737/754/721 +f 716/755/722 747/787/754 746/807/774 715/756/723 +f 727/757/724 758/789/756 757/792/759 726/758/725 +f 736/759/726 767/791/758 766/794/761 735/760/727 +f 725/761/728 756/793/760 755/796/763 724/762/729 +f 745/763/730 776/808/775 775/798/765 744/764/731 +f 734/765/732 765/795/762 764/800/767 733/766/733 +f 723/767/734 754/797/764 753/802/769 722/768/735 +f 743/769/736 774/799/766 773/804/771 742/770/737 +f 732/771/738 763/801/768 762/805/772 731/772/739 +f 721/773/740 752/803/770 751/806/773 720/774/741 +f 773/804/771 804/809/776 803/810/777 772/778/745 +f 762/805/772 793/811/778 792/812/779 761/782/749 +f 751/806/773 782/813/780 781/814/781 750/780/747 +f 771/779/746 802/815/782 801/816/783 770/784/751 +f 749/781/748 780/817/784 779/818/785 748/786/753 +f 760/783/750 791/819/786 790/820/787 759/788/755 +f 769/785/752 800/821/788 799/822/789 768/790/757 +f 747/787/754 778/823/790 777/824/791 746/807/774 +f 758/789/756 789/825/792 788/826/793 757/792/759 +f 767/791/758 798/827/794 797/828/795 766/794/761 +f 756/793/760 787/829/796 786/830/797 755/796/763 +f 776/808/775 807/831/798 806/832/799 775/798/765 +f 765/795/762 796/833/800 795/834/801 764/800/767 +f 754/797/764 785/835/802 784/836/803 753/802/769 +f 774/799/766 805/837/804 804/809/776 773/804/771 +f 763/801/768 794/838/805 793/811/778 762/805/772 +f 752/803/770 783/839/806 782/813/780 751/806/773 +f 772/778/745 803/810/777 802/815/782 771/779/746 +f 750/780/747 781/814/781 780/817/784 749/781/748 +f 761/782/749 792/812/779 791/819/786 760/783/750 +f 770/784/751 801/816/783 800/821/788 769/785/752 +f 748/786/753 779/818/785 778/823/790 747/787/754 +f 759/788/755 790/820/787 789/825/792 758/789/756 +f 768/790/757 799/822/789 798/827/794 767/791/758 +f 757/792/759 788/826/793 787/829/796 756/793/760 +f 766/794/761 797/828/795 796/833/800 765/795/762 +f 755/796/763 786/830/797 785/835/802 754/797/764 +f 775/798/765 806/832/799 805/837/804 774/799/766 +f 764/800/767 795/834/801 794/838/805 763/801/768 +f 753/802/769 784/836/803 783/839/806 752/803/770 +f 805/837/804 836/840/807 835/841/808 804/809/776 +f 794/838/805 825/842/809 824/843/810 793/811/778 +f 783/839/806 814/844/811 813/845/812 782/813/780 +f 803/810/777 834/846/813 833/847/814 802/815/782 +f 781/814/781 812/848/815 811/849/816 780/817/784 +f 792/812/779 823/850/817 822/851/818 791/819/786 +f 801/816/783 832/852/819 831/853/820 800/821/788 +f 779/818/785 810/854/821 809/855/822 778/823/790 +f 790/820/787 821/856/823 820/857/824 789/825/792 +f 799/822/789 830/858/825 829/859/826 798/827/794 +f 788/826/793 819/860/827 818/861/828 787/829/796 +f 797/828/795 828/862/829 827/863/830 796/833/800 +f 786/830/797 817/864/831 816/865/832 785/835/802 +f 806/832/799 837/866/833 836/840/807 805/837/804 +f 795/834/801 826/867/834 825/842/809 794/838/805 +f 784/836/803 815/868/835 814/844/811 783/839/806 +f 804/809/776 835/841/808 834/846/813 803/810/777 +f 793/811/778 824/843/810 823/850/817 792/812/779 +f 782/813/780 813/845/812 812/848/815 781/814/781 +f 802/815/782 833/847/814 832/852/819 801/816/783 +f 780/817/784 811/849/816 810/854/821 779/818/785 +f 791/819/786 822/851/818 821/856/823 790/820/787 +f 800/821/788 831/853/820 830/858/825 799/822/789 +f 778/823/790 809/855/822 808/869/836 777/824/791 +f 789/825/792 820/857/824 819/860/827 788/826/793 +f 798/827/794 829/859/826 828/862/829 797/828/795 +f 787/829/796 818/861/828 817/864/831 786/830/797 +f 807/831/798 838/870/837 837/866/833 806/832/799 +f 796/833/800 827/863/830 826/867/834 795/834/801 +f 785/835/802 816/865/832 815/868/835 784/836/803 +f 837/866/833 868/871/838 867/872/839 836/840/807 +f 826/867/834 857/873/840 856/874/841 825/842/809 +f 815/868/835 846/875/842 845/876/843 814/844/811 +f 835/841/808 866/877/844 865/878/845 834/846/813 +f 824/843/810 855/879/846 854/880/847 823/850/817 +f 813/845/812 844/881/848 843/882/849 812/848/815 +f 833/847/814 864/883/850 863/884/851 832/852/819 +f 811/849/816 842/885/852 841/886/853 810/854/821 +f 822/851/818 853/887/854 852/888/855 821/856/823 +f 831/853/820 862/889/856 861/890/857 830/858/825 +f 809/855/822 840/891/858 839/892/859 808/869/836 +f 820/857/824 851/893/860 850/894/861 819/860/827 +f 829/859/826 860/895/862 859/896/863 828/862/829 +f 818/861/828 849/897/864 848/898/865 817/864/831 +f 838/870/837 869/899/866 868/871/838 837/866/833 +f 827/863/830 858/900/867 857/873/840 826/867/834 +f 816/865/832 847/901/868 846/875/842 815/868/835 +f 836/840/807 867/872/839 866/877/844 835/841/808 +f 825/842/809 856/874/841 855/879/846 824/843/810 +f 814/844/811 845/876/843 844/881/848 813/845/812 +f 834/846/813 865/878/845 864/883/850 833/847/814 +f 812/848/815 843/882/849 842/885/852 811/849/816 +f 823/850/817 854/880/847 853/887/854 822/851/818 +f 832/852/819 863/884/851 862/889/856 831/853/820 +f 810/854/821 841/886/853 840/891/858 809/855/822 +f 821/856/823 852/888/855 851/893/860 820/857/824 +f 830/858/825 861/890/857 860/895/862 829/859/826 +f 819/860/827 850/894/861 849/897/864 818/861/828 +f 828/862/829 859/896/863 858/900/867 827/863/830 +f 817/864/831 848/898/865 847/901/868 816/865/832 +f 869/899/866 901/902/869 900/903/870 868/871/838 +f 858/900/867 890/904/871 889/905/872 857/873/840 +f 847/901/868 879/906/873 878/907/874 846/875/842 +f 867/872/839 899/908/875 898/909/876 866/877/844 +f 856/874/841 888/910/877 887/911/878 855/879/846 +f 845/876/843 877/912/879 876/913/880 844/881/848 +f 865/878/845 897/914/881 896/915/882 864/883/850 +f 843/882/849 875/916/883 874/917/884 842/885/852 +f 854/880/847 886/918/885 885/919/886 853/887/854 +f 863/884/851 895/920/887 894/921/888 862/889/856 +f 841/886/853 873/922/889 872/923/890 840/891/858 +f 852/888/855 884/924/891 883/925/892 851/893/860 +f 861/890/857 893/926/893 892/927/894 860/895/862 +f 850/894/861 882/928/895 881/929/896 849/897/864 +f 859/896/863 891/930/897 890/904/871 858/900/867 +f 848/898/865 880/931/898 879/906/873 847/901/868 +f 868/871/838 900/903/870 899/908/875 867/872/839 +f 857/873/840 889/905/872 888/910/877 856/874/841 +f 846/875/842 878/907/874 877/912/879 845/876/843 +f 866/877/844 898/909/876 897/914/881 865/878/845 +f 855/879/846 887/911/878 886/918/885 854/880/847 +f 844/881/848 876/913/880 875/916/883 843/882/849 +f 864/883/850 896/915/882 895/920/887 863/884/851 +f 842/885/852 874/917/884 873/922/889 841/886/853 +f 853/887/854 885/919/886 884/924/891 852/888/855 +f 862/889/856 894/921/888 893/926/893 861/890/857 +f 840/891/858 872/923/890 871/932/899 839/892/859 +f 851/893/860 883/925/892 882/928/895 850/894/861 +f 860/895/862 892/927/894 891/930/897 859/896/863 +f 849/897/864 881/929/896 880/931/898 848/898/865 +f 891/930/897 922/933/900 921/934/901 890/904/871 +f 880/931/898 911/935/902 910/936/903 879/906/873 +f 900/903/870 931/937/904 930/938/905 899/908/875 +f 889/905/872 920/939/906 919/940/907 888/910/877 +f 878/907/874 909/941/908 908/942/909 877/912/879 +f 898/909/876 929/943/910 928/944/911 897/914/881 +f 887/911/878 918/945/912 917/946/913 886/918/885 +f 876/913/880 907/947/914 906/948/915 875/916/883 +f 896/915/882 927/949/916 926/950/917 895/920/887 +f 874/917/884 905/951/918 904/952/919 873/922/889 +f 885/919/886 916/953/920 915/954/921 884/924/891 +f 894/921/888 925/955/922 924/956/923 893/926/893 +f 872/923/890 903/957/924 902/958/925 871/932/899 +f 883/925/892 914/959/926 913/960/927 882/928/895 +f 892/927/894 923/961/928 922/933/900 891/930/897 +f 881/929/896 912/962/929 911/935/902 880/931/898 +f 901/902/869 932/963/930 931/937/904 900/903/870 +f 890/904/871 921/934/901 920/939/906 889/905/872 +f 879/906/873 910/936/903 909/941/908 878/907/874 +f 899/908/875 930/938/905 929/943/910 898/909/876 +f 888/910/877 919/940/907 918/945/912 887/911/878 +f 877/912/879 908/942/909 907/947/914 876/913/880 +f 897/914/881 928/944/911 927/949/916 896/915/882 +f 875/916/883 906/948/915 905/951/918 874/917/884 +f 886/918/885 917/946/913 916/953/920 885/919/886 +f 895/920/887 926/950/917 925/955/922 894/921/888 +f 873/922/889 904/952/919 903/957/924 872/923/890 +f 884/924/891 915/954/921 914/959/926 883/925/892 +f 893/926/893 924/956/923 923/961/928 892/927/894 +f 882/928/895 913/960/927 912/962/929 881/929/896 +f 923/961/928 954/964/931 953/965/932 922/933/900 +f 912/962/929 943/966/933 942/967/934 911/935/902 +f 932/963/930 963/968/935 962/969/936 931/937/904 +f 921/934/901 952/970/937 951/971/938 920/939/906 +f 910/936/903 941/972/939 940/973/940 909/941/908 +f 930/938/905 961/974/941 960/975/942 929/943/910 +f 919/940/907 950/976/943 949/977/944 918/945/912 +f 908/942/909 939/978/945 938/979/946 907/947/914 +f 928/944/911 959/980/947 958/981/948 927/949/916 +f 906/948/915 937/982/949 936/983/950 905/951/918 +f 917/946/913 948/984/951 947/985/952 916/953/920 +f 926/950/917 957/986/953 956/987/954 925/955/922 +f 904/952/919 935/988/955 934/989/956 903/957/924 +f 915/954/921 946/990/957 945/991/958 914/959/926 +f 924/956/923 955/992/959 954/964/931 923/961/928 +f 913/960/927 944/993/960 943/966/933 912/962/929 +f 922/933/900 953/965/932 952/970/937 921/934/901 +f 911/935/902 942/967/934 941/972/939 910/936/903 +f 931/937/904 962/969/936 961/974/941 930/938/905 +f 920/939/906 951/971/938 950/976/943 919/940/907 +f 909/941/908 940/973/940 939/978/945 908/942/909 +f 929/943/910 960/975/942 959/980/947 928/944/911 +f 918/945/912 949/977/944 948/984/951 917/946/913 +f 907/947/914 938/979/946 937/982/949 906/948/915 +f 927/949/916 958/981/948 957/986/953 926/950/917 +f 905/951/918 936/983/950 935/988/955 904/952/919 +f 916/953/920 947/985/952 946/990/957 915/954/921 +f 925/955/922 956/987/954 955/992/959 924/956/923 +f 903/957/924 934/989/956 933/994/961 902/958/925 +f 914/959/926 945/991/958 944/993/960 913/960/927 +f 955/992/959 986/995/962 985/996/963 954/964/931 +f 944/993/960 975/997/964 974/998/965 943/966/933 +f 953/965/932 984/999/966 983/1000/967 952/970/937 +f 942/967/934 973/1001/968 972/1002/969 941/972/939 +f 962/969/936 993/1003/970 992/1004/971 961/974/941 +f 951/971/938 982/1005/972 981/1006/973 950/976/943 +f 940/973/940 971/1007/974 970/1008/975 939/978/945 +f 960/975/942 991/1009/976 990/1010/977 959/980/947 +f 949/977/944 980/1011/978 979/1012/979 948/984/951 +f 938/979/946 969/1013/980 968/1014/981 937/982/949 +f 958/981/948 989/1015/982 988/1016/983 957/986/953 +f 936/983/950 967/1017/984 966/1018/985 935/988/955 +f 947/985/952 978/1019/986 977/1020/987 946/990/957 +f 956/987/954 987/1021/988 986/995/962 955/992/959 +f 934/989/956 965/1022/989 964/1023/990 933/994/961 +f 945/991/958 976/1024/991 975/997/964 944/993/960 +f 954/964/931 985/996/963 984/999/966 953/965/932 +f 943/966/933 974/998/965 973/1001/968 942/967/934 +f 963/968/935 994/1025/992 993/1003/970 962/969/936 +f 952/970/937 983/1000/967 982/1005/972 951/971/938 +f 941/972/939 972/1002/969 971/1007/974 940/973/940 +f 961/974/941 992/1004/971 991/1009/976 960/975/942 +f 950/976/943 981/1006/973 980/1011/978 949/977/944 +f 939/978/945 970/1008/975 969/1013/980 938/979/946 +f 959/980/947 990/1010/977 989/1015/982 958/981/948 +f 937/982/949 968/1014/981 967/1017/984 936/983/950 +f 948/984/951 979/1012/979 978/1019/986 947/985/952 +f 957/986/953 988/1016/983 987/1021/988 956/987/954 +f 935/988/955 966/1018/985 965/1022/989 934/989/956 +f 946/990/957 977/1020/987 976/1024/991 945/991/958 +f 1/8/8 32/7/7 870/1026/993 +f 218/1027/994 62/97/22 31/1028/21 +f 32/7/7 63/96/92 870/1026/993 +f 218/1027/994 93/98/93 62/97/22 +f 63/96/92 94/115/103 870/1026/993 +f 218/1027/994 124/128/110 93/98/93 +f 94/115/103 125/182/154 870/1026/993 +f 218/1027/994 155/183/155 124/128/110 +f 125/182/154 156/199/171 870/1026/993 +f 218/1027/994 186/206/178 155/183/155 +f 156/199/171 187/244/216 870/1026/993 +f 218/1027/994 217/245/217 186/206/178 +f 187/244/216 219/267/239 870/1026/993 +f 218/1027/994 249/274/246 217/245/217 +f 219/267/239 250/307/279 870/1026/993 +f 218/1027/994 280/277/249 249/274/246 +f 218/1027/994 311/338/310 280/277/249 +f 250/307/279 281/333/305 870/1026/993 +f 281/333/305 312/369/341 870/1026/993 +f 218/1027/994 342/343/315 311/338/310 +f 312/369/341 343/398/370 870/1026/993 +f 218/1027/994 373/400/372 342/343/315 +f 343/398/370 374/404/376 870/1026/993 +f 218/1027/994 404/411/383 373/400/372 +f 374/404/376 405/461/433 870/1026/993 +f 218/1027/994 435/462/434 404/411/383 +f 405/461/433 436/472/444 870/1026/993 +f 218/1027/994 466/479/451 435/462/434 +f 436/472/444 467/523/495 870/1026/993 +f 218/1027/994 497/524/496 466/479/451 +f 467/523/495 498/540/512 870/1026/993 +f 218/1027/994 528/547/519 497/524/496 +f 498/540/512 529/586/558 870/1026/993 +f 218/1027/994 559/556/528 528/547/519 +f 218/1027/994 590/617/589 559/556/528 +f 529/586/558 560/612/584 870/1026/993 +f 560/612/584 591/649/620 870/1026/993 +f 218/1027/994 621/622/594 590/617/589 +f 591/649/620 622/681/649 870/1026/993 +f 218/1027/994 652/1029/651 621/622/594 +f 622/681/649 653/688/655 870/1026/993 +f 218/1027/994 683/1030/662 652/1029/651 +f 653/688/655 684/745/712 870/1026/993 +f 218/1027/994 714/1031/713 683/1030/662 +f 684/745/712 715/756/723 870/1026/993 +f 218/1027/994 745/1032/730 714/1031/713 +f 715/756/723 746/807/774 870/1026/993 +f 218/1027/994 776/1033/775 745/1032/730 +f 746/807/774 777/824/791 870/1026/993 +f 218/1027/994 807/1034/798 776/1033/775 +f 777/824/791 808/869/836 870/1026/993 +f 218/1027/994 838/1035/837 807/1034/798 +f 808/869/836 839/892/859 870/1026/993 +f 218/1027/994 869/1036/866 838/1035/837 +f 839/892/859 871/932/899 870/1026/993 +f 218/1027/994 901/1037/869 869/1036/866 +f 218/1027/994 932/1038/930 901/1037/869 +f 871/932/899 902/958/925 870/1026/993 +f 902/958/925 933/994/961 870/1026/993 +f 218/1027/994 963/1039/935 932/1038/930 +f 933/994/961 964/1023/990 870/1026/993 +f 218/1027/994 994/1040/992 963/1039/935 +f 987/1021/988 24/1/1 23/4/4 986/995/962 +f 965/1022/989 2/5/5 1/8/8 964/1023/990 +f 976/1024/991 13/9/9 12/12/12 975/997/964 +f 985/996/963 22/13/13 21/16/16 984/999/966 +f 974/998/965 11/17/17 10/20/20 973/1001/968 +f 994/1025/992 31/21/21 30/24/24 993/1003/970 +f 983/1000/967 20/25/25 19/28/28 982/1005/972 +f 972/1002/969 9/29/29 8/32/32 971/1007/974 +f 992/1004/971 29/33/33 28/36/36 991/1009/976 +f 981/1006/973 18/37/37 17/40/40 980/1011/978 +f 970/1008/975 7/41/41 6/44/44 969/1013/980 +f 990/1010/977 27/45/45 26/48/48 989/1015/982 +f 968/1014/981 5/49/49 4/52/52 967/1017/984 +f 979/1012/979 16/53/53 15/56/56 978/1019/986 +f 988/1016/983 25/57/57 24/1/1 987/1021/988 +f 966/1018/985 3/59/59 2/5/5 965/1022/989 +f 977/1020/987 14/61/61 13/9/9 976/1024/991 +f 986/995/962 23/4/4 22/13/13 985/996/963 +f 964/1023/990 1/8/8 870/1026/993 +f 975/997/964 12/12/12 11/17/17 974/998/965 +f 218/1027/994 31/1028/21 994/1040/992 +f 984/999/966 21/16/16 20/25/25 983/1000/967 +f 973/1001/968 10/20/20 9/29/29 972/1002/969 +f 993/1003/970 30/24/24 29/33/33 992/1004/971 +f 982/1005/972 19/28/28 18/37/37 981/1006/973 +f 971/1007/974 8/32/32 7/41/41 970/1008/975 +f 991/1009/976 28/36/36 27/45/45 990/1010/977 +f 980/1011/978 17/40/40 16/53/53 979/1012/979 +f 969/1013/980 6/44/44 5/49/49 968/1014/981 +f 989/1015/982 26/48/48 25/57/57 988/1016/983 +f 967/1017/984 4/52/52 3/59/59 966/1018/985 +f 978/1019/986 15/56/56 14/61/61 977/1020/987 diff --git a/examples/qt3d/planets-qml/planets-qml-images.qrc b/examples/qt3d/planets-qml/planets-qml-images.qrc new file mode 100644 index 000000000..937e32de8 --- /dev/null +++ b/examples/qt3d/planets-qml/planets-qml-images.qrc @@ -0,0 +1,34 @@ + + + images/sunmap.jpg + images/mercurymap.jpg + images/mercurynormal.jpg + images/venusmap.jpg + images/venusnormal.jpg + images/earthmap1k.jpg + images/earthnormal1k.jpg + images/earthspec1k.jpg + images/moonmap1k.jpg + images/moonnormal1k.jpg + images/marsmap1k.jpg + images/marsnormal1k.jpg + images/jupitermap.jpg + images/saturnmap.jpg + images/uranusmap.jpg + images/neptunemap.jpg + images/earth.png + images/mercury.png + images/jupiter.png + images/mars.png + images/neptune.png + images/saturn.png + images/sun.png + images/uranus.png + images/venus.png + images/earthcloudmapcolortrans.png + images/earthcloudmapspec.jpg + images/saturnringcolortrans.png + images/uranusringcolortrans.png + images/galaxy_starfield.png + + diff --git a/examples/qt3d/planets-qml/planets-qml.pro b/examples/qt3d/planets-qml/planets-qml.pro new file mode 100644 index 000000000..f2ebf1f1b --- /dev/null +++ b/examples/qt3d/planets-qml/planets-qml.pro @@ -0,0 +1,20 @@ +!include( ../examples.pri ) { + error( "Couldn't find the examples.pri file!" ) +} + +QT += qml quick 3dinput + +SOURCES += \ + main.cpp + +OTHER_FILES += \ + *.qml \ + planets.js \ + shaders\*.* + +RESOURCES += \ + planets-qml.qrc \ + planets-qml-images.qrc + +DISTFILES += \ + PlanetsMain.qml diff --git a/examples/qt3d/planets-qml/planets-qml.qrc b/examples/qt3d/planets-qml/planets-qml.qrc new file mode 100644 index 000000000..f8efcbd44 --- /dev/null +++ b/examples/qt3d/planets-qml/planets-qml.qrc @@ -0,0 +1,31 @@ + + + SolarSystem.qml + PlanetsMain.qml + PlanetButton.qml + InfoSheet.qml + StyledSlider.qml + FpsDisplay.qml + Planet.qml + Ring.qml + Light.qml + CloudEffectDS.qml + PlanetEffectD.qml + PlanetEffectDB.qml + PlanetEffectDS.qml + PlanetEffectDSB.qml + PlanetMaterial.qml + ShadowMapFrameGraph.qml + planets.js + meshes/starfield.obj + meshes/ring.obj + shaders/shadowmap.frag + shaders/shadowmap.vert + shaders/planetD.frag + shaders/planetD.vert + shaders/planetDB.frag + shaders/planetDB.vert + shaders/planetDS.frag + shaders/planetDSB.frag + + diff --git a/examples/qt3d/planets-qml/planets.js b/examples/qt3d/planets-qml/planets.js new file mode 100644 index 000000000..1de683c21 --- /dev/null +++ b/examples/qt3d/planets-qml/planets.js @@ -0,0 +1,166 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +var SUN = 0; +var MERCURY = 1; +var VENUS = 2; +var EARTH = 3; +var MARS = 4; +var JUPITER = 5; +var SATURN = 6; +var URANUS = 7; +var NEPTUNE = 8; +var NUM_SELECTABLE_PLANETS = 9; +var MOON = 9; +var SOLAR_SYSTEM = 100; + +var planets = []; // Planet data info + +var solarDistance = 2600000; +var saturnOuterRadius = 120.700; +var uranusOuterRadius = 40; + +var auScale = 149597.870700; // AU in thousands of kilometers + +function loadPlanetData() { + + // Planet Data + // radius - planet radius + // tilt - planet axis angle + // N1/2 - longitude of the ascending node + // i1/2 - inclination to the ecliptic (plane of the Earth's orbit) + // w1/2 - argument of perihelion + // a1/2 - semi-major axis, or mean distance from Sun + // e1/2 - eccentricity (0=circle, 0-1=ellipse, 1=parabola) + // M1/2 - mean anomaly (0 at perihelion; increases uniformly with time) + // period - sidereal rotation period + // centerOfOrbit - the planet in the center of the orbit + // (orbital elements based on http://www.stjarnhimlen.se/comp/ppcomp.html) + + var sun = { radius: 694.439, tilt: 63.87, period: 25.05, x: 0, y: 0, z: 0, + roll: 0 }; + planets.push(sun); + var mercury = { + radius: 2.433722, tilt: 0.04, N1: 48.3313, N2: 0.0000324587, + i1: 7.0047, i2: 0.0000000500, w1: 29.1241, w2: 0.0000101444, + a1: 0.387098, a2: 0, e1: 0.205635, e2: 0.000000000559, + M1: 168.6562, M2: 4.0923344368, period: 58.646, x: 0, y: 0, z: 0, + roll: 0, centerOfOrbit: SUN + }; + planets.push(mercury); + var venus = { + radius: 6.046079, tilt: 177.36, N1: 76.6799, N2: 0.0000246590, + i1: 3.3946, i2: 0.0000000275, w1: 54.8910, w2: 0.0000138374, + a1: 0.723330, a2: 0, e1: 0.006773, e2: -0.000000001302, + M1: 48.0052, M2: 1.6021302244, period: 243.0185, x: 0, y: 0, z: 0, + roll: 0, centerOfOrbit: SUN + }; + planets.push(venus); + var earth = { + radius: 6.371, tilt: 25.44, N1: 174.873, N2: 0, + i1: 0.00005, i2: 0, w1: 102.94719, w2: 0, + a1: 1, a2: 0, e1: 0.01671022, e2: 0, + M1: 357.529, M2: 0.985608, period: 0.997, x: 0, y: 0, z: 0, + roll: 0, centerOfOrbit: SUN + }; + planets.push(earth); + var mars = { + radius: 3.389372, tilt: 25.19, N1: 49.5574, N2: 0.0000211081, + i1: 1.8497, i2: -0.0000000178, w1: 286.5016, w2: 0.0000292961, + a1: 1.523688, a2: 0, e1: 0.093405, e2: 0.000000002516, + M1: 18.6021, M2: 0.5240207766, period: 1.025957, x: 0, y: 0, z: 0, + roll: 0, centerOfOrbit: SUN + }; + planets.push(mars); + var jupiter = { + radius: 71.41254, tilt: 3.13, N1: 100.4542, N2: 0.0000276854, + i1: 1.3030, i2: -0.0000001557, w1: 273.8777, w2: 0.0000164505, + a1: 5.20256, a2: 0, e1: 0.048498, e2: 0.000000004469, + M1: 19.8950, M2: 0.0830853001, period: 0.4135, x: 0, y: 0, z: 0, + roll: 0, centerOfOrbit: SUN + }; + planets.push(jupiter); + var saturn = { + radius: 60.19958, tilt: 26.73, N1: 113.6634, N2: 0.0000238980, + i1: 2.4886, i2: -0.0000001081, w1: 339.3939, w2: 0.0000297661, + a1: 9.55475, a2: 0, e1: 0.055546, e2: -0.000000009499, + M1: 316.9670, M2: 0.0334442282, period: 0.4395, x: 0, y: 0, z: 0, + roll: 0, centerOfOrbit: SUN + }; + planets.push(saturn); + var uranus = { + radius: 25.5286, tilt: 97.77, N1: 74.0005, N2: 0.000013978, + i1: 0.7733, i2: 0.000000019, w1: 96.6612, w2: 0.000030565, + a1: 19.18171, a2: -0.0000000155, e1: 0.047318, e2: 0.00000000745, + M1: 142.5905, M2: 0.011725806, period: 0.71833, x: 0, y: 0, z: 0, + roll: 0, centerOfOrbit: SUN + }; + planets.push(uranus); + var neptune = { + radius: 24.73859, tilt: 28.32, N1: 131.7806, N2: 0.000030173, + i1: 1.7700, i2: -0.000000255, w1: 272.8461, w2: 0.000006027, + a1: 30.05826, a2: 0.00000003313, e1: 0.008606, e2: 0.00000000215, + M1: 260.2471, M2: 0.005995147, period: 0.6713, x: 0, y: 0, z: 0, + roll: 0, centerOfOrbit: SUN + }; + planets.push(neptune); + var moon = { + radius: 1.5424, tilt: 28.32, N1: 125.1228, N2: -0.0529538083, + i1: 5.1454, i2: 0, w1: 318.0634, w2: 0.1643573223, + a1: 0.273, a2: 0, e1: 0.054900, e2: 0, + M1: 115.3654, M2: 13.0649929509, period: 27.321582, x: 0, y: 0, z: 0, + roll: 0, centerOfOrbit: EARTH + }; + planets.push(moon); + + return planets; +} + +function getOuterRadius(planet) { + var outerRadius = solarDistance; + if (planet !== SOLAR_SYSTEM) { + outerRadius = planets[planet]["radius"]; + if (planet === SATURN) { + outerRadius =+ saturnOuterRadius; + } else if (planet === URANUS) { + outerRadius =+ uranusOuterRadius; + } else if (planet === SUN) { + outerRadius = planets[planet]["radius"] / 100; + } + } + + return outerRadius; +} diff --git a/examples/qt3d/planets-qml/shaders/planetD.frag b/examples/qt3d/planets-qml/shaders/planetD.frag new file mode 100644 index 000000000..62d941d25 --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/planetD.frag @@ -0,0 +1,105 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#version 150 core + +uniform mat4 viewMatrix; + +uniform vec3 lightPosition; +uniform vec3 lightIntensity; + +uniform vec3 ka; // Ambient reflectivity +uniform vec3 ks; // Specular reflectivity +uniform float shininess; // Specular shininess factor +uniform float opacity; // Alpha channel + +uniform sampler2D diffuseTexture; + +uniform sampler2DShadow shadowMapTexture; + +in vec4 positionInLightSpace; + +in vec3 position; +in vec3 normal; +in vec2 texCoord; + +out vec4 fragColor; + +vec3 dModel(const in vec2 flipYTexCoord) +{ + // Calculate the vector from the light to the fragment + vec3 s = normalize(vec3(viewMatrix * vec4(lightPosition, 1.0)) - position); + + // Calculate the vector from the fragment to the eye position + // (origin since this is in "eye" or "camera" space) + vec3 v = normalize(-position); + + // Reflect the light beam using the normal at this fragment + vec3 r = reflect(-s, normal); + + // Calculate the diffuse component + float diffuse = max(dot(s, normal), 0.0); + + // Calculate the specular component + float specular = 0.0; + if (dot(s, normal) > 0.0) + specular = (shininess / (8.0 * 3.14)) * pow(max(dot(r, v), 0.0), shininess); + + // Lookup diffuse and specular factors + vec3 diffuseColor = texture(diffuseTexture, flipYTexCoord).rgb; + + // Combine the ambient, diffuse and specular contributions + return lightIntensity * ((ka + diffuse) * diffuseColor + specular * ks); +} + +void main() +{ + vec2 flipYTexCoord = texCoord; + flipYTexCoord.y = 1.0 - texCoord.y; + + float shadowMapSample = textureProj(shadowMapTexture, positionInLightSpace); + + vec3 ambient = lightIntensity * ka * texture(diffuseTexture, flipYTexCoord).rgb; + + vec3 result = ambient; + if (shadowMapSample > 0) + result = dModel(flipYTexCoord); + + float alpha = opacity * texture(diffuseTexture, flipYTexCoord).a; + + fragColor = vec4(result, alpha); +} diff --git a/examples/qt3d/planets-qml/shaders/planetD.vert b/examples/qt3d/planets-qml/shaders/planetD.vert new file mode 100644 index 000000000..41a1db6e4 --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/planetD.vert @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#version 150 core + +in vec3 vertexPosition; +in vec3 vertexNormal; +in vec2 vertexTexCoord; + +out vec4 positionInLightSpace; +out vec3 position; +out vec3 normal; +out vec2 texCoord; + +uniform mat4 lightViewProjection; +uniform mat4 modelMatrix; +uniform mat4 modelView; +uniform mat3 modelViewNormal; +uniform mat4 mvp; + +uniform float texCoordScale; + +void main() +{ + const mat4 shadowMatrix = mat4(0.5, 0.0, 0.0, 0.0, + 0.0, 0.5, 0.0, 0.0, + 0.0, 0.0, 0.5, 0.0, + 0.5, 0.5, 0.5, 1.0); + + positionInLightSpace = shadowMatrix * lightViewProjection * modelMatrix * vec4(vertexPosition, 1.0); + + texCoord = vertexTexCoord * texCoordScale; + normal = normalize(modelViewNormal * vertexNormal); + position = vec3(modelView * vec4(vertexPosition, 1.0)); + + gl_Position = mvp * vec4(vertexPosition, 1.0); +} diff --git a/examples/qt3d/planets-qml/shaders/planetDB.frag b/examples/qt3d/planets-qml/shaders/planetDB.frag new file mode 100644 index 000000000..bf53a127b --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/planetDB.frag @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#version 150 core + +uniform mat4 viewMatrix; + +uniform vec3 lightPosition; +uniform vec3 lightIntensity; + +uniform vec3 ka; // Ambient reflectivity +uniform vec3 ks; // Specular reflectivity +uniform float shininess; // Specular shininess factor +uniform float opacity; // Alpha channel + +uniform sampler2D diffuseTexture; +uniform sampler2D normalTexture; + +uniform sampler2DShadow shadowMapTexture; + +in vec4 positionInLightSpace; + +in vec3 lightDir; +in vec3 viewDir; +in vec2 texCoord; + +out vec4 fragColor; + +void dbModel(const in vec3 norm, const in vec2 flipYTexCoord, out vec3 ambientAndDiff, out vec3 spec) +{ + // Reflection of light direction about normal + vec3 r = reflect(-lightDir, norm); + + vec3 diffuseColor = texture(diffuseTexture, flipYTexCoord).rgb; + + // Calculate the ambient contribution + vec3 ambient = lightIntensity * ka * diffuseColor; + + // Calculate the diffuse contribution + float sDotN = max(dot(lightDir, norm), 0.0); + vec3 diffuse = lightIntensity * diffuseColor * sDotN; + + // Sum the ambient and diffuse contributions + ambientAndDiff = ambient + diffuse; + + // Calculate the specular highlight contribution + spec = vec3(0.0); + if (sDotN > 0.0) + spec = (lightIntensity * ks) * pow(max(dot(r, viewDir), 0.0), shininess); +} + +void main() +{ + vec2 flipYTexCoord = texCoord; + flipYTexCoord.y = 1.0 - texCoord.y; + + float shadowMapSample = textureProj(shadowMapTexture, positionInLightSpace); + + // Sample the textures at the interpolated texCoords + vec4 normal = 2.0 * texture(normalTexture, flipYTexCoord) - vec4(1.0); + + vec3 result = lightIntensity * ka * texture(diffuseTexture, flipYTexCoord).rgb; + + // Calculate the lighting model, keeping the specular component separate + vec3 ambientAndDiff, spec; + if (shadowMapSample > 0) { + dbModel(normalize(normal.xyz), flipYTexCoord, ambientAndDiff, spec); + result = ambientAndDiff + spec; + } + + // Combine spec with ambient+diffuse for final fragment color + fragColor = vec4(result, opacity); +} diff --git a/examples/qt3d/planets-qml/shaders/planetDB.vert b/examples/qt3d/planets-qml/shaders/planetDB.vert new file mode 100644 index 000000000..e30394aa3 --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/planetDB.vert @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#version 150 core + +in vec3 vertexPosition; +in vec3 vertexNormal; +in vec2 vertexTexCoord; +in vec4 vertexTangent; + +out vec4 positionInLightSpace; +out vec3 lightDir; +out vec3 viewDir; +out vec2 texCoord; + +uniform mat4 viewMatrix; +uniform mat4 lightViewProjection; +uniform mat4 modelMatrix; +uniform mat4 modelView; +uniform mat3 modelViewNormal; +uniform mat4 mvp; + +uniform float texCoordScale; + +uniform vec3 lightPosition; + +void main() +{ + const mat4 shadowMatrix = mat4(0.5, 0.0, 0.0, 0.0, + 0.0, 0.5, 0.0, 0.0, + 0.0, 0.0, 0.5, 0.0, + 0.5, 0.5, 0.5, 1.0); + + positionInLightSpace = shadowMatrix * lightViewProjection * modelMatrix * vec4(vertexPosition, 1.0); + + // Pass through texture coordinates + texCoord = vertexTexCoord * texCoordScale; + + // Transform position, normal, and tangent to eye coords + vec3 normal = normalize(modelViewNormal * vertexNormal); + vec3 tangent = normalize(modelViewNormal * vertexTangent.xyz); + vec3 position = vec3(modelView * vec4(vertexPosition, 1.0)); + + // Calculate binormal vector + vec3 binormal = normalize(cross(normal, tangent)); + + // Construct matrix to transform from eye coords to tangent space + mat3 tangentMatrix = mat3 ( + tangent.x, binormal.x, normal.x, + tangent.y, binormal.y, normal.y, + tangent.z, binormal.z, normal.z); + + // Transform light direction and view direction to tangent space + vec3 s = lightPosition - position; + lightDir = normalize(tangentMatrix * vec3(viewMatrix * vec4(s, 1.0))); + + vec3 v = -position; + viewDir = normalize(tangentMatrix * v); + + // Calculate vertex position in clip coordinates + gl_Position = mvp * vec4(vertexPosition, 1.0); +} diff --git a/examples/qt3d/planets-qml/shaders/planetDS.frag b/examples/qt3d/planets-qml/shaders/planetDS.frag new file mode 100644 index 000000000..2a1b78bfa --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/planetDS.frag @@ -0,0 +1,104 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#version 150 core + +uniform mat4 viewMatrix; + +uniform vec3 lightPosition; +uniform vec3 lightIntensity; + +uniform vec3 ka; // Ambient reflectivity +uniform float shininess; // Specular shininess factor +uniform float opacity; // Alpha channel + +uniform sampler2D diffuseTexture; +uniform sampler2D specularTexture; + +uniform sampler2DShadow shadowMapTexture; + +in vec4 positionInLightSpace; + +in vec3 position; +in vec3 normal; +in vec2 texCoord; + +out vec4 fragColor; + +vec3 dsModel(const in vec2 flipYTexCoord) +{ + // Calculate the vector from the light to the fragment + vec3 s = normalize(vec3(viewMatrix * vec4(lightPosition, 1.0)) - position); + + // Calculate the vector from the fragment to the eye position + // (origin since this is in "eye" or "camera" space) + vec3 v = normalize(-position); + + // Reflect the light beam using the normal at this fragment + vec3 r = reflect(-s, normal); + + // Calculate the diffuse component + float diffuse = max(dot(s, normal), 0.0); + + // Calculate the specular component + float specular = 0.0; + if (dot(s, normal) > 0.0) + specular = (shininess / (8.0 * 3.14)) * pow(max(dot(r, v), 0.0), shininess); + + // Lookup diffuse and specular factors + vec3 diffuseColor = texture(diffuseTexture, flipYTexCoord).rgb; + vec3 specularColor = texture(specularTexture, flipYTexCoord).rgb; + + // Combine the ambient, diffuse and specular contributions + return lightIntensity * ((ka + diffuse) * diffuseColor + specular * specularColor); +} + +void main() +{ + vec2 flipYTexCoord = texCoord; + flipYTexCoord.y = 1.0 - texCoord.y; + + float shadowMapSample = textureProj(shadowMapTexture, positionInLightSpace); + + vec3 ambient = lightIntensity * ka * texture(diffuseTexture, flipYTexCoord).rgb; + + vec3 result = ambient; + if (shadowMapSample > 0) + result = dsModel(flipYTexCoord); + + fragColor = vec4(result, opacity * texture(diffuseTexture, flipYTexCoord).a); +} diff --git a/examples/qt3d/planets-qml/shaders/planetDSB.frag b/examples/qt3d/planets-qml/shaders/planetDSB.frag new file mode 100644 index 000000000..deb9565d4 --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/planetDSB.frag @@ -0,0 +1,110 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#version 150 core + +uniform mat4 viewMatrix; + +uniform vec3 lightPosition; +uniform vec3 lightIntensity; + +uniform vec3 ka; // Ambient reflectivity +uniform float shininess; // Specular shininess factor +uniform float opacity; // Alpha channel + +uniform sampler2D diffuseTexture; +uniform sampler2D specularTexture; +uniform sampler2D normalTexture; + +uniform sampler2DShadow shadowMapTexture; + +in vec4 positionInLightSpace; + +in vec3 lightDir; +in vec3 viewDir; +in vec2 texCoord; + +out vec4 fragColor; + +void dsbModel(const in vec3 norm, const in vec2 flipYTexCoord, out vec3 ambientAndDiff, out vec3 spec) +{ + // Reflection of light direction about normal + vec3 r = reflect(-lightDir, norm); + + vec3 diffuseColor = texture(diffuseTexture, flipYTexCoord).rgb; + vec3 specularColor = texture(specularTexture, flipYTexCoord).rgb; + + // Calculate the ambient contribution + vec3 ambient = lightIntensity * ka * diffuseColor; + + // Calculate the diffuse contribution + float sDotN = max(dot(lightDir, norm), 0.0); + vec3 diffuse = lightIntensity * diffuseColor * sDotN; + + // Sum the ambient and diffuse contributions + ambientAndDiff = ambient + diffuse; + + // Calculate the specular highlight contribution + spec = vec3(0.0); + if (sDotN > 0.0) + spec = (lightIntensity * (shininess / (8.0 * 3.14))) * pow(max(dot(r, viewDir), 0.0), shininess); + + spec *= specularColor; +} + +void main() +{ + vec2 flipYTexCoord = texCoord; + flipYTexCoord.y = 1.0 - texCoord.y; + + float shadowMapSample = textureProj(shadowMapTexture, positionInLightSpace); + + // Sample the textures at the interpolated texCoords + vec4 normal = 2.0 * texture(normalTexture, flipYTexCoord) - vec4(1.0); + + vec3 result = lightIntensity * ka * texture(diffuseTexture, flipYTexCoord).rgb; + + // Calculate the lighting model, keeping the specular component separate + vec3 ambientAndDiff, spec; + if (shadowMapSample > 0) { + dsbModel(normalize(normal.xyz), flipYTexCoord, ambientAndDiff, spec); + result = ambientAndDiff + spec; + } + + // Combine spec with ambient+diffuse for final fragment color + fragColor = vec4(result, opacity); +} diff --git a/examples/qt3d/planets-qml/shaders/shadowmap.frag b/examples/qt3d/planets-qml/shaders/shadowmap.frag new file mode 100644 index 000000000..63f203da6 --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/shadowmap.frag @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#version 150 core + +void main() +{ +} diff --git a/examples/qt3d/planets-qml/shaders/shadowmap.vert b/examples/qt3d/planets-qml/shaders/shadowmap.vert new file mode 100644 index 000000000..ca93360c6 --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/shadowmap.vert @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#version 150 core + +in vec3 vertexPosition; + +uniform mat4 mvp; + +void main() +{ + gl_Position = mvp * vec4(vertexPosition, 1.0); +} diff --git a/examples/qt3d/qt3d.pro b/examples/qt3d/qt3d.pro index 2894e4760..583d6b081 100644 --- a/examples/qt3d/qt3d.pro +++ b/examples/qt3d/qt3d.pro @@ -29,7 +29,8 @@ SUBDIRS += \ skybox \ controls \ anaglyph-rendering \ - simple-shaders-qml + simple-shaders-qml \ + planets-qml # TODO Port the old examples to new APIs #SUBDIRS += qt3d -- cgit v1.2.3 From dbe0950dfa2e6351af45a564e62b7a47ba6e7be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Thu, 11 Jun 2015 12:47:36 +0300 Subject: Added documentation for the planets-qml example Change-Id: I07734c6a30f49b05cd7815d3c3412cd867a09836 Task-number: QTBUG-46602 Reviewed-by: Mika Salmela Reviewed-by: Titta Heikkala Reviewed-by: Miikka Heikkinen (cherry picked from commit fc662e5a4597b568561c3a19abb24151086a229d) --- examples/qt3d/planets-qml/PlanetsMain.qml | 6 ++ examples/qt3d/planets-qml/SolarSystem.qml | 8 +++ .../planets-qml/doc/images/planets-qml-example.jpg | Bin 0 -> 68712 bytes examples/qt3d/planets-qml/doc/src/planets-qml.qdoc | 71 ++++++++++++++++++++- examples/qt3d/planets-qml/planets-qml.pro | 4 +- 5 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 examples/qt3d/planets-qml/doc/images/planets-qml-example.jpg diff --git a/examples/qt3d/planets-qml/PlanetsMain.qml b/examples/qt3d/planets-qml/PlanetsMain.qml index 3c8ab417b..84705e696 100644 --- a/examples/qt3d/planets-qml/PlanetsMain.qml +++ b/examples/qt3d/planets-qml/PlanetsMain.qml @@ -50,6 +50,7 @@ Item { anchors.fill: parent color: "black" + //! [0] Scene3D { anchors.fill: parent anchors.margins: 10 @@ -58,6 +59,7 @@ Item { SolarSystem { id: solarsystem } } + //! [0] MouseArea { anchors.fill: parent @@ -71,6 +73,7 @@ Item { } } + //! [1] onFocusedPlanetChanged: { solarsystem.setFreeCamera(false) if (focusedPlanet == 100) { @@ -84,6 +87,7 @@ Item { solarsystem.changePlanetFocus(oldPlanet, focusedPlanet) oldPlanet = focusedPlanet } + //! [1] ListModel { id: planetModel @@ -285,7 +289,9 @@ Item { value: 1 minimumValue: 1 maximumValue: 2 + //! [2] onValueChanged: solarsystem.changeCameraDistance(value) + //! [2] } Text { y: distanceSlider.y + distanceSlider.height + width + 10 diff --git a/examples/qt3d/planets-qml/SolarSystem.qml b/examples/qt3d/planets-qml/SolarSystem.qml index 339643235..d34627735 100644 --- a/examples/qt3d/planets-qml/SolarSystem.qml +++ b/examples/qt3d/planets-qml/SolarSystem.qml @@ -156,6 +156,7 @@ Entity { light: light } + //! [2] QQ2.Component.onCompleted: { planetData = Planets.loadPlanetData() // Push in the correct order @@ -181,7 +182,9 @@ Entity { changeSpeed(0.2) setLookAtOffset(Planets.SUN) } + //! [2] + //! [0] QQ2.NumberAnimation { id: lookAtOffsetAnimation target: sceneRoot @@ -199,6 +202,7 @@ Entity { easing.type: Easing.InOutQuint duration: 2500 } + //! [0] QQ2.Behavior on cameraNear { QQ2.PropertyAnimation { @@ -408,6 +412,7 @@ Entity { cameraDistance = distance } + //! [3] function animate(focusedPlanet) { if (!ready || freeCamera) return @@ -418,6 +423,7 @@ Entity { updateCamera(focusedPlanet) } + //! [3] function updateCamera(focusedPlanet) { // Get the appropriate near plane position for the camera and animate it with QML animations @@ -602,6 +608,7 @@ Entity { // EARTH + //! [1] Planet { id: earth tilt: planetData[Planets.EARTH].tilt @@ -639,6 +646,7 @@ Entity { components: [ earth, materialEarth, transformEarth ] } + //! [1] // EARTH CLOUDS diff --git a/examples/qt3d/planets-qml/doc/images/planets-qml-example.jpg b/examples/qt3d/planets-qml/doc/images/planets-qml-example.jpg new file mode 100644 index 000000000..d388d5ee4 Binary files /dev/null and b/examples/qt3d/planets-qml/doc/images/planets-qml-example.jpg differ diff --git a/examples/qt3d/planets-qml/doc/src/planets-qml.qdoc b/examples/qt3d/planets-qml/doc/src/planets-qml.qdoc index d03e11325..d68a21b2d 100644 --- a/examples/qt3d/planets-qml/doc/src/planets-qml.qdoc +++ b/examples/qt3d/planets-qml/doc/src/planets-qml.qdoc @@ -38,7 +38,76 @@ \example planets-qml \title Qt3D: Planets QML Example \ingroup qt3d-examples-qml + \brief Demonstrates combining Qt 3D rendering and Qt Quick 2 elements. - TODO + The Planets example demonstrates how to implement an application that combines the use of + Qt 3D rendering with Qt Quick 2D elements. The example shows the eight planets of our Solar + System with the Sun. + \image planets-qml-example.jpg + + Planet texture maps are Copyright (c) by James Hastings-Trew + \l{http://planetpixelemporium.com/planets.html}{http://planetpixelemporium.com/planets.html} + used with permission. + + The planets are rotating around the Sun based on their orbit at a given time. The rotation + starts at 2000 Jan 0.0 UT. The planet positions are calculated based on the formulas found here: + \l {http://www.stjarnhimlen.se/comp/ppcomp.html}{http://www.stjarnhimlen.se/comp/ppcomp.html} + and \l {http://www.davidcolarusso.com/astro/}{http://www.davidcolarusso.com/astro/}. + + \section1 Qt Quick 2D Implementation + + The Qt Quick Implementation \l{planets-qml/PlanetsMain.qml}{PlanetsMain.qml} of the + example renders the 3D content using the \c Scene3D type. + + \snippet planets-qml/PlanetsMain.qml 0 + + The planet related information is stored into a \c{ListModel}. The selection buttons for the + planets and the information sheet are created based on the model. The 2D elements, selection + buttons and sliders, are implemented in the \l{planets-qml/PlanetsMain.qml}{PlanetsMain.qml}. + + The selection buttons change the \c{focusedPlanet} property of the \c{mainview}. As the property + changes, the planet information is updated, and the camera is animated to the new position. + + \snippet planets-qml/PlanetsMain.qml 1 + + The camera position and the camera look at point are updated based on values that are animated + in the \l{planets-qml/SolarSystem.qml}{SolarSystem.qml}, triggered from the + \c{changePlanetFocus()} function. + + \snippet planets-qml/SolarSystem.qml 0 + + The sliders are used to adjust the rotation speed, the planet size, and the viewing distance. + When a slider value changes, a JavaScript function in \l{planets-qml/SolarSystem.qml} + {SolarSystem.qml} is called to adjust the given property. For example, changing the value of + the \e{Viewing Distance} slider calls the \c{changeCameraDistance()} method. + + \snippet planets-qml/PlanetsMain.qml 2 + + \section1 Qt 3D Implementation + + The main part of the implementation, including the movement and rotation maths for the planets, + is done in the \l{planets-qml/SolarSystem.qml}{SolarSystem.qml}. + + First, a \c Camera, a \c{Light}, and a \c Configuration are added, followed by \c{Effect}s for + the planet \c{Material}s, and finally the planets themselves. For example, Earth is constructed + as follows: + + \snippet planets-qml/SolarSystem.qml 1 + + Planet data, which is needed for the movement and rotation calculations, among other things, is + constructed with JavaScript in \l{planets-qml/planets.js}{planets.js} by calling + \c{loadPlanetData()} as the component completes. Other initializations, such as inserting the + planets into an array for easier handling, calculating the ring radii for Saturn and Uranus + rings, and setting the default scale, speed and camera offset, are done as well: + + \snippet planets-qml/SolarSystem.qml 2 + + The scene is animated by calling the \c{animate()} function. That is also the place where the + time is advanced, and the new positions for all of the planets are calculated. The planets are + rotated in the \c{positionPlanet()} function based on their axial tilt and their sidereal + rotation period. Finally, the new camera position is calculated in the \c{updateCamera()} + function. + + \snippet planets-qml/SolarSystem.qml 3 */ diff --git a/examples/qt3d/planets-qml/planets-qml.pro b/examples/qt3d/planets-qml/planets-qml.pro index f2ebf1f1b..7c27fc579 100644 --- a/examples/qt3d/planets-qml/planets-qml.pro +++ b/examples/qt3d/planets-qml/planets-qml.pro @@ -10,7 +10,9 @@ SOURCES += \ OTHER_FILES += \ *.qml \ planets.js \ - shaders\*.* + shaders/*.* \ + doc/src/*.* \ + doc/images/*.* RESOURCES += \ planets-qml.qrc \ -- cgit v1.2.3 From 5cc86303d61264d98b51c7130dd36f50131a67ee Mon Sep 17 00:00:00 2001 From: Mika Salmela Date: Tue, 23 Jun 2015 16:56:59 +0300 Subject: Add ES2 support to planets-qml example Change-Id: Ic5208d2149efbd03b82417ce3af17747375663f5 Reviewed-by: Miikka Heikkinen --- examples/qt3d/planets-qml/CloudEffectDS.qml | 69 ++++++++++++- examples/qt3d/planets-qml/Light.qml | 2 +- examples/qt3d/planets-qml/Planet.qml | 2 +- examples/qt3d/planets-qml/PlanetButton.qml | 3 +- examples/qt3d/planets-qml/PlanetEffectD.qml | 83 +++++++++++++++- examples/qt3d/planets-qml/PlanetEffectDB.qml | 83 +++++++++++++++- examples/qt3d/planets-qml/PlanetEffectDS.qml | 73 +++++++++++++- examples/qt3d/planets-qml/PlanetEffectDSB.qml | 73 +++++++++++++- examples/qt3d/planets-qml/PlanetFrameGraph.qml | 106 ++++++++++++++++++++ examples/qt3d/planets-qml/PlanetMaterial.qml | 26 ++--- examples/qt3d/planets-qml/PlanetsMain.qml | 8 +- examples/qt3d/planets-qml/Ring.qml | 2 +- examples/qt3d/planets-qml/ShadowMapFrameGraph.qml | 103 ------------------- examples/qt3d/planets-qml/SolarSystem.qml | 11 +-- .../qt3d/planets-qml/android/AndroidManifest.xml | 56 +++++++++++ .../planets-qml/android/res/drawable-hdpi/icon.png | Bin 0 -> 69493 bytes .../planets-qml/android/res/drawable-ldpi/icon.png | Bin 0 -> 69493 bytes .../planets-qml/android/res/drawable-mdpi/icon.png | Bin 0 -> 69493 bytes examples/qt3d/planets-qml/planets-qml.pro | 10 +- examples/qt3d/planets-qml/planets-qml.qrc | 24 +++-- examples/qt3d/planets-qml/shaders/es2/planetD.frag | 93 +++++++++++++++++ examples/qt3d/planets-qml/shaders/es2/planetD.vert | 69 +++++++++++++ .../qt3d/planets-qml/shaders/es2/planetDB.frag | 89 +++++++++++++++++ .../qt3d/planets-qml/shaders/es2/planetDB.vert | 94 ++++++++++++++++++ .../qt3d/planets-qml/shaders/es2/planetDS.frag | 94 ++++++++++++++++++ .../qt3d/planets-qml/shaders/es2/planetDSB.frag | 94 ++++++++++++++++++ examples/qt3d/planets-qml/shaders/gl3/planetD.frag | 105 ++++++++++++++++++++ examples/qt3d/planets-qml/shaders/gl3/planetD.vert | 71 +++++++++++++ .../qt3d/planets-qml/shaders/gl3/planetDB.frag | 107 ++++++++++++++++++++ .../qt3d/planets-qml/shaders/gl3/planetDB.vert | 96 ++++++++++++++++++ .../qt3d/planets-qml/shaders/gl3/planetDS.frag | 104 +++++++++++++++++++ .../qt3d/planets-qml/shaders/gl3/planetDSB.frag | 110 +++++++++++++++++++++ .../qt3d/planets-qml/shaders/gl3/shadowmap.frag | 41 ++++++++ .../qt3d/planets-qml/shaders/gl3/shadowmap.vert | 46 +++++++++ examples/qt3d/planets-qml/shaders/planetD.frag | 105 -------------------- examples/qt3d/planets-qml/shaders/planetD.vert | 71 ------------- examples/qt3d/planets-qml/shaders/planetDB.frag | 107 -------------------- examples/qt3d/planets-qml/shaders/planetDB.vert | 96 ------------------ examples/qt3d/planets-qml/shaders/planetDS.frag | 104 ------------------- examples/qt3d/planets-qml/shaders/planetDSB.frag | 110 --------------------- examples/qt3d/planets-qml/shaders/shadowmap.frag | 41 -------- examples/qt3d/planets-qml/shaders/shadowmap.vert | 46 --------- 42 files changed, 1778 insertions(+), 849 deletions(-) create mode 100644 examples/qt3d/planets-qml/PlanetFrameGraph.qml delete mode 100644 examples/qt3d/planets-qml/ShadowMapFrameGraph.qml create mode 100644 examples/qt3d/planets-qml/android/AndroidManifest.xml create mode 100644 examples/qt3d/planets-qml/android/res/drawable-hdpi/icon.png create mode 100644 examples/qt3d/planets-qml/android/res/drawable-ldpi/icon.png create mode 100644 examples/qt3d/planets-qml/android/res/drawable-mdpi/icon.png create mode 100644 examples/qt3d/planets-qml/shaders/es2/planetD.frag create mode 100644 examples/qt3d/planets-qml/shaders/es2/planetD.vert create mode 100644 examples/qt3d/planets-qml/shaders/es2/planetDB.frag create mode 100644 examples/qt3d/planets-qml/shaders/es2/planetDB.vert create mode 100644 examples/qt3d/planets-qml/shaders/es2/planetDS.frag create mode 100644 examples/qt3d/planets-qml/shaders/es2/planetDSB.frag create mode 100644 examples/qt3d/planets-qml/shaders/gl3/planetD.frag create mode 100644 examples/qt3d/planets-qml/shaders/gl3/planetD.vert create mode 100644 examples/qt3d/planets-qml/shaders/gl3/planetDB.frag create mode 100644 examples/qt3d/planets-qml/shaders/gl3/planetDB.vert create mode 100644 examples/qt3d/planets-qml/shaders/gl3/planetDS.frag create mode 100644 examples/qt3d/planets-qml/shaders/gl3/planetDSB.frag create mode 100644 examples/qt3d/planets-qml/shaders/gl3/shadowmap.frag create mode 100644 examples/qt3d/planets-qml/shaders/gl3/shadowmap.vert delete mode 100644 examples/qt3d/planets-qml/shaders/planetD.frag delete mode 100644 examples/qt3d/planets-qml/shaders/planetD.vert delete mode 100644 examples/qt3d/planets-qml/shaders/planetDB.frag delete mode 100644 examples/qt3d/planets-qml/shaders/planetDB.vert delete mode 100644 examples/qt3d/planets-qml/shaders/planetDS.frag delete mode 100644 examples/qt3d/planets-qml/shaders/planetDSB.frag delete mode 100644 examples/qt3d/planets-qml/shaders/shadowmap.frag delete mode 100644 examples/qt3d/planets-qml/shaders/shadowmap.vert diff --git a/examples/qt3d/planets-qml/CloudEffectDS.qml b/examples/qt3d/planets-qml/CloudEffectDS.qml index 3088f996a..ea043d22b 100644 --- a/examples/qt3d/planets-qml/CloudEffectDS.qml +++ b/examples/qt3d/planets-qml/CloudEffectDS.qml @@ -36,7 +36,7 @@ ****************************************************************************/ import Qt3D 2.0 -import Qt3D.Render 2.0 +import Qt3D.Renderer 2.0 Effect { id: root @@ -58,9 +58,72 @@ Effect { minorVersion: 2 } + annotations: [ Annotation { name: "name"; value: "Desktop" } ] + + renderPasses: [ + RenderPass { + annotations: [ Annotation { name : "pass"; value : "forward" } ] + bindings: [ + // Uniforms (those provided by the user) + ParameterMapping { + parameterName: "ambient"; + shaderVariableName: "ka"; + bindingType: ParameterMapping.Uniform + } + ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/gl3/planetD.vert") + fragmentShaderCode: loadSource("qrc:/shaders/gl3/planetDS.frag") + } + + // no special render state set => use the default set of states + } + ] + }, + Technique { + openGLFilter { + api: OpenGLFilter.Desktop + majorVersion: 2 + } + + annotations: [ Annotation { name: "name"; value: "ES2" } ] + renderPasses: [ RenderPass { annotations: [ Annotation { name : "pass"; value : "forward" } ] + + bindings: [ + // Uniforms (those provided by the user) + ParameterMapping { + parameterName: "ambient"; + shaderVariableName: "ka"; + bindingType: ParameterMapping.Uniform + } + ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/es2/planetD.vert") + fragmentShaderCode: loadSource("qrc:/shaders/es2/planetDS.frag") + } + + // no special render state set => use the default set of states + } + ] + }, + Technique { + openGLFilter { + api: OpenGLFilter.ES + majorVersion: 2 + minorVersion: 0 + } + + annotations: [ Annotation { name: "name"; value: "ES2" } ] + + renderPasses: [ + RenderPass { + annotations: [ Annotation { name : "pass"; value : "forward" } ] + bindings: [ // Uniforms (those provided by the user) ParameterMapping { @@ -71,8 +134,8 @@ Effect { ] shaderProgram: ShaderProgram { - vertexShaderCode: loadSource("qrc:/shaders/planetD.vert") - fragmentShaderCode: loadSource("qrc:/shaders/planetDS.frag") + vertexShaderCode: loadSource("qrc:/shaders/es2/planetD.vert") + fragmentShaderCode: loadSource("qrc:/shaders/es2/planetDS.frag") } // no special render state set => use the default set of states diff --git a/examples/qt3d/planets-qml/Light.qml b/examples/qt3d/planets-qml/Light.qml index ab63bf1e0..199d3f30a 100644 --- a/examples/qt3d/planets-qml/Light.qml +++ b/examples/qt3d/planets-qml/Light.qml @@ -36,7 +36,7 @@ ****************************************************************************/ import Qt3D 2.0 -import Qt3D.Render 2.0 +import Qt3D.Renderer 2.0 Entity { id: root diff --git a/examples/qt3d/planets-qml/Planet.qml b/examples/qt3d/planets-qml/Planet.qml index 005312b5d..4381ebdb1 100644 --- a/examples/qt3d/planets-qml/Planet.qml +++ b/examples/qt3d/planets-qml/Planet.qml @@ -34,7 +34,7 @@ ** ****************************************************************************/ -import Qt3D.Render 2.0 +import Qt3D.Renderer 2.0 SphereMesh { property real r: 0 diff --git a/examples/qt3d/planets-qml/PlanetButton.qml b/examples/qt3d/planets-qml/PlanetButton.qml index f68c70052..e530312dc 100644 --- a/examples/qt3d/planets-qml/PlanetButton.qml +++ b/examples/qt3d/planets-qml/PlanetButton.qml @@ -59,7 +59,8 @@ Rectangle { hoverEnabled: true onClicked: { planetSelector.focusedPlanet = focusPlanet } onEntered: PropertyAnimation { target: planetText; property: "opacity"; to: 1 } - onExited: PropertyAnimation { target: planetText; + onExited: PropertyAnimation { + target: planetText property: "opacity" to: { if (planetText.text != "Solar System") diff --git a/examples/qt3d/planets-qml/PlanetEffectD.qml b/examples/qt3d/planets-qml/PlanetEffectD.qml index 5d3f64f89..e5fcc8ae0 100644 --- a/examples/qt3d/planets-qml/PlanetEffectD.qml +++ b/examples/qt3d/planets-qml/PlanetEffectD.qml @@ -36,7 +36,7 @@ ****************************************************************************/ import Qt3D 2.0 -import Qt3D.Render 2.0 +import Qt3D.Renderer 2.0 Effect { id: root @@ -60,13 +60,15 @@ Effect { minorVersion: 2 } + annotations: [ Annotation { name: "name"; value: "Desktop" } ] + renderPasses: [ RenderPass { annotations: [ Annotation { name: "pass"; value: "shadowmap" } ] shaderProgram: ShaderProgram { - vertexShaderCode: loadSource("qrc:/shaders/shadowmap.vert") - fragmentShaderCode: loadSource("qrc:/shaders/shadowmap.frag") + vertexShaderCode: loadSource("qrc:/shaders/gl3/shadowmap.vert") + fragmentShaderCode: loadSource("qrc:/shaders/gl3/shadowmap.frag") } renderStates: [ @@ -92,8 +94,79 @@ Effect { ] shaderProgram: ShaderProgram { - vertexShaderCode: loadSource("qrc:/shaders/planetD.vert") - fragmentShaderCode: loadSource("qrc:/shaders/planetD.frag") + vertexShaderCode: loadSource("qrc:/shaders/gl3/planetD.vert") + fragmentShaderCode: loadSource("qrc:/shaders/gl3/planetD.frag") + } + + // no special render state set => use the default set of states + } + ] + }, + Technique { + openGLFilter { + api: OpenGLFilter.Desktop + majorVersion: 2 + } + + annotations: [ Annotation { name: "name"; value: "ES2" } ] + + renderPasses: [ + RenderPass { + annotations: [ Annotation { name : "pass"; value : "forward" } ] + + bindings: [ + // Uniforms (those provided by the user) + ParameterMapping { + parameterName: "ambient"; + shaderVariableName: "ka"; + bindingType: ParameterMapping.Uniform + }, + ParameterMapping { + parameterName: "specular"; + shaderVariableName: "ks"; + bindingType: ParameterMapping.Uniform + } + ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/es2/planetD.vert") + fragmentShaderCode: loadSource("qrc:/shaders/es2/planetD.frag") + } + + // no special render state set => use the default set of states + } + ] + }, + Technique { + openGLFilter { + api: OpenGLFilter.ES + majorVersion: 2 + minorVersion: 0 + } + + annotations: [ Annotation { name: "name"; value: "ES2" } ] + + renderPasses: [ + RenderPass { + annotations: [ Annotation { name : "pass"; value : "forward" } ] + + bindings: [ + // Uniforms (those provided by the user) + ParameterMapping { + parameterName: "ambient"; + shaderVariableName: "ka"; + bindingType: ParameterMapping.Uniform + }, + ParameterMapping { + parameterName: "specular"; + shaderVariableName: "ks"; + bindingType: ParameterMapping.Uniform + } + ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/es2/planetD.vert") + fragmentShaderCode: loadSource("qrc:/shaders/es2/planetD.frag") } // no special render state set => use the default set of states diff --git a/examples/qt3d/planets-qml/PlanetEffectDB.qml b/examples/qt3d/planets-qml/PlanetEffectDB.qml index a36cdf427..ad9d2035e 100644 --- a/examples/qt3d/planets-qml/PlanetEffectDB.qml +++ b/examples/qt3d/planets-qml/PlanetEffectDB.qml @@ -36,7 +36,7 @@ ****************************************************************************/ import Qt3D 2.0 -import Qt3D.Render 2.0 +import Qt3D.Renderer 2.0 Effect { id: root @@ -60,13 +60,15 @@ Effect { minorVersion: 2 } + annotations: [ Annotation { name: "name"; value: "Desktop" } ] + renderPasses: [ RenderPass { annotations: [ Annotation { name: "pass"; value: "shadowmap" } ] shaderProgram: ShaderProgram { - vertexShaderCode: loadSource("qrc:/shaders/shadowmap.vert") - fragmentShaderCode: loadSource("qrc:/shaders/shadowmap.frag") + vertexShaderCode: loadSource("qrc:/shaders/gl3/shadowmap.vert") + fragmentShaderCode: loadSource("qrc:/shaders/gl3/shadowmap.frag") } renderStates: [ @@ -92,8 +94,79 @@ Effect { ] shaderProgram: ShaderProgram { - vertexShaderCode: loadSource("qrc:/shaders/planetDB.vert") - fragmentShaderCode: loadSource("qrc:/shaders/planetDB.frag") + vertexShaderCode: loadSource("qrc:/shaders/gl3/planetDB.vert") + fragmentShaderCode: loadSource("qrc:/shaders/gl3/planetDB.frag") + } + + // no special render state set => use the default set of states + } + ] + }, + Technique { + openGLFilter { + api: OpenGLFilter.Desktop + majorVersion: 2 + } + + annotations: [ Annotation { name: "name"; value: "ES2" } ] + + renderPasses: [ + RenderPass { + annotations: [ Annotation { name : "pass"; value : "forward" } ] + + bindings: [ + // Uniforms (those provided by the user) + ParameterMapping { + parameterName: "ambient"; + shaderVariableName: "ka"; + bindingType: ParameterMapping.Uniform + }, + ParameterMapping { + parameterName: "specular"; + shaderVariableName: "ks"; + bindingType: ParameterMapping.Uniform + } + ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/es2/planetDB.vert") + fragmentShaderCode: loadSource("qrc:/shaders/es2/planetDB.frag") + } + + // no special render state set => use the default set of states + } + ] + }, + Technique { + openGLFilter { + api: OpenGLFilter.ES + majorVersion: 2 + minorVersion: 0 + } + + annotations: [ Annotation { name: "name"; value: "ES2" } ] + + renderPasses: [ + RenderPass { + annotations: [ Annotation { name : "pass"; value : "forward" } ] + + bindings: [ + // Uniforms (those provided by the user) + ParameterMapping { + parameterName: "ambient"; + shaderVariableName: "ka"; + bindingType: ParameterMapping.Uniform + }, + ParameterMapping { + parameterName: "specular"; + shaderVariableName: "ks"; + bindingType: ParameterMapping.Uniform + } + ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/es2/planetDB.vert") + fragmentShaderCode: loadSource("qrc:/shaders/es2/planetDB.frag") } // no special render state set => use the default set of states diff --git a/examples/qt3d/planets-qml/PlanetEffectDS.qml b/examples/qt3d/planets-qml/PlanetEffectDS.qml index 670fccc15..1d3512d86 100644 --- a/examples/qt3d/planets-qml/PlanetEffectDS.qml +++ b/examples/qt3d/planets-qml/PlanetEffectDS.qml @@ -36,7 +36,7 @@ ****************************************************************************/ import Qt3D 2.0 -import Qt3D.Render 2.0 +import Qt3D.Renderer 2.0 Effect { id: root @@ -60,13 +60,15 @@ Effect { minorVersion: 2 } + annotations: [ Annotation { name: "name"; value: "Desktop" } ] + renderPasses: [ RenderPass { annotations: [ Annotation { name: "pass"; value: "shadowmap" } ] shaderProgram: ShaderProgram { - vertexShaderCode: loadSource("qrc:/shaders/shadowmap.vert") - fragmentShaderCode: loadSource("qrc:/shaders/shadowmap.frag") + vertexShaderCode: loadSource("qrc:/shaders/gl3/shadowmap.vert") + fragmentShaderCode: loadSource("qrc:/shaders/gl3/shadowmap.frag") } renderStates: [ @@ -87,8 +89,69 @@ Effect { ] shaderProgram: ShaderProgram { - vertexShaderCode: loadSource("qrc:/shaders/planetD.vert") - fragmentShaderCode: loadSource("qrc:/shaders/planetDS.frag") + vertexShaderCode: loadSource("qrc:/shaders/gl3/planetD.vert") + fragmentShaderCode: loadSource("qrc:/shaders/gl3/planetDS.frag") + } + + // no special render state set => use the default set of states + } + ] + }, + Technique { + openGLFilter { + api: OpenGLFilter.Desktop + majorVersion: 2 + } + + annotations: [ Annotation { name: "name"; value: "ES2" } ] + + renderPasses: [ + RenderPass { + annotations: [ Annotation { name : "pass"; value : "forward" } ] + + bindings: [ + // Uniforms (those provided by the user) + ParameterMapping { + parameterName: "ambient"; + shaderVariableName: "ka"; + bindingType: ParameterMapping.Uniform + } + ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/es2/planetD.vert") + fragmentShaderCode: loadSource("qrc:/shaders/es2/planetDS.frag") + } + + // no special render state set => use the default set of states + } + ] + }, + Technique { + openGLFilter { + api: OpenGLFilter.ES + majorVersion: 2 + minorVersion: 0 + } + + annotations: [ Annotation { name: "name"; value: "ES2" } ] + + renderPasses: [ + RenderPass { + annotations: [ Annotation { name : "pass"; value : "forward" } ] + + bindings: [ + // Uniforms (those provided by the user) + ParameterMapping { + parameterName: "ambient"; + shaderVariableName: "ka"; + bindingType: ParameterMapping.Uniform + } + ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/es2/planetD.vert") + fragmentShaderCode: loadSource("qrc:/shaders/es2/planetDS.frag") } // no special render state set => use the default set of states diff --git a/examples/qt3d/planets-qml/PlanetEffectDSB.qml b/examples/qt3d/planets-qml/PlanetEffectDSB.qml index 1b035406a..78b00bd32 100644 --- a/examples/qt3d/planets-qml/PlanetEffectDSB.qml +++ b/examples/qt3d/planets-qml/PlanetEffectDSB.qml @@ -36,7 +36,7 @@ ****************************************************************************/ import Qt3D 2.0 -import Qt3D.Render 2.0 +import Qt3D.Renderer 2.0 Effect { id: root @@ -60,13 +60,15 @@ Effect { minorVersion: 2 } + annotations: [ Annotation { name: "name"; value: "Desktop" } ] + renderPasses: [ RenderPass { annotations: [ Annotation { name: "pass"; value: "shadowmap" } ] shaderProgram: ShaderProgram { - vertexShaderCode: loadSource("qrc:/shaders/shadowmap.vert") - fragmentShaderCode: loadSource("qrc:/shaders/shadowmap.frag") + vertexShaderCode: loadSource("qrc:/shaders/gl3/shadowmap.vert") + fragmentShaderCode: loadSource("qrc:/shaders/gl3/shadowmap.frag") } renderStates: [ @@ -87,8 +89,69 @@ Effect { ] shaderProgram: ShaderProgram { - vertexShaderCode: loadSource("qrc:/shaders/planetDB.vert") - fragmentShaderCode: loadSource("qrc:/shaders/planetDSB.frag") + vertexShaderCode: loadSource("qrc:/shaders/gl3/planetDB.vert") + fragmentShaderCode: loadSource("qrc:/shaders/gl3/planetDSB.frag") + } + + // no special render state set => use the default set of states + } + ] + }, + Technique { + openGLFilter { + api: OpenGLFilter.Desktop + majorVersion: 2 + } + + annotations: [ Annotation { name: "name"; value: "ES2" } ] + + renderPasses: [ + RenderPass { + annotations: [ Annotation { name : "pass"; value : "forward" } ] + + bindings: [ + // Uniforms (those provided by the user) + ParameterMapping { + parameterName: "ambient"; + shaderVariableName: "ka"; + bindingType: ParameterMapping.Uniform + } + ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/es2/planetDB.vert") + fragmentShaderCode: loadSource("qrc:/shaders/es2/planetDSB.frag") + } + + // no special render state set => use the default set of states + } + ] + }, + Technique { + openGLFilter { + api: OpenGLFilter.ES + majorVersion: 2 + minorVersion: 0 + } + + annotations: [ Annotation { name: "name"; value: "ES2" } ] + + renderPasses: [ + RenderPass { + annotations: [ Annotation { name : "pass"; value : "forward" } ] + + bindings: [ + // Uniforms (those provided by the user) + ParameterMapping { + parameterName: "ambient"; + shaderVariableName: "ka"; + bindingType: ParameterMapping.Uniform + } + ] + + shaderProgram: ShaderProgram { + vertexShaderCode: loadSource("qrc:/shaders/es2/planetDB.vert") + fragmentShaderCode: loadSource("qrc:/shaders/es2/planetDSB.frag") } // no special render state set => use the default set of states diff --git a/examples/qt3d/planets-qml/PlanetFrameGraph.qml b/examples/qt3d/planets-qml/PlanetFrameGraph.qml new file mode 100644 index 000000000..6034505d2 --- /dev/null +++ b/examples/qt3d/planets-qml/PlanetFrameGraph.qml @@ -0,0 +1,106 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt3D 2.0 +import Qt3D.Renderer 2.0 + +FrameGraph { + id: root + + property alias viewCamera: viewCameraSelector.camera + property alias lightCamera: lightCameraSelector.camera + readonly property Texture2D shadowTexture: depthTexture + + activeFrameGraph: Viewport { + rect: Qt.rect(0.0, 0.0, 1.0, 1.0) + clearColor: Qt.rgba(0.0, 0.0, 0.0, 1.0) + + TechniqueFilter { + requires: [ Annotation { name: "name"; value: "Desktop" } ] + + RenderPassFilter { + includes: [ Annotation { name: "pass"; value: "shadowmap" } ] + + RenderTargetSelector { + target: RenderTarget { + attachments: [ + RenderAttachment { + name: "depth" + type: RenderAttachment.DepthAttachment + texture: Texture2D { + id: depthTexture + width: mainview.width + height: mainview.height + format: Texture.D24 + generateMipMaps: false + magnificationFilter: Texture.Nearest + minificationFilter: Texture.Nearest + wrapMode { + x: WrapMode.ClampToEdge + y: WrapMode.ClampToEdge + } + comparisonFunction: Texture.CompareLessEqual + comparisonMode: Texture.CompareRefToTexture + } + } + ] + } + + ClearBuffer { + buffers: ClearBuffer.DepthBuffer + + CameraSelector { + id: lightCameraSelector + } + } + } + } + } + + RenderPassFilter { + includes: [ Annotation { name: "pass"; value: "forward" } ] + + ClearBuffer { + buffers: ClearBuffer.ColorDepthBuffer + + CameraSelector { + id: viewCameraSelector + } + } + } + } +} diff --git a/examples/qt3d/planets-qml/PlanetMaterial.qml b/examples/qt3d/planets-qml/PlanetMaterial.qml index 5fd259e45..e754394b0 100644 --- a/examples/qt3d/planets-qml/PlanetMaterial.qml +++ b/examples/qt3d/planets-qml/PlanetMaterial.qml @@ -36,7 +36,7 @@ ****************************************************************************/ import Qt3D 2.0 -import Qt3D.Render 2.0 +import Qt3D.Renderer 2.0 import QtQuick 2.1 Material { @@ -53,19 +53,19 @@ Material { parameters: [ Parameter { - name: "ambient"; + name: "ambient" value: Qt.vector3d(root.ambientLight.r, root.ambientLight.g, root.ambientLight.b) }, Parameter { - name: "diffuse"; + name: "diffuse" value: Qt.vector3d(root.diffuseColor.r, root.diffuseColor.g, root.diffuseColor.b) }, Parameter { - name: "specular"; + name: "specular" value: Qt.vector3d(root.specularColor.r, root.specularColor.g, root.specularColor.b) }, Parameter { - name: "shininess"; + name: "shininess" value: root.shininess }, Parameter { @@ -80,10 +80,11 @@ Material { } generateMipMaps: true maximumAnisotropy: 16.0 - TextureImage { id: diffuseTextureImage; } + TextureImage { id: diffuseTextureImage } } }, - Parameter { name: "specularTexture"; + Parameter { + name: "specularTexture" value: Texture2D { id: specularTexture minificationFilter: Texture.LinearMipMapLinear @@ -94,10 +95,11 @@ Material { } generateMipMaps: true maximumAnisotropy: 16.0 - TextureImage { id: specularTextureImage; } + TextureImage { id: specularTextureImage } } }, - Parameter { name: "normalTexture"; + Parameter { + name: "normalTexture" value: Texture2D { id: normalTexture minificationFilter: Texture.Linear @@ -107,15 +109,15 @@ Material { y: WrapMode.Repeat } maximumAnisotropy: 16.0 - TextureImage { id: normalTextureImage; } + TextureImage { id: normalTextureImage } } }, Parameter { - name: "texCoordScale"; + name: "texCoordScale" value: textureScale }, Parameter { - name: "opacity"; + name: "opacity" value: opacity } ] diff --git a/examples/qt3d/planets-qml/PlanetsMain.qml b/examples/qt3d/planets-qml/PlanetsMain.qml index 84705e696..f72c93715 100644 --- a/examples/qt3d/planets-qml/PlanetsMain.qml +++ b/examples/qt3d/planets-qml/PlanetsMain.qml @@ -55,7 +55,6 @@ Item { anchors.fill: parent anchors.margins: 10 focus: true - aspects: "input" SolarSystem { id: solarsystem } } @@ -64,18 +63,13 @@ Item { MouseArea { anchors.fill: parent acceptedButtons: Qt.LeftButton - onClicked: { - solarsystem.setFreeCamera(false) + onClicked: focusedPlanet = 100 - } - onDoubleClicked: - solarsystem.setFreeCamera(true) } } //! [1] onFocusedPlanetChanged: { - solarsystem.setFreeCamera(false) if (focusedPlanet == 100) { info.opacity = 0 updatePlanetInfo() diff --git a/examples/qt3d/planets-qml/Ring.qml b/examples/qt3d/planets-qml/Ring.qml index 7bf585805..1dcb59618 100644 --- a/examples/qt3d/planets-qml/Ring.qml +++ b/examples/qt3d/planets-qml/Ring.qml @@ -34,7 +34,7 @@ ** ****************************************************************************/ -import Qt3D.Render 2.0 +import Qt3D.Renderer 2.0 // TODO: Once support for meshes from arrays is implemented, replace ring.obj with that Mesh { diff --git a/examples/qt3d/planets-qml/ShadowMapFrameGraph.qml b/examples/qt3d/planets-qml/ShadowMapFrameGraph.qml deleted file mode 100644 index 8b52e42d4..000000000 --- a/examples/qt3d/planets-qml/ShadowMapFrameGraph.qml +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt3D 2.0 -import Qt3D.Render 2.0 -import QtQuick 2.2 as QQ2 - -FrameGraph { - id: root - - property alias viewCamera: viewCameraSelector.camera - property alias lightCamera: lightCameraSelector.camera - readonly property Texture2D shadowTexture: depthTexture - - activeFrameGraph: Viewport { - rect: Qt.rect(0.0, 0.0, 1.0, 1.0) - clearColor: Qt.rgba(0.0, 0.0, 0.0, 1.0) - - RenderPassFilter { - includes: [ Annotation { name: "pass"; value: "shadowmap" } ] - - RenderTargetSelector { - target: RenderTarget { - attachments: [ - RenderAttachment { - name: "depth" - type: RenderAttachment.DepthAttachment - texture: Texture2D { - id: depthTexture - width: mainview.width - height: mainview.height - format: Texture.DepthFormat - generateMipMaps: false - magnificationFilter: Texture.Linear - minificationFilter: Texture.Linear - wrapMode { - x: WrapMode.ClampToEdge - y: WrapMode.ClampToEdge - } - comparisonFunction: Texture.CompareLessEqual - comparisonMode: Texture.CompareRefToTexture - } - } - ] - } - - ClearBuffer { - buffers: ClearBuffer.DepthBuffer - - CameraSelector { - id: lightCameraSelector - } - } - } - } - - RenderPassFilter { - includes: [ Annotation { name: "pass"; value: "forward" } ] - - ClearBuffer { - buffers: ClearBuffer.ColorDepthBuffer - - CameraSelector { - id: viewCameraSelector - } - } - } - } -} diff --git a/examples/qt3d/planets-qml/SolarSystem.qml b/examples/qt3d/planets-qml/SolarSystem.qml index d34627735..515e2d8d7 100644 --- a/examples/qt3d/planets-qml/SolarSystem.qml +++ b/examples/qt3d/planets-qml/SolarSystem.qml @@ -35,7 +35,7 @@ ****************************************************************************/ import Qt3D 2.0 -import Qt3D.Render 2.0 +import Qt3D.Renderer 2.0 import QtQuick 2.0 as QQ2 import "planets.js" as Planets @@ -44,7 +44,6 @@ Entity { id: sceneRoot property bool ready: false - property bool freeCamera: false property real cameraNear: 0 property real xLookAtOffset: 0 @@ -120,7 +119,7 @@ Entity { } components: [ - ShadowMapFrameGraph { + PlanetFrameGraph { id: framegraph viewCamera: camera lightCamera: light.lightCamera @@ -231,10 +230,6 @@ Entity { checkScaling(focusedPlanet) } - function setFreeCamera(free) { - freeCamera = free - } - function setScale(value, focused) { // Save actual scale if (!focused) @@ -414,7 +409,7 @@ Entity { //! [3] function animate(focusedPlanet) { - if (!ready || freeCamera) + if (!ready) return advanceTime(focusedPlanet) diff --git a/examples/qt3d/planets-qml/android/AndroidManifest.xml b/examples/qt3d/planets-qml/android/AndroidManifest.xml new file mode 100644 index 000000000..0c768c546 --- /dev/null +++ b/examples/qt3d/planets-qml/android/AndroidManifest.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/qt3d/planets-qml/android/res/drawable-hdpi/icon.png b/examples/qt3d/planets-qml/android/res/drawable-hdpi/icon.png new file mode 100644 index 000000000..c62530326 Binary files /dev/null and b/examples/qt3d/planets-qml/android/res/drawable-hdpi/icon.png differ diff --git a/examples/qt3d/planets-qml/android/res/drawable-ldpi/icon.png b/examples/qt3d/planets-qml/android/res/drawable-ldpi/icon.png new file mode 100644 index 000000000..c62530326 Binary files /dev/null and b/examples/qt3d/planets-qml/android/res/drawable-ldpi/icon.png differ diff --git a/examples/qt3d/planets-qml/android/res/drawable-mdpi/icon.png b/examples/qt3d/planets-qml/android/res/drawable-mdpi/icon.png new file mode 100644 index 000000000..c62530326 Binary files /dev/null and b/examples/qt3d/planets-qml/android/res/drawable-mdpi/icon.png differ diff --git a/examples/qt3d/planets-qml/planets-qml.pro b/examples/qt3d/planets-qml/planets-qml.pro index 7c27fc579..58a8b30fd 100644 --- a/examples/qt3d/planets-qml/planets-qml.pro +++ b/examples/qt3d/planets-qml/planets-qml.pro @@ -2,7 +2,7 @@ error( "Couldn't find the examples.pri file!" ) } -QT += qml quick 3dinput +QT += qml quick SOURCES += \ main.cpp @@ -10,7 +10,8 @@ SOURCES += \ OTHER_FILES += \ *.qml \ planets.js \ - shaders/*.* \ + shaders/gl3/*.* \ + shaders/es2/*.* \ doc/src/*.* \ doc/images/*.* @@ -19,4 +20,7 @@ RESOURCES += \ planets-qml-images.qrc DISTFILES += \ - PlanetsMain.qml + PlanetsMain.qml \ + android/AndroidManifest.xml + +ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android diff --git a/examples/qt3d/planets-qml/planets-qml.qrc b/examples/qt3d/planets-qml/planets-qml.qrc index f8efcbd44..04a67b7d7 100644 --- a/examples/qt3d/planets-qml/planets-qml.qrc +++ b/examples/qt3d/planets-qml/planets-qml.qrc @@ -15,17 +15,23 @@ PlanetEffectDS.qml PlanetEffectDSB.qml PlanetMaterial.qml - ShadowMapFrameGraph.qml + PlanetFrameGraph.qml planets.js meshes/starfield.obj meshes/ring.obj - shaders/shadowmap.frag - shaders/shadowmap.vert - shaders/planetD.frag - shaders/planetD.vert - shaders/planetDB.frag - shaders/planetDB.vert - shaders/planetDS.frag - shaders/planetDSB.frag + shaders/gl3/shadowmap.frag + shaders/gl3/shadowmap.vert + shaders/gl3/planetD.frag + shaders/gl3/planetD.vert + shaders/gl3/planetDB.frag + shaders/gl3/planetDB.vert + shaders/gl3/planetDS.frag + shaders/gl3/planetDSB.frag + shaders/es2/planetD.frag + shaders/es2/planetD.vert + shaders/es2/planetDB.frag + shaders/es2/planetDB.vert + shaders/es2/planetDS.frag + shaders/es2/planetDSB.frag diff --git a/examples/qt3d/planets-qml/shaders/es2/planetD.frag b/examples/qt3d/planets-qml/shaders/es2/planetD.frag new file mode 100644 index 000000000..6df16b5b4 --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/es2/planetD.frag @@ -0,0 +1,93 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +uniform highp mat4 viewMatrix; + +uniform highp vec3 lightPosition; +uniform highp vec3 lightIntensity; + +uniform highp vec3 ka; // Ambient reflectivity +uniform highp vec3 ks; // Specular reflectivity +uniform highp float shininess; // Specular shininess factor +uniform highp float opacity; // Alpha channel + +uniform sampler2D diffuseTexture; + +varying highp vec4 positionInLightSpace; + +varying highp vec3 position; +varying highp vec3 normal; +varying highp vec2 texCoord; + +highp vec3 dModel(const highp vec2 flipYTexCoord) +{ + // Calculate the vector from the light to the fragment + highp vec3 s = normalize(vec3(viewMatrix * vec4(lightPosition, 1.0)) - position); + + // Calculate the vector from the fragment to the eye position + // (origin since this is in "eye" or "camera" space) + highp vec3 v = normalize(-position); + + // Reflect the light beam using the normal at this fragment + highp vec3 r = reflect(-s, normal); + + // Calculate the diffuse component + highp float diffuse = max(dot(s, normal), 0.0); + + // Calculate the specular component + highp float specular = 0.0; + if (dot(s, normal) > 0.0) + specular = (shininess / (8.0 * 3.14)) * pow(max(dot(r, v), 0.0), shininess); + + // Lookup diffuse and specular factors + highp vec3 diffuseColor = texture2D(diffuseTexture, flipYTexCoord).rgb; + + // Combine the ambient, diffuse and specular contributions + return lightIntensity * ((ka + diffuse) * diffuseColor + specular * ks); +} + +void main() +{ + highp vec2 flipYTexCoord = texCoord; + flipYTexCoord.y = 1.0 - texCoord.y; + + highp vec3 result = dModel(flipYTexCoord); + + highp float alpha = opacity * texture2D(diffuseTexture, flipYTexCoord).a; + + gl_FragColor = vec4(result, alpha); +} diff --git a/examples/qt3d/planets-qml/shaders/es2/planetD.vert b/examples/qt3d/planets-qml/shaders/es2/planetD.vert new file mode 100644 index 000000000..12f19768c --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/es2/planetD.vert @@ -0,0 +1,69 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +attribute vec3 vertexPosition; +attribute vec3 vertexNormal; +attribute vec2 vertexTexCoord; + +varying vec4 positionInLightSpace; +varying vec3 position; +varying vec3 normal; +varying vec2 texCoord; + +uniform mat4 lightViewProjection; +uniform mat4 modelMatrix; +uniform mat4 modelView; +uniform mat3 modelViewNormal; +uniform mat4 mvp; + +uniform float texCoordScale; + +void main() +{ + const mat4 shadowMatrix = mat4(0.5, 0.0, 0.0, 0.0, + 0.0, 0.5, 0.0, 0.0, + 0.0, 0.0, 0.5, 0.0, + 0.5, 0.5, 0.5, 1.0); + + positionInLightSpace = shadowMatrix * lightViewProjection * modelMatrix * vec4(vertexPosition, 1.0); + + texCoord = vertexTexCoord * texCoordScale; + normal = normalize(modelViewNormal * vertexNormal); + position = vec3(modelView * vec4(vertexPosition, 1.0)); + + gl_Position = mvp * vec4(vertexPosition, 1.0); +} diff --git a/examples/qt3d/planets-qml/shaders/es2/planetDB.frag b/examples/qt3d/planets-qml/shaders/es2/planetDB.frag new file mode 100644 index 000000000..0a2cc87ee --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/es2/planetDB.frag @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +uniform highp mat4 viewMatrix; + +uniform highp vec3 lightPosition; +uniform highp vec3 lightIntensity; + +uniform highp vec3 ka; // Ambient reflectivity +uniform highp vec3 ks; // Specular reflectivity +uniform highp float shininess; // Specular shininess factor +uniform highp float opacity; // Alpha channel + +uniform sampler2D diffuseTexture; +uniform sampler2D normalTexture; + +varying highp vec4 positionInLightSpace; + +varying highp vec3 lightDir; +varying highp vec3 viewDir; +varying highp vec2 texCoord; + +highp vec3 dbModel(const highp vec3 norm, const highp vec2 flipYTexCoord) +{ + // Reflection of light direction about normal + highp vec3 r = reflect(-lightDir, norm); + + highp vec3 diffuseColor = texture2D(diffuseTexture, flipYTexCoord).rgb; + + // Calculate the ambient contribution + highp vec3 ambient = lightIntensity * ka * diffuseColor; + + // Calculate the diffuse contribution + highp float sDotN = max(dot(lightDir, norm), 0.0); + highp vec3 diffuse = lightIntensity * diffuseColor * sDotN; + + // Calculate the specular highlight contribution + highp vec3 specular = vec3(0.0); + if (sDotN > 0.0) + specular = (lightIntensity * ks) * pow(max(dot(r, viewDir), 0.0), shininess); + + return ambient + diffuse + specular; +} + +void main() +{ + highp vec2 flipYTexCoord = texCoord; + flipYTexCoord.y = 1.0 - texCoord.y; + + highp vec4 normal = 2.0 * texture2D(normalTexture, flipYTexCoord) - vec4(1.0); + + highp vec3 result = dbModel(normalize(normal.xyz), flipYTexCoord); + + gl_FragColor = vec4(result, opacity); +} diff --git a/examples/qt3d/planets-qml/shaders/es2/planetDB.vert b/examples/qt3d/planets-qml/shaders/es2/planetDB.vert new file mode 100644 index 000000000..423e337c9 --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/es2/planetDB.vert @@ -0,0 +1,94 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +attribute vec3 vertexPosition; +attribute vec3 vertexNormal; +attribute vec2 vertexTexCoord; +attribute vec4 vertexTangent; + +varying vec4 positionInLightSpace; +varying vec3 lightDir; +varying vec3 viewDir; +varying vec2 texCoord; + +uniform mat4 viewMatrix; +uniform mat4 lightViewProjection; +uniform mat4 modelMatrix; +uniform mat4 modelView; +uniform mat3 modelViewNormal; +uniform mat4 mvp; + +uniform float texCoordScale; + +uniform vec3 lightPosition; + +void main() +{ + const mat4 shadowMatrix = mat4(0.5, 0.0, 0.0, 0.0, + 0.0, 0.5, 0.0, 0.0, + 0.0, 0.0, 0.5, 0.0, + 0.5, 0.5, 0.5, 1.0); + + positionInLightSpace = shadowMatrix * lightViewProjection * modelMatrix * vec4(vertexPosition, 1.0); + + // Pass through texture coordinates + texCoord = vertexTexCoord * texCoordScale; + + // Transform position, normal, and tangent to eye coords + vec3 normal = normalize(modelViewNormal * vertexNormal); + vec3 tangent = normalize(modelViewNormal * vertexTangent.xyz); + vec3 position = vec3(modelView * vec4(vertexPosition, 1.0)); + + // Calculate binormal vector + vec3 binormal = normalize(cross(normal, tangent)); + + // Construct matrix to transform from eye coords to tangent space + mat3 tangentMatrix = mat3 ( + tangent.x, binormal.x, normal.x, + tangent.y, binormal.y, normal.y, + tangent.z, binormal.z, normal.z); + + // Transform light direction and view direction to tangent space + vec3 s = lightPosition - position; + lightDir = normalize(tangentMatrix * vec3(viewMatrix * vec4(s, 1.0))); + + vec3 v = -position; + viewDir = normalize(tangentMatrix * v); + + // Calculate vertex position in clip coordinates + gl_Position = mvp * vec4(vertexPosition, 1.0); +} diff --git a/examples/qt3d/planets-qml/shaders/es2/planetDS.frag b/examples/qt3d/planets-qml/shaders/es2/planetDS.frag new file mode 100644 index 000000000..9b35ce10c --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/es2/planetDS.frag @@ -0,0 +1,94 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +uniform highp mat4 viewMatrix; + +uniform highp vec3 lightPosition; +uniform highp vec3 lightIntensity; + +uniform highp vec3 ka; // Ambient reflectivity +uniform highp float shininess; // Specular shininess factor +uniform highp float opacity; // Alpha channel + +uniform sampler2D diffuseTexture; +uniform sampler2D specularTexture; + +varying highp vec4 positionInLightSpace; + +varying highp vec3 position; +varying highp vec3 normal; +varying highp vec2 texCoord; + +highp vec3 dsModel(const highp vec2 flipYTexCoord) +{ + // Calculate the vector from the light to the fragment + highp vec3 s = normalize(vec3(viewMatrix * vec4(lightPosition, 1.0)) - position); + + // Calculate the vector from the fragment to the eye position + // (origin since this is in "eye" or "camera" space) + highp vec3 v = normalize(-position); + + // Reflect the light beam using the normal at this fragment + highp vec3 r = reflect(-s, normal); + + // Calculate the diffuse component + highp float diffuse = max(dot(s, normal), 0.0); + + // Calculate the specular component + highp float specular = 0.0; + if (dot(s, normal) > 0.0) + specular = (shininess / (8.0 * 3.14)) * pow(max(dot(r, v), 0.0), shininess); + + // Lookup diffuse and specular factors + highp vec3 diffuseColor = texture2D(diffuseTexture, flipYTexCoord).rgb; + highp vec3 specularColor = texture2D(specularTexture, flipYTexCoord).rgb; + + // Combine the ambient, diffuse and specular contributions + return lightIntensity * ((ka + diffuse) * diffuseColor + specular * specularColor); +} + +void main() +{ + highp vec2 flipYTexCoord = texCoord; + flipYTexCoord.y = 1.0 - texCoord.y; + + highp vec3 result = dsModel(flipYTexCoord); + + highp float alpha = opacity * texture2D(diffuseTexture, flipYTexCoord).a; + + gl_FragColor = vec4(result, alpha); +} diff --git a/examples/qt3d/planets-qml/shaders/es2/planetDSB.frag b/examples/qt3d/planets-qml/shaders/es2/planetDSB.frag new file mode 100644 index 000000000..cbbdae353 --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/es2/planetDSB.frag @@ -0,0 +1,94 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +uniform highp mat4 viewMatrix; + +uniform highp vec3 lightPosition; +uniform highp vec3 lightIntensity; + +uniform highp vec3 ka; // Ambient reflectivity +uniform highp float shininess; // Specular shininess factor +uniform highp float opacity; // Alpha channel + +uniform sampler2D diffuseTexture; +uniform sampler2D specularTexture; +uniform sampler2D normalTexture; + +varying highp vec4 positionInLightSpace; + +varying highp vec3 lightDir; +varying highp vec3 viewDir; +varying highp vec2 texCoord; + +highp vec3 dsbModel(const highp vec3 norm, const highp vec2 flipYTexCoord) +{ + // Reflection of light direction about normal + highp vec3 r = reflect(-lightDir, norm); + + highp vec3 diffuseColor = texture2D(diffuseTexture, flipYTexCoord).rgb; + highp vec3 specularColor = texture2D(specularTexture, flipYTexCoord).rgb; + + // Calculate the ambient contribution + highp vec3 ambient = lightIntensity * ka * diffuseColor; + + // Calculate the diffuse contribution + highp float sDotN = max(dot(lightDir, norm), 0.0); + highp vec3 diffuse = lightIntensity * diffuseColor * sDotN; + + // Calculate the specular highlight contribution + highp vec3 specular = vec3(0.0); + if (sDotN > 0.0) + specular = (lightIntensity * (shininess / (8.0 * 3.14))) * pow(max(dot(r, viewDir), 0.0), shininess); + + specular *= specularColor; + + return ambient + diffuse + specular; +} + +void main() +{ + highp vec2 flipYTexCoord = texCoord; + flipYTexCoord.y = 1.0 - texCoord.y; + + // Sample the textures at the interpolated texCoords + highp vec4 normal = 2.0 * texture2D(normalTexture, flipYTexCoord) - vec4(1.0); + + highp vec3 result = dsbModel(normalize(normal.xyz), flipYTexCoord); + + // Combine spec with ambient+diffuse for final fragment color + gl_FragColor = vec4(result, opacity); +} diff --git a/examples/qt3d/planets-qml/shaders/gl3/planetD.frag b/examples/qt3d/planets-qml/shaders/gl3/planetD.frag new file mode 100644 index 000000000..62d941d25 --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/gl3/planetD.frag @@ -0,0 +1,105 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#version 150 core + +uniform mat4 viewMatrix; + +uniform vec3 lightPosition; +uniform vec3 lightIntensity; + +uniform vec3 ka; // Ambient reflectivity +uniform vec3 ks; // Specular reflectivity +uniform float shininess; // Specular shininess factor +uniform float opacity; // Alpha channel + +uniform sampler2D diffuseTexture; + +uniform sampler2DShadow shadowMapTexture; + +in vec4 positionInLightSpace; + +in vec3 position; +in vec3 normal; +in vec2 texCoord; + +out vec4 fragColor; + +vec3 dModel(const in vec2 flipYTexCoord) +{ + // Calculate the vector from the light to the fragment + vec3 s = normalize(vec3(viewMatrix * vec4(lightPosition, 1.0)) - position); + + // Calculate the vector from the fragment to the eye position + // (origin since this is in "eye" or "camera" space) + vec3 v = normalize(-position); + + // Reflect the light beam using the normal at this fragment + vec3 r = reflect(-s, normal); + + // Calculate the diffuse component + float diffuse = max(dot(s, normal), 0.0); + + // Calculate the specular component + float specular = 0.0; + if (dot(s, normal) > 0.0) + specular = (shininess / (8.0 * 3.14)) * pow(max(dot(r, v), 0.0), shininess); + + // Lookup diffuse and specular factors + vec3 diffuseColor = texture(diffuseTexture, flipYTexCoord).rgb; + + // Combine the ambient, diffuse and specular contributions + return lightIntensity * ((ka + diffuse) * diffuseColor + specular * ks); +} + +void main() +{ + vec2 flipYTexCoord = texCoord; + flipYTexCoord.y = 1.0 - texCoord.y; + + float shadowMapSample = textureProj(shadowMapTexture, positionInLightSpace); + + vec3 ambient = lightIntensity * ka * texture(diffuseTexture, flipYTexCoord).rgb; + + vec3 result = ambient; + if (shadowMapSample > 0) + result = dModel(flipYTexCoord); + + float alpha = opacity * texture(diffuseTexture, flipYTexCoord).a; + + fragColor = vec4(result, alpha); +} diff --git a/examples/qt3d/planets-qml/shaders/gl3/planetD.vert b/examples/qt3d/planets-qml/shaders/gl3/planetD.vert new file mode 100644 index 000000000..41a1db6e4 --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/gl3/planetD.vert @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#version 150 core + +in vec3 vertexPosition; +in vec3 vertexNormal; +in vec2 vertexTexCoord; + +out vec4 positionInLightSpace; +out vec3 position; +out vec3 normal; +out vec2 texCoord; + +uniform mat4 lightViewProjection; +uniform mat4 modelMatrix; +uniform mat4 modelView; +uniform mat3 modelViewNormal; +uniform mat4 mvp; + +uniform float texCoordScale; + +void main() +{ + const mat4 shadowMatrix = mat4(0.5, 0.0, 0.0, 0.0, + 0.0, 0.5, 0.0, 0.0, + 0.0, 0.0, 0.5, 0.0, + 0.5, 0.5, 0.5, 1.0); + + positionInLightSpace = shadowMatrix * lightViewProjection * modelMatrix * vec4(vertexPosition, 1.0); + + texCoord = vertexTexCoord * texCoordScale; + normal = normalize(modelViewNormal * vertexNormal); + position = vec3(modelView * vec4(vertexPosition, 1.0)); + + gl_Position = mvp * vec4(vertexPosition, 1.0); +} diff --git a/examples/qt3d/planets-qml/shaders/gl3/planetDB.frag b/examples/qt3d/planets-qml/shaders/gl3/planetDB.frag new file mode 100644 index 000000000..bf53a127b --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/gl3/planetDB.frag @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#version 150 core + +uniform mat4 viewMatrix; + +uniform vec3 lightPosition; +uniform vec3 lightIntensity; + +uniform vec3 ka; // Ambient reflectivity +uniform vec3 ks; // Specular reflectivity +uniform float shininess; // Specular shininess factor +uniform float opacity; // Alpha channel + +uniform sampler2D diffuseTexture; +uniform sampler2D normalTexture; + +uniform sampler2DShadow shadowMapTexture; + +in vec4 positionInLightSpace; + +in vec3 lightDir; +in vec3 viewDir; +in vec2 texCoord; + +out vec4 fragColor; + +void dbModel(const in vec3 norm, const in vec2 flipYTexCoord, out vec3 ambientAndDiff, out vec3 spec) +{ + // Reflection of light direction about normal + vec3 r = reflect(-lightDir, norm); + + vec3 diffuseColor = texture(diffuseTexture, flipYTexCoord).rgb; + + // Calculate the ambient contribution + vec3 ambient = lightIntensity * ka * diffuseColor; + + // Calculate the diffuse contribution + float sDotN = max(dot(lightDir, norm), 0.0); + vec3 diffuse = lightIntensity * diffuseColor * sDotN; + + // Sum the ambient and diffuse contributions + ambientAndDiff = ambient + diffuse; + + // Calculate the specular highlight contribution + spec = vec3(0.0); + if (sDotN > 0.0) + spec = (lightIntensity * ks) * pow(max(dot(r, viewDir), 0.0), shininess); +} + +void main() +{ + vec2 flipYTexCoord = texCoord; + flipYTexCoord.y = 1.0 - texCoord.y; + + float shadowMapSample = textureProj(shadowMapTexture, positionInLightSpace); + + // Sample the textures at the interpolated texCoords + vec4 normal = 2.0 * texture(normalTexture, flipYTexCoord) - vec4(1.0); + + vec3 result = lightIntensity * ka * texture(diffuseTexture, flipYTexCoord).rgb; + + // Calculate the lighting model, keeping the specular component separate + vec3 ambientAndDiff, spec; + if (shadowMapSample > 0) { + dbModel(normalize(normal.xyz), flipYTexCoord, ambientAndDiff, spec); + result = ambientAndDiff + spec; + } + + // Combine spec with ambient+diffuse for final fragment color + fragColor = vec4(result, opacity); +} diff --git a/examples/qt3d/planets-qml/shaders/gl3/planetDB.vert b/examples/qt3d/planets-qml/shaders/gl3/planetDB.vert new file mode 100644 index 000000000..e30394aa3 --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/gl3/planetDB.vert @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#version 150 core + +in vec3 vertexPosition; +in vec3 vertexNormal; +in vec2 vertexTexCoord; +in vec4 vertexTangent; + +out vec4 positionInLightSpace; +out vec3 lightDir; +out vec3 viewDir; +out vec2 texCoord; + +uniform mat4 viewMatrix; +uniform mat4 lightViewProjection; +uniform mat4 modelMatrix; +uniform mat4 modelView; +uniform mat3 modelViewNormal; +uniform mat4 mvp; + +uniform float texCoordScale; + +uniform vec3 lightPosition; + +void main() +{ + const mat4 shadowMatrix = mat4(0.5, 0.0, 0.0, 0.0, + 0.0, 0.5, 0.0, 0.0, + 0.0, 0.0, 0.5, 0.0, + 0.5, 0.5, 0.5, 1.0); + + positionInLightSpace = shadowMatrix * lightViewProjection * modelMatrix * vec4(vertexPosition, 1.0); + + // Pass through texture coordinates + texCoord = vertexTexCoord * texCoordScale; + + // Transform position, normal, and tangent to eye coords + vec3 normal = normalize(modelViewNormal * vertexNormal); + vec3 tangent = normalize(modelViewNormal * vertexTangent.xyz); + vec3 position = vec3(modelView * vec4(vertexPosition, 1.0)); + + // Calculate binormal vector + vec3 binormal = normalize(cross(normal, tangent)); + + // Construct matrix to transform from eye coords to tangent space + mat3 tangentMatrix = mat3 ( + tangent.x, binormal.x, normal.x, + tangent.y, binormal.y, normal.y, + tangent.z, binormal.z, normal.z); + + // Transform light direction and view direction to tangent space + vec3 s = lightPosition - position; + lightDir = normalize(tangentMatrix * vec3(viewMatrix * vec4(s, 1.0))); + + vec3 v = -position; + viewDir = normalize(tangentMatrix * v); + + // Calculate vertex position in clip coordinates + gl_Position = mvp * vec4(vertexPosition, 1.0); +} diff --git a/examples/qt3d/planets-qml/shaders/gl3/planetDS.frag b/examples/qt3d/planets-qml/shaders/gl3/planetDS.frag new file mode 100644 index 000000000..2a1b78bfa --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/gl3/planetDS.frag @@ -0,0 +1,104 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#version 150 core + +uniform mat4 viewMatrix; + +uniform vec3 lightPosition; +uniform vec3 lightIntensity; + +uniform vec3 ka; // Ambient reflectivity +uniform float shininess; // Specular shininess factor +uniform float opacity; // Alpha channel + +uniform sampler2D diffuseTexture; +uniform sampler2D specularTexture; + +uniform sampler2DShadow shadowMapTexture; + +in vec4 positionInLightSpace; + +in vec3 position; +in vec3 normal; +in vec2 texCoord; + +out vec4 fragColor; + +vec3 dsModel(const in vec2 flipYTexCoord) +{ + // Calculate the vector from the light to the fragment + vec3 s = normalize(vec3(viewMatrix * vec4(lightPosition, 1.0)) - position); + + // Calculate the vector from the fragment to the eye position + // (origin since this is in "eye" or "camera" space) + vec3 v = normalize(-position); + + // Reflect the light beam using the normal at this fragment + vec3 r = reflect(-s, normal); + + // Calculate the diffuse component + float diffuse = max(dot(s, normal), 0.0); + + // Calculate the specular component + float specular = 0.0; + if (dot(s, normal) > 0.0) + specular = (shininess / (8.0 * 3.14)) * pow(max(dot(r, v), 0.0), shininess); + + // Lookup diffuse and specular factors + vec3 diffuseColor = texture(diffuseTexture, flipYTexCoord).rgb; + vec3 specularColor = texture(specularTexture, flipYTexCoord).rgb; + + // Combine the ambient, diffuse and specular contributions + return lightIntensity * ((ka + diffuse) * diffuseColor + specular * specularColor); +} + +void main() +{ + vec2 flipYTexCoord = texCoord; + flipYTexCoord.y = 1.0 - texCoord.y; + + float shadowMapSample = textureProj(shadowMapTexture, positionInLightSpace); + + vec3 ambient = lightIntensity * ka * texture(diffuseTexture, flipYTexCoord).rgb; + + vec3 result = ambient; + if (shadowMapSample > 0) + result = dsModel(flipYTexCoord); + + fragColor = vec4(result, opacity * texture(diffuseTexture, flipYTexCoord).a); +} diff --git a/examples/qt3d/planets-qml/shaders/gl3/planetDSB.frag b/examples/qt3d/planets-qml/shaders/gl3/planetDSB.frag new file mode 100644 index 000000000..deb9565d4 --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/gl3/planetDSB.frag @@ -0,0 +1,110 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#version 150 core + +uniform mat4 viewMatrix; + +uniform vec3 lightPosition; +uniform vec3 lightIntensity; + +uniform vec3 ka; // Ambient reflectivity +uniform float shininess; // Specular shininess factor +uniform float opacity; // Alpha channel + +uniform sampler2D diffuseTexture; +uniform sampler2D specularTexture; +uniform sampler2D normalTexture; + +uniform sampler2DShadow shadowMapTexture; + +in vec4 positionInLightSpace; + +in vec3 lightDir; +in vec3 viewDir; +in vec2 texCoord; + +out vec4 fragColor; + +void dsbModel(const in vec3 norm, const in vec2 flipYTexCoord, out vec3 ambientAndDiff, out vec3 spec) +{ + // Reflection of light direction about normal + vec3 r = reflect(-lightDir, norm); + + vec3 diffuseColor = texture(diffuseTexture, flipYTexCoord).rgb; + vec3 specularColor = texture(specularTexture, flipYTexCoord).rgb; + + // Calculate the ambient contribution + vec3 ambient = lightIntensity * ka * diffuseColor; + + // Calculate the diffuse contribution + float sDotN = max(dot(lightDir, norm), 0.0); + vec3 diffuse = lightIntensity * diffuseColor * sDotN; + + // Sum the ambient and diffuse contributions + ambientAndDiff = ambient + diffuse; + + // Calculate the specular highlight contribution + spec = vec3(0.0); + if (sDotN > 0.0) + spec = (lightIntensity * (shininess / (8.0 * 3.14))) * pow(max(dot(r, viewDir), 0.0), shininess); + + spec *= specularColor; +} + +void main() +{ + vec2 flipYTexCoord = texCoord; + flipYTexCoord.y = 1.0 - texCoord.y; + + float shadowMapSample = textureProj(shadowMapTexture, positionInLightSpace); + + // Sample the textures at the interpolated texCoords + vec4 normal = 2.0 * texture(normalTexture, flipYTexCoord) - vec4(1.0); + + vec3 result = lightIntensity * ka * texture(diffuseTexture, flipYTexCoord).rgb; + + // Calculate the lighting model, keeping the specular component separate + vec3 ambientAndDiff, spec; + if (shadowMapSample > 0) { + dsbModel(normalize(normal.xyz), flipYTexCoord, ambientAndDiff, spec); + result = ambientAndDiff + spec; + } + + // Combine spec with ambient+diffuse for final fragment color + fragColor = vec4(result, opacity); +} diff --git a/examples/qt3d/planets-qml/shaders/gl3/shadowmap.frag b/examples/qt3d/planets-qml/shaders/gl3/shadowmap.frag new file mode 100644 index 000000000..63f203da6 --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/gl3/shadowmap.frag @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#version 150 core + +void main() +{ +} diff --git a/examples/qt3d/planets-qml/shaders/gl3/shadowmap.vert b/examples/qt3d/planets-qml/shaders/gl3/shadowmap.vert new file mode 100644 index 000000000..ca93360c6 --- /dev/null +++ b/examples/qt3d/planets-qml/shaders/gl3/shadowmap.vert @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#version 150 core + +in vec3 vertexPosition; + +uniform mat4 mvp; + +void main() +{ + gl_Position = mvp * vec4(vertexPosition, 1.0); +} diff --git a/examples/qt3d/planets-qml/shaders/planetD.frag b/examples/qt3d/planets-qml/shaders/planetD.frag deleted file mode 100644 index 62d941d25..000000000 --- a/examples/qt3d/planets-qml/shaders/planetD.frag +++ /dev/null @@ -1,105 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#version 150 core - -uniform mat4 viewMatrix; - -uniform vec3 lightPosition; -uniform vec3 lightIntensity; - -uniform vec3 ka; // Ambient reflectivity -uniform vec3 ks; // Specular reflectivity -uniform float shininess; // Specular shininess factor -uniform float opacity; // Alpha channel - -uniform sampler2D diffuseTexture; - -uniform sampler2DShadow shadowMapTexture; - -in vec4 positionInLightSpace; - -in vec3 position; -in vec3 normal; -in vec2 texCoord; - -out vec4 fragColor; - -vec3 dModel(const in vec2 flipYTexCoord) -{ - // Calculate the vector from the light to the fragment - vec3 s = normalize(vec3(viewMatrix * vec4(lightPosition, 1.0)) - position); - - // Calculate the vector from the fragment to the eye position - // (origin since this is in "eye" or "camera" space) - vec3 v = normalize(-position); - - // Reflect the light beam using the normal at this fragment - vec3 r = reflect(-s, normal); - - // Calculate the diffuse component - float diffuse = max(dot(s, normal), 0.0); - - // Calculate the specular component - float specular = 0.0; - if (dot(s, normal) > 0.0) - specular = (shininess / (8.0 * 3.14)) * pow(max(dot(r, v), 0.0), shininess); - - // Lookup diffuse and specular factors - vec3 diffuseColor = texture(diffuseTexture, flipYTexCoord).rgb; - - // Combine the ambient, diffuse and specular contributions - return lightIntensity * ((ka + diffuse) * diffuseColor + specular * ks); -} - -void main() -{ - vec2 flipYTexCoord = texCoord; - flipYTexCoord.y = 1.0 - texCoord.y; - - float shadowMapSample = textureProj(shadowMapTexture, positionInLightSpace); - - vec3 ambient = lightIntensity * ka * texture(diffuseTexture, flipYTexCoord).rgb; - - vec3 result = ambient; - if (shadowMapSample > 0) - result = dModel(flipYTexCoord); - - float alpha = opacity * texture(diffuseTexture, flipYTexCoord).a; - - fragColor = vec4(result, alpha); -} diff --git a/examples/qt3d/planets-qml/shaders/planetD.vert b/examples/qt3d/planets-qml/shaders/planetD.vert deleted file mode 100644 index 41a1db6e4..000000000 --- a/examples/qt3d/planets-qml/shaders/planetD.vert +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#version 150 core - -in vec3 vertexPosition; -in vec3 vertexNormal; -in vec2 vertexTexCoord; - -out vec4 positionInLightSpace; -out vec3 position; -out vec3 normal; -out vec2 texCoord; - -uniform mat4 lightViewProjection; -uniform mat4 modelMatrix; -uniform mat4 modelView; -uniform mat3 modelViewNormal; -uniform mat4 mvp; - -uniform float texCoordScale; - -void main() -{ - const mat4 shadowMatrix = mat4(0.5, 0.0, 0.0, 0.0, - 0.0, 0.5, 0.0, 0.0, - 0.0, 0.0, 0.5, 0.0, - 0.5, 0.5, 0.5, 1.0); - - positionInLightSpace = shadowMatrix * lightViewProjection * modelMatrix * vec4(vertexPosition, 1.0); - - texCoord = vertexTexCoord * texCoordScale; - normal = normalize(modelViewNormal * vertexNormal); - position = vec3(modelView * vec4(vertexPosition, 1.0)); - - gl_Position = mvp * vec4(vertexPosition, 1.0); -} diff --git a/examples/qt3d/planets-qml/shaders/planetDB.frag b/examples/qt3d/planets-qml/shaders/planetDB.frag deleted file mode 100644 index bf53a127b..000000000 --- a/examples/qt3d/planets-qml/shaders/planetDB.frag +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#version 150 core - -uniform mat4 viewMatrix; - -uniform vec3 lightPosition; -uniform vec3 lightIntensity; - -uniform vec3 ka; // Ambient reflectivity -uniform vec3 ks; // Specular reflectivity -uniform float shininess; // Specular shininess factor -uniform float opacity; // Alpha channel - -uniform sampler2D diffuseTexture; -uniform sampler2D normalTexture; - -uniform sampler2DShadow shadowMapTexture; - -in vec4 positionInLightSpace; - -in vec3 lightDir; -in vec3 viewDir; -in vec2 texCoord; - -out vec4 fragColor; - -void dbModel(const in vec3 norm, const in vec2 flipYTexCoord, out vec3 ambientAndDiff, out vec3 spec) -{ - // Reflection of light direction about normal - vec3 r = reflect(-lightDir, norm); - - vec3 diffuseColor = texture(diffuseTexture, flipYTexCoord).rgb; - - // Calculate the ambient contribution - vec3 ambient = lightIntensity * ka * diffuseColor; - - // Calculate the diffuse contribution - float sDotN = max(dot(lightDir, norm), 0.0); - vec3 diffuse = lightIntensity * diffuseColor * sDotN; - - // Sum the ambient and diffuse contributions - ambientAndDiff = ambient + diffuse; - - // Calculate the specular highlight contribution - spec = vec3(0.0); - if (sDotN > 0.0) - spec = (lightIntensity * ks) * pow(max(dot(r, viewDir), 0.0), shininess); -} - -void main() -{ - vec2 flipYTexCoord = texCoord; - flipYTexCoord.y = 1.0 - texCoord.y; - - float shadowMapSample = textureProj(shadowMapTexture, positionInLightSpace); - - // Sample the textures at the interpolated texCoords - vec4 normal = 2.0 * texture(normalTexture, flipYTexCoord) - vec4(1.0); - - vec3 result = lightIntensity * ka * texture(diffuseTexture, flipYTexCoord).rgb; - - // Calculate the lighting model, keeping the specular component separate - vec3 ambientAndDiff, spec; - if (shadowMapSample > 0) { - dbModel(normalize(normal.xyz), flipYTexCoord, ambientAndDiff, spec); - result = ambientAndDiff + spec; - } - - // Combine spec with ambient+diffuse for final fragment color - fragColor = vec4(result, opacity); -} diff --git a/examples/qt3d/planets-qml/shaders/planetDB.vert b/examples/qt3d/planets-qml/shaders/planetDB.vert deleted file mode 100644 index e30394aa3..000000000 --- a/examples/qt3d/planets-qml/shaders/planetDB.vert +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#version 150 core - -in vec3 vertexPosition; -in vec3 vertexNormal; -in vec2 vertexTexCoord; -in vec4 vertexTangent; - -out vec4 positionInLightSpace; -out vec3 lightDir; -out vec3 viewDir; -out vec2 texCoord; - -uniform mat4 viewMatrix; -uniform mat4 lightViewProjection; -uniform mat4 modelMatrix; -uniform mat4 modelView; -uniform mat3 modelViewNormal; -uniform mat4 mvp; - -uniform float texCoordScale; - -uniform vec3 lightPosition; - -void main() -{ - const mat4 shadowMatrix = mat4(0.5, 0.0, 0.0, 0.0, - 0.0, 0.5, 0.0, 0.0, - 0.0, 0.0, 0.5, 0.0, - 0.5, 0.5, 0.5, 1.0); - - positionInLightSpace = shadowMatrix * lightViewProjection * modelMatrix * vec4(vertexPosition, 1.0); - - // Pass through texture coordinates - texCoord = vertexTexCoord * texCoordScale; - - // Transform position, normal, and tangent to eye coords - vec3 normal = normalize(modelViewNormal * vertexNormal); - vec3 tangent = normalize(modelViewNormal * vertexTangent.xyz); - vec3 position = vec3(modelView * vec4(vertexPosition, 1.0)); - - // Calculate binormal vector - vec3 binormal = normalize(cross(normal, tangent)); - - // Construct matrix to transform from eye coords to tangent space - mat3 tangentMatrix = mat3 ( - tangent.x, binormal.x, normal.x, - tangent.y, binormal.y, normal.y, - tangent.z, binormal.z, normal.z); - - // Transform light direction and view direction to tangent space - vec3 s = lightPosition - position; - lightDir = normalize(tangentMatrix * vec3(viewMatrix * vec4(s, 1.0))); - - vec3 v = -position; - viewDir = normalize(tangentMatrix * v); - - // Calculate vertex position in clip coordinates - gl_Position = mvp * vec4(vertexPosition, 1.0); -} diff --git a/examples/qt3d/planets-qml/shaders/planetDS.frag b/examples/qt3d/planets-qml/shaders/planetDS.frag deleted file mode 100644 index 2a1b78bfa..000000000 --- a/examples/qt3d/planets-qml/shaders/planetDS.frag +++ /dev/null @@ -1,104 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#version 150 core - -uniform mat4 viewMatrix; - -uniform vec3 lightPosition; -uniform vec3 lightIntensity; - -uniform vec3 ka; // Ambient reflectivity -uniform float shininess; // Specular shininess factor -uniform float opacity; // Alpha channel - -uniform sampler2D diffuseTexture; -uniform sampler2D specularTexture; - -uniform sampler2DShadow shadowMapTexture; - -in vec4 positionInLightSpace; - -in vec3 position; -in vec3 normal; -in vec2 texCoord; - -out vec4 fragColor; - -vec3 dsModel(const in vec2 flipYTexCoord) -{ - // Calculate the vector from the light to the fragment - vec3 s = normalize(vec3(viewMatrix * vec4(lightPosition, 1.0)) - position); - - // Calculate the vector from the fragment to the eye position - // (origin since this is in "eye" or "camera" space) - vec3 v = normalize(-position); - - // Reflect the light beam using the normal at this fragment - vec3 r = reflect(-s, normal); - - // Calculate the diffuse component - float diffuse = max(dot(s, normal), 0.0); - - // Calculate the specular component - float specular = 0.0; - if (dot(s, normal) > 0.0) - specular = (shininess / (8.0 * 3.14)) * pow(max(dot(r, v), 0.0), shininess); - - // Lookup diffuse and specular factors - vec3 diffuseColor = texture(diffuseTexture, flipYTexCoord).rgb; - vec3 specularColor = texture(specularTexture, flipYTexCoord).rgb; - - // Combine the ambient, diffuse and specular contributions - return lightIntensity * ((ka + diffuse) * diffuseColor + specular * specularColor); -} - -void main() -{ - vec2 flipYTexCoord = texCoord; - flipYTexCoord.y = 1.0 - texCoord.y; - - float shadowMapSample = textureProj(shadowMapTexture, positionInLightSpace); - - vec3 ambient = lightIntensity * ka * texture(diffuseTexture, flipYTexCoord).rgb; - - vec3 result = ambient; - if (shadowMapSample > 0) - result = dsModel(flipYTexCoord); - - fragColor = vec4(result, opacity * texture(diffuseTexture, flipYTexCoord).a); -} diff --git a/examples/qt3d/planets-qml/shaders/planetDSB.frag b/examples/qt3d/planets-qml/shaders/planetDSB.frag deleted file mode 100644 index deb9565d4..000000000 --- a/examples/qt3d/planets-qml/shaders/planetDSB.frag +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#version 150 core - -uniform mat4 viewMatrix; - -uniform vec3 lightPosition; -uniform vec3 lightIntensity; - -uniform vec3 ka; // Ambient reflectivity -uniform float shininess; // Specular shininess factor -uniform float opacity; // Alpha channel - -uniform sampler2D diffuseTexture; -uniform sampler2D specularTexture; -uniform sampler2D normalTexture; - -uniform sampler2DShadow shadowMapTexture; - -in vec4 positionInLightSpace; - -in vec3 lightDir; -in vec3 viewDir; -in vec2 texCoord; - -out vec4 fragColor; - -void dsbModel(const in vec3 norm, const in vec2 flipYTexCoord, out vec3 ambientAndDiff, out vec3 spec) -{ - // Reflection of light direction about normal - vec3 r = reflect(-lightDir, norm); - - vec3 diffuseColor = texture(diffuseTexture, flipYTexCoord).rgb; - vec3 specularColor = texture(specularTexture, flipYTexCoord).rgb; - - // Calculate the ambient contribution - vec3 ambient = lightIntensity * ka * diffuseColor; - - // Calculate the diffuse contribution - float sDotN = max(dot(lightDir, norm), 0.0); - vec3 diffuse = lightIntensity * diffuseColor * sDotN; - - // Sum the ambient and diffuse contributions - ambientAndDiff = ambient + diffuse; - - // Calculate the specular highlight contribution - spec = vec3(0.0); - if (sDotN > 0.0) - spec = (lightIntensity * (shininess / (8.0 * 3.14))) * pow(max(dot(r, viewDir), 0.0), shininess); - - spec *= specularColor; -} - -void main() -{ - vec2 flipYTexCoord = texCoord; - flipYTexCoord.y = 1.0 - texCoord.y; - - float shadowMapSample = textureProj(shadowMapTexture, positionInLightSpace); - - // Sample the textures at the interpolated texCoords - vec4 normal = 2.0 * texture(normalTexture, flipYTexCoord) - vec4(1.0); - - vec3 result = lightIntensity * ka * texture(diffuseTexture, flipYTexCoord).rgb; - - // Calculate the lighting model, keeping the specular component separate - vec3 ambientAndDiff, spec; - if (shadowMapSample > 0) { - dsbModel(normalize(normal.xyz), flipYTexCoord, ambientAndDiff, spec); - result = ambientAndDiff + spec; - } - - // Combine spec with ambient+diffuse for final fragment color - fragColor = vec4(result, opacity); -} diff --git a/examples/qt3d/planets-qml/shaders/shadowmap.frag b/examples/qt3d/planets-qml/shaders/shadowmap.frag deleted file mode 100644 index 63f203da6..000000000 --- a/examples/qt3d/planets-qml/shaders/shadowmap.frag +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#version 150 core - -void main() -{ -} diff --git a/examples/qt3d/planets-qml/shaders/shadowmap.vert b/examples/qt3d/planets-qml/shaders/shadowmap.vert deleted file mode 100644 index ca93360c6..000000000 --- a/examples/qt3d/planets-qml/shaders/shadowmap.vert +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#version 150 core - -in vec3 vertexPosition; - -uniform mat4 mvp; - -void main() -{ - gl_Position = mvp * vec4(vertexPosition, 1.0); -} -- cgit v1.2.3 From 759784ec34ff2be08e9858ca5e17baf2114441b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Wed, 24 Jun 2015 09:57:18 +0300 Subject: Fixed planets-qml example for OS X MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iee3f1dc54231a8cf67d934025c1a8ff72dcc8b28 Task-number: QTBUG-46699 Reviewed-by: Miikka Heikkinen Reviewed-by: Pasi Keränen --- examples/qt3d/planets-qml/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/examples/qt3d/planets-qml/main.cpp b/examples/qt3d/planets-qml/main.cpp index 2d38334e0..396a06083 100644 --- a/examples/qt3d/planets-qml/main.cpp +++ b/examples/qt3d/planets-qml/main.cpp @@ -43,6 +43,17 @@ int main(int argc, char **argv) QQuickView view; + QSurfaceFormat format; +#ifndef QT_OPENGL_ES_2 +#ifdef Q_OS_OSX + format.setVersion(3, 2); +#endif + format.setProfile(QSurfaceFormat::CoreProfile); +#endif + format.setDepthBufferSize(24); + format.setSamples(4); + view.setFormat(format); + view.setResizeMode(QQuickView::SizeRootObjectToView); view.setSource(QUrl("qrc:/PlanetsMain.qml")); view.show(); -- cgit v1.2.3 From 1b98284ad0e775c84963385732c93ef0e2d5a0f1 Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Wed, 17 Jun 2015 17:28:52 +0200 Subject: Doc: Add documentation for the Wireframe QML Example Add information about materials and shaders in the overview topic. Add file extensions to the configuration file to have all the example files listed in the example docs. Change-Id: I709f91fb854ca18fb3a56caf656c191fa15e99ef Reviewed-by: Sean Harmer --- .../doc/images/qt3d-wireframe-rendering.png | Bin 0 -> 214431 bytes examples/qt3d/wireframe/doc/src/wireframe.qdoc | 166 ++++++++++++++++++++- src/core/doc/src/qt3d-overview.qdoc | 31 +++- src/render/doc/qt3drenderer.qdocconf | 3 + 4 files changed, 197 insertions(+), 3 deletions(-) create mode 100644 examples/qt3d/wireframe/doc/images/qt3d-wireframe-rendering.png diff --git a/examples/qt3d/wireframe/doc/images/qt3d-wireframe-rendering.png b/examples/qt3d/wireframe/doc/images/qt3d-wireframe-rendering.png new file mode 100644 index 000000000..c05f9b492 Binary files /dev/null and b/examples/qt3d/wireframe/doc/images/qt3d-wireframe-rendering.png differ diff --git a/examples/qt3d/wireframe/doc/src/wireframe.qdoc b/examples/qt3d/wireframe/doc/src/wireframe.qdoc index 453be115d..2b0cdda62 100644 --- a/examples/qt3d/wireframe/doc/src/wireframe.qdoc +++ b/examples/qt3d/wireframe/doc/src/wireframe.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -29,4 +29,168 @@ \example wireframe \title Qt3D: Wireframe QML Example \ingroup qt3d-examples-qml + + \brief A Qt3D QML application that implements a single-pass wireframe + rendering method. + + \image qt3d-wireframe-rendering.png + + \e {Qt3D Wireframe Rendering} illustrates how to draw a single entity + (a trefoil knot) using a custom set of shaders to implement a single-pass + wireframe rendering method. + + \include examples-run.qdocinc + + \section1 Creating Entities + + The renderer aspect looks for entities that have some geometry, a material, + and optionally a transformation. These are all specified in the form of + subclasses of QComponent that have been exported to the QML engine in the + form of \l Mesh, \l Material, and \l Transform. We use these components to + create a custom QML item in \e TrefoilKnot.qml. + + We start off by importing the \c {Qt3D 2.0} module that provides the + \l Entity type and value type helpers, such as Qt.vector3d(). We also import + the \c {Qt3D.Renderer} module that provides the components and other types + picked up by the renderer aspect: + + \quotefromfile wireframe/TrefoilKnot.qml + \skipto import Qt3D + \printuntil Renderer + + To use components from other aspects, we would need to import the + corresponding QML module, too. + + We then use an \l Entity type as the root element of the custom QML type + exposing some custom properties just as you would with any other type in + QML: + + \printuntil Material + + In addition to aggregating components, the \l Entity type can be used to + group child objects together. This is analogous to how the \l Item type is + used in Qt Quick 2. + + \section1 Specifying Transformations + + We instantiate a \l Transform component and a \l Mesh component. The + \l Transform component specifies how the renderer should transform the + geometry when it is drawn with the OpenGL pipeline. We combine an ordered + set of transformations into a single \l Transform component. This + information will be automatically available to our shaders through standard + named uniform variables: + + \skipto Transform + \printuntil phiRotation + \printuntil } + + \section1 Loading Dynamic Per-Vertex Data + + The \l Mesh component is very simple. We use its source property to load in + a static set of geometry (such as vertex positions, normal vectors, and + texture coordinates) from a file in the Wavefront Obj format. This data was + exported from the Blender application. + + \printuntil } + + In addition to the \l Mesh element, Qt3D also enables dynamic generation of + per-vertex attribute data through C++ hooks that are called by the + task-based engine. + + \section1 Aggregating Components + + Simply instantiating components is not enough, however. In order for them to + imbue special behavior on an entity, the entity must aggregate the + components by means of its components property: + + \quotefromfile wireframe/TrefoilKnot.qml + \skipto components + \printuntil ] + + This allows components to be shared between multiple entities very easily. + In this example, we have components for the transform and mesh that are + contained within the TrefoilKnot custom type. The final component, of type + \l Material, is provided by a property of the TrefoilKnot custom type. We + will later customize the appearance of the entity. + + \section1 Rendering from Cameras + + We use the TrefoilKnot custom type in \e main.qml to draw the trefoil knot + on the screen. + + We use the same import statements as in \e TrefoilKnot.qml, with the + addition of a namespaced import for the Qt Quick module that we will + need for animations: + + \quotefromfile wireframe/main.qml + \skipto import Qt3D + \printuntil QtQuick + + We use an \l Entity type as the root type simply to act as a parent for + its children. In this sense, the \l Entity type is much like the \l Item + type: + + \printuntil id + + The FrameGraph component uses the ForwardRenderer type to completely + configure the renderer without touching any C++ code: + + \printuntil ] + + The \l BasicCamera type is a trivial wrapper around the built-in \l Camera + type that represents a virtual camera. It has properties for such things as + the near and far planes, field of view, aspect ratio, projection type, + position, and orientation: + + \printuntil } + + The \l Configuration type provides a temporary workaround for having mouse + control of the camera while the proper implementation that uses aspects and + components is being completed: + + \printuntil } + + It is trivial to use multiple cameras and choose between them using the + framegraph for all or part of the scene rendering. + + \section1 Mapping Materials + + Qt3D has a robust and very flexible \l {Qt3D Overview#Materials}{material + system} that allows multiple levels of customization. We use the + WireframeMaterial custom type to wrap the \l Material type: + + \printuntil diffuse + + We then instantiate the TrefoilKnot type and set the material on it: + + \skipto TrefoilKnot + \printuntil } + + The Qt3D engine in conjunction with the renderer aspect now has enough + information to finally render our mesh using the material we specified. + + \section1 Using Animation Elements + + We use the animation elements provided by Qt Quick 2 to animate the + properties of the TrefoilKnot and WireframeMaterial types. The properties of + the components of a type are updated by using the QML property binding + mechanism: + + \quotefromfile wireframe/main.qml + \skipto SequentialAnimation + \printuntil PauseAnimation + \printuntil } + + The property updates are noticed by the \l{Qt3D::}{QNode} base class + and automatically sent through to the corresponding objects in the renderer + aspect. The renderer then takes care of translating the property updates + to new values for uniform variables in the GLSL shader programs. + + Run the example to view the trefoil knot with the width of the wireframe + lines pulsing. All the heavy lifting is being done by the GPU. The CPU only + has to run the property animations and to translate the scenegraph and + framegraph into raw OpenGL calls. + + It is also possible to animate on the GPU via a custom shader program and + material. */ diff --git a/src/core/doc/src/qt3d-overview.qdoc b/src/core/doc/src/qt3d-overview.qdoc index a02f32d83..74a4c2949 100644 --- a/src/core/doc/src/qt3d-overview.qdoc +++ b/src/core/doc/src/qt3d-overview.qdoc @@ -60,9 +60,9 @@ \list \li 2D and 3D rendering for C++ and Qt Quick applications \li Meshes - \li Materials + \li \l {Materials} \li Shadows - \li Shaders + \li \l {Shaders} \li Ambient occlusion \li High dynamic range \li Deferred rendering @@ -71,6 +71,33 @@ \li Uniform Buffer Objects \endlist + \section2 Materials + + Qt3D has a robust and very flexible material system that allows multiple + levels of customization. It caters for different rendering approaches on + different platforms or OpenGL versions, enables multiple rendering passes + with different state sets, provides mechanisms for overriding of parameters + at different levels, and allows easy switching of shaders. All this from C++ + or using QML property bindings. + + The properties of a \l Material type can easily be mapped through to uniform + variables in a GLSL shader program that is itself specified in the + referenced effect property. + + For examples of using materials, see the \l {Qt3D: Materials C++ Example} + and \l {Qt3D: Materials QML Example}. + + \section2 Shaders + + Qt3D supports all of the OpenGL programmable rendering pipeline stages: + vertex, tessellation control, tessellation evaluation, geometry, and + fragment shaders. Compute shaders are planned for a future release. + + For examples of using shaders, see the Simple Shaders QML Example, + \l {Qt3D: Tessellation Modes QML Example}, + \l {Qt3D: Shadow Map QML Example}, \l{Qt3D: Wireframe QML Example}, and + \l {Qt3D: Wave QML Example}. + \section1 Configurable Renderer To combine support for both C++ and QML APIs with having a fully diff --git a/src/render/doc/qt3drenderer.qdocconf b/src/render/doc/qt3drenderer.qdocconf index e56b6f992..add1cc90c 100644 --- a/src/render/doc/qt3drenderer.qdocconf +++ b/src/render/doc/qt3drenderer.qdocconf @@ -45,6 +45,9 @@ exampledirs += ../../../examples/qt3d \ imagedirs += images +examples.fileextensions += "*.fraq *.geom *.vert" +examples.imageextensions += "*.png" + Cpp.ignoretokens += QT3DRENDERERSHARED_EXPORT \ QT3DRENDERERSHARED_PRIVATE_EXPORT -- cgit v1.2.3 From 05e378b2fcbe72725b4736946d65c1290c291d25 Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Wed, 24 Jun 2015 14:05:53 +0200 Subject: Doc: Add some docs for the shadow map example Change-Id: Iea29c9f654fc57518bf3d428b30fa5955aa1230d Reviewed-by: Sean Harmer Reviewed-by: Leena Miettinen --- .../doc/images/shadowmapping-depth.png | Bin 0 -> 23712 bytes .../doc/images/shadowmapping-qt3d.png | Bin 0 -> 39159 bytes .../shadow-map-qml/doc/src/shadow-map-qml.qdoc | 240 ++++++++++++++++++++- src/core/doc/qt3dcore.qdocconf | 3 +- src/core/doc/src/qt3d-overview.qdoc | 86 +++++++- 5 files changed, 324 insertions(+), 5 deletions(-) create mode 100644 examples/qt3d/shadow-map-qml/doc/images/shadowmapping-depth.png create mode 100644 examples/qt3d/shadow-map-qml/doc/images/shadowmapping-qt3d.png diff --git a/examples/qt3d/shadow-map-qml/doc/images/shadowmapping-depth.png b/examples/qt3d/shadow-map-qml/doc/images/shadowmapping-depth.png new file mode 100644 index 000000000..d2b501412 Binary files /dev/null and b/examples/qt3d/shadow-map-qml/doc/images/shadowmapping-depth.png differ diff --git a/examples/qt3d/shadow-map-qml/doc/images/shadowmapping-qt3d.png b/examples/qt3d/shadow-map-qml/doc/images/shadowmapping-qt3d.png new file mode 100644 index 000000000..bac6ac75c Binary files /dev/null and b/examples/qt3d/shadow-map-qml/doc/images/shadowmapping-qt3d.png differ diff --git a/examples/qt3d/shadow-map-qml/doc/src/shadow-map-qml.qdoc b/examples/qt3d/shadow-map-qml/doc/src/shadow-map-qml.qdoc index 4e55da3b1..fd3377a8b 100644 --- a/examples/qt3d/shadow-map-qml/doc/src/shadow-map-qml.qdoc +++ b/examples/qt3d/shadow-map-qml/doc/src/shadow-map-qml.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -29,4 +29,242 @@ \example shadow-map-qml \title Qt3D: Shadow Map QML Example \ingroup qt3d-examples-qml + + \brief A Qt3D QML application that illustrates how to render a scene in Qt3D + with shadows. + + \image shadowmapping-qt3d.png + + \e {Qt3D Shadow Map} illustrates how to configure the renderer in order to + accommodate custom rendering techniques. The example application displays a + self-shadowed plane and trefoil knot. + + We implement \l{Shadow Mapping}{shadow mapping} using a two pass rendering. + In the first pass, we generate the shadow information. In the second pass, + we generate the scene using the forward rendering technique with Phong + shading, while at the same time using the information gathered in the first + pass to draw the shadows. + + The entire rendering is configured using QML, but it is possible to use C++ + to achieve the very same result. + + \include examples-run.qdocinc + + \section1 Setting Up the Scene + + We set up the entire scene in the \e main.qml file. + + To be able to use the types in the Q3D and Q3D Renderer modules, we must + import the modules: + + \quotefromfile shadow-map-qml/main.qml + \skipto import Qt3D + \printuntil Renderer + + The first entities we create are a \l Camera, which represents the camera + used for the final rendering, and a \l Configuration, which allows us to + control this camera using the keyboard or the mouse: + + \printuntil } + \printuntil } + + We then create a Light custom entity, which represents our light. It is a + directional spotlight, placed somewhere above the plane and looking down at + the scene’s origin: + + \printuntil } + + This light entity is used by our custom framegraph, ShadowMapFrameGraph, + and our rendering effect, AdsEffect, whose instances are created just after + the light: + + \printuntil ] + \printuntil } + + Last, we create three entities for the meshes in the scene: a trefoil knot, + a toy plane, and a ground plane. They aggregate a mesh, a transformation, + and a material that uses the AdsEffect. The toy plane and the trefoil knot + transformations are animated: + + \printuntil /^\}/ + + \section1 Specifying the Light + + We specify the Light custom entity in \e Light.qml. + + Again, we import the necessary modules: + + \quotefromfile shadow-map-qml/Light.qml + \skipto import Qt3D + \printuntil Qt3D.Renderer + + We then use an \l Entity type as the root element of the custom QML type. + The light is a directional spotlight that exposes as properties a position, + intensity, and a 4×4 transformation matrix: + + \printuntil matrix4x4 + + In the first rendering pass, we use the light as a camera, and therefore we + use a \l Camera entity within the light and expose it as a property: + + \printuntil /^\}/ + + \section1 Configuring the Framegraph + + In Qt3D, the framegraph is the data-driven configuration for the rendering. + We implement the framegraph in the \e ShadowMapFrameGraph.qml file. + + In addition to the Qt3D and Qt3D Renderer modules, we also import the + Qt Quick module: + + \quotefromfile shadow-map-qml/ShadowMapFrameGraph.qml + \skipto import Qt3D + \printuntil QtQuick + + The code defines a \l FrameGraph entity that has a tree of entities as the + active framegraph: + + \printuntil clearColor + + Any path from the leaves of this tree to the root is a viable framegraph + configuration. Filter entities can enable or disable such paths, and + selector entities can alter the configuration. + + In our case, the tree looks like this: + + \code + Viewport + RenderPassFilter + RenderTargetSelector + ClearBuffer + CameraSelector + RenderPassFilter + ClearBuffer + CameraSelector + \endcode + + So we have two paths from the topmost \l Viewport entity. Each path + corresponds to a pass of the shadow map technique. The paths are enabled and + disabled using a RenderPassFilter, an entity that can filter depending on + arbitrary values defined in a given render pass. In this example, it is a + string: + + \printuntil ] + + The actual passes are not defined here. The framegraph simply modifies its + configuration when a given pass is rendered. + + \section1 Generating the Shadow Map + + In the shadow map generation pass, we must render to an offscreen surface + (Framebuffer Object) which has a depth texture attachment. In Qt3D, it is + represented by the RenderTarget entity, which has a number of attachments. + + In this example, we need only a depth attachment. We define it as a + RenderAttachment entity using the RenderAttachment.DepthAttachment \c type + that stores the depth and a Texture2D entity that actually configures the + exture storage used to store the depth information: + + \printuntil ] + \printuntil } + + Moreover, in this first pass, we must render using the light’s camera. + Therefore, we have a CameraSelector entity that sets the camera to the one + exported by the Light: + + \skipto CameraSelector + \printuntil } + + The second pass is more straightforward, because we simply render to the + screen using the main camera. + + \section1 Using Effects + + The bulk of the magic happens in the \e AdsEffect.qml file, where our main + \l Effect entity is defined. It implements the Ambient, Diffuse and Specular + (ADS) Lightning Model Phong shading with the addition of shadow mapped + generated shadows. + + An effect contains the implementation of a particular rendering strategy. In + this example, shadow mapping using two passes: + + \quotefromfile shadow-map-qml/AdsEffect.qml + \skipto Effect + \printuntil Light + + The \c parameters list defines some default values for the effect. The + values will get mapped to OpenGL shader program uniforms, so that in the + shaders we can access them. In this example, we expose some information from + the Light entity (position, intensity, view or projection matrix defined by + the internal camera) and the shadow map texture exposed by the framegraph: + + \skipto parameters: + \printuntil ] + + It is possible to put such parameters all the way down, from a \l Material, + to its \l Effect, to one of the effect’s \l Techniques. This allows a + \l Material instance to override defaults in an \l Effect or \l Technique. + The bindings array provides the same thing, except that it also allows us to + rename some parameters. In this example, it renames the \c ambient, + \c diffuse, and \c specular values defined in the material to the actual + uniform names used by the shader programs: + + \skipto bindings: + \printuntil ] + + To adapt the implementation to different hardware or OpenGL versions, we + could use one or more \l Technique elements. In this example, only one + technique is provided, targeting OpenGL 3.2 Core, or later: + + \quotefromfile shadow-map-qml/AdsEffect.qml + \skipto techniques: + \printuntil } + + Inside the technique, we finally have the definition of our two rendering + passes. We \e tag each pass with an \l Annotation entity, matching the ones + we specified in the framegraph configuration, so that each pass will have + different rendering settings: + + \printuntil ] + + The first pass is the shadow map generation. We load a suitable set of GLSL + shaders, which are actually extremely simple. They do only MVP (Model, View, + Projection) to bring meshes from their model space into clip space (and, + remember, in this first pass, the light is the camera). The fragment shader + is totally empty, because there is no color to be generated, and the depth + will be automatically captured for us by OpenGL: + + \printuntil } + + In this first pass, we also set some custom OpenGL state in the form of a + polygon offset and depth testing mode: + + \printuntil ] + + \section1 Rendering Using Phong Shading + + The second pass is a normal forward rendering using Phong shading. The code + in the effect entity is extremely simple. We simply configure some + parameters and load a pair of shaders which will be used when drawing. + + The first part of the shadow mapping happens in the vertex shader defined in + \e ads.vert file, where we output towards the fragment shader the + coordinates of each vertex in light space: + + \quotefromfile shadow-map-qml/shaders/ads.vert + \skipto mat4( + \skipto positionInLightSpace + \printuntil ; + + Actually, the coordinates get adjusted a little to allow us to easily sample + the shadow map texture. + + The second part happens in the fragment shader defined in the \e ads.frag + file, where we sample the shadow map. If the currently processed fragment is + behind the one closest to the light, then the current fragment is in shadow + (and only gets ambient contribution). Otherwise, it gets full Phong shading: + + \quotefromfile shadow-map-qml/shaders/ads.frag + \skipto main + \printuntil } */ diff --git a/src/core/doc/qt3dcore.qdocconf b/src/core/doc/qt3dcore.qdocconf index 28f985029..923cc1345 100644 --- a/src/core/doc/qt3dcore.qdocconf +++ b/src/core/doc/qt3dcore.qdocconf @@ -48,7 +48,8 @@ exampledirs += src/snippets #excludedirs += -imagedirs += images +imagedirs += images \ + ../../../examples/qt3d/shadow-map-qml/doc/images Cpp.ignoretokens += QT3DCORE_PRIVATE_EXPORT \ QT3DINPUTSHARED_EXPORT \ diff --git a/src/core/doc/src/qt3d-overview.qdoc b/src/core/doc/src/qt3d-overview.qdoc index 74a4c2949..133f6fd14 100644 --- a/src/core/doc/src/qt3d-overview.qdoc +++ b/src/core/doc/src/qt3d-overview.qdoc @@ -61,14 +61,14 @@ \li 2D and 3D rendering for C++ and Qt Quick applications \li Meshes \li \l {Materials} - \li Shadows \li \l {Shaders} + \li \l {Shadow Mapping}{Shadow mapping} \li Ambient occlusion \li High dynamic range \li Deferred rendering \li Multitexturing - \li Instancing - \li Uniform Buffer Objects + \li \l {Instanced Rendering}{Instanced rendering} + \li \l {Uniform Buffer Objects} \endlist \section2 Materials @@ -98,6 +98,86 @@ \l {Qt3D: Shadow Map QML Example}, \l{Qt3D: Wireframe QML Example}, and \l {Qt3D: Wave QML Example}. + \section2 Shadow Mapping + + Shadows are not directly supported by OpenGL, but there are countless + techniques that can be employed to generate them. Shadow mapping is simple + to use for generating good-looking shadows, while having a very small + performance cost. + + Shadow mapping is typically implemented using a two pass rendering. In the + first pass, the shadow information is generated. In the second pass, the + scene is generated using a particular rendering technique, while at the + same time using the information gathered in the first pass to draw the + shadows. + + The idea behind shadow mapping is that only the closest fragments to the + light are lit. Fragments \e behind other fragments are occluded, and + therefore in shadow. + + Therefore, in the first pass, the scene is drawn from the point of view of + the light. The information that is stored is simply the distance of the + closest fragment in this \e {light space}. In OpenGL terms, this corresponds + to having a Framebuffer Object, or FBO, with a depth texture attached to it. + In fact, the \e {distance from the eye} is the definition of the depth, + and the default depth testing done by OpenGL will actually store only the + depth for the closest fragment. + + A color texture attachment is not even needed, because there is no need to + shade fragments, only to calculate their depth. + + The following image displays a scene with a self-shadowed plane and trefoil + knot: + + \image shadowmapping-qt3d.png + + The following image shows an exaggerated shadow map texture of the scene: + + \image shadowmapping-depth.png + + The image indicates the depth stored when rendering the scene from the light + point of view. Darker colors represent a shallow depth (that is, closer to + the camera). In this scene, the light is placed somewhere above the objects + in the scene, on the right side with respect to the main camera (compare + this with the first screenshot). This matches with the fact that the toy + plane is closer to the camera than the other objects. + + Once the shadow map has been generated, the second rendering pass is done. + In this second pass, rendering is done using the normal scene's camera. Any + effect can be used here, such as Phong shading. It is important that the + shadow map algorithm is applied in the fragment shader. That is, the + fragment that is closest to the light is drawn lit, whereas the other + fragments are drawn in shadow. + + The shadow map generated in the first pass provides the necessary + information about the distance of fragments to light. It then suffices to + remap the fragment in light space, thereby calculating its depth from the + light point of view, as well as where its coordinates are on the shadow map + texture. The shadow map texture can then be sampled at the given coordinates + and the fragment's depth can be compared with the result of the sampling. If + the fragment is further away, then it is in shadow; otherwise it is lit. + + For example code, see the \l {Qt3D: Shadow Map QML Example}. + + \section2 Instanced Rendering + + \e Instancing is a way of getting the GPU to draw many copies (instances) of + a base object that varies in some way for each copy. Often, in position, + orientation, color, material properties, scale, and so on. Qt3D provides an + API similar to the Qt Quick \l Repeater element. In this case, the delegate + is the base object and the model provides the per-instance data. So whereas + an entity with a \l Mesh component attached eventually gets transformed into + a call to glDrawElements, an entity with a instanced component will be + translated into a call to glDrawElementsInstanced. + + Instanced rendering is planned for a future release. + + \section2 Uniform Buffer Objects + + A Uniform Buffer Object (UBO) can be bound to OpenGL shader programs to make + large amounts of data readily available. Typical use cases for UBOs are for + sets of material or lighting parameters. + \section1 Configurable Renderer To combine support for both C++ and QML APIs with having a fully -- cgit v1.2.3 From a2bd6a2a820fc2f2c881102f884df34a190505c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Thu, 25 Jun 2015 07:05:38 +0300 Subject: Fix dynamic OpenGL ANGLE issue for planets-qml example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2d645189ed50567195f4fc1df8ec3e468037fb92 Reviewed-by: Pasi Keränen Reviewed-by: Miikka Heikkinen --- examples/qt3d/planets-qml/main.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/examples/qt3d/planets-qml/main.cpp b/examples/qt3d/planets-qml/main.cpp index 396a06083..02c43181f 100644 --- a/examples/qt3d/planets-qml/main.cpp +++ b/examples/qt3d/planets-qml/main.cpp @@ -36,24 +36,22 @@ #include #include +#include int main(int argc, char **argv) { QGuiApplication app(argc, argv); - QQuickView view; - QSurfaceFormat format; -#ifndef QT_OPENGL_ES_2 -#ifdef Q_OS_OSX - format.setVersion(3, 2); -#endif - format.setProfile(QSurfaceFormat::CoreProfile); -#endif + if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL) { + format.setVersion(3, 2); + format.setProfile(QSurfaceFormat::CoreProfile); + } format.setDepthBufferSize(24); format.setSamples(4); - view.setFormat(format); + QQuickView view; + view.setFormat(format); view.setResizeMode(QQuickView::SizeRootObjectToView); view.setSource(QUrl("qrc:/PlanetsMain.qml")); view.show(); -- cgit v1.2.3