Digitize points using OpenGL


Purpose
This sample demonstrates how to draw on the globe using the OpenGL plug-in. It shows how to implement display feedback (drawn as a response to mouse events) as well as information that gets stored in a user-defined data structure. This sample focuses on listening to globe events; creating OpenGL display lists and textures; and translating, scaling, and bill boarding items.

How to use

See How to use ArcGIS samples for help on running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Run the sample.
  2. Click the Digitize Points tool on the toolbar.
  3. Click and drag points on the globe surface. When you release the mouse button, a billboard icon is added at the mouse position.


Download the files for Java
globe/DigitizeGlobeApplication.java Class that creates the graphical user interface (GUI) for the sample.
globe/DigitizeTool.java Class that represents a tool that attaches a globe display event listener that draws on the surface of the globe using the JOGL application programming interface (API) for OpenGL. The event listener uses the AfterDraw events to draw billboards at digitized locations. The event listener also provides feedback by drawing a circle when the mouse button is pressed.
globe/ImageTexturizer.java Class that reads the compass.gif image file and returns a byte representation that can be used with the JOGL API to draw the image on the map.




Additional Requirements
  • When importing this project into Eclipse, you must also import the jogl_libraries project under $ARCGISHOME/java/samples/engine/lib, which provides the necessary JOGL jars.
  • When running the sample, you must provide the Djava.library.path=<path_to_jogl_bin_folder> VM argument. The value of this argument depends on the operating system you're using. For Windows, it will be similar to <ARCGISHOME>/java/samples/engine/lib/jogl-libraries/jogl-1.1.0-windows-i586/bin.

Development licensing Deployment licensing
Engine Developer Kit Engine Runtime
ArcView