Package com.luciad.view.lightspeed


package com.luciad.view.lightspeed
Provides support for OpenGL-based 2D and 3D visualization of data. The main interface in this package is ILspView, which defines a view consisting of a number of ILspLayers.

Creating a view

The main view implementations are Most applications will want to use TLspAWTView. TLspViewBuilder provides a convenient mechanism to create views and to initialize their most important properties.

2D and 3D views

A view can be 2D or 3D depending on its ALspViewXYZWorldTransformation. Typically, 3D views will use a geocentric world reference, whereas 2D views will have a grid reference with a particular map projection. The class TLspViewTransformationUtil offers convenient methods to switch a view between 2D and 3D.

3D views support the use of graphics effects such as lighting and fog to produce more visually striking images. TLspViewBuilder.defaultEffects() provides a useful default setup. For manual configuration of effects, see the com.luciad.view.lightspeed.services.effects package.

Adding data to a view

Depending on the type of data you wish to visualize, various layer builders are available to create ILspLayer instances which can then be added to a view. The main ones are: Most layers support the use of the styling API to customize the visualization of your data.

Note that TLspViewNavigationUtil can be used to fit the extents of the view to the data present in a particular layer or set of layers.

Working with elevation data

Lightspeed views have built-in support for visualization elevation data in the form of a 3D terrain. As mentioned above, TLspRasterLayerBuilder can be used to create layers for elevation models. The view will automatically pick up any such layers and merge them into a single 3D terrain which is displayed when the view is 3D. Layers which contain 2D raster or vector data can be draped over the 3D terrain. In most cases, 2D shapes and rasters will be draped automatically. If manual control is needed, draping can be controlled with fine granularity using the styling API. All styles which implement ILspWorldElevationStyle can be used to indicate whether or not affected shapes should be draped on the terrain.

Interacting with a view

Interaction with a view is handled by an ILspController. Various implementations of this interface are available in the com.luciad.view.lightspeed.controller package to support actions such as navigation, selection and drawing. Newly created views have a default controller which combines navigation and selection functionality.

Navigation is also possible using GUI components that can be overlaid on the view. See TLspNavigationControlsBuilder for more information.

Since:
2012.0