diff --git a/ground/gcs/src/share/qml/CubeView.qml b/ground/gcs/src/share/qml/CubeView.qml new file mode 100644 index 000000000..d2d81fd3d --- /dev/null +++ b/ground/gcs/src/share/qml/CubeView.qml @@ -0,0 +1,20 @@ +import QtQuick 2.4 +import osgQtQuick 1.0 + +Item { + OSGViewport { + anchors.fill: parent + focus: true + sceneData: cubeNode + camera: camera + + OSGCubeNode { + id: cubeNode + } + + OSGCamera { + id: camera + fieldOfView: 90 + } + } +} diff --git a/ground/gcs/src/share/qml/EarthView.qml b/ground/gcs/src/share/qml/EarthView.qml new file mode 100644 index 000000000..271bcd07d --- /dev/null +++ b/ground/gcs/src/share/qml/EarthView.qml @@ -0,0 +1,42 @@ +import QtQuick 2.4 +import osgQtQuick 1.0 +import PfdQmlEnums 1.0 + +Item { + OSGViewport { + anchors.fill: parent + focus: true + sceneData: skyNode + camera: camera + + OSGSkyNode { + id: skyNode + sceneData: terrainNode + dateTime: getDateTime() + minimumAmbientLight: qmlWidget.minimumAmbientLight + + function getDateTime() { + switch(qmlWidget.timeMode) { + case Pfd.Local: + return new Date(); + case Pfd.PredefinedTime: + return qmlWidget.dateTime; + } + } + + } + + OSGFileNode { + id: terrainNode + source: qmlWidget.terrainFile + async: false + } + + OSGCamera { + id: camera + fieldOfView: 90 + manipulatorMode: OSGCamera.Earth + } + + } +}