RenderableTravelSpeed

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

Target

This value sets which scene graph node to target with the light speed indicator

String

Value of type ‘String’

No

Color

This value determines the RGB color for the line

Vector3<double>

Value of type ‘Vector3

Yes

FadeLength

This value specifies the length of the faded tail of the light indicator set in light seconds

Double

Value of type ‘Double’

Yes

IndicatorLength

This value specifies the length of the light indicator set in light seconds

Double

Value of type ‘Double’

Yes

LineWidth

This value specifies the line width

Double

Value of type ‘Double’

Yes

TravelSpeed

The speed of light is the default value

Double

Value of type ‘Double’

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

Asset Examples

 1local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
 2local earthTransforms = asset.require("scene/solarsystem/planets/earth/transforms")
 3local coreKernels = asset.require("spice/core")
 4
 5
 6
 7local TravelSpeedIndicator = {
 8  Identifier = "TravelSpeedIndicator-2000",
 9  --SunIAU adds an extra rotation. Using barycenter, then offsetting to SunIAU
10  Parent = sunTransforms.SolarSystemBarycenter.Identifier,
11  -- TODO Elon: 21 April 2022. Interaction sphere should not depend on the transform scale.
12  -- InteractionSphere = sunAsset.Sun.Renderable.Radii[1] * 1.05,
13  InteractionSphere = 695700000.0,
14  Transform = {
15    Translation = {
16      Type = "SpiceTranslation",
17      Target = coreKernels.ID.Sun,
18      Observer = coreKernels.ID.SolarSystemBarycenter
19    }
20  },
21  Renderable = {
22    Type = "RenderableTravelSpeed",
23    Target = earthTransforms.EarthCenter.Identifier,
24    LineWidth = 4,
25    IndicatorLength = 10,
26    FadeLength = 10
27  },
28   GUI = {
29    Path = "/Solar System/Heliosphere",
30    Name = "Speed indicator",
31    Description = "Speed of light indicator from sun to earth"
32  }
33}
34
35
36asset.onInitialize(function()
37  openspace.addSceneGraphNode(TravelSpeedIndicator)
38end)
39
40asset.onDeinitialize(function()
41  openspace.removeSceneGraphNode(TravelSpeedIndicator)
42end)
43
44asset.export(TravelSpeedIndicator)
45
46
47
48asset.meta = {
49  Name = "Light travel from sun to earth",
50  Version = "1.0",
51  Description = "Speed of light indicator from sun to earth",
52  Author = "CCMC, Christian Adamsson, Emilie Ho",
53  URL = "",
54  License = "MIT"
55}