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 classes/interfaces inherited from interface repast.simphony.visualization.IDisplay
IDisplay.LayoutFrequency
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected Color
protected gov.nasa.worldwind.geom.Sector
protected Map<Class<?>,
AbstractRenderableLayer<?, ?>> protected Map<String,
CoverageLayer> protected Map<org.geotools.coverage.grid.GridCoverage2D,
gov.nasa.worldwind.render.SurfaceImage> protected String
protected boolean
protected gov.nasa.worldwind.globes.FlatGlobe
protected Geography
protected List<gov.nasa.worldwind.layers.Layer>
protected GISDisplayData<?>
static final String
protected LayerPanel
protected Layout
protected LayoutUpdater
protected static final double
protected gov.nasa.worldwind.Model
protected Map<Network<?>,
NetworkLayerGIS> protected JPanel
protected DisplayGIS3D.GlobePositionListener
protected gov.nasa.worldwind.globes.Globe
protected RepastStatusBar
protected boolean
protected Lock
protected Runnable
protected RepastViewControlsSelectListener
protected boolean
protected gov.nasa.worldwind.awt.WorldWindowGLJPanel
Fields inherited from class repast.simphony.visualization.AbstractDisplay
dlSupport, FRAME_UPDATE_INTERVAL, INFO_CURSOR, lastRenderTS, probeSupport
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
closed()
Notifies this IDisplay that its associated gui widget has been closed.protected void
Create 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.void
protected gov.nasa.worldwind.layers.RenderableLayer
createStaticRasterLayer
(String filename, boolean forceLongitudeFirstAxis) Adds a static raster layer from the provided file.void
Notifies this IDisplay that its associated gui widget has been deIconified.void
destroy()
!!! Destroy needs to properly dispose and shutdown of WorldWind objects to prevent memory leaks !!!!void
enableRoundGlobe
(boolean round) Map<Class<?>,
AbstractRenderableLayer<?, ?>> Gets the layout the display usesgetPanel()
Gets a panel that contains the actual gui for visualization.gov.nasa.worldwind.WorldWindow
void
Notifies this IDisplay that its associated gui widget has been iconified.void
init()
Initializes the display.protected void
initGlobes
(GISDisplayDescriptor.VIEW_TYPE viewType) Initialize the WWJ globe (flat/globe)boolean
protected boolean
protected void
moveObject
(Object o) void
probe
(gov.nasa.worldwind.event.SelectEvent event) void
registerCoverageStyle
(String coverageName, CoverageStyle<?> style) Register the dynamic coverage and style informationvoid
registerNetworkStyle
(Network<?> network, NetworkStyleGIS style) Register the network and style informationvoid
registerStyle
(Class<?> clazz, StyleGIS<?> style) Register the agent class and style informationvoid
registerToolBar
(JToolBar bar) Registers the specified toolbar with this IDisplay.protected void
void
render()
Render the display.void
Resets the home (initial) view of the displayvoid
setBackgroundColor
(Color backgroundColor) void
Sets the Layout for the display to use.void
setLayoutFrequency
(IDisplay.LayoutFrequency frequency, int interval) Sets the frequency of the layout.void
setPause
(boolean pause) Pause the rendering.void
void
setTrackAgents
(boolean trackAgents) void
void
void
update()
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:IDisplay
Gets 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:IDisplay
Initializes 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:
destroy
in interfaceIDisplay
- Overrides:
destroy
in classAbstractDisplay
-
addObject
- Specified by:
addObject
in classAbstractDisplay
-
moveObject
- Specified by:
moveObject
in classAbstractDisplay
-
removeObject
- Specified by:
removeObject
in classAbstractDisplay
-
setLayout
Description copied from interface:IDisplay
Sets the Layout for the display to use.- Parameters:
layout
- the layout to use
-
setLayoutFrequency
Description copied from interface:IDisplay
Sets 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:IDisplay
Updates the state of the display to reflect whatever it is that it is displaying. -
render
public void render()Description copied from interface:Renderer
Render the display. This rendering should take place asynchronously on the AWT thread. -
setPause
public void setPause(boolean pause) Description copied from interface:Renderer
Pause 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:IDisplay
Gets the layout the display uses- Returns:
- a layout object
-
getRegisteredClasses
-
createEditor
Description copied from interface:IDisplay
Creates 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:IDisplay
Resets the home (initial) view of the display -
toggleAnaglyphStereo
public void toggleAnaglyphStereo() -
registerToolBar
Description copied from class:AbstractDisplay
Registers 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:
registerToolBar
in interfaceIDisplay
- Overrides:
registerToolBar
in 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:IDisplay
Notifies this IDisplay that its associated gui widget has been deIconified. -
iconified
public void iconified()Description copied from interface:IDisplay
Notifies this IDisplay that its associated gui widget has been iconified. -
closed
public void closed()Description copied from interface:IDisplay
Notifies this IDisplay that its associated gui widget has been closed. -
setBackgroundColor
-