StaticScale
Inherits Scale
This Scale type scales the scene graph node that it is attached to by a fixed amount that does not change over time. It is possible to change the fixed scale after starting the application, but it otherwise remains unchanged. The scaling is a simple multiplication so that a Scale value of 10 means that the object will be 10 times larger than its original size.
Members
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
This value is used as a scaling factor for the scene graph node that this transformation is attached to relative to its parent. |
|
Value of type ‘Double’ |
No |
Inherited members from Scale
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
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 |
|
Must name a valid Scale type |
No |
|
The time frame in which this |
|
Yes |
Asset Examples
Basic
This asset creates a scene graph node 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 = "StaticScale - Basic",
14 Path = "/Examples"
15 }
16}
17
18asset.onInitialize(function()
19 openspace.addSceneGraphNode(Node)
20end)
21
22asset.onDeinitialize(function()
23 openspace.removeSceneGraphNode(Node)
24end)
Time Frame
This asset creates a scale that is only applied between 2000 JAN 01 and just prior to 2002 JAN 01. The coordinate axes of this scene graph node 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_TimeFrame",
3 Transform = {
4 Scale = {
5 Type = "StaticScale",
6 Scale = 149597870700,
7 TimeFrame = {
8 Type = "TimeFrameInterval",
9 Start = "2000 JAN 01",
10 End = "2002 JAN 01"
11 }
12 }
13 },
14 Renderable = {
15 Type = "RenderableCartesianAxes"
16 },
17 GUI = {
18 Name = "StaticScale - TimeFrame",
19 Path = "/Examples"
20 }
21}
22
23asset.onInitialize(function()
24 openspace.addSceneGraphNode(Node)
25end)
26
27asset.onDeinitialize(function()
28 openspace.removeSceneGraphNode(Node)
29end)