TimeFrameUnion
Inherits TimeFrame
This TimeFrame class will accept the union of all passed-in TimeFrames. This means that this TimeFrame will be active if at least one of the child TimeFrames is active and it will be inactive if none of the child TimeFrames are active.
This can be used to create more complex TimeFrames that are made up of several, simpler TimeFrames themselves.
Members
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
A vector of time frames to combine into one. The time frame is active when any of the contained time frames are, but not in gaps between contained time frames. |
|
No |
Inherited members from TimeFrame
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
The type of the time frame 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 TimeFrame type |
No |
Table parameters for TimeFrames
A vector of time frames to combine into one. The time frame is active when any of the contained time frames are, but not in gaps between contained time frames.
Optional: No
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
|
Yes |
Asset Examples
1-- Basic
2-- This example creates a union out of two simpler TimeFrameIntervals and uses it for a
3-- SceneGraphNode. The first TimeFrameInterval covers January 1st, 2000 and the second
4-- TimeFrameInterval covers March 1st, 2002. The resulting TimeFrameUnion will cover both
5-- January 1st, 2000 and March 1st, 2002.
6
7local Node = {
8 Identifier = "TimeFrameUnion_Example",
9 TimeFrame = {
10 Type = "TimeFrameUnion",
11 TimeFrames = {
12 -- The first TimeFrameInterval for the first day
13 {
14 Type = "TimeFrameInterval",
15 Start = "2000 JAN 01 00:00:00.000",
16 End = "2000 JAN 01 23:59:59.999"
17 },
18 -- The second TimeFrameInterval for the second day
19 {
20 Type = "TimeFrameInterval",
21 Start = "2002 MAR 01 00:00:00.000",
22 End = "2002 MAR 01 23:59:59.999"
23 }
24 }
25 },
26 Renderable = {
27 Type = "RenderableCartesianAxes"
28 },
29 GUI = {
30 Name = "TimeFrameUnion - Basic",
31 Path = "/Examples"
32 }
33}
34
35asset.onInitialize(function()
36 openspace.addSceneGraphNode(Node)
37end)
38
39asset.onDeinitialize(function()
40 openspace.removeSceneGraphNode(Node)
41end)