RenderableNodeLine

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

Color

This value determines 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

This value specifies the line width

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

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 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 Example",
17    Path = "/Example",
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  Version = "1.0",
38  Description = [[Example of a RenderableNodeLine, that can be used to draw an line
39    between two scene graph nodes.]],
40  Author = "OpenSpace Team",
41  URL = "http://openspaceproject.com",
42  License = "MIT license"
43}