RenderableBoxGrid

Inherits Renderable

A RenderableBoxGrid creates a 3D box that is rendered using grid lines.

Per default the box is given a uniform size of 1x1x1 meters. It can then be scaled to the desired size. Alternatively, the size in each dimension can be specified.

Members

Name

Documentation

Type

Description

Optional

Color

The color used for the grid lines.

Color3

Value of type ‘Color3’

Yes

LineWidth

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

Double

Value of type ‘Double’

Yes

Size

The size of each dimension of the box, in meters.

Vector3<double>

Value of type ‘Vector3

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, Overlay, PostDeferredTransparent, Sticker }

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

Basic

This example adds a box grid, which is a 3D box rendered using grid lines, to the scene.

Per default, the box will be given a size of 1x1x1 meters, and here it is scaled up by a factor of 100. It will hence have a size of 100x100x100 meters.

 1local Node = {
 2  Identifier = "RenderableBoxGrid_Example",
 3  Transform = {
 4    Scale = {
 5      Type = "StaticScale",
 6      Scale = 100
 7    }
 8  },
 9  Renderable = {
10    Type = "RenderableBoxGrid"
11  },
12  GUI = {
13    Name = "RenderableBoxGrid - Basic",
14    Path = "/Examples"
15  }
16}
17
18asset.onInitialize(function()
19  openspace.addSceneGraphNode(Node)
20end)
21
22asset.onDeinitialize(function()
23  openspace.removeSceneGraphNode(Node)
24end)
Styled

This example creates a box grid where the grid lines are styled to have a specific color and line width.

 1local Node = {
 2  Identifier = "RenderableBoxGrid_Example_Styled",
 3  Renderable = {
 4    Type = "RenderableBoxGrid",
 5    LineWidth = 4.0,
 6    Color = { 1.0, 1.0, 0.0 }
 7  },
 8  GUI = {
 9    Name = "RenderableBoxGrid - Styled",
10    Path = "/Examples"
11  }
12}
13
14asset.onInitialize(function()
15  openspace.addSceneGraphNode(Node)
16end)
17
18asset.onDeinitialize(function()
19  openspace.removeSceneGraphNode(Node)
20end)
With Non-uniform Size

This example creates a box grid with a non-uniform size. The size has been set so the box is two times larger in the Y-direction.

The Size values are given in meters, and here the box is scaled up by a factor of 100. So, the box will have a size of 100 times the Size values.

 1local Node = {
 2  Identifier = "RenderableBoxGrid_Example_Size",
 3  Transform = {
 4    Scale = {
 5      Type = "StaticScale",
 6      Scale = 100
 7    }
 8  },
 9  Renderable = {
10    Type = "RenderableBoxGrid",
11    Size = { 1.0, 2.0, 1.0 }
12  },
13  GUI = {
14    Name = "RenderableBoxGrid - Non-uniform Size",
15    Path = "/Examples"
16  }
17}
18
19asset.onInitialize(function()
20  openspace.addSceneGraphNode(Node)
21end)
22
23asset.onDeinitialize(function()
24  openspace.removeSceneGraphNode(Node)
25end)