Package gov.nasa.worldwind
Interface SceneController
-
- All Superinterfaces:
AVList,Disposable,java.util.EventListener,MessageListener,java.beans.PropertyChangeListener,WWObject
- All Known Subinterfaces:
StereoSceneController
- All Known Implementing Classes:
AbstractSceneController,BasicSceneController,StereoOptionSceneController
public interface SceneController extends WWObject, Disposable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ClutterFiltergetClutterFilter()Returns the current clutter filter.DrawContextgetDrawContext()Returns the current draw context.doublegetFramesPerSecond()Returns the current average frames drawn per second.doublegetFrameTime()Returns the per-frame timestamp.GLRuntimeCapabilitiesgetGLRuntimeCapabilities()Returns theGLRuntimeCapabilitiesassociated with this SceneController.GpuResourceCachegetGpuResourceCache()Returns this scene controller's GPU Resource cache.ModelgetModel()Indicates the scene controller's model.PickedObjectListgetObjectsInPickRectangle()Returns the list of picked objects that intersect the current pick rectangle.java.util.Collection<PerformanceStatistic>getPerFrameStatistics()Returns the current per-frame statistics.PickedObjectListgetPickedObjectList()Returns the list of picked objects at the current pick point.java.awt.PointgetPickPoint()Returns the current pick point in AWT screen coordinates.java.awt.RectanglegetPickRectangle()Returns the current pick rectangle in AWT screen coordinates.java.util.Collection<java.lang.Throwable>getRenderingExceptions()Returns the rendering exceptions accumulated by this SceneController during the last frame as aCollectionofThrowableobjects.ScreenCreditControllergetScreenCreditController()Returns the current screen credit controller.SectorGeometryListgetTerrain()Returns the terrain geometry used to draw the most recent frame.doublegetVerticalExaggeration()Indicates the current vertical exaggeration.ViewgetView()Returns the current view.booleanisDeepPickEnabled()Indicates whether all items under the cursor are identified during picking and withinSelectEvents.voidreinitialize()Reinitializes the scene controller.intrepaint()Cause the window to regenerate the frame, including pick resolution.voidsetClutterFilter(ClutterFilter clutterFilter)Specifies the clutter filter to use.voidsetDeepPickEnabled(boolean tf)Specifies whether all items under the cursor are identified during picking and withinSelectEvents.voidsetGLRuntimeCapabilities(GLRuntimeCapabilities capabilities)Sets theGLRuntimeCapabilitiesassociated with this SceneController to the specified parameter.voidsetGpuResourceCache(GpuResourceCache gpuResourceCache)Specifies the GPU Resource cache to use.voidsetModel(Model model)Specifies the scene controller's model.voidsetPerFrameStatisticsKeys(java.util.Set<java.lang.String> keys)Specifies the performance values to monitor.voidsetPickPoint(java.awt.Point pickPoint)Specifies the current pick point in AWT screen coordinates, ornullto indicate that there is no pick point.voidsetPickRectangle(java.awt.Rectangle pickRect)Specifies the current pick rectangle in AWT screen coordinates, ornullto indicate that there is no pick rectangle.voidsetScreenCreditController(ScreenCreditController screenCreditRenderer)Specifies theScreenCreditControllerto use for displaying screen credits for the model of this screen controller.voidsetVerticalExaggeration(double verticalExaggeration)Specifies the exaggeration to apply to elevation values of terrain and other displayed items.voidsetView(View view)Sets the current view.-
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
-
Methods inherited from interface gov.nasa.worldwind.Disposable
dispose
-
Methods inherited from interface gov.nasa.worldwind.event.MessageListener
onMessage
-
-
-
-
Method Detail
-
getModel
Model getModel()
Indicates the scene controller's model. This returnsnullif the scene controller has no model.- Returns:
- the scene controller's model, or
nullif the scene controller has no model.
-
setModel
void setModel(Model model)
Specifies the scene controller's model. This method fires anAVKey.MODELproperty change event.- Parameters:
model- the scene controller's model.
-
getView
View getView()
Returns the current view. This method fires anAVKey.VIEWproperty change event.- Returns:
- the current view.
-
setView
void setView(View view)
Sets the current view.- Parameters:
view- the view.
-
repaint
int repaint()
Cause the window to regenerate the frame, including pick resolution.- Returns:
- if greater than zero, the window should be automatically repainted again at the indicated number of milliseconds from this method's return.
-
setVerticalExaggeration
void setVerticalExaggeration(double verticalExaggeration)
Specifies the exaggeration to apply to elevation values of terrain and other displayed items.- Parameters:
verticalExaggeration- the vertical exaggeration to apply.
-
getVerticalExaggeration
double getVerticalExaggeration()
Indicates the current vertical exaggeration.- Returns:
- the current vertical exaggeration.
-
getPickedObjectList
PickedObjectList getPickedObjectList()
Returns the list of picked objects at the current pick point. The returned list is computed during the most recent call to repaint.- Returns:
- the list of picked objects at the pick point, or null if no objects are currently picked.
-
getObjectsInPickRectangle
PickedObjectList getObjectsInPickRectangle()
Returns the list of picked objects that intersect the current pick rectangle. The returned list is computed during the most recent call to repaint.- Returns:
- the list of picked objects intersecting the pick rectangle, or null if no objects are currently intersecting the rectangle.
-
getFramesPerSecond
double getFramesPerSecond()
Returns the current average frames drawn per second. A frame is one repaint of the window and includes a pick pass and a render pass.- Returns:
- the current average number of frames drawn per second.
-
getFrameTime
double getFrameTime()
Returns the per-frame timestamp.- Returns:
- the per-frame timestamp, in milliseconds.
-
setPickPoint
void setPickPoint(java.awt.Point pickPoint)
Specifies the current pick point in AWT screen coordinates, ornullto indicate that there is no pick point. Each frame, this scene controller determines which objects are drawn at the pick point and places them in a PickedObjectList. This list can be accessed by callinggetPickedObjectList().If the pick point is
null, this scene controller ignores the pick point and the list of objects returned by getPickedObjectList is empty.- Parameters:
pickPoint- the current pick point, ornull.
-
getPickPoint
java.awt.Point getPickPoint()
Returns the current pick point in AWT screen coordinates.- Returns:
- the current pick point, or
nullif no pick point is current. - See Also:
setPickPoint(java.awt.Point)
-
setPickRectangle
void setPickRectangle(java.awt.Rectangle pickRect)
Specifies the current pick rectangle in AWT screen coordinates, ornullto indicate that there is no pick rectangle. Each frame, this scene controller determines which objects intersect the pick rectangle and places them in a PickedObjectList. This list can be accessed by callinggetObjectsInPickRectangle().If the pick rectangle is
null, this scene controller ignores the pick rectangle and the list of objects returned by getObjectsInPickRectangle is empty.- Parameters:
pickRect- the current pick rectangle, ornull.
-
getPickRectangle
java.awt.Rectangle getPickRectangle()
Returns the current pick rectangle in AWT screen coordinates.- Returns:
- the current pick rectangle, or
nullif no pick rectangle is current. - See Also:
setPickRectangle(java.awt.Rectangle)
-
setDeepPickEnabled
void setDeepPickEnabled(boolean tf)
Specifies whether all items under the cursor are identified during picking and withinSelectEvents.- Parameters:
tf- true to identify all items under the cursor during picking, otherwise false.
-
isDeepPickEnabled
boolean isDeepPickEnabled()
Indicates whether all items under the cursor are identified during picking and withinSelectEvents.- Returns:
- true if all items under the cursor are identified during picking, otherwise false.
-
setGpuResourceCache
void setGpuResourceCache(GpuResourceCache gpuResourceCache)
Specifies the GPU Resource cache to use.- Parameters:
gpuResourceCache- the texture cache.
-
getGpuResourceCache
GpuResourceCache getGpuResourceCache()
Returns this scene controller's GPU Resource cache.- Returns:
- this scene controller's GPU Resource cache.
-
getPerFrameStatistics
java.util.Collection<PerformanceStatistic> getPerFrameStatistics()
Returns the current per-frame statistics.- Returns:
- the current per-frame statistics.
-
setPerFrameStatisticsKeys
void setPerFrameStatisticsKeys(java.util.Set<java.lang.String> keys)
Specifies the performance values to monitor. SeePerformanceStatisticfor the available keys.- Parameters:
keys- the performance statistic keys to monitor.
-
getRenderingExceptions
java.util.Collection<java.lang.Throwable> getRenderingExceptions()
Returns the rendering exceptions accumulated by this SceneController during the last frame as aCollectionofThrowableobjects.- Returns:
- the Collection of accumulated rendering exceptions.
-
getTerrain
SectorGeometryList getTerrain()
Returns the terrain geometry used to draw the most recent frame. The geometry spans only the area most recently visible.- Returns:
- the terrain geometry used to draw the most recent frame. May be null.
-
getDrawContext
DrawContext getDrawContext()
Returns the current draw context.- Returns:
- the current draw context.
-
reinitialize
void reinitialize()
Reinitializes the scene controller.
-
getScreenCreditController
ScreenCreditController getScreenCreditController()
Returns the current screen credit controller.- Returns:
- the current screen credit controller. May be null.
- See Also:
setScreenCreditController(gov.nasa.worldwind.render.ScreenCreditController)
-
setScreenCreditController
void setScreenCreditController(ScreenCreditController screenCreditRenderer)
Specifies theScreenCreditControllerto use for displaying screen credits for the model of this screen controller.- Parameters:
screenCreditRenderer- the screen credit controller. May be null, in which case screen credits are not displayed.
-
getGLRuntimeCapabilities
GLRuntimeCapabilities getGLRuntimeCapabilities()
Returns theGLRuntimeCapabilitiesassociated with this SceneController.- Returns:
- this SceneController's associated GLRuntimeCapabilities.
-
setGLRuntimeCapabilities
void setGLRuntimeCapabilities(GLRuntimeCapabilities capabilities)
Sets theGLRuntimeCapabilitiesassociated with this SceneController to the specified parameter.- Parameters:
capabilities- the GLRuntimeCapabilities to be associated with this SceneController.- Throws:
java.lang.IllegalArgumentException- if the capabilities are null.
-
getClutterFilter
ClutterFilter getClutterFilter()
Returns the current clutter filter.- Returns:
- the current clutter filter. May be null, in which case decluttering is not performed.
-
setClutterFilter
void setClutterFilter(ClutterFilter clutterFilter)
Specifies the clutter filter to use.- Parameters:
clutterFilter- the clutter filter to use. May be null to indicate no decluttering.
-
-