GlobeRotation
Inherits Rotation
Members
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
The globe on which the longitude/latitude is specified. |
|
A valid scene graph node with a RenderableGlobe |
No |
|
A rotation angle that can be used to rotate the object around its own y-axis, which will be pointing out of the globe’s surface. |
|
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 set to true, the heightmap will be used when computing the surface normal. This means that the object will be rotated to lay flat on the surface at the given coordinate and follow the shape of the landscape. |
|
Value of type ‘Boolean’ |
Yes |
Inherited members from Rotation
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
The type of the rotation that is described in this element. The available types of rotations depend on the configuration of the application and can be written to disk on application startup into the FactoryDocumentation |
|
Must name a valid Rotation type |
No |
Asset Examples
Angle
This asset creates a rotation that places a coordinate axes on the surface of a
planetary body. The rotation causes the coordinate axes to remain fixed to the surface
of the globe. Additionally, the coordinate axes are rotated around the up-axis by a
fixed amount.
In order for this feature to work properly, the coordinate axes need to be located at
the same place as well, so this example also needs a GlobeTranslation
applied.
1-- The example needs a `RenderableGlobe` as a parent to function
2local Globe = {
3 Identifier = "GlobeRotation_Example_Angle_Globe",
4 Renderable = {
5 Type = "RenderableGlobe"
6 },
7 GUI = {
8 Name = "GlobeRotation - Angle (Globe)",
9 Path = "/Examples"
10 }
11}
12
13local Node = {
14 Identifier = "GlobeRotation_Example_Angle",
15 Parent = "GlobeRotation_Example_Angle_Globe",
16 Transform = {
17 Translation = {
18 Type = "GlobeTranslation",
19 Globe = "GlobeRotation_Example_Angle_Globe",
20 Latitude = 20.0,
21 Longitude = -45.0
22 },
23 Rotation = {
24 Type = "GlobeRotation",
25 Globe = "GlobeRotation_Example_Angle_Globe",
26 Latitude = 20.0,
27 Longitude = -45.0,
28 Angle = 45.0
29 }
30 },
31 Renderable = {
32 Type = "RenderableCartesianAxes"
33 },
34 GUI = {
35 Name = "GlobeRotation - Angle",
36 Path = "/Examples"
37 }
38}
39
40asset.onInitialize(function()
41 openspace.addSceneGraphNode(Globe)
42 openspace.addSceneGraphNode(Node)
43end)
44
45asset.onDeinitialize(function()
46 openspace.removeSceneGraphNode(Node)
47 openspace.removeSceneGraphNode(Globe)
48end)
UseCamera
This asset creates a rotation that places a coordinate axes on the surface of a
planetary body. The rotation causes the coordinate axes to remain fixed to the surface
of the globe. In this example, the rotation of the object will be updated based on the
location of the camera. When loading this example, make sure to focus the camera on
the Globe object for the follow-function to work.
In order for this feature to work properly, the coordinate axes need to be located at
the same place as well, so this example also needs a GlobeTranslation
applied, which
in this case also updated based on the camera location.
1-- The example needs a `RenderableGlobe` as a parent to function
2local Globe = {
3 Identifier = "GlobeRotation_Example_UseCamera_Globe",
4 Renderable = {
5 Type = "RenderableGlobe"
6 },
7 GUI = {
8 Name = "GlobeRotation - UseCamera (Globe)",
9 Path = "/Examples"
10 }
11}
12
13local Node = {
14 Identifier = "GlobeRotation_Example_UseCamera",
15 Parent = "GlobeRotation_Example_UseCamera_Globe",
16 Transform = {
17 Translation = {
18 Type = "GlobeTranslation",
19 Globe = "GlobeRotation_Example_UseCamera_Globe",
20 Latitude = 20.0,
21 Longitude = -45.0,
22 UseCamera = true
23 },
24 Rotation = {
25 Type = "GlobeRotation",
26 Globe = "GlobeRotation_Example_UseCamera_Globe",
27 Latitude = 20.0,
28 Longitude = -45.0,
29 Angle = 45.0,
30 UseCamera = true
31 }
32 },
33 Renderable = {
34 Type = "RenderableCartesianAxes"
35 },
36 GUI = {
37 Name = "GlobeRotation - UseCamera",
38 Path = "/Examples"
39 }
40}
41
42asset.onInitialize(function()
43 openspace.addSceneGraphNode(Globe)
44 openspace.addSceneGraphNode(Node)
45end)
46
47asset.onDeinitialize(function()
48 openspace.removeSceneGraphNode(Node)
49 openspace.removeSceneGraphNode(Globe)
50end)
Basic
This asset creates a rotation that places a coordinate axes on the surface of a
planetary body. The rotation causes the coordinate axes to remain fixed to the surface
of the globe.
In order for this feature to work properly, the coordinate axes need to be located at
the same place as well, so this example also needs a GlobeTranslation
applied.
1-- The example needs a `RenderableGlobe` as a parent to function
2local Globe = {
3 Identifier = "GlobeRotation_Example_Globe",
4 Renderable = {
5 Type = "RenderableGlobe"
6 },
7 GUI = {
8 Name = "GlobeRotation - Basic (Globe)",
9 Path = "/Examples"
10 }
11}
12
13local Node = {
14 Identifier = "GlobeRotation_Example",
15 Parent = "GlobeRotation_Example_Globe",
16 Transform = {
17 Translation = {
18 Type = "GlobeTranslation",
19 Globe = "GlobeRotation_Example_Globe",
20 Latitude = 20.0,
21 Longitude = -45.0
22 },
23 Rotation = {
24 Type = "GlobeRotation",
25 Globe = "GlobeRotation_Example_Globe",
26 Latitude = 20.0,
27 Longitude = -45.0
28 }
29 },
30 Renderable = {
31 Type = "RenderableCartesianAxes"
32 },
33 GUI = {
34 Name = "GlobeRotation - Basic",
35 Path = "/Examples"
36 }
37}
38
39asset.onInitialize(function()
40 openspace.addSceneGraphNode(Globe)
41 openspace.addSceneGraphNode(Node)
42end)
43
44asset.onDeinitialize(function()
45 openspace.removeSceneGraphNode(Node)
46 openspace.removeSceneGraphNode(Globe)
47end)