RenderableNodeLine

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

Color

The RGB color for the line.

Color3

Value of type ‘Color3’

Yes

EndNode

The identifier of the node the line ends at. Defaults to ‘Root’ if not specified.

Identifier

An identifier string. May not contain ‘.’, spaces, newlines, or tabs

Yes

EndOffset

A distance to the end node at which the rendered line should end. By default it takes a value in meters, but if ‘UseRelativeOffsets’ is set to true it is read as a multiplier times the bounding sphere of the node.

Double

Value of type ‘Double’

Yes

LineWidth

The width of the line. The larger number, the thicker the line.

Double

Value of type ‘Double’

Yes

StartNode

The identifier of the node the line starts from. Defaults to ‘Root’ if not specified.

Identifier

An identifier string. May not contain ‘.’, spaces, newlines, or tabs

Yes

StartOffset

A distance from the start node at which the rendered line should begin. By default it takes a value in meters, but if ‘UseRelativeOffsets’ is set to true it is read as a multiplier times the bounding sphere of the node.

Double

Value of type ‘Double’

Yes

UseRelativeOffsets

If true, the offset values are interpreted as relative values to be multiplied with the bounding sphere of the start/end node. If false, the value is interpreted as a distance in meters.

Boolean

Value of type ‘Boolean’

Yes

Inherited members from Renderable

Name

Documentation

Type

Description

Optional

DimInAtmosphere

Decides if the object should be dimmed (i.e. faded out) when the camera is in the sunny part of an atmosphere.

Boolean

Value of type ‘Boolean’

Yes

Enabled

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

A value that specifies if the renderable should be rendered in the Background, Opaque, Pre-/PostDeferredTransparency, Overlay, or Sticker 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

The type of the renderable.

String

Value of type ‘String’

Yes

Asset Examples

 1local earth = asset.require("scene/solarsystem/planets/earth/earth")
 2local mars = asset.require("scene/solarsystem/planets/mars/mars")
 3
 4
 5
 6local RenderableNodeLineExample = {
 7  Identifier = "RenderableNodeLineExample",
 8  Renderable = {
 9    Type = "RenderableNodeLine",
10    StartNode = earth.Earth.Identifier,
11    EndNode = mars.Mars.Identifier,
12    Color = { 0.5, 0.5, 0.5 },
13    LineWidth = 2
14  },
15  GUI = {
16    Name = "RenderableNodeLine - Basic",
17    Path = "/Examples",
18    Description = "Draws a line between two nodes in the scene."
19  }
20}
21
22
23asset.onInitialize(function()
24  openspace.addSceneGraphNode(RenderableNodeLineExample)
25end)
26
27asset.onDeinitialize(function()
28  openspace.removeSceneGraphNode(RenderableNodeLineExample)
29end)
30
31asset.export(RenderableNodeLineExample)
32
33
34
35asset.meta = {
36  Name = "RenderableNodeLine Example asset",
37  Description = [[Example of a RenderableNodeLine, that can be used to draw an line
38    between two scene graph nodes.]],
39  Author = "OpenSpace Team",
40  URL = "http://openspaceproject.com",
41  License = "MIT license"
42}