GlobeTranslation
Inherits Translation
Members
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
The globe on which the longitude/latitude is specified. |
|
A valid scene graph node with a RenderableGlobe |
No |
|
The altitude in meters. If the ‘UseHeightmap’ property is ‘true’, this is an offset from the actual surface of the globe. If not, this is an offset from the reference ellipsoid. The default value is 0.0. |
|
Value of type ‘Double’ |
Yes |
|
The latitude of the location on the globe’s surface. The value can range from -90 to 90, with negative values representing the southern hemisphere of the globe. The default value is 0.0. |
|
Value of type ‘Double’ |
Yes |
|
The longitude of the location on the globe’s surface. The value can range from -180 to 180, with negative values representing the western hemisphere of the globe. The default value is 0.0. |
|
Value of type ‘Double’ |
Yes |
|
If this value is ‘true’, the lat and lon are updated to match the camera. |
|
Value of type ‘Boolean’ |
Yes |
|
If this value is ‘true’, the altitude is updated to match the camera. |
|
Value of type ‘Boolean’ |
Yes |
|
If this value is ‘true’, the altitude specified in ‘Altitude’ will be treated as an offset from the heightmap. Otherwise, it will be an offset from the globe’s reference ellipsoid. The default value is ‘false’. |
|
Value of type ‘Boolean’ |
Yes |
Inherited members from Translation
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
The type of translation that is described in this element. The available types of translations depend on the configuration of the application and can be written to disk on application startup into the FactoryDocumentation |
|
Must name a valid Translation type |
No |
Asset Examples
1-- Basic
2-- This asset creates a rotation that places a coordinate axes on the surface of a
3-- planetary body. The rotation causes the coordinate axes to remain fixed to the surface
4-- of the globe.
5--
6-- In order for this feature to work properly, the coordinate axes need to be located at
7-- the same place as well, so this example also needs a `GlobeTranslation` applied.
8
9-- The example needs a `RenderableGlobe` as a parent to function
10local Globe = {
11 Identifier = "GlobeRotation_Example_Globe",
12 Renderable = {
13 Type = "RenderableGlobe"
14 },
15 GUI = {
16 Name = "GlobeRotation - Basic (Globe)",
17 Path = "/Examples"
18 }
19}
20
21local Node = {
22 Identifier = "GlobeRotation_Example",
23 Parent = "GlobeRotation_Example_Globe",
24 Transform = {
25 Translation = {
26 Type = "GlobeTranslation",
27 Globe = "GlobeRotation_Example_Globe",
28 Latitude = 20.0,
29 Longitude = -45.0
30 },
31 Rotation = {
32 Type = "GlobeRotation",
33 Globe = "GlobeRotation_Example_Globe",
34 Latitude = 20.0,
35 Longitude = -45.0
36 }
37 },
38 Renderable = {
39 Type = "RenderableCartesianAxes"
40 },
41 GUI = {
42 Name = "GlobeRotation - Basic",
43 Path = "/Examples"
44 }
45}
46
47asset.onInitialize(function()
48 openspace.addSceneGraphNode(Globe)
49 openspace.addSceneGraphNode(Node)
50end)
51
52asset.onDeinitialize(function()
53 openspace.removeSceneGraphNode(Node)
54 openspace.removeSceneGraphNode(Globe)
55end)