AGI STK Objects 11 Send comments on this topic.
IAgPlanet Interface





Description

Provides access to the properties and methods used in defining a planet object.

Object Model






Public Properties

Public Property AccessConstraints Get the constraints imposed on the planet.
Public Property CommonTasks Common Tasks associated with the planet.
Public Property Graphics Get the planet's 2D Graphics properties.
Public Property PositionSource The criterion for defining the planet. A member of the AgEPlPositionSourceType enumeration.
Public Property PositionSourceData Get definitional data for the planet.
Public Property VO Get the planet's 3D Graphics properties.

Example

Configure a planet
[C#] Copy Code
planet.PositionSource = AgEPlPositionSourceType.ePosCentralBody; 
 
// Get IAgPlPosCentralBody interface 
IAgPlPosCentralBody body = planet.PositionSourceData as IAgPlPosCentralBody; 
 
body.AutoRename = false
body.CentralBody = "Jupiter"
 
// AvailableEphemSourceTypes is a one dimensional array of AgEEphemSourceType values 
if (Array.IndexOf(body.AvailableEphemSourceTypes, (int)AgEEphemSourceType.eEphemAnalytic) != -1

    body.EphemSource = AgEEphemSourceType.eEphemAnalytic; 

 

Configure a planet
[Visual Basic .NET] Copy Code
planet.PositionSource = AgEPlPositionSourceType.ePosCentralBody

' Get IAgPlPosCentralBody interface
Dim body As IAgPlPosCentralBody = TryCast(planet.PositionSourceData, IAgPlPosCentralBody)

body.AutoRename = False
body.CentralBody = "Jupiter"

' AvailableEphemSourceTypes is a one dimensional array of AgEEphemSourceType values
If Array.IndexOf(body.AvailableEphemSourceTypes, DirectCast(AgEEphemSourceType.eEphemAnalytic, Integer)) <> -1 Then
    body.EphemSource = AgEEphemSourceType.eEphemAnalytic
End If

Create a New Planet
[MATLAB] Copy Code
% IAgScenario scenario: Scenario object 
planet = scenario.Children.New('ePlanet','Mars'); 
planet.CommonTasks.SetPositionSourceCentralBody('Mars','eEphemJPLDE'); 
 
 
Modify Planet 2D Properties
[MATLAB] Copy Code
% IAgPlanet planet: Planet object 
planet2D = planet.Graphics; 
planet2D.Color = 255;   % Red 
planet2D.Inherit = false; 
planet2D.OrbitVisible = true; 
planet2D.SubPlanetPointVisible = false; 
planet2D.SubPlanetLabelVisible = false; 
 
 

CoClasses that Implement IAgPlanet

Name
AgPlanet
© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1