Effects in the GlobeControl


Purpose
This sample demonstrates how to manipulate heads-up display (HUD), north arrow, observer location (latitude, longitude, and altitude), enabling, setting sun, and ambient light effects. This sample shows how to do the following:
  • Use the IGlobeViewer interface NorthArrowEnabled and HUDEnabled properties to enable north arrow and heads-up display.
  • Use the IGlobeDisplayRendering interface GetSunColor, SetSunColor, GetSunPosition, and SetSunPosition methods and AmbientLight property to get and set the sun color, sun position, and ambient light.
  • Use the IGlobeCamera.GetObserverLatLonAlt method to get observer latitude, longitude, and altitude.
  • Listen to an AfterDraw event of IGlobeDisplayEvents.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and 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. If no default document is loaded, open a globe document.
  2. Select the Enable Sun check box to enable and disable the sun effect and click the Set Sun Color button to set the desired color of the sun.
  3. Select the HUD check boxes to enable and disable the built-in heads-up display; the Alternate HUD area shows how to make a heads-up display.


  4. Screen shot of the HUD options used in this sample.

AssemblyInfo.cs Assembly information.
Effects.cs Form file.
Download the C# files
AssemblyInfo.vb Assembly information.
Effects.vb Form file.
Download the VB.NET files

Download the files for all languages

See Also:

GlobeControl class
IGlobeControl interface




Additional Requirements
  • Designed to run with a display setting of 96 dpi.

Development licensing Deployment licensing
Engine Developer Kit Engine Runtime: 3D
ArcView: 3D Analyst
ArcEditor: 3D Analyst
ArcInfo: 3D Analyst