Description
A
Scene provides properties and functionality that are reflected in the rendering of the globe control that it is associated with. An globe control's
Scene is available from the Scene property. Any changes that are made to a
Scene will only affect the rendering of the particular globe control it is associated with. The static
SceneManager class provides global properties and functionality that apply to all
Scenes and thus affect the rendering of every globe control. A
Scene has a
Camera, and various properties for changing the visual state of the scene and its
Central Bodies, including changes to
Lighting. To render a particular
Scene, use the
Render method. To render all Scenes, use use the
SceneManager.Render method.
Public Methods
Public Properties
Interfaces
CoClasses that Implement IAgStkGraphicsScene
Example
Change view mode to use Earth's fixed frame
[C#] |
---|
scene.Camera.ViewCentralBody("Earth", root.VgtRoot.WellKnownAxes.Earth.Fixed);
|
|
Take a snapshot of the camera's view
[C#] |
---|
IAgStkGraphicsSceneManager manager = ((IAgScenario)root.CurrentScenario).SceneManager;
//
// The snapshot can be saved to a file, texture, image, or the clipboard
//
IAgStkGraphicsRendererTexture2D texture = scene.Camera.Snapshot.SaveToTexture();
IAgStkGraphicsTextureScreenOverlay textureScreenOverlay = manager.Initializers.TextureScreenOverlay.InitializeWithXYTexture(0, 0, texture);
IAgStkGraphicsOverlay overlay = (IAgStkGraphicsOverlay)textureScreenOverlay;
overlay.BorderSize = 2;
overlay.BorderColor = Color.White;
overlay.Scale = 0.2;
overlay.Origin = AgEStkGraphicsScreenOverlayOrigin.eStkGraphicsScreenOverlayOriginCenter;
IAgStkGraphicsScreenOverlayCollectionBase screenOverlayManager = (IAgStkGraphicsScreenOverlayCollectionBase)manager.ScreenOverlays;
screenOverlayManager.Add((IAgStkGraphicsScreenOverlay)overlay);
|
|
Change view mode to use Earth's fixed frame
[Visual Basic .NET] |
---|
scene.Camera.ViewCentralBody("Earth", root.VgtRoot.WellKnownAxes.Earth.Fixed)
|
|
Take a snapshot of the camera's view
[Visual Basic .NET] |
---|
Dim manager As IAgStkGraphicsSceneManager = DirectCast(root.CurrentScenario, IAgScenario).SceneManager
'
' The snapshot can be saved to a file, texture, image, or the clipboard
'
Dim texture As IAgStkGraphicsRendererTexture2D = scene.Camera.Snapshot.SaveToTexture()
Dim overlay As IAgStkGraphicsTextureScreenOverlay = CreateOverlayFromTexture(texture, root)
Dim screenOverlayManager As IAgStkGraphicsScreenOverlayCollectionBase = DirectCast(manager.ScreenOverlays, IAgStkGraphicsScreenOverlayCollectionBase)
screenOverlayManager.Add(DirectCast(overlay, IAgStkGraphicsScreenOverlay))
|
|
Control Display of Stars and Water Texture
[Python - STK API] |
---|
# IAgScenario scenario: Scenario object
# Turn off the stars and water texture
manager = scenario.SceneManager
manager.Scenes.Item(0).ShowStars = False
manager.Scenes.Item(0).ShowWaterSurface = False
|
|
Control Display of Stars and Water Texture
[MATLAB] |
---|
% IAgScenario scenario: Scenario object
% Turn off the stars and water texture
manager = scenario.SceneManager;
manager.Scenes.Item(0).ShowStars = false;
manager.Scenes.Item(0).ShowWaterSurface = false;
|
|
See Also