Shows how to compute terrain intersections using the highest resolution terrain data available from a globe's
To generate and show intersections, Shift + LeftClick anywhere on the globe. The program forms a grid of locations
around the selected location. The grid points are shown in yellow. It then determines whether a line between the
selected location and each grid point intersects the terrain. If it does, the intersection nearest the selected
location is shown in cyan and a line is drawn from the selected location to the intersection. If there is no
intersection, a line is drawn from the selected location to the grid position.
If the highest resolution terrain is not available for the area around the selected location, it is retrieved from
the elevation model's source, which is most likely a remote server. Since the high-res data must be retrieved and
then loaded from the local disk cache, it will take some time to compute and show the intersections.
This example uses a
object to perform the terrain retrieval, generation
and intersection calculations.s