Description
Provides access to the properties and methods used in defining a planet object.
Public Properties
AccessConstraints | Get the constraints imposed on the planet. |
CommonTasks | Common Tasks associated with the planet. |
Graphics | Get the planet's 2D Graphics properties. |
PositionSource | The criterion for defining the planet. A member of the AgEPlPositionSourceType enumeration. |
PositionSourceData | Get definitional data for the planet. |
VO | Get the planet's 3D Graphics properties. |
Interfaces
CoClasses that Implement IAgPlanet
Example
Configure a planet
[C#] |
---|
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] |
---|
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
[Python - STK API] |
---|
# IAgScenario scenario: Scenario object
planet = scenario.Children.New(AgESTKObjectType.ePlanet, 'Mars')
planet.CommonTasks.SetPositionSourceCentralBody('Mars', AgEEphemSourceType.eEphemJPLDE)
|
|
Modify Planet 2D Properties
[Python - STK API] |
---|
# IAgPlanet planet: Planet object
planet2D = planet.Graphics
planet2D.Color = Colors.Red
planet2D.Inherit = False
planet2D.OrbitVisible = True
planet2D.SubPlanetPointVisible = False
planet2D.SubPlanetLabelVisible = False
|
|
Create a New Planet
[MATLAB] |
---|
% IAgScenario scenario: Scenario object
planet = scenario.Children.New('ePlanet', 'Mars');
planet.CommonTasks.SetPositionSourceCentralBody('Mars', 'eEphemJPLDE');
|
|
Modify Planet 2D Properties
[MATLAB] |
---|
% IAgPlanet planet: Planet object
planet2D = planet.Graphics;
planet2D.Color = 255; % Red
planet2D.Inherit = false;
planet2D.OrbitVisible = true;
planet2D.SubPlanetPointVisible = false;
planet2D.SubPlanetLabelVisible = false;
|
|