Skip to content
Snippets Groups Projects
Commit ce29cdf5 authored by Tomi Korpipää's avatar Tomi Korpipää
Browse files

Modify LowEndCluster to OpenGL runtime

parent a9864b2b
No related branches found
No related tags found
No related merge requests found
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<application xmlns="http://qt.io/qt3dstudio/uia"> <application xmlns="http://qt.io/qt3dstudio/uia">
<assets initial="Presentation"> <assets initial="Presentation">
<!-- <presentation id="Presentation" src="presentations/Presentation.uip"/>--> <presentation id="Presentation" src="presentations/Presentation.uip"/>
<presentation id="Presentation" src="Presentation_1_1.uip"/> <dataInput metadata="" name="carSlide" type="String"/>
<dataInput metadata="" name="roadSpeed" type="Float"/> <dataInput metadata="" name="roadSpeed" type="Float"/>
</assets> </assets>
<statemachine ref="#logic"> <statemachine ref="#logic">
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<CustomColors count="16" >#4f456e #56416e #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff</CustomColors> <CustomColors count="16" >#4f456e #56416e #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff</CustomColors>
</ProjectSettings> </ProjectSettings>
<Graph > <Graph >
<Scene id="Scene" > <Scene id="Scene" controlledproperty="" >
<Layer id="Layer" variants="" > <Layer id="Layer" variants="" >
<Camera id="Camera" /> <Camera id="Camera" />
<Component id="Car" > <Component id="Car" >
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<Logic > <Logic >
<State name="Master Slide" component="#Scene" > <State name="Master Slide" component="#Scene" >
<Add ref="#Layer" background="SolidColor" backgroundcolor="0 0 0" disabledepthprepass="True" disabledepthtest="False" /> <Add ref="#Layer" background="SolidColor" backgroundcolor="0 0 0" disabledepthprepass="True" disabledepthtest="False" />
<Add ref="#Camera" position="0 546.454 -720.64" rotation="44.5 0 0" > <Add ref="#Camera" clipfar="3500" position="0 546.454 -720.64" rotation="44.5 0 0" >
<AnimationTrack property="position.x" type="EaseInOut" >0.008 0 0 0 2.003 0 0 0 22 0 0 0 24 0 0 0 44 0 0 0</AnimationTrack> <AnimationTrack property="position.x" type="EaseInOut" >0.008 0 0 0 2.003 0 0 0 22 0 0 0 24 0 0 0 44 0 0 0</AnimationTrack>
<AnimationTrack property="position.y" type="EaseInOut" >0.008 258.454 0 0 2.003 811.454 0 0 22 811.454 0 0 24 258.454 0 0 44 258.454 0 0</AnimationTrack> <AnimationTrack property="position.y" type="EaseInOut" >0.008 258.454 0 0 2.003 811.454 0 0 22 811.454 0 0 24 258.454 0 0 44 258.454 0 0</AnimationTrack>
<AnimationTrack property="position.z" type="EaseInOut" >0.008 -720.64 0 0 2.003 -616.64 0 0 22 -616.64 0 0 24 -720.64 0 0 44 -720.64 0 0</AnimationTrack> <AnimationTrack property="position.z" type="EaseInOut" >0.008 -720.64 0 0 2.003 -616.64 0 0 22 -616.64 0 0 24 -720.64 0 0 44 -720.64 0 0</AnimationTrack>
...@@ -50,9 +50,9 @@ ...@@ -50,9 +50,9 @@
</Add> </Add>
<Add ref="#__Container" name="__Container" /> <Add ref="#__Container" name="__Container" />
<Add ref="#materials/lowpolyCoupe" name="materials/lowpolyCoupe" importfile="../models/lowPolyCar/lowPolyCar.import" shaderlighting="None" /> <Add ref="#materials/lowpolyCoupe" name="materials/lowpolyCoupe" importfile="../models/lowPolyCar/lowPolyCar.import" shaderlighting="None" />
<Add ref="#materials/lowpolyCoupe_diffusemap" importfile="../models/lowPolyCar/lowPolyCar.import" sourcepath="models/lowPolyCar/maps/Low_lowpolyCoupe_Diffuse.jpg" subpresentation="" /> <Add ref="#materials/lowpolyCoupe_diffusemap" importfile="../models/lowPolyCar/lowPolyCar.import" sourcepath="../models/lowPolyCar/maps/Low_lowpolyCoupe_Diffuse.jpg" subpresentation="" />
<Add ref="#materials/lowpolyCoupeRed" name="materials/lowpolyCoupeRed" blendmode="Normal" bumpamount="0.5" diffuse="1 1 1" diffuselightwrap="0" diffusemap="#materials/lowpolyCoupeRed_diffusemap" displaceamount="20" emissivecolor="1 1 1" emissivepower="0" fresnelPower="0" importfile="../models/lowPolyCar/lowPolyCar.import" importid="lowpolyCoupe" ior="1.5" opacity="100" shaderlighting="None" sourcepath="" specularamount="0" specularmodel="Default" specularroughness="0" speculartint="1 1 1" translucentfalloff="1" type="Material" vertexcolors="False" /> <Add ref="#materials/lowpolyCoupeRed" name="materials/lowpolyCoupeRed" blendmode="Normal" bumpamount="0.5" diffuse="1 1 1" diffuselightwrap="0" diffusemap="#materials/lowpolyCoupeRed_diffusemap" displaceamount="20" emissivecolor="1 1 1" emissivepower="0" fresnelPower="0" importfile="../models/lowPolyCar/lowPolyCar.import" importid="lowpolyCoupe" ior="1.5" opacity="100" shaderlighting="None" sourcepath="" specularamount="0" specularmodel="Default" specularroughness="0" speculartint="1 1 1" translucentfalloff="1" type="Material" vertexcolors="False" />
<Add ref="#materials/lowpolyCoupeRed_diffusemap" importfile="../models/lowPolyCar/lowPolyCar.import" importid="" sourcepath="models/lowPolyCar/maps/Low_lowpolyCoupe_Diffuse_red.jpg" subpresentation="" /> <Add ref="#materials/lowpolyCoupeRed_diffusemap" importfile="../models/lowPolyCar/lowPolyCar.import" importid="" sourcepath="../models/lowPolyCar/maps/Low_lowpolyCoupe_Diffuse_red.jpg" subpresentation="" />
<State id="Scene-Slide1" name="Slide1" playmode="Looping" > <State id="Scene-Slide1" name="Slide1" playmode="Looping" >
<Set ref="#Layer" endtime="44000" /> <Set ref="#Layer" endtime="44000" />
<Set ref="#Camera" endtime="44000" /> <Set ref="#Camera" endtime="44000" />
......
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Window 2.12 import QtQuick.Window 2.12
//import QtStudio3D 2.3 import QtStudio3D.OpenGL 2.4
import QtStudio3D 1.1
Window { Window {
id: main id: main
...@@ -10,7 +9,7 @@ Window { ...@@ -10,7 +9,7 @@ Window {
height: 480 height: 480
title: qsTr("Low End Cluster") title: qsTr("Low End Cluster")
color: "black" color: "black"
visibility: Window.FullScreen //visibility: Window.FullScreen // Use this only if display size is 1280 x 480
property real speedrotation: sim.speedRotation property real speedrotation: sim.speedRotation
property real rpmrotation: sim.rpmRotation property real rpmrotation: sim.rpmRotation
...@@ -44,12 +43,10 @@ Window { ...@@ -44,12 +43,10 @@ Window {
readonly property int secondsBetweenUpdates: 60 // Use a 1 minute average for the average FPS counter readonly property int secondsBetweenUpdates: 60 // Use a 1 minute average for the average FPS counter
onRpmrotationChanged: { onRpmrotationChanged: {
if (rpmrotation < previousrpmrotation) { if (rpmrotation < previousrpmrotation) {
rpmForward = false; rpmForward = false;
rpmTrailOpacity = 2 * (previousrpmrotation - rpmrotation); rpmTrailOpacity = 2 * (previousrpmrotation - rpmrotation);
} } else {
else {
rpmForward = true; rpmForward = true;
rpmTrailOpacity = -2 * (previousrpmrotation - rpmrotation); rpmTrailOpacity = -2 * (previousrpmrotation - rpmrotation);
} }
...@@ -59,8 +56,7 @@ Window { ...@@ -59,8 +56,7 @@ Window {
if (speedrotation < previousspeedrotation) { if (speedrotation < previousspeedrotation) {
speedForward = false; speedForward = false;
speedTrailOpacity = 2 * (previousspeedrotation - speedrotation); speedTrailOpacity = 2 * (previousspeedrotation - speedrotation);
} } else {
else {
speedForward = true; speedForward = true;
speedTrailOpacity = -2 * (previousspeedrotation - speedrotation); speedTrailOpacity = -2 * (previousspeedrotation - speedrotation);
} }
...@@ -71,16 +67,18 @@ Window { ...@@ -71,16 +67,18 @@ Window {
avgFrames++; avgFrames++;
} }
onGaugeoffsetChanged: { onGaugeoffsetChanged: {
if (gaugeoffset == 0 || gaugeoffset == -600) if (gaugeoffset == 0)
carComponent.goToSlide(carComponent.elementPath, true, true) carPosition.value = "Top";
else if (gaugeoffset == -600)
carPosition.value = "Bottom";
} }
FontLoader { FontLoader {
id: customfont id: customfont
source: "qrc:/TitilliumWeb-Italic.ttf" source: "qrc:/TitilliumWeb-Italic.ttf"
//onStatusChanged: console.log("LOADER"+status)
} }
//3D Presentation // 3D Presentation
Studio3D { Studio3D {
id: adasview id: adasview
anchors.top: topbar.bottom anchors.top: topbar.bottom
...@@ -89,7 +87,7 @@ Window { ...@@ -89,7 +87,7 @@ Window {
height: 290 height: 290
ViewerSettings { ViewerSettings {
scaleMode: ViewerSettings.ScaleModeCenter scaleMode: ViewerSettings.ScaleModeFit
} }
Presentation { Presentation {
...@@ -98,12 +96,13 @@ Window { ...@@ -98,12 +96,13 @@ Window {
id: carComponent id: carComponent
elementPath: "Scene.Layer.Car" elementPath: "Scene.Layer.Car"
} }
// No support for this in RT1.1
// DataInput{ DataInput {
// id: carPosition id: carPosition
// name: "carSlide" name: "carSlide"
// value: "Top" value: "Top"
// } }
DataInput { DataInput {
id: roadPosition id: roadPosition
name: "roadSpeed" name: "roadSpeed"
......
...@@ -27,9 +27,10 @@ ...@@ -27,9 +27,10 @@
<file>parkbrake.jpg</file> <file>parkbrake.jpg</file>
<file>seatbelt.jpg</file> <file>seatbelt.jpg</file>
<file>Presentation/models/lowPolyCar/maps/Low_lowpolyCoupe_Diffuse_red.jpg</file> <file>Presentation/models/lowPolyCar/maps/Low_lowpolyCoupe_Diffuse_red.jpg</file>
<file>Presentation/Presentation_1_1.uip</file>
<file>FpsDisplay.qml</file> <file>FpsDisplay.qml</file>
<file>needleTrail.png</file> <file>needleTrail.png</file>
<file>SimulationData.qml</file> <file>SimulationData.qml</file>
<file>Presentation/materials/lowpolyCoupeRed.materialdef</file>
<file>Presentation/presentations/Presentation.uip</file>
</qresource> </qresource>
</RCC> </RCC>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment