StaticTranslation

Inherits Translation

This Translation provides a fixed translation to the attached scene graph node that does not change unless the Position property is changed.

Members

Name

Documentation

Type

Description

Optional

Position

This value is used as a static offset (in meters) that is applied to the scene graph node that this transformation is attached to relative to its parent.

Vector3<double>

Value of type ‘Vector3

No

Inherited members from Translation

Name

Documentation

Type

Description

Optional

Type

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

String

Must name a valid Translation type

No

TimeFrame

The time frame in which this Translation is applied. If the in-game time is outside this range, no translation will be applied.

Table

TimeFrame

Yes

Asset Examples

Time Frame

This asset creates a translation that is only applied from 2000 JAN 01 and just prior to 2002 JAN 01. In this specific example, the coordinate axes that are attached to the scene graph node are offset by 50 meters along the y-axis and 10 meters along the negative z-axis.

 1local Node = {
 2  Identifier = "StaticTranslation_TimeFrame",
 3  Transform = {
 4    Translation = {
 5      Type = "StaticTranslation",
 6      Position = { 0.0, 50.0, -10.0 },
 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 = "StaticTranslation - TimeFrame",
19    Path = "/Examples"
20  }
21}
22
23asset.onInitialize(function()
24  openspace.addSceneGraphNode(Node)
25end)
26
27asset.onDeinitialize(function()
28  openspace.removeSceneGraphNode(Node)
29end)
Basic

This asset creates a set of coordinate axes that are offset from their original position by a fixed and static amount. In this specific example, the axes are offset by 50 meters along the y-axis and 10 meters along the negative z-axis.

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