STK Graphics PrimitivesSend comments on this topic.
IAgStkGraphicsTimeIntervalDisplayCondition Interface

Description

Defines an inclusive time interval that determines when an object, such as a primitive, is rendered based on the current animation time .

Public Properties

Public Property MaximumTimeGets or sets the maximum time of the inclusive time interval.
Public Property MinimumTimeGets or sets the minimum time of the inclusive time interval.

Interfaces

Implemented Interface
IAgStkGraphicsDisplayCondition

CoClasses that Implement IAgStkGraphicsTimeIntervalDisplayCondition

Example

Draw a primitive based on a time interval
[C#]
IAgStkGraphicsSceneManager manager = ((IAgScenario)root.CurrentScenario).SceneManager;

IAgStkGraphicsGeospatialImageGlobeOverlay overlay = manager.Initializers.GeospatialImageGlobeOverlay.InitializeWithString(globeOverlayFile);

IAgDate start = root.ConversionUtility.NewDate("UTCG", "30 May 2008 14:30:00.000");
IAgDate end = root.ConversionUtility.NewDate("UTCG", "30 May 2008 15:00:00.000");

((IAgScenario)root.CurrentScenario).Animation.StartTime = double.Parse(start.Subtract("sec", 3600).Format("epSec"));

IAgStkGraphicsTimeIntervalDisplayCondition condition = 
    manager.Initializers.TimeIntervalDisplayCondition.InitializeWithTimes(start, end);
((IAgStkGraphicsGlobeOverlay)overlay).DisplayCondition = condition as IAgStkGraphicsDisplayCondition;

scene.CentralBodies.Earth.Imagery.Add((IAgStkGraphicsGlobeImageOverlay)overlay);
Draw a primitive based on a time interval
[Visual Basic .NET]
Dim manager As IAgStkGraphicsSceneManager = DirectCast(root.CurrentScenario, IAgScenario).SceneManager

Dim overlay As IAgStkGraphicsGeospatialImageGlobeOverlay = manager.Initializers.GeospatialImageGlobeOverlay.InitializeWithString(globeOverlayFile)

Dim start As IAgDate = root.ConversionUtility.NewDate("UTCG", "30 May 2008 14:30:00.000")
Dim [end] As IAgDate = root.ConversionUtility.NewDate("UTCG", "30 May 2008 15:00:00.000")

DirectCast(root.CurrentScenario, IAgScenario).Animation.StartTime = Double.Parse(start.Subtract("sec", 3600).Format("epSec"))

Dim condition As IAgStkGraphicsTimeIntervalDisplayCondition = manager.Initializers.TimeIntervalDisplayCondition.InitializeWithTimes(start, [end])
DirectCast(overlay, IAgStkGraphicsGlobeOverlay).DisplayCondition = TryCast(condition, IAgStkGraphicsDisplayCondition)

scene.CentralBodies.Earth.Imagery.Add(DirectCast(overlay, IAgStkGraphicsGlobeImageOverlay))

See Also

© 2024 Analytical Graphics, Inc. All Rights Reserved.