Description | API | Development Configuration | Deployment Configuration | FAQ

STK Java API - STK Graphics Plugin

Description

Custom graphics are used to visualize rasters, projections, and custom image globe overlays in a 3D display. Custom graphics can be defined by developers and users of STK via a plugin architecture in many software programming languages including Java.

What's included in this API?

The API to develop/run/deploy an STK Graphics Java Plugin based on the STK Java API includes the following lists of libraries/packages/javadocs:

JAR libraries:

JNI native libraries:

Packages:

Documentation

To use these samples:

  1. Build these samples in Eclipse by referring to the Eclipse samples configuration page.
  2. Locate the STK installation's Graphics.xml. The default installation location for instance:
  3. Platform Path
    Windows 32bit C:\Program Files\AGI\<STKVERSION>\CodeSamples\Extend\Graphics\Graphics.xml
    Windows 64bit C:\Program Files\AGI\<STKVERSION>\CodeSamples\Extend\Graphics\Graphics.xml
    Windows 32bit on 64bit C:\Program Files (x86)\AGI\<STKVERSION>\CodeSamples\Extend\Graphics\Graphics.xml
    Linux 32/64 <STK_INSTALL_DIR>/CodeSamples/Extend/Graphics/Graphics.xml
  4. Copy this file to your STK plugin configuration user directory, which typically is C:\Documents and Settings\<user account name>\My Documents\<STKVERSION>\Config\Plugins on windows and <STK_CONFIG_DIR>/<STKVERSION>/Config/Plugins on LINUX.
  5. Locate the three sample Graphics JavaPlugin entries for your chosen platform in the comment block that start with the following:
  6. <JavaPlugin ProgID="AgJNISTKPluginGraphicsDriver10.Driver" ...

  7. Copy the three entries to the uncommented section under the Graphics Plugins category element within the XML file.
  8. In the copied JavaPlugin element entries, if the sample plugin's compiled .class files (and package structure) are not located in the directory specified by the ClassPath entry, then change it to the directory location of the plugin's *.class file's base package space.
  9. Refer to STK documentation for configuration of Graphics during display time to use the above plugin samples.

Development/Runtime Configuration

Development Environments

Use the above listed JAR and JNI native libraries as input to the following development environment configurations:

Use the samples listed above as reference for implementing the IAgStkGraphicsPluginRasterStream, IAgStkGraphicsPluginProjectionStream, IAgStkGraphicsPluginCustomImageGlobeOverlay and IAgStkGraphicsPluginWithSite interfaces.

Deployment

Deployment instructions for a STK Graphics Java Plugin application:

  1. Follow the appropriate installation instructions for the STK or STK Engine product.
  2. Install your STK Graphics Java Plugin JAR file and its dependent JAR files to your preferred installation location.
  3. Create an Graphics Plugin XML file.
  4. Note: Make sure the name of your Graphics XML file is unique as to not conflict with other plugin xml files.

  5. Copy your Graphics Plugin XML file to the STK or STK Engine installation's Plugins directory if it is writable. The default installation location for instance:
  6. Platform Path
    Windows 32bit C:\Program Files\AGI\<STKVERSION>\Plugins\<Name of plugin xml file>.xml
    Windows 64bit C:\Program Files\AGI\<STKVERSION>\Plugins\<Name of plugin xml file>.xml
    Windows 32bit on 64bit C:\Program Files (x86)\AGI\<STKVERSION>\Plugins\<Name of plugin xml file>.xml
    Linux 32/64 <STK_INSTALL_DIR>/Plugins/<Name of plugin xml file>.xml

    If this is not a writable location, copy your Graphics Plugin XML file to the STK Plugin configuration user directory, which typically is C:\Documents and Settings\<user account name>\My Documents\<STKVERSION>\Config\Plugins on windows and <STK_CONFIG_DIR>/<STKVERSION>/Config/Plugins on LINUX.

  7. Refer to the STK documentation on how to configure your scenario to use your Graphics Java plugin during display.

FAQ

A set of frequently asked questions/issues and their answers/solutions.

Topics

How/when do I run my Graphics Java plugin application?

STK is responsible for creating and initializing your plugin when necessary during 3D Graphics window redraw.

Do I need a main method declared?

You do NOT need to declare a main method within your plugin. The latest installed JRE on the deployed machine fill be embedded/started within STK, your Java plugin class which you indicated in the ClassName attribute of your JavaPlugin entry within your plugin xml file.

STK Engine for UNIX 11.2