Class DisplayGIS3D
java.lang.Object
repast.simphony.visualization.AbstractDisplay
repast.simphony.visualization.gis3D.DisplayGIS3D
- All Implemented Interfaces:
Renderer,ProjectionListener,IDisplay
Display for GIS 3D
- Author:
- Eric Tatara TODO GIS add separator layers that are always hidden with predefined String key IDs that can be used to separate layer types such as agent layers, network layers, coverage layers, wms layers, etc.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface repast.simphony.visualization.IDisplay
IDisplay.LayoutFrequency -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected Colorprotected gov.nasa.worldwind.geom.Sectorprotected Map<Class<?>,AbstractRenderableLayer<?, ?>> protected Map<String,CoverageLayer> protected Map<org.geotools.coverage.grid.GridCoverage2D,gov.nasa.worldwind.render.SurfaceImage> protected Stringprotected booleanprotected gov.nasa.worldwind.globes.FlatGlobeprotected Geographyprotected List<gov.nasa.worldwind.layers.Layer>protected GISDisplayData<?>static final Stringprotected LayerPanelprotected Layoutprotected LayoutUpdaterprotected static final doubleprotected gov.nasa.worldwind.Modelprotected Map<Network<?>,NetworkLayerGIS> protected JPanelprotected DisplayGIS3D.GlobePositionListenerprotected gov.nasa.worldwind.globes.Globeprotected RepastStatusBarprotected booleanprotected Lockprotected Runnableprotected RepastViewControlsSelectListenerprotected booleanprotected gov.nasa.worldwind.awt.WorldWindowGLJPanelFields inherited from class repast.simphony.visualization.AbstractDisplay
dlSupport, FRAME_UPDATE_INTERVAL, INFO_CURSOR, lastRenderTS, probeSupport -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidclosed()Notifies this IDisplay that its associated gui widget has been closed.protected voidCreate a simple background layer that is a single colored rectangle that covers the entire globe.createEditor(JPanel panel) Creates an DisplayEditor appropriate for editing this display.voidprotected gov.nasa.worldwind.layers.RenderableLayercreateStaticRasterLayer(String filename, boolean forceLongitudeFirstAxis) Adds a static raster layer from the provided file.voidNotifies this IDisplay that its associated gui widget has been deIconified.voiddestroy()!!! Destroy needs to properly dispose and shutdown of WorldWind objects to prevent memory leaks !!!!voidenableRoundGlobe(boolean round) Map<Class<?>,AbstractRenderableLayer<?, ?>> Gets the layout the display usesgetPanel()Gets a panel that contains the actual gui for visualization.gov.nasa.worldwind.WorldWindowvoidNotifies this IDisplay that its associated gui widget has been iconified.voidinit()Initializes the display.protected voidinitGlobes(GISDisplayDescriptor.VIEW_TYPE viewType) Initialize the WWJ globe (flat/globe)booleanprotected booleanprotected voidmoveObject(Object o) voidprobe(gov.nasa.worldwind.event.SelectEvent event) voidregisterCoverageStyle(String coverageName, CoverageStyle<?> style) Register the dynamic coverage and style informationvoidregisterNetworkStyle(Network<?> network, NetworkStyleGIS style) Register the network and style informationvoidregisterStyle(Class<?> clazz, StyleGIS<?> style) Register the agent class and style informationvoidregisterToolBar(JToolBar bar) Registers the specified toolbar with this IDisplay.protected voidvoidrender()Render the display.voidResets the home (initial) view of the displayvoidsetBackgroundColor(Color backgroundColor) voidSets the Layout for the display to use.voidsetLayoutFrequency(IDisplay.LayoutFrequency frequency, int interval) Sets the frequency of the layout.voidsetPause(boolean pause) Pause the rendering.voidvoidsetTrackAgents(boolean trackAgents) voidvoidvoidupdate()Updates the state of the display to reflect whatever it is that it is displaying.Methods inherited from class repast.simphony.visualization.AbstractDisplay
addDisplayListener, addProbeListener, createInfoCursor, getProbeSupport, projectionEventOccurred, setProbeSupport
-
Field Details
-
MIN_DEFAULT_ZOOM_ALTITUDE
protected static final double MIN_DEFAULT_ZOOM_ALTITUDE- See Also:
-
BACKGROUND_LAYER_NAME
- See Also:
-
LAYER_ID_KEY
- See Also:
-
updateLock
-
panel
-
layout
-
layoutUpdater
-
initData
-
geog
-
model
protected gov.nasa.worldwind.Model model -
classStyleMap
-
networkLayerMap
-
coverageLayerMap
-
globeLayers
-
coverageToRenderableMap
protected Map<org.geotools.coverage.grid.GridCoverage2D,gov.nasa.worldwind.render.SurfaceImage> coverageToRenderableMap -
worldWindow
protected gov.nasa.worldwind.awt.WorldWindowGLJPanel worldWindow -
displayMode
-
layerPanel
-
doRender
protected boolean doRender -
visible
protected boolean visible -
backgroundColor
-
viewControlsSelectListener
-
statusBar
-
roundGlobe
protected gov.nasa.worldwind.globes.Globe roundGlobe -
flatGlobe
protected gov.nasa.worldwind.globes.FlatGlobe flatGlobe -
trackAgents
protected boolean trackAgents -
boundingSector
protected gov.nasa.worldwind.geom.Sector boundingSector -
positionListener
-
updater
-
-
Constructor Details
-
DisplayGIS3D
-
-
Method Details
-
registerStyle
Register the agent class and style information- Parameters:
clazz- the agent class to style in the displaystyle- the agent styleorder- the agent layer order in the display
-
registerNetworkStyle
Register the network and style information- Parameters:
network- the networkstyle- the network style
-
registerCoverageStyle
Register the dynamic coverage and style information- Parameters:
coverageName- the coverage name to style in the displaystyle- the coverage styleorder- the coverage layer order in the display
-
createPanel
public void createPanel() -
getPanel
Description copied from interface:IDisplayGets a panel that contains the actual gui for visualization.- Returns:
- a panel that contains the actual gui for visualization.
-
isVisible
protected boolean isVisible() -
probe
public void probe(gov.nasa.worldwind.event.SelectEvent event) -
init
public void init()Description copied from interface:IDisplayInitializes the display. Called once before the display is made visible. -
createBackgroundLayer
protected void createBackgroundLayer()Create a simple background layer that is a single colored rectangle that covers the entire globe. -
createStaticRasterLayer
protected gov.nasa.worldwind.layers.RenderableLayer createStaticRasterLayer(String filename, boolean forceLongitudeFirstAxis) Adds a static raster layer from the provided file. The raster BufferedImage is created and added to the WWJ Globe so that it persists as long as the display exists, but is not updated with display updates.- Parameters:
filename- the GIS raster filename to displayforceLongitudeFirstAxis- true if lon should be forced first axis in coverage loader
-
destroy
public void destroy()!!! Destroy needs to properly dispose and shutdown of WorldWind objects to prevent memory leaks !!!!- Specified by:
destroyin interfaceIDisplay- Overrides:
destroyin classAbstractDisplay
-
addObject
- Specified by:
addObjectin classAbstractDisplay
-
moveObject
- Specified by:
moveObjectin classAbstractDisplay
-
removeObject
- Specified by:
removeObjectin classAbstractDisplay
-
setLayout
Description copied from interface:IDisplaySets the Layout for the display to use.- Parameters:
layout- the layout to use
-
setLayoutFrequency
Description copied from interface:IDisplaySets the frequency of the layout.- Parameters:
frequency- the frequency of the layoutinterval- the interval if the frequency is AT_INTERVAL. The interval is in terms of number of calls to update()
-
update
public void update()Description copied from interface:IDisplayUpdates the state of the display to reflect whatever it is that it is displaying. -
render
public void render()Description copied from interface:RendererRender the display. This rendering should take place asynchronously on the AWT thread. -
setPause
public void setPause(boolean pause) Description copied from interface:RendererPause the rendering. The Renderer should update and render if pause is true, if possible. The rendering should take place asynchronously on the AWT thread. -
getLayout
Description copied from interface:IDisplayGets the layout the display uses- Returns:
- a layout object
-
getRegisteredClasses
-
createEditor
Description copied from interface:IDisplayCreates an DisplayEditor appropriate for editing this display.- Parameters:
panel- a JPanel with a BorderLayout to which editor components can be added- Returns:
- an DisplayEditor appropriate for editing this display or null if this display cannot be edited.
-
resetHomeView
public void resetHomeView()Description copied from interface:IDisplayResets the home (initial) view of the display -
toggleAnaglyphStereo
public void toggleAnaglyphStereo() -
registerToolBar
Description copied from class:AbstractDisplayRegisters the specified toolbar with this IDisplay. This IDisplay can then put buttons etc. are on this toolbar. This is a default no-op implementation.- Specified by:
registerToolBarin interfaceIDisplay- Overrides:
registerToolBarin classAbstractDisplay- Parameters:
bar- the bar to register
-
initGlobes
Initialize the WWJ globe (flat/globe)- Parameters:
viewType- the view type (flat/globe)
-
isFlatGlobe
public boolean isFlatGlobe() -
setTrackAgents
public void setTrackAgents(boolean trackAgents) -
setRenderQuality
-
enableRoundGlobe
public void enableRoundGlobe(boolean round) -
toggleInfoProbe
public void toggleInfoProbe() -
getClassStyleMap
-
getWwglCanvas
public gov.nasa.worldwind.WorldWindow getWwglCanvas() -
getLayerPanel
-
deIconified
public void deIconified()Description copied from interface:IDisplayNotifies this IDisplay that its associated gui widget has been deIconified. -
iconified
public void iconified()Description copied from interface:IDisplayNotifies this IDisplay that its associated gui widget has been iconified. -
closed
public void closed()Description copied from interface:IDisplayNotifies this IDisplay that its associated gui widget has been closed. -
setBackgroundColor
-