StaticScale

Inherits Scale

Members

Name

Documentation

Type

Description

Optional

Scale

This value is used as a scaling factor for the scene graph node that this transformation is attached to relative to its parent

Double

Value of type ‘Double’

No

Inherited members from Scale

Name

Documentation

Type

Description

Optional

Type

The type of the scaling that is described in this element. The available types of scaling depend on the configuration of the application and can be written to disk on application startup into the FactoryDocumentation

String

Must name a valid Scale type

No

Asset Examples

Basic

This asset creates a SceneGraphNode that only displays coordinate axes. The coordinate axis normally have a length of 1 meter and are scaled in this example by a factor of 149597870700, which means they will be 149597870700 m (1 AU) long, thus reaching the same distance as Earth’s orbit around the Sun.

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