QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GeoMapDropLine.qml
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * (c) 2009-2024 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4 *
5 * QGroundControl is licensed according to the terms in the file
6 * COPYING.md in the root of the source code directory.
7 *
8 ****************************************************************************/
9
10import QtQuick
11import QtQuick3D
12
13/// Drop line from a floating marker to the terrain below (Google Earth-style
14/// "extrude"): anchors the marker visually so its altitude is readable.
15/// Place inside the marker's delegate3D node; dropLength / lineScale come
16/// from the marker's GeoMapDropShadow, which owns the drop computation.
17Model {
18 id: root
19
20 property real dropLength: 0 ///< Scene-space marker-to-ground distance
21 property real lineScale: 0 ///< Diameter scale (GeoMapDropShadow.dropLineScale)
22 property color lineColor: "white"
23
24 source: "#Cylinder" // built-in: 100x100 units, height along +Y
25 visible: dropLength > 0
26 opacity: 0.75
27 eulerRotation.x: 90 // stand the height axis up along scene z
28 position: Qt.vector3d(0, 0, -dropLength / 2)
29 scale: Qt.vector3d(lineScale, dropLength / 100, lineScale)
30
31 materials: PrincipledMaterial {
32 lighting: PrincipledMaterial.NoLighting
33 baseColor: root.lineColor
34 }
35}