RenderableGlobe
Inherits Renderable
Members
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
A list of all the layers that should be added |
|
No |
|
|
Specifies information about planetary labels that can be rendered on the object’s surface |
|
Yes |
|
|
This value is the name of a scene graph node that should be used as the source of illumination for the globe. If this value is not specified, the solar system’s Sun is used instead |
|
Value of type ‘String’ |
Yes |
|
Specifies whether the planet should be shaded by the primary light source or not. If it is disabled, all parts of the planet are illuminated |
|
Value of type ‘Boolean’ |
Yes |
|
Specifies the radii for this planet. If the Double version of this is used, all three radii are assumed to be equal |
|
Value of type ‘Vector3 |
Yes |
|
Specifies if distance culling should be disabled. |
|
Value of type ‘Boolean’ |
Yes |
|
|
Yes |
||
|
|
Yes |
||
|
|
Yes |
Inherited members from Renderable
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
Enables/Disables if the object should be dimmed when the camera is in the sunny part of an atmosphere |
|
Value of type ‘Boolean’ |
Yes |
|
This setting determines whether this object will be visible or not |
|
Value of type ‘Boolean’ |
Yes |
|
This value determines the opacity of this renderable. A value of 0 means completely transparent |
|
In range: ( 0,1 ) |
Yes |
|
This value specifies if the renderable should be rendered in the Background,Opaque, Pre/PostDeferredTransparency, or Overlay rendering step |
|
In list { Background, Opaque, PreDeferredTransparent, PostDeferredTransparent, Overlay } |
Yes |
|
A single tag or a list of tags that this renderable will respond to when setting properties |
|
Value of type ‘Table’, or Value of type ‘String’ |
Yes |
|
This tells the type of the renderable |
|
Value of type ‘String’ |
Yes |
Table parameters for Layers
A list of all the layers that should be added
Optional: No
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
|
No |
Table parameters for ShadowGroup
Optional: Yes
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
|
No |
||
|
|
No |
Table parameters for Casters
Optional: No
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
|
Yes |
Table parameters for *
Optional: Yes
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
|
Value of type ‘String’ |
No |
|
|
|
Value of type ‘Double’ |
No |
Table parameters for Sources
Optional: No
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
|
Yes |
Table parameters for *
Optional: Yes
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
|
Value of type ‘String’ |
No |
|
|
|
Value of type ‘Double’ |
No |
Asset Examples
1-- Basic
2-- This example file adds a layer to a globe that has a base layer and then replaces one
3-- hemisphere of the planet with a single image. Recommended reading for this example is
4-- the documentation on the DefaultTileProvider.
5
6-- Download some example images that we can use
7local images = asset.resource({
8 Name = "Earth Textures",
9 Type = "HttpSynchronization",
10 Identifier = "earth_textures",
11 Version = 3
12})
13
14-- Define the TileProvider
15local TileProvider = {
16 Identifier = "Example",
17 Type = "TileProviderByIndex",
18 Enabled = true,
19 -- The default tile provider that is used for the whole globe
20 DefaultTileProvider = {
21 Identifier = "Blue_Marble",
22 FilePath = images .. "earth_bluemarble.jpg"
23 },
24 TileProviders = {
25 -- We only define one additional tile provider that overwrites the right
26 -- hemisphere of the globe
27 {
28 Index = { X = 0, Y = 0, Level = 2 },
29 TileProvider = {
30 Identifier = "Blue_Marble_Night",
31 FilePath = images .. "earth_night.png"
32 }
33 }
34 }
35}
36
37-- Define the scene graph node
38local Node = {
39 Identifier = "TileProviderByIndex_Example",
40 Renderable = {
41 Type = "RenderableGlobe",
42 Layers = {
43 -- The globe has exactly one layer, which is the one we defined above
44 ColorLayers = { TileProvider }
45 }
46 },
47 GUI = {
48 Name = "Basic",
49 Path = "/Examples/TileProviderByIndex"
50 }
51}
52
53asset.onInitialize(function()
54 openspace.addSceneGraphNode(Node)
55end)
56
57asset.onDeinitialize(function()
58 openspace.removeSceneGraphNode(Node)
59end)