diff options
Diffstat (limited to 'src/Runtime/ogl-runtime/examples')
33 files changed, 0 insertions, 1274 deletions
diff --git a/src/Runtime/ogl-runtime b/src/Runtime/ogl-runtime new file mode 160000 +Subproject 2025912174c4cf99270b7439ec3b021e1d089ae diff --git a/src/Runtime/ogl-runtime/examples/cppdatainput/cppdatainput.pro b/src/Runtime/ogl-runtime/examples/cppdatainput/cppdatainput.pro deleted file mode 100644 index 20b5c685..00000000 --- a/src/Runtime/ogl-runtime/examples/cppdatainput/cppdatainput.pro +++ /dev/null @@ -1,11 +0,0 @@ -CONFIG += c++11 -QT += widgets qml quick studio3d - -target.path = $$[QT_INSTALL_EXAMPLES]/studio3d/$$TARGET -INSTALLS += target - -SOURCES += \ - main.cpp - -RESOURCES += \ - res.qrc diff --git a/src/Runtime/ogl-runtime/examples/cppdatainput/main.cpp b/src/Runtime/ogl-runtime/examples/cppdatainput/main.cpp deleted file mode 100644 index d966a3a0..00000000 --- a/src/Runtime/ogl-runtime/examples/cppdatainput/main.cpp +++ /dev/null @@ -1,137 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt 3D Studio. -** -** $QT_BEGIN_LICENSE:BSD$ -** 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 https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <qstudio3dglobal.h> -#include <QGuiApplication> -#include <QQmlApplicationEngine> -#include <Q3DSSurfaceViewer> -#include <QWindow> -#include <QSurface> -#include <Q3DSPresentation> -#include <QOpenGLContext> -#include <Q3DSDataInput> -#include <QVector3D> -#include <QTimer> -#include <QDebug> -// Required for Ubuntu build -#include <cmath> - -int main(int argc, char *argv[]) -{ - float colorRed = 0.0f; - int range = 0; - - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - - QGuiApplication app(argc, argv); - - // Use the ideal format (i.e. OpenGL version and profile) recommended by - // the Qt 3D Studio runtime. Without this the format set on the QQuickView - // would be used instead. - QSurfaceFormat::setDefaultFormat(Q3DS::surfaceFormat()); - - QOpenGLContext context; - if (!context.create()) - qFatal("Failed to create OpenGL context"); - - QWindow window; - window.setSurfaceType(QSurface::OpenGLSurface); - window.setFormat(context.format()); - window.create(); - - Q3DSSurfaceViewer viewer; - QObject::connect(&viewer, &Q3DSSurfaceViewer::presentationLoaded, &viewer, [&] { - qDebug() << "Presentation loaded"; - }); - - QObject::connect(&viewer, &Q3DSSurfaceViewer::presentationReady, &viewer, [&] { - qDebug() << "Presentation ready"; - const auto diList = viewer.presentation()->dataInputs(); - for (const auto &it : diList) { - Q3DSDataInput *dynDi = it; - qDebug() << "Processing data input " << dynDi->name(); - if (dynDi->name().contains(QLatin1String("color"))) { - if (dynDi->isValid()) { - // Access metadata. - qDebug() << "Metadata: " << dynDi->metadata("metadata1"); - - QObject::connect(&viewer, &Q3DSSurfaceViewer::frameUpdate, - [&colorRed, dynDi] { - dynDi->setValue(QVector3D(colorRed, 0.5, 0.5)); - colorRed = std::fmod(colorRed + 0.001f, 1.0f); - }); - } - } else if (dynDi->name().contains(QLatin1String("range"))) { - qDebug() << "Found dynamic data input for range " << dynDi; - if (dynDi->isValid()) { - QObject::connect(&viewer, &Q3DSSurfaceViewer::frameUpdate, [&range, dynDi] { - dynDi->setValue((float)range); - range = (range + 1) % 360; - }); - } - } - } - auto diWithMetadata = viewer.presentation()->dataInputs("metadata1"); - qDebug() << "Datainputs with metadatakey metadata1: "; - for (auto &it : diWithMetadata) - qDebug() << it->name(); - }); - - viewer.presentation()->setSource(QUrl(QStringLiteral("qrc:presentation/datainput.uia"))); - viewer.setUpdateInterval(0); // enable automatic updates - - viewer.create(&window, &context); - - window.setTitle(QStringLiteral("Qt 3D Studio Example")); - window.resize(800, 480); - window.show(); - - return app.exec(); -} diff --git a/src/Runtime/ogl-runtime/examples/cppdatainput/presentation/datainput.uia b/src/Runtime/ogl-runtime/examples/cppdatainput/presentation/datainput.uia deleted file mode 100644 index 0c891219..00000000 --- a/src/Runtime/ogl-runtime/examples/cppdatainput/presentation/datainput.uia +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<application> - <assets initial="datainput"> - <presentation id="datainput" src="datainput.uip"/> - <dataInput name="colorInput" type="Vector3"/> - <dataInput metadata="metadata1$Controls rotation" max="360" name="rangeInput" min="0" type="Ranged Number"/> - </assets> - <statemachine ref="#logic"> - <visual-states> - <state ref="Initial"> - <enter> - <goto-slide element="main:Scene" rel="next"/> - </enter> - </state> - </visual-states> - </statemachine> -</application> diff --git a/src/Runtime/ogl-runtime/examples/cppdatainput/presentation/datainput.uip b/src/Runtime/ogl-runtime/examples/cppdatainput/presentation/datainput.uip deleted file mode 100644 index 2dc85459..00000000 --- a/src/Runtime/ogl-runtime/examples/cppdatainput/presentation/datainput.uip +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<UIP version="6" > - <Project > - <ProjectSettings author="" company="" presentationWidth="800" presentationHeight="480" maintainAspect="False" preferKtx="False" > - <CustomColors count="16" >#ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff</CustomColors> - </ProjectSettings> - <Graph > - <Scene id="Scene" controlledproperty="$rangeInput @timeline" > - <Layer id="Layer" > - <Camera id="Camera" /> - <Light id="Light" /> - <Text id="Text" /> - <Text id="Text2" /> - <Model id="Cylinder" > - <Material id="Default_002" name="Default" /> - </Model> - <Text id="Text4" /> - <Model id="Rectangle" > - <Material id="Default_001" name="Default" /> - </Model> - </Layer> - </Scene> - </Graph> - <Logic > - <State name="Master Slide" component="#Scene" > - <Add ref="#Layer" multisampleaa="SSAA" progressiveaa="8x" /> - <Add ref="#Camera" controlledproperty="" pivot="0 0 0" position="0 0 -800" rotation="0 0 0" /> - <Add ref="#Light" castshadow="True" controlledproperty="$colorInput lightdiffuse" lightdiffuse="1 0 0" lighttype="Point" position="-300.444 70.829 -30" shdwfactor="11.89" shdwfilter="6.94" shdwmapres="11" /> - <State id="Scene-Slide1" name="Slide1" initialplaystate="Pause" > - <Add ref="#Text" name="Text" controlledproperty="$rangeInput textstring" font="TitilliumWeb-Regular" position="216.513 76.6172 -113.498" scale="1 1 1" size="24" textstring="0" > - <AnimationTrack property="rotation.x" type="EaseInOut" >0 0 0 0 10 0 0 0</AnimationTrack> - <AnimationTrack property="rotation.y" type="EaseInOut" >0 0 0 0 10 0 0 0</AnimationTrack> - <AnimationTrack property="rotation.z" type="EaseInOut" >0 0 0 0 10 -360 0 0</AnimationTrack> - </Add> - <Add ref="#Text2" name="Text2" controlledproperty="" font="TitilliumWeb-Regular" position="259.808 217.95 0" scale="1 1 1" size="16" textstring="Text control Rotation animation control via datainput timeline control" /> - <Add ref="#Cylinder" name="Cylinder" controlledproperty="" position="15.877 -141.932 0" sourcepath="#Cylinder" /> - <Add ref="#Default_002" diffuse="0.666667 1 0.498039" /> - <Add ref="#Text4" name="Text4" font="TitilliumWeb-Regular" position="-373.353 201.004 0" size="18" textstring="Directional light color control" /> - <Add ref="#Rectangle" name="Rectangle" position="0 -400 20" rotation="90.5 0 0" scale="11.0468 7.99191 9.12813" sourcepath="#Rectangle" /> - <Add ref="#Default_001" diffuse="0.623529 0.623529 0.623529" /> - </State> - </State> - </Logic> - </Project> -</UIP> diff --git a/src/Runtime/ogl-runtime/examples/cppdatainput/res.qrc b/src/Runtime/ogl-runtime/examples/cppdatainput/res.qrc deleted file mode 100644 index 9beb456d..00000000 --- a/src/Runtime/ogl-runtime/examples/cppdatainput/res.qrc +++ /dev/null @@ -1,6 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>presentation/datainput.uia</file> - <file>presentation/datainput.uip</file> - </qresource> -</RCC> diff --git a/src/Runtime/ogl-runtime/examples/examples.pro b/src/Runtime/ogl-runtime/examples/examples.pro deleted file mode 100644 index f51add1f..00000000 --- a/src/Runtime/ogl-runtime/examples/examples.pro +++ /dev/null @@ -1,9 +0,0 @@ -TEMPLATE = subdirs - -SUBDIRS += \ - cppdatainput - -qtHaveModule(quick) { - SUBDIRS += simpleqml \ - qmldatainput -} diff --git a/src/Runtime/ogl-runtime/examples/qmldatainput/doc/images/qmldatainput.png b/src/Runtime/ogl-runtime/examples/qmldatainput/doc/images/qmldatainput.png Binary files differdeleted file mode 100644 index e0567ee2..00000000 --- a/src/Runtime/ogl-runtime/examples/qmldatainput/doc/images/qmldatainput.png +++ /dev/null diff --git a/src/Runtime/ogl-runtime/examples/qmldatainput/doc/src/qmldatainput.qdoc b/src/Runtime/ogl-runtime/examples/qmldatainput/doc/src/qmldatainput.qdoc deleted file mode 100644 index 21eae9e3..00000000 --- a/src/Runtime/ogl-runtime/examples/qmldatainput/doc/src/qmldatainput.qdoc +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt 3D Studio. -** -** $QT_BEGIN_LICENSE:FDL$ -** 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 https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \example qmldatainput - \title Qt 3D Studio Runtime: QML DataInput Example - \ingroup OpenGLRuntime-examples-qml - \brief Demonstrates using DataInput elements in QML. - - \image qmldatainput.png - - \e {This example demonstrates using DataInput elements with QML in Studio} - - \include examples-run.qdocinc - - \section1 Description - - The presentation consists of a static text element serving as a label and a rotating text - element for showing the input data as text. There is also a data input of type \e{Ranged Number} - in the presentation. This data input is used to control both the rotation animation time and - the text shown on the second text element. - The range is specified as [0 .. 360] in the presentation, where zero maps - to the beginning of the animation and 360 maps to the end of the animation. - - The \l {qmldatainput/qml/qmldatainput/main.qml}{qml main} loads the presentation and animates - a number property. The value of the animated property is bound to the - \l{DataInput::value}{value} property of the DataInput element, making the value show up in the - linked text element in the presentation. The same value is used to control the animation time: - - \snippet qmldatainput/qml/qmldatainput/main.qml 1 -*/ diff --git a/src/Runtime/ogl-runtime/examples/qmldatainput/main.cpp b/src/Runtime/ogl-runtime/examples/qmldatainput/main.cpp deleted file mode 100644 index 165cd89e..00000000 --- a/src/Runtime/ogl-runtime/examples/qmldatainput/main.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt 3D Studio. -** -** $QT_BEGIN_LICENSE:BSD$ -** 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 https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QtWidgets/QApplication> -#include <QtQuick/QQuickView> -#include <qstudio3dglobal.h> -#ifdef USE_EMBEDDED_FONTS -#include <QtGui/QFontDatabase> -#include <QtCore/QDebug> -#endif - -int main(int argc, char *argv[]) -{ - qputenv("QSG_INFO", "1"); - - QApplication app(argc, argv); - - // Use the ideal format (i.e. OpenGL version and profile) recommended by - // the Qt 3D Studio runtime. Without this the format set on the QQuickView - // would be used instead. - QSurfaceFormat::setDefaultFormat(Q3DS::surfaceFormat()); - - QQuickView viewer; - viewer.setSource(QUrl("qrc:/qml/qmldatainput/main.qml")); - - viewer.setTitle(QStringLiteral("Qt 3D Studio Example")); - viewer.setResizeMode(QQuickView::SizeRootObjectToView); - viewer.resize(1280, 720); - viewer.show(); - - return app.exec(); -} diff --git a/src/Runtime/ogl-runtime/examples/qmldatainput/presentation/Paper05.png b/src/Runtime/ogl-runtime/examples/qmldatainput/presentation/Paper05.png Binary files differdeleted file mode 100644 index e70749db..00000000 --- a/src/Runtime/ogl-runtime/examples/qmldatainput/presentation/Paper05.png +++ /dev/null diff --git a/src/Runtime/ogl-runtime/examples/qmldatainput/presentation/datainput.uia b/src/Runtime/ogl-runtime/examples/qmldatainput/presentation/datainput.uia deleted file mode 100644 index 30d0084c..00000000 --- a/src/Runtime/ogl-runtime/examples/qmldatainput/presentation/datainput.uia +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<application> - <assets initial="datainput"> - <presentation id="datainput" src="datainput.uip"/> - <dataInput name="cameraRotInput" type="Vector3"/> - <dataInput name="colorInput" type="Vector3"/> - <dataInput name="queriedInput" type="String"/> - <dataInput name="rangeInput" type="Ranged Number" min="0" max="360"/> - <dataInput name="scaleInput" type="Vector3"/> - <dataInput name="stringInput" type="String"/> - <dataInput name="variantInput" type="Variant" metadata="usage$opacity$datasource$speedgauge_visibility"/> - </assets> - <statemachine ref="#logic"> - <visual-states> - <state ref="Initial"> - <enter> - <goto-slide rel="next" element="main:Scene"/> - </enter> - </state> - </visual-states> - </statemachine> -</application> diff --git a/src/Runtime/ogl-runtime/examples/qmldatainput/presentation/datainput.uip b/src/Runtime/ogl-runtime/examples/qmldatainput/presentation/datainput.uip deleted file mode 100644 index 008f4562..00000000 --- a/src/Runtime/ogl-runtime/examples/qmldatainput/presentation/datainput.uip +++ /dev/null @@ -1,66 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<UIP version="6" > - <Project > - <ProjectSettings author="" company="" presentationWidth="800" presentationHeight="480" maintainAspect="False" preferKtx="False" > - <CustomColors count="16" >#ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff</CustomColors> - </ProjectSettings> - <Graph > - <Scene id="Scene" controlledproperty="$rangeInput @timeline" > - <Layer id="Layer" > - <Camera id="Camera" /> - <Light id="Light" /> - <Text id="Text" /> - <Text id="Text2" /> - <Model id="Cone" > - <Material id="Default" name="Default" /> - </Model> - <Model id="Cylinder" > - <Material id="Default_002" name="Default" /> - </Model> - <Text id="Text6" /> - <Text id="Text8" /> - <Model id="Cube2" > - <Material id="Default_003" name="Default" /> - </Model> - <Text id="Text3" /> - <Text id="Text4" /> - <Model id="Rectangle" > - <Material id="Default_001" name="Default" > - <Image id="Default_001_diffusemap" /> - </Material> - </Model> - <Text id="Text5" /> - </Layer> - </Scene> - </Graph> - <Logic > - <State name="Master Slide" component="#Scene" > - <Add ref="#Layer" multisampleaa="SSAA" progressiveaa="8x" /> - <Add ref="#Camera" controlledproperty="$cameraRotInput rotation" pivot="0 0 0" position="0 0 -800" rotation="0 0 0" /> - <Add ref="#Light" castshadow="True" controlledproperty="$colorInput lightdiffuse" lightdiffuse="1 0 0" lighttype="Point" position="-300.444 70.829 -30" shdwfactor="11.89" shdwfilter="6.94" shdwmapres="11" /> - <State id="Scene-Slide1" name="Slide1" initialplaystate="Pause" > - <Add ref="#Text" name="Text" controlledproperty="$stringInput textstring" font="TitilliumWeb-Regular" position="216.513 76.6172 -113.498" scale="1 1 1" size="24" textstring="0" > - <AnimationTrack property="rotation.x" type="EaseInOut" >0 0 0 0 10 0 0 0</AnimationTrack> - <AnimationTrack property="rotation.y" type="EaseInOut" >0 0 0 0 10 0 0 0</AnimationTrack> - <AnimationTrack property="rotation.z" type="EaseInOut" >0 0 0 0 10 -360 0 0</AnimationTrack> - </Add> - <Add ref="#Text2" name="Text2" controlledproperty="" font="TitilliumWeb-Regular" position="259.808 217.95 0" scale="1 1 1" size="16" textstring="Text control Rotation animation control via datainput timeline control" /> - <Add ref="#Cone" name="Cone" controlledproperty="$scaleInput scale" position="-417.135 -225.166 0" sourcepath="#Cone" /> - <Add ref="#Default" /> - <Add ref="#Cylinder" name="Cylinder" controlledproperty="$variantInput opacity" position="131.347 -180.422 0" sourcepath="#Cylinder" /> - <Add ref="#Default_002" diffuse="0.666667 1 0.498039" /> - <Add ref="#Text6" name="Text6" font="TitilliumWeb-Regular" position="135.678 -300.019 -8.28656" size="16" textstring="Opacity control (Variant type)" /> - <Add ref="#Text8" name="Text8" font="TitilliumWeb-Regular" position="-428.683 -290.118 0" size="16" textstring="Scale control" /> - <Add ref="#Cube2" name="Cube2" controlledproperty="$cameraRotInput rotation" position="409.919 -177.535 0" sourcepath="#Cube" /> - <Add ref="#Default_003" controlledproperty="" /> - <Add ref="#Text3" name="Text3" font="TitilliumWeb-Regular" position="434.456 -304.552 0" size="16" textstring="Rotation control Diffuse color control" /> - <Add ref="#Text4" name="Text4" font="TitilliumWeb-Regular" position="-381.051 290.118 0" size="18" textstring="Directional light color control Camera xy rotation control" /> - <Add ref="#Rectangle" name="Rectangle" position="0 -400 20" rotation="90.5 0 0" scale="11.0468 7.99191 9.12813" sourcepath="#Rectangle" /> - <Add ref="#Default_001" diffuse="0.623529 0.623529 0.623529" diffusemap="#Default_001_diffusemap" /> - <Add ref="#Default_001_diffusemap" sourcepath="Paper05.png" /> - <Add ref="#Text5" name="Text5" controlledproperty="$queriedInput textstring" font="TitilliumWeb-Regular" position="-57.7348 3.84888 0" textstring="Text from queried QML Datainput" /> - </State> - </State> - </Logic> - </Project> -</UIP> diff --git a/src/Runtime/ogl-runtime/examples/qmldatainput/presentation/fonts/TitilliumWeb-Regular.ttf b/src/Runtime/ogl-runtime/examples/qmldatainput/presentation/fonts/TitilliumWeb-Regular.ttf Binary files differdeleted file mode 100644 index 6da82193..00000000 --- a/src/Runtime/ogl-runtime/examples/qmldatainput/presentation/fonts/TitilliumWeb-Regular.ttf +++ /dev/null diff --git a/src/Runtime/ogl-runtime/examples/qmldatainput/qml/qmldatainput/main.qml b/src/Runtime/ogl-runtime/examples/qmldatainput/qml/qmldatainput/main.qml deleted file mode 100644 index ab50796d..00000000 --- a/src/Runtime/ogl-runtime/examples/qmldatainput/qml/qmldatainput/main.qml +++ /dev/null @@ -1,211 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt 3D Studio. -** -** $QT_BEGIN_LICENSE:BSD$ -** 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 https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.7 -import QtStudio3D.OpenGL 2.4 - -Item { - id: mainview - width: 1280 - height: 768 - visible: true - - // Show the list of datainputs queried by Q3DSPresentation queried from Presentation - Column { - id : diColumn - opacity: 50 - z: 1 - - Text { text: "Datainputs"; color: "red"; bottomPadding: 5; } - - Repeater { - id: diList - height: childrenRect.height - - property var diObjList - - model: diObjList - - function updateModel() { - diObjList = studio3D.presentation.getDataInputs(); - - for (var i = 0; i < count; ++i) { - // Use dynamically queried datainput to set value. - if (diObjList[i].name === "queriedInput") { - console.log("Updating " + diObjList[i].name); - diObjList[i].value = "This text is controlled by " + diObjList[i].name; - } - } - } - - Text { - id: diItem - color: "white" - // Show the metadata keys available for this datainput and - // min-max range for datainput type Ranged Number - text: "name: " + modelData.name - + (modelData.max !== 0 ? "\n range min: " + modelData.min - + "\n range max: " + modelData.max - : "") - + " \n metadata keys: [" + modelData.metadataKeys() + "]" - font.pointSize: 6 - } - } - } - - Studio3D { - id: studio3D - anchors.fill: parent - height: 900 - width: 1280 - - property real inputNumber: 0 - property vector3d inputColorVec3: Qt.vector3d(0, 0, 0) - property vector3d inputCamRotVec3: Qt.vector3d(0, 0, 0) - property vector3d inputScaleVec3: Qt.vector3d(0, 0, 0) - property string inputString: "" - property variant inputVariant: 0 - - onPresentationLoaded: { - diList.updateModel(); - } - - // A changing property to demonstrate DataInput - NumberAnimation { - target: studio3D - property: "inputNumber" - duration: 20000 - from: 0 - to: 360 - loops: Animation.Infinite - running: true - } - Vector3dAnimation { - target: studio3D - property: "inputScaleVec3" - duration: 12000 - from: Qt.vector3d(0.3, 0.5, 0.5) - to: Qt.vector3d(4.0, 4.0, 1.0) - loops: Animation.Infinite - running: true - } - Vector3dAnimation { - target: studio3D - property: "inputColorVec3" - duration: 6000 - from: Qt.vector3d(0.1, 0.1, 0.3) - to: Qt.vector3d(1.0, 0.5, 1.0) - loops: Animation.Infinite - running: true - } - Vector3dAnimation { - target: studio3D - property: "inputCamRotVec3" - duration: 20000 - from: Qt.vector3d(-5, -5, 0.0) - to: Qt.vector3d(10.0, 10.1, 10.0) - loops: Animation.Infinite - running: true - } - NumberAnimation { - target: studio3D - property: "inputString" - duration: 20000 - from: 0 - to: 1 - loops: Animation.Infinite - running: true - } - NumberAnimation { - target: studio3D - property: "inputVariant" - duration: 5000 - from: 20 - to: 100 - loops: Animation.Infinite - running: true - } - - // Presentation item is used to control the presentation. - //![1] - Presentation { - id: presentation - - source: "qrc:/presentation/datainput.uia" - DataInput { - // Name must match the data input name specified in the presentation - name: "rangeInput" - value: studio3D.inputNumber - } - DataInput { - name: "scaleInput" - value: studio3D.inputScaleVec3 - } - DataInput { - name: "colorInput" - value: studio3D.inputColorVec3 - } - DataInput { - name: "cameraRotInput" - value: studio3D.inputCamRotVec3 - } - DataInput { - name: "stringInput" - value: studio3D.inputString - } - DataInput { - name: "variantInput" - value: studio3D.inputVariant - } - } - //![1] - } - -} diff --git a/src/Runtime/ogl-runtime/examples/qmldatainput/qmldatainput.pro b/src/Runtime/ogl-runtime/examples/qmldatainput/qmldatainput.pro deleted file mode 100644 index 9bafed53..00000000 --- a/src/Runtime/ogl-runtime/examples/qmldatainput/qmldatainput.pro +++ /dev/null @@ -1,20 +0,0 @@ -TEMPLATE = app - -QT += widgets qml quick studio3d - -integrity: DEFINES += USE_EMBEDDED_FONTS - -target.path = $$[QT_INSTALL_EXAMPLES]/studio3d/$$TARGET -INSTALLS += target - -SOURCES += main.cpp - -RESOURCES += \ - qmldatainput.qrc - -OTHER_FILES += qml/qmldatainput/* \ - doc/src/* \ - doc/images/* - -# Icon in case example is included in installer -exists(example.ico): RC_ICONS = example.ico diff --git a/src/Runtime/ogl-runtime/examples/qmldatainput/qmldatainput.qrc b/src/Runtime/ogl-runtime/examples/qmldatainput/qmldatainput.qrc deleted file mode 100644 index 97aaeaa1..00000000 --- a/src/Runtime/ogl-runtime/examples/qmldatainput/qmldatainput.qrc +++ /dev/null @@ -1,8 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>qml/qmldatainput/main.qml</file> - <file>presentation/datainput.uia</file> - <file>presentation/datainput.uip</file> - <file>presentation/Paper05.png</file> - </qresource> -</RCC> diff --git a/src/Runtime/ogl-runtime/examples/simpleqml/doc/images/simpleqml.png b/src/Runtime/ogl-runtime/examples/simpleqml/doc/images/simpleqml.png Binary files differdeleted file mode 100644 index 73d92075..00000000 --- a/src/Runtime/ogl-runtime/examples/simpleqml/doc/images/simpleqml.png +++ /dev/null diff --git a/src/Runtime/ogl-runtime/examples/simpleqml/doc/src/simpleqml.qdoc b/src/Runtime/ogl-runtime/examples/simpleqml/doc/src/simpleqml.qdoc deleted file mode 100644 index a7dcec74..00000000 --- a/src/Runtime/ogl-runtime/examples/simpleqml/doc/src/simpleqml.qdoc +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt 3D Studio. -** -** $QT_BEGIN_LICENSE:FDL$ -** 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 https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \example simpleqml - \title Qt 3D Studio Runtime: Simple QML Example - \ingroup OpenGLRuntime-examples-qml - \brief Demonstrates using the Studio3D element in a Qt Quick application. - - \image simpleqml.png - - \e {This example demonstrates basic usage of the Studio3D element in Qt Quick applications} - - \include examples-run.qdocinc - - \section1 Description - - This example consists of a simple C++ main() function that sets up - a QQuickView and a QML scene demonstrating the usage of the \l - Studio3D, \l Presentation, \l DataInput, \l SceneElement, and \l - Element QML types. - - Besides displaying the presentation designed in the Qt 3D Studio - application, a few simple cases of interacting with the scene - (such as, changing 3D object properties via data input, changing - slides, controlling the timeline) are also demonstrated. -*/ diff --git a/src/Runtime/ogl-runtime/examples/simpleqml/main.cpp b/src/Runtime/ogl-runtime/examples/simpleqml/main.cpp deleted file mode 100644 index f2640b52..00000000 --- a/src/Runtime/ogl-runtime/examples/simpleqml/main.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt 3D Studio. -** -** $QT_BEGIN_LICENSE:BSD$ -** 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 https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QtWidgets/QApplication> // for MessageDialog -#include <QtQuick/QQuickView> -#include <qstudio3dglobal.h> - -int main(int argc, char *argv[]) -{ - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - qputenv("QSG_INFO", "1"); - QApplication app(argc, argv); - - // Use the ideal format (i.e. OpenGL version and profile) recommended by - // the Qt 3D Studio runtime. Without this the format set on the QQuickView - // would be used instead. - QSurfaceFormat::setDefaultFormat(Q3DS::surfaceFormat()); - - QQuickView viewer; - viewer.setSource(QUrl("qrc:/main.qml")); - - viewer.setTitle(QStringLiteral("Qt 3D Studio Example")); - viewer.setResizeMode(QQuickView::SizeRootObjectToView); - viewer.resize(1280, 720); - viewer.show(); - - return app.exec(); -} diff --git a/src/Runtime/ogl-runtime/examples/simpleqml/main.qml b/src/Runtime/ogl-runtime/examples/simpleqml/main.qml deleted file mode 100644 index 06321a7c..00000000 --- a/src/Runtime/ogl-runtime/examples/simpleqml/main.qml +++ /dev/null @@ -1,284 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt 3D Studio. -** -** $QT_BEGIN_LICENSE:BSD$ -** 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 https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtStudio3D.OpenGL 2.4 -import QtQuick.Window 2.3 -import QtQuick.Controls 2.2 -import QtQuick.Layouts 1.3 -import Qt.labs.platform 1.0 - -Rectangle { - id: root - color: "lightGray" - - MessageDialog { - id: errorDialog - } - - Studio3D { - id: s3d - focus: true - anchors.margins: 60 - anchors.fill: parent - property string textValue: "hello world" - - Presentation { - id: s3dpres - source: "qrc:/presentation/barrel.uip" - onCustomSignalEmitted: customSignalName.text = Date.now() + ": " + name - onSlideEntered: slideEnter.text = "Entered slide " + name + "(index " + index + ") on " + elementPath - onSlideExited: slideExit.text = "Exited slide " + name + "(index " + index + ") on " + elementPath - - DataInput { - name: "di_text" - value: s3d.textValue - } - - SceneElement { - id: sceneElementForScene - elementPath: "Scene" // could also refer to a Component node instead - onCurrentSlideIndexChanged: console.log("Current slide index for 'Scene': " + currentSlideIndex) - onCurrentSlideNameChanged: console.log("Current slide name for 'Scene': " + currentSlideName) - } - - // Exercise Element a bit. This is no different from using the - // functions on Presentations, just avoids the need to specify the - // name/path repeatedly. - Element { - id: barrelRef - elementPath: "Barrel" // or Scene.Layer.Barrel but as long as it's unique the name's good enough - } - } - ignoredEvents: mouseEvCb.checked ? Studio3D.EnableAllEvents : (Studio3D.IgnoreMouseEvents | Studio3D.IgnoreWheelEvents) - onRunningChanged: console.log("running: " + s3d.running) - onPresentationReady: console.log("presentationReady") - onErrorChanged: { - if (s3d.error !== "") { - errorDialog.text = s3d.error; - errorDialog.open(); - } - } - - property int frameCount: 0 - onFrameUpdate: frameCount += 1 - - Timer { - running: true - repeat: true - interval: 1000 - onTriggered: { - fpsCount.text = "~" + s3d.frameCount + " FPS"; - s3d.frameCount = 0; - } - } - - Timer { - interval: 2000 - running: true - repeat: true - } - - NumberAnimation on opacity { - id: opacityAnimation - from: 1 - to: 0 - duration: 5000 - running: false - onStopped: s3d.opacity = 1 - } - } - - Window { - id: w - visible: false - width: 500 - height: 500 - Item { - id: wroot - anchors.fill: parent - } - title: "Second window" - } - - RowLayout { - Button { - text: "Move to other window" - onClicked: { - w.visible = true; - if (s3d.parent === wroot) s3d.parent = root; else s3d.parent = wroot; - } - focusPolicy: Qt.NoFocus - } - Button { - text: "Open barrel without background" - onClicked: s3dpres.source = "qrc:/presentation/barrel_no_background.uip" - focusPolicy: Qt.NoFocus - } - Button { - text: "Animate opacity" - onClicked: opacityAnimation.running = true - focusPolicy: Qt.NoFocus - } - Button { - text: "Reload" - onClicked: s3dpres.reload() - focusPolicy: Qt.NoFocus - } - Button { - text: "Open" - onClicked: openDialog.open() - focusPolicy: Qt.NoFocus - } - CheckBox { - id: mouseEvCb - text: "Let mouse events through" - checked: true - focusPolicy: Qt.NoFocus - } - Button { - text: "Toggle camera" - onClicked: { - var v = s3dpres.getAttribute("Scene.Layer.Camera", "eyeball") - s3dpres.setAttribute("Scene.Layer.Camera", "eyeball", !v) - } - focusPolicy: Qt.NoFocus - } - Button { - text: "Send new data input value" - property int invocationCount: 0 - onClicked: s3d.textValue = "Data input value " + (++invocationCount) - focusPolicy: Qt.NoFocus - } - } - - Text { - id: fpsCount - text: "0 FPS" - anchors.bottom: parent.bottom - anchors.left: parent.left - } - Text { - id: customSignalName - anchors.bottom: parent.bottom - anchors.left: fpsCount.right - anchors.leftMargin: 8 - } - Text { - id: slideEnter - anchors.bottom: parent.bottom - anchors.left: customSignalName.right - anchors.leftMargin: 8 - } - Text { - id: slideExit - anchors.bottom: parent.bottom - anchors.left: slideEnter.right - anchors.leftMargin: 8 - } - Button { - id: nextSlideByIndex - text: "Next slide (via pres., wrap)" - anchors.left: parent.left - anchors.bottom: fpsCount.top - onClicked: s3dpres.goToSlide("Scene", true, true) - focusPolicy: Qt.NoFocus - } - Button { - id: seekBtn - text: "Seek to 5 seconds (via pres.)" - anchors.left: nextSlideByIndex.right - anchors.bottom: fpsCount.top - onClicked: s3dpres.goToTime("Scene", 5) - focusPolicy: Qt.NoFocus - } - Button { - id: nextSlideViaSceneElement - text: "Next slide (via SceneElement, no wrap)" - anchors.left: seekBtn.right - anchors.bottom: fpsCount.top - onClicked: sceneElementForScene.currentSlideIndex += 1 - focusPolicy: Qt.NoFocus - } - Button { - id: seekBtn2 - text: "Seek to 5 seconds (via SceneElement)" - anchors.left: nextSlideViaSceneElement.right - anchors.bottom: fpsCount.top - onClicked: sceneElementForScene.goToTime(5) - focusPolicy: Qt.NoFocus - } - - Button { - id: profTogBtn - text: "Toggle profile UI" - anchors.right: parent.right - anchors.bottom: parent.bottom - focusPolicy: Qt.NoFocus - onClicked: s3dpres.profileUiVisible = !s3dpres.profileUiVisible - } - Slider { - id: profUiScale - width: profTogBtn.width - anchors.right: profTogBtn.left - anchors.bottom: parent.bottom - from: 50 - to: 400 - value: 100 - focusPolicy: Qt.NoFocus - } - - FileDialog { - id: openDialog - fileMode: FileDialog.OpenFile - nameFilters: ["UIP files (*.uip)", "UIA files (*.uia)", "All files (*)"] - onAccepted: s3dpres.source = file - } -} diff --git a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/barrel.uia b/src/Runtime/ogl-runtime/examples/simpleqml/presentation/barrel.uia deleted file mode 100644 index d936e429..00000000 --- a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/barrel.uia +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<application> - <assets initial="barrel"> - <dataInput name="di_text" type="String"/> - <presentation id="barrel" src="barrel.uip"/> - </assets> - <statemachine ref="#logic"> - <visual-states> - <state ref="Initial"> - <enter> - <goto-slide element="main:Scene" rel="next"/> - </enter> - </state> - </visual-states> - </statemachine> -</application> diff --git a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/barrel.uip b/src/Runtime/ogl-runtime/examples/simpleqml/presentation/barrel.uip deleted file mode 100644 index 48b4edcd..00000000 --- a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/barrel.uip +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<UIP version="6" > - <Project > - <ProjectSettings author="" company="" presentationWidth="800" presentationHeight="480" maintainAspect="False" > - <CustomColors count="16" >#ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff</CustomColors> - </ProjectSettings> - <Graph > - <Scene id="Scene" > - <Layer id="Layer" > - <Camera id="Camera" /> - <Light id="Light" /> - <Model id="Barrel" > - <Material id="Material" > - <Image id="Material_diffusemap" /> - <Image id="Material_normalmap" /> - <Image id="Material_emissivemap" /> - <Image id="Material_specularmap" /> - </Material> - </Model> - <Text id="Text" /> - <Text id="Text2" /> - </Layer> - </Scene> - </Graph> - <Logic > - <State name="Master Slide" component="#Scene" > - <Add ref="#Layer" /> - <Add ref="#Camera" /> - <Add ref="#Light" /> - <State id="Scene-Slide1" name="Slide1" playmode="Looping" > - <Add ref="#Barrel" name="Barrel" position="0 -42 -483" rotation="90 0 0" scale="100 100 100" sourcepath=".\barrel\meshes\Barrel.mesh#1" > - <AnimationTrack property="opacity" type="EaseInOut" /> - <AnimationTrack property="rotation.x" type="EaseInOut" >0 90 100 100 5 64 100 100 10 90 100 100</AnimationTrack> - <AnimationTrack property="rotation.y" type="EaseInOut" >0 0 100 100 5 -302 100 100 10 0 100 100</AnimationTrack> - <AnimationTrack property="rotation.z" type="EaseInOut" >0 0 100 100 5 0 100 100 10 0 100 100</AnimationTrack> - </Add> - <Add ref="#Material" bumpamount="0" diffuse="1 1 1" diffusemap="#Material_diffusemap" emissivemap="#Material_emissivemap" fresnelPower="25" normalmap="#Material_normalmap" specularamount="4" specularmap="#Material_specularmap" specularmodel="Default" specularroughness="0.001" > - <AnimationTrack property="bumpamount" type="EaseInOut" >0 0 100 100 5 1 100 100</AnimationTrack> - </Add> - <Add ref="#Material_diffusemap" sourcepath=".\maps\barrel_barrel_Diffuse.png" /> - <Add ref="#Material_normalmap" sourcepath=".\maps\barrel_barrel_Normal.png" /> - <Add ref="#Material_emissivemap" sourcepath=".\maps\barrel_barrel_Emissive.png" /> - <Add ref="#Material_specularmap" sourcepath=".\maps\barrel_barrel_Specular.png" /> - <Add ref="#Text" name="Text" font="Arimo-Regular" position="-486.418 297.128 50.5569" textcolor="0 1 0" textstring="Barrel!" tracking="0" > - <AnimationTrack property="opacity" type="EaseInOut" >0 100 100 100 5.009 43.75 100 100 10 100 100 100</AnimationTrack> - <AnimationTrack property="rotation.x" type="EaseInOut" >0 0 100 100 4.997 0 100 100 5.009 0 100 100 10 0 100 100</AnimationTrack> - <AnimationTrack property="rotation.y" type="EaseInOut" >0 0 100 100 4.997 0 100 100 5.009 0 100 100 10 360 100 100</AnimationTrack> - <AnimationTrack property="rotation.z" type="EaseInOut" >0 0 100 100 4.997 0 100 100 5.009 0 100 100 10 0 100 100</AnimationTrack> - <AnimationTrack property="textcolor.x" type="EaseInOut" >0 0 100 100 5.009 0.501961 100 100 10 0 100 100</AnimationTrack> - <AnimationTrack property="textcolor.y" type="EaseInOut" >0 1 100 100 5.009 0.235294 100 100 10 1 100 100</AnimationTrack> - <AnimationTrack property="textcolor.z" type="EaseInOut" >0 0 100 100 5.009 0.333333 100 100 10 0 100 100</AnimationTrack> - </Add> - <Add ref="#Text2" name="Text2" controlledproperty="di_text textstring" font="Arimo-Regular" position="435.899 267.025 0" /> - </State> - </State> - </Logic> - </Project> -</UIP> diff --git a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/barrel/barrel.import b/src/Runtime/ogl-runtime/examples/simpleqml/presentation/barrel/barrel.import deleted file mode 100644 index cf56bb4e..00000000 --- a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/barrel/barrel.import +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<UIP Version="1" > - <Project Revision="1" > - <Graph > - <Group id="__import__root__" > - <Model id="Barrel" name="Barrel" orientation="Right Handed" position="0 0 -0" rotation="-90 -0 0" rotationorder="XYZr" scale="100 100 100" sourcepath=".\meshes\Barrel.mesh#1" > - <Material id="Barrel_0001" name="Barrel" blendmode="Normal" diffuse="0.64 0.64 0.64" emissivepower="0" opacity="100" specularamount="0" specularroughness="9.60784" /> - </Model> - </Group> - </Graph> - <Import SrcFile="..\..\..\barrel.fbx" ImageDir="Images" MeshDir="Meshes" > - <Mesh > - <Source >Barrel</Source> - <Dest >.\meshes\Barrel.mesh</Dest> - </Mesh> - </Import> - </Project> -</UIP> diff --git a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/barrel/meshes/Barrel.mesh b/src/Runtime/ogl-runtime/examples/simpleqml/presentation/barrel/meshes/Barrel.mesh Binary files differdeleted file mode 100644 index 1d935a4e..00000000 --- a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/barrel/meshes/Barrel.mesh +++ /dev/null diff --git a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/barrel_no_background.uip b/src/Runtime/ogl-runtime/examples/simpleqml/presentation/barrel_no_background.uip deleted file mode 100644 index aef5ddb3..00000000 --- a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/barrel_no_background.uip +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<UIP version="4" > - <Project > - <ProjectSettings author="" company="" presentationWidth="800" presentationHeight="480" maintainAspect="False" > - <CustomColors count="16" >#ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff</CustomColors> - </ProjectSettings> - <Graph > - <Scene id="Scene" bgcolorenable="False" > - <Layer id="Layer" > - <Camera id="Camera" /> - <Light id="Light" /> - <Model id="Barrel" > - <Material id="Material" > - <Image id="Material_diffusemap" /> - <Image id="Material_normalmap" /> - <Image id="Material_emissivemap" /> - <Image id="Material_specularmap" /> - </Material> - </Model> - <Text id="Text" /> - </Layer> - </Scene> - </Graph> - <Logic > - <State name="Master Slide" component="#Scene" > - <Add ref="#Layer" /> - <Add ref="#Camera" /> - <Add ref="#Light" /> - <State id="Scene-Slide1" name="Slide1" playmode="Looping" > - <Add ref="#Barrel" name="Barrel" position="0 -42 -483" rotation="90 0 0" scale="100 100 100" sourcepath=".\barrel\meshes\Barrel.mesh#1" > - <AnimationTrack property="opacity" type="EaseInOut" /> - <AnimationTrack property="rotation.x" type="EaseInOut" >0 90 100 100 5 64 100 100 10 90 100 100</AnimationTrack> - <AnimationTrack property="rotation.y" type="EaseInOut" >0 0 100 100 5 -302 100 100 10 0 100 100</AnimationTrack> - <AnimationTrack property="rotation.z" type="EaseInOut" >0 0 100 100 5 0 100 100 10 0 100 100</AnimationTrack> - </Add> - <Add ref="#Material" bumpamount="0" diffusemap="#Material_diffusemap" emissivemap="#Material_emissivemap" fresnelPower="25" normalmap="#Material_normalmap" specularamount="4" specularmap="#Material_specularmap" specularmodel="Default" specularroughness="0.001" > - <AnimationTrack property="bumpamount" type="EaseInOut" >0 0 100 100 5 1 100 100</AnimationTrack> - </Add> - <Add ref="#Material_diffusemap" sourcepath=".\maps\barrel_barrel_Diffuse.png" /> - <Add ref="#Material_normalmap" sourcepath=".\maps\barrel_barrel_Normal.png" /> - <Add ref="#Material_emissivemap" sourcepath=".\maps\barrel_barrel_Emissive.png" /> - <Add ref="#Material_specularmap" sourcepath=".\maps\barrel_barrel_Specular.png" /> - <Add ref="#Text" name="Text" font="Arimo-Regular" position="-486.418 297.128 50.5569" textcolor="0 1 0" textstring="Barrel!" tracking="0" > - <AnimationTrack property="opacity" type="EaseInOut" >0 100 100 100 5.009 43.75 100 100 10 100 100 100</AnimationTrack> - <AnimationTrack property="rotation.x" type="EaseInOut" >0 0 100 100 4.997 0 100 100 5.009 0 100 100 10 0 100 100</AnimationTrack> - <AnimationTrack property="rotation.y" type="EaseInOut" >0 0 100 100 4.997 0 100 100 5.009 0 100 100 10 360 100 100</AnimationTrack> - <AnimationTrack property="rotation.z" type="EaseInOut" >0 0 100 100 4.997 0 100 100 5.009 0 100 100 10 0 100 100</AnimationTrack> - <AnimationTrack property="textcolor.x" type="EaseInOut" >0 0 100 100 5.009 0.501961 100 100 10 0 100 100</AnimationTrack> - <AnimationTrack property="textcolor.y" type="EaseInOut" >0 1 100 100 5.009 0.235294 100 100 10 1 100 100</AnimationTrack> - <AnimationTrack property="textcolor.z" type="EaseInOut" >0 0 100 100 5.009 0.333333 100 100 10 0 100 100</AnimationTrack> - </Add> - </State> - </State> - </Logic> - </Project> -</UIP> diff --git a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/fonts/Arimo-Regular.ttf b/src/Runtime/ogl-runtime/examples/simpleqml/presentation/fonts/Arimo-Regular.ttf Binary files differdeleted file mode 100644 index 720d4198..00000000 --- a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/fonts/Arimo-Regular.ttf +++ /dev/null diff --git a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/maps/barrel_barrel_Diffuse.png b/src/Runtime/ogl-runtime/examples/simpleqml/presentation/maps/barrel_barrel_Diffuse.png Binary files differdeleted file mode 100644 index 426f1299..00000000 --- a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/maps/barrel_barrel_Diffuse.png +++ /dev/null diff --git a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/maps/barrel_barrel_Emissive.png b/src/Runtime/ogl-runtime/examples/simpleqml/presentation/maps/barrel_barrel_Emissive.png Binary files differdeleted file mode 100644 index b6be9f3e..00000000 --- a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/maps/barrel_barrel_Emissive.png +++ /dev/null diff --git a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/maps/barrel_barrel_Normal.png b/src/Runtime/ogl-runtime/examples/simpleqml/presentation/maps/barrel_barrel_Normal.png Binary files differdeleted file mode 100644 index 4e16c47a..00000000 --- a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/maps/barrel_barrel_Normal.png +++ /dev/null diff --git a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/maps/barrel_barrel_Specular.png b/src/Runtime/ogl-runtime/examples/simpleqml/presentation/maps/barrel_barrel_Specular.png Binary files differdeleted file mode 100644 index 18825599..00000000 --- a/src/Runtime/ogl-runtime/examples/simpleqml/presentation/maps/barrel_barrel_Specular.png +++ /dev/null diff --git a/src/Runtime/ogl-runtime/examples/simpleqml/simpleqml.pro b/src/Runtime/ogl-runtime/examples/simpleqml/simpleqml.pro deleted file mode 100644 index 62afa78e..00000000 --- a/src/Runtime/ogl-runtime/examples/simpleqml/simpleqml.pro +++ /dev/null @@ -1,16 +0,0 @@ -TEMPLATE = app - -QT += widgets qml quick studio3d - -SOURCES += \ - main.cpp - -RESOURCES += simpleqml.qrc - -OTHER_FILES += \ - main.qml \ - doc/src/* \ - doc/images/* - -target.path = $$[QT_INSTALL_EXAMPLES]/studio3d/$$TARGET -INSTALLS += target diff --git a/src/Runtime/ogl-runtime/examples/simpleqml/simpleqml.qrc b/src/Runtime/ogl-runtime/examples/simpleqml/simpleqml.qrc deleted file mode 100644 index bc843a90..00000000 --- a/src/Runtime/ogl-runtime/examples/simpleqml/simpleqml.qrc +++ /dev/null @@ -1,14 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>main.qml</file> - <file>presentation/barrel.uip</file> - <file>presentation/barrel.uia</file> - <file>presentation/barrel_no_background.uip</file> - <file>presentation/barrel/meshes/Barrel.mesh</file> - <file>presentation/fonts/Arimo-Regular.ttf</file> - <file>presentation/maps/barrel_barrel_Diffuse.png</file> - <file>presentation/maps/barrel_barrel_Emissive.png</file> - <file>presentation/maps/barrel_barrel_Normal.png</file> - <file>presentation/maps/barrel_barrel_Specular.png</file> - </qresource> -</RCC> |