TimeDependentScale

Inherits Scale

Members

Name

Documentation

Type

Description

Optional

ReferenceDate

The date at which this scale will be 0. The current value of the scale is computed by taking the difference between the current time and the reference date and multiplying it by the speed. This field must be formatted as: YYYY-MM-DDThh:mm:ss.uuu where h is a 24h clock and u microseconds

String

Value of type ‘String’

No

ClampToPositive

If this value is true, the velocity computation will never result in any negative values. This is useful for instantaneous events that only propagate forwards. The default value is ‘true’

Boolean

Value of type ‘Boolean’

Yes

Speed

The speed at which the value grows or shrinks. The units for this are meters per second. The default value is 1 m/s

Double

Value of type ‘Double’

Yes

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, which grow at a speed of 1 m/s starting on January 1st, 2000 00:00:00. This means that on that date, the coordinate axes will disappear and, for example, on January 1st, 2000 12:00:00, the coordinate axes will be 43200 meters long.

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

This asset creates a SceneGraphNode that only displays coordinate axes, which grow at a speed of 12 km/s starting on August 8th, 1969 12:00:00. This means that on that date, the coordinate axes will disappear and, for example, on August 8th, 1969 23:00:00, the coordinate axes will be 475200 km long.

 1local Node = {
 2  Identifier = "TimeDependentScale_Example_Speed",
 3  Transform = {
 4    Scale = {
 5      Type = "TimeDependentScale",
 6      ReferenceDate = "1969 AUG 08 12:00:00",
 7      Speed = 12000
 8    }
 9  },
10  Renderable = {
11    Type = "RenderableCartesianAxes"
12  },
13  GUI = {
14    Name = "with Speed",
15    Path = "/Examples/TimeDependentScale"
16  }
17}
18
19asset.onInitialize(function()
20  openspace.addSceneGraphNode(Node)
21end)
22
23asset.onDeinitialize(function()
24  openspace.removeSceneGraphNode(Node)
25end)