CentralBodyGraphics#

class ansys.stk.core.graphics.CentralBodyGraphics#

The graphical properties associated with a particular central body. Changing the central body graphics will affect how the associated central body is rendered in a scene. For instance, to show or hide the central body, use the show property…

Overview#

color

Get or set the color of the central body in the scene.

specular_color

Get or set the specular color of the central body in the scene. The specular color is associated with the specular overlay.

shininess

Get or set the shininess of the central body in the scene. The shininess affects the size and brightness of specular reflection associated with the specular overlay.

show_imagery

Get or set whether the imagery for central body in the scene is shown or hidden.

show

Get or set whether the central body is shown or hidden in the scene. This only affects the central body itself, not the primitives that are associated with it.

show_label

Get or set whether a label with the name of the central body should be rendered in the scene when the camera is at certain distance away from the central body.

altitude_offset

Get or set the altitude that all terrain and imagery will be offset from the surface of the central body in the scene.

base_overlay

Get or set the base globe image overlay associated with the central body in the scene. The base overlay is always rendered before any other imagery…

night_overlay

Get or set the night globe image overlay associated with the central body in the scene. The night overlay is displayed only on parts of the central body that are not in sun light…

specular_overlay

Get or set the specular globe image overlay associated with the central body in the scene. The specular overlay is displayed only in the specular highlight of the central body.

terrain

Get the collection of terrain overlay associated with the central body in the scene.

imagery

Get the collection of imagery associated with the central body in the scene.

kml

Get the kml graphics associated with the central body in the scene.

Examples#

Add Imagery and Terrain to the Scene

# Scenario scenario: Scenario object
# Retrieve the boundaries of the imported files
manager = scenario.scene_manager
# Add Terrain
installPath = r"C:\Program Files\AGI\STK 12" if os.name == "nt" else os.environ["STK_INSTALL_DIR"]
terrainTile = manager.scenes.item(0).central_bodies.earth.terrain.add_uri_string(
    os.path.join(installPath, "Data", "Resources", "stktraining", "samples", "SRTM_Skopje.pdtt")
)
extentTerrain = terrainTile.extent
print(
    "Terrain boundaries: LatMin: %s LatMax: %s LonMin: %s LonMax: %s"
    % (str(extentTerrain[0]), str(extentTerrain[2]), str(extentTerrain[1]), str(extentTerrain[3]))
)
# Add Imagery
imageryTile = manager.scenes.item(0).central_bodies.earth.imagery.add_uri_string(
    os.path.join(installPath, "Data", "Resources", "stktraining", "imagery", "NPS_OrganPipeCactus_Map.pdttx")
)
extentImagery = imageryTile.extent
print(
    "Imagery boundaries: LatMin: %s LatMax: %s LonMin: %s LonMax: %s"
    % (str(extentImagery[0]), str(extentImagery[2]), str(extentImagery[1]), str(extentImagery[3]))
)

Import detail#

from ansys.stk.core.graphics import CentralBodyGraphics

Property detail#

property CentralBodyGraphics.color: Color#

Get or set the color of the central body in the scene.

property CentralBodyGraphics.specular_color: Color#

Get or set the specular color of the central body in the scene. The specular color is associated with the specular overlay.

property CentralBodyGraphics.shininess: float#

Get or set the shininess of the central body in the scene. The shininess affects the size and brightness of specular reflection associated with the specular overlay.

property CentralBodyGraphics.show_imagery: bool#

Get or set whether the imagery for central body in the scene is shown or hidden.

property CentralBodyGraphics.show: bool#

Get or set whether the central body is shown or hidden in the scene. This only affects the central body itself, not the primitives that are associated with it.

property CentralBodyGraphics.show_label: bool#

Get or set whether a label with the name of the central body should be rendered in the scene when the camera is at certain distance away from the central body.

property CentralBodyGraphics.altitude_offset: float#

Get or set the altitude that all terrain and imagery will be offset from the surface of the central body in the scene.

property CentralBodyGraphics.base_overlay: IGlobeImageOverlay#

Get or set the base globe image overlay associated with the central body in the scene. The base overlay is always rendered before any other imagery…

property CentralBodyGraphics.night_overlay: IGlobeImageOverlay#

Get or set the night globe image overlay associated with the central body in the scene. The night overlay is displayed only on parts of the central body that are not in sun light…

property CentralBodyGraphics.specular_overlay: IGlobeImageOverlay#

Get or set the specular globe image overlay associated with the central body in the scene. The specular overlay is displayed only in the specular highlight of the central body.

property CentralBodyGraphics.terrain: TerrainOverlayCollection#

Get the collection of terrain overlay associated with the central body in the scene.

property CentralBodyGraphics.imagery: ImageCollection#

Get the collection of imagery associated with the central body in the scene.

property CentralBodyGraphics.kml: KmlGraphics#

Get the kml graphics associated with the central body in the scene.