RenderableGlobe

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

Layers

A list of all the layers that should be added

Table

Table parameters

No

Labels

Specifies information about planetary labels that can be rendered on the object’s surface

Table

GlobeLabelsComponent

Yes

LightSourceNode

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

String

Value of type ‘String’

Yes

PerformShading

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

Boolean

Value of type ‘Boolean’

Yes

Radii

Specifies the radii for this planet. If the Double version of this is used, all three radii are assumed to be equal

Vector3<double>, or Double

Value of type ‘Vector3’, or Value of type ‘Double’

Yes

RenderAtDistance

Specifies if distance culling should be disabled.

Boolean

Value of type ‘Boolean’

Yes

Rings

Table

RingsComponent

Yes

ShadowGroup

Table

Table parameters

Yes

Shadows

Table

ShadowComponent

Yes

Inherited members from Renderable

Name

Documentation

Type

Description

Optional

DimInAtmosphere

Enables/Disables if the object should be dimmed when the camera is in the sunny part of an atmosphere

Boolean

Value of type ‘Boolean’

Yes

Enabled

This setting determines whether this object will be visible or not

Boolean

Value of type ‘Boolean’

Yes

Opacity

This value determines the opacity of this renderable. A value of 0 means completely transparent

Double

In range: ( 0,1 )

Yes

RenderBinMode

This value specifies if the renderable should be rendered in the Background,Opaque, Pre/PostDeferredTransparency, or Overlay rendering step

String

In list { Background, Opaque, PreDeferredTransparent, PostDeferredTransparent, Overlay }

Yes

Tag

A single tag or a list of tags that this renderable will respond to when setting properties

Table, or String

Value of type ‘Table’, or Value of type ‘String’

Yes

Type

This tells the type of the renderable

String

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

*

Table

LayerManager

No

Table parameters for ShadowGroup
  • Optional: Yes

Name

Documentation

Type

Description

Optional

Casters

Table

Table parameters

No

Sources

Table

Table parameters

No

Table parameters for Casters

  • Optional: No

Name

Documentation

Type

Description

Optional

*

Table

Table parameters

Yes

Table parameters for *

  • Optional: Yes

Name

Documentation

Type

Description

Optional

Name

String

Value of type ‘String’

No

Radius

Double

Value of type ‘Double’

No

Table parameters for Sources

  • Optional: No

Name

Documentation

Type

Description

Optional

*

Table

Table parameters

Yes

Table parameters for *

  • Optional: Yes

Name

Documentation

Type

Description

Optional

Name

String

Value of type ‘String’

No

Radius

Double

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)