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






Windows & Linux

Description

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

Object Model





IAgPositionSourceData.html">IAgPositionSourceData)~298.gif">

Public Properties

Public Property AccessConstraintsGet the constraints imposed on the planet.
Public Property CommonTasksCommon Tasks associated with the planet.
Public Property GraphicsGet the planet's 2D Graphics properties.
Public Property PositionSourceThe criterion for defining the planet. A member of the AgEPlPositionSourceType enumeration.
Public Property PositionSourceDataGet definitional data for the planet.
Public Property VOGet 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; 
 
 
Create a New Planet
[Python]Copy Code
# IAgScenario scenario: Scenario object 
planet = scenario.Children.New(15,'Mars') # ePlanet 
planet.CommonTasks.SetPositionSourceCentralBody('Mars',4) # eEphemJPLDE 
 
 
Modify Planet 2D Properties
[Python]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
© 2018 Analytical Graphics, Inc. All Rights Reserved.