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
ILspLayer
s.
Creating a view
The main view implementations areTLspAWTView
, which uses a heavyweightGLCanvas
component;TLspSwingView
, which uses a lightweightGLJPanel
component;TLspOffscreenView
, which uses an offscreen buffer.
2D and 3D views
A view can be 2D or 3D depending on itsALspViewXYZWorldTransformation
.
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 createILspLayer
instances which can then be added to a view. The main ones are:
TLspShapeLayerBuilder
for models that contain vector shapes (points, polylines, polygons, ...) or for density plots.TLspRasterLayerBuilder
for raster-based elevation and imagery dataTLspLonLatGridLayerBuilder
for visualizing longitude/latitude grid lines in the view
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 thestyling 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 thecom.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
-
ClassDescriptionAbstract base class for implementations of
ILspAWTView
.Empty implementation ofILspViewListener
.Enumeration of quality hints, which indicate a user preference towards either high performance (ELspQualityHint.FASTEST) or correctness/visual quality (ELspQualityHint.NICEST) for data painted in an ILspView.Defines anILspView
which is represented on screen by an AWT or Swing component.Determines the order in which layers and their various painters are invoked in anILspView
.Identifies a painting step consisting of anILspLayer
and aTLspPaintRepresentationState
.AnILcdView
to visualize geospatial data in 2D or 3D, based on OpenGL.View type enumeration that distinguishes between 2D and 3D views.Listener that can be added to anILspView
to be informed of initialization, dispose and render events.AnILspView
which is represented by an AWT component.Provides context information to be used when painting or editing an object in anILspView
.Deprecated.Integration of LuciadLightspeed in C++ applications is no longer actively supported as of V2020.0.AnILspView
which is represented by a JavaFX node.An offscreen Lightspeed view that uses an internal buffer to render images to.Provides a mechanism to classify the level of OpenGL support on an end-user system.Default implementation ofILspPaintingOrder
.Combination of a paint phase and paint representation state that describes which object representation to paint during a given paint pass.Class that describes the current paint phase.Identifies how the objects are added to the world: draped on terrain or not.Identifies the current paint phase in the transparency algorithm and hence which objects should be drawn.Identifies for which eye the view should be rendered for a stereoscopic view.Class describing the progress of paint operations in anILspView
.Builder to create aTLspStereoscopicDevice
, which can be used to create a stereoscopic 3D view, (seeTLspViewBuilder.buildStereoscopicView(TLspStereoscopicDevice)
).This class can be used to create stereoscopic views for stereoscopic devices.AnILspAWTView
which is represented by a Swing component.Builder for creatingILspView
instances.Defines hints that influence the behavior ofILspView
, allowing the user to bias either towards higher performance or towards better visual quality.Builder forTLspViewPaintingHints
objects.Provides configuration parameters used for printing the contents of anILspView
.Builder for TLspViewPrintSettings objects.AnILspView
provides a number of useful services that can be leveraged by its layers, for performance or other reasons: A render target stack allows for nested rendering into offscreen buffers.