RenderableRadialGrid

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

CircleSegments

The number of segments that is used to render each circle in the grid.

Integer

Value of type ‘Integer’

Yes

Color

The color used for the grid lines.

Color3

Value of type ‘Color3’

Yes

GridSegments

Specifies the number of segments for the grid, in the radial and angular direction respectively.

Vector2<int>

Value of type ‘Vector2

Yes

Labels

The labels for the grid.

Table

LabelsComponent

Yes

LineWidth

The width of the grid lines. The larger number, the thicker the lines.

Double

Value of type ‘Double’

Yes

Radii

The radii values that determine the size of the circular grid. The first value is the radius of the inmost ring and the second is the radius of the outmost ring.

Vector2<double>

Value of type ‘Vector2

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 AU = 149597870700 -- 1 AU
 2
 3local Circle = {
 4  Identifier = "ExampleCircle",
 5  Transform = {
 6    Scale = {
 7      Type = "StaticScale",
 8      Scale = AU
 9    }
10  },
11  Renderable = {
12    Type = "RenderableRadialGrid",
13    Color = { 0.6, 0.6, 0.8 },
14    LineWidth = 3.0,
15    GridSegments = { 1, 1 },
16    CircleSegments = 64,
17    Radii = { 0.0, 1.0 }
18  },
19  GUI = {
20    Name = "Example Circle",
21    Path = "/Examples/Primitives"
22  }
23}
24
25local Ellipse = {
26  Identifier = "ExampleEllipse",
27  Transform = {
28    Scale = {
29      Type = "NonUniformStaticScale",
30      Scale = { 1.5, 1.0, 1.0 }
31    }
32  },
33  Renderable = {
34    Type = "RenderableRadialGrid",
35    Color = { 0.6, 0.8, 0.6 },
36    LineWidth = 3.0,
37    GridSegments = { 1, 1 },
38    CircleSegments = 64,
39    Radii = { 0.0, AU }
40  },
41  GUI = {
42    Name = "Example Ellipse",
43    Path = "/Examples/Primitives"
44  }
45}
46
47
48asset.onInitialize(function()
49  openspace.addSceneGraphNode(Circle)
50  openspace.addSceneGraphNode(Ellipse)
51end)
52
53asset.onDeinitialize(function()
54  openspace.removeSceneGraphNode(Ellipse)
55  openspace.removeSceneGraphNode(Circle)
56end)
57
58asset.export(Circle)
59asset.export(Ellipse)
60
61
62
63asset.meta = {
64  Name = "Primitives Example",
65  Description = [[Examples of different simple rendered primitives, such as circles
66    and ellipses.]],
67  Author = "OpenSpace Team",
68  URL = "http://openspaceproject.com",
69  License = "MIT license"
70}