STK Graphics PrimitivesSend comments on this topic.
IAgStkGraphicsAltitudeDisplayCondition Interface

Description

Defines an inclusive altitude interval that determines when an object is rendered based on the camera's altitude relative to a Central Body.

Public Properties

Public Property CentralBodyGets or sets the Central Body to which the altitude is relative.
Public Property MaximumAltitudeGets or sets the maximum altitude of the inclusive altitude interval. Use Double.MaxValue to ignore checking the maximum altitude.
Public Property MinimumAltitudeGets or sets the minimum altitude of the inclusive altitude interval. Use Double.MinValue to ignore checking the minimum altitude.

Interfaces

Implemented Interface
IAgStkGraphicsDisplayCondition

CoClasses that Implement IAgStkGraphicsAltitudeDisplayCondition

Example

Draw a primitive based on viewer altitude
[C#]
IAgStkGraphicsSceneManager manager = ((IAgScenario)root.CurrentScenario).SceneManager;
Array extent = new object[]
{
    -94, 29,
    -89, 33
};

IAgStkGraphicsSurfaceTriangulatorResult triangles = manager.Initializers.SurfaceExtentTriangulator.ComputeSimple("Earth", ref extent);

IAgStkGraphicsPolylinePrimitive line = manager.Initializers.PolylinePrimitive.Initialize();
Array boundaryPositions = triangles.BoundaryPositions;
line.Set(ref boundaryPositions);
((IAgStkGraphicsPrimitive)line).Color = Color.White;

IAgStkGraphicsAltitudeDisplayCondition condition = manager.Initializers.AltitudeDisplayCondition.InitializeWithAltitudes(500000, 2500000);
((IAgStkGraphicsPrimitive)line).DisplayCondition = condition as IAgStkGraphicsDisplayCondition;

manager.Primitives.Add((IAgStkGraphicsPrimitive)line);
Draw a primitive based on viewer altitude
[Visual Basic .NET]
Dim manager As IAgStkGraphicsSceneManager = DirectCast(root.CurrentScenario, IAgScenario).SceneManager
Dim extent As Array = New Object() _
{ _
    -94, 29, _
    -89, 33 _
}

Dim triangles As IAgStkGraphicsSurfaceTriangulatorResult = manager.Initializers.SurfaceExtentTriangulator.ComputeSimple("Earth", extent)

Dim line As IAgStkGraphicsPolylinePrimitive = manager.Initializers.PolylinePrimitive.Initialize()
Dim boundaryPositions As Array = triangles.BoundaryPositions
line.Set(boundaryPositions)
DirectCast(line, IAgStkGraphicsPrimitive).Color = Color.White

Dim condition As IAgStkGraphicsAltitudeDisplayCondition = manager.Initializers.AltitudeDisplayCondition.InitializeWithAltitudes(500000, 2500000)
DirectCast(line, IAgStkGraphicsPrimitive).DisplayCondition = TryCast(condition, IAgStkGraphicsDisplayCondition)

manager.Primitives.Add(DirectCast(line, IAgStkGraphicsPrimitive))

See Also

© 2024 Analytical Graphics, Inc. All Rights Reserved.