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 |
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 = "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)