RenderableCartesianAxes

Inherits Renderable

The RenderableCartesianAxes can be used to render the local Cartesian coordinate system, or reference frame, of another scene graph node. The colors of the axes can be customized but are per default set to Red, Green and Blue, for the X-, Y- and Z-axis, respectively.

To add the axes, create a scene graph node with the RenderableCartesianAxes renderable and add it as a child to the other scene graph node, i.e. specify the other node as the Parent of the node with this renderable. Also, the axes have to be scaled to match the parent object for the axes to be visible in the scene, for example using a StaticScale.

Members

Name

Documentation

Type

Description

Optional

XColor

This value determines the color of the x axis

Color3

Value of type ‘Color3’

Yes

YColor

This value determines the color of the y axis

Color3

Value of type ‘Color3’

Yes

ZColor

This value determines the color of the z axis

Color3

Value of type ‘Color3’

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

 1-- Basic
 2-- This asset creates a SceneGraphNode that only displays coordinate axes. The coordinate
 3-- axis normally have a length of 1 meter and are scaled in this example by a factor of
 4-- 149597870700, which means they will be 149597870700 m (1 AU) long, thus reaching the
 5-- same distance as Earth's orbit around the Sun.
 6
 7local Node = {
 8  Identifier = "StaticScale_Example",
 9  Transform = {
10    Scale = {
11      Type = "StaticScale",
12      Scale = 149597870700
13    }
14  },
15  Renderable = {
16    Type = "RenderableCartesianAxes"
17  },
18  GUI = {
19    Name = "Basic",
20    Path = "/Examples/StaticScale"
21  }
22}
23
24asset.onInitialize(function()
25  openspace.addSceneGraphNode(Node)
26end)
27
28asset.onDeinitialize(function()
29  openspace.removeSceneGraphNode(Node)
30end)