NonUniformStaticScale

Inherits Scale

Members

Name

Documentation

Type

Description

Optional

Scale

These values are used as scaling factors for the scene graph node that this transformation is attached to relative to its parent

Vector3<double>

Value of type ‘Vector3

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 different values for each axis. The x axis is scaled by a factor of 149597870700, which means they will be 149597870700 m (1 AU) long and thus reaching the same distance as Earth’s orbit around the Sun. The y-axis stays at its original size, and the z-axis will be hidden entirely by setting the scale value close to 0.

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

This asset creates a SceneGraphNode that is rendering a sphere which is adjust to an ellipsoidal shape by using a non-uniform scaling. In particular, the second axis is half as long as the first, and the third axis is a third as long.

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