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 ClutterFilter
getClutterFilter()
Returns the current clutter filter.DrawContext
getDrawContext()
Returns the current draw context.double
getFramesPerSecond()
Returns the current average frames drawn per second.double
getFrameTime()
Returns the per-frame timestamp.GLRuntimeCapabilities
getGLRuntimeCapabilities()
Returns theGLRuntimeCapabilities
associated with this SceneController.GpuResourceCache
getGpuResourceCache()
Returns this scene controller's GPU Resource cache.Model
getModel()
Indicates the scene controller's model.PickedObjectList
getObjectsInPickRectangle()
Returns the list of picked objects that intersect the current pick rectangle.java.util.Collection<PerformanceStatistic>
getPerFrameStatistics()
Returns the current per-frame statistics.PickedObjectList
getPickedObjectList()
Returns the list of picked objects at the current pick point.java.awt.Point
getPickPoint()
Returns the current pick point in AWT screen coordinates.java.awt.Rectangle
getPickRectangle()
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 aCollection
ofThrowable
objects.ScreenCreditController
getScreenCreditController()
Returns the current screen credit controller.SectorGeometryList
getTerrain()
Returns the terrain geometry used to draw the most recent frame.double
getVerticalExaggeration()
Indicates the current vertical exaggeration.View
getView()
Returns the current view.boolean
isDeepPickEnabled()
Indicates whether all items under the cursor are identified during picking and withinSelectEvent
s.void
reinitialize()
Reinitializes the scene controller.int
repaint()
Cause the window to regenerate the frame, including pick resolution.void
setClutterFilter(ClutterFilter clutterFilter)
Specifies the clutter filter to use.void
setDeepPickEnabled(boolean tf)
Specifies whether all items under the cursor are identified during picking and withinSelectEvent
s.void
setGLRuntimeCapabilities(GLRuntimeCapabilities capabilities)
Sets theGLRuntimeCapabilities
associated with this SceneController to the specified parameter.void
setGpuResourceCache(GpuResourceCache gpuResourceCache)
Specifies the GPU Resource cache to use.void
setModel(Model model)
Specifies the scene controller's model.void
setPerFrameStatisticsKeys(java.util.Set<java.lang.String> keys)
Specifies the performance values to monitor.void
setPickPoint(java.awt.Point pickPoint)
Specifies the current pick point in AWT screen coordinates, ornull
to indicate that there is no pick point.void
setPickRectangle(java.awt.Rectangle pickRect)
Specifies the current pick rectangle in AWT screen coordinates, ornull
to indicate that there is no pick rectangle.void
setScreenCreditController(ScreenCreditController screenCreditRenderer)
Specifies theScreenCreditController
to use for displaying screen credits for the model of this screen controller.void
setVerticalExaggeration(double verticalExaggeration)
Specifies the exaggeration to apply to elevation values of terrain and other displayed items.void
setView(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 returnsnull
if the scene controller has no model.- Returns:
- the scene controller's model, or
null
if the scene controller has no model.
-
setModel
void setModel(Model model)
Specifies the scene controller's model. This method fires anAVKey.MODEL
property change event.- Parameters:
model
- the scene controller's model.
-
getView
View getView()
Returns the current view. This method fires anAVKey.VIEW
property 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, ornull
to 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
null
if 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, ornull
to 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
null
if 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 withinSelectEvent
s.- 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 withinSelectEvent
s.- 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. SeePerformanceStatistic
for 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 aCollection
ofThrowable
objects.- 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 theScreenCreditController
to 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 theGLRuntimeCapabilities
associated with this SceneController.- Returns:
- this SceneController's associated GLRuntimeCapabilities.
-
setGLRuntimeCapabilities
void setGLRuntimeCapabilities(GLRuntimeCapabilities capabilities)
Sets theGLRuntimeCapabilities
associated 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.
-
-