mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
LP-29 added EarthView.qml and CubeView.qml
This commit is contained in:
parent
edade72b01
commit
ad83ecca41
20
ground/gcs/src/share/qml/CubeView.qml
Normal file
20
ground/gcs/src/share/qml/CubeView.qml
Normal file
@ -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
|
||||
}
|
||||
}
|
||||
}
|
42
ground/gcs/src/share/qml/EarthView.qml
Normal file
42
ground/gcs/src/share/qml/EarthView.qml
Normal file
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user