NASA World Wind

gov.nasa.worldwind
Interface SceneController

All Superinterfaces:
AVList, Disposable, EventListener, MessageListener, PropertyChangeListener, WWObject
All Known Subinterfaces:
StereoSceneController
All Known Implementing Classes:
AbstractSceneController, BasicSceneController, StereoOptionSceneController

public interface SceneController
extends WWObject, Disposable


Method Summary
 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 the GLRuntimeCapabilities 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.
 Collection<PerformanceStatistic> getPerFrameStatistics()
          Returns the current per-frame statistics.
 PickedObjectList getPickedObjectList()
          Returns the list of picked objects at the current pick point.
 Point getPickPoint()
          Returns the current pick point in AWT screen coordinates.
 Rectangle getPickRectangle()
          Returns the current pick rectangle in AWT screen coordinates.
 Collection<Throwable> getRenderingExceptions()
          Returns the rendering exceptions accumulated by this SceneController during the last frame as a Collection of Throwable 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 within SelectEvents.
 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 within SelectEvents.
 void setGLRuntimeCapabilities(GLRuntimeCapabilities capabilities)
          Sets the GLRuntimeCapabilities 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(Set<String> keys)
          Specifies the performance values to monitor.
 void setPickPoint(Point pickPoint)
          Specifies the current pick point in AWT screen coordinates, or null to indicate that there is no pick point.
 void setPickRectangle(Rectangle pickRect)
          Specifies the current pick rectangle in AWT screen coordinates, or null to indicate that there is no pick rectangle.
 void setScreenCreditController(ScreenCreditController screenCreditRenderer)
          Specifies the ScreenCreditController 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 java.beans.PropertyChangeListener
propertyChange
 
Methods inherited from interface gov.nasa.worldwind.event.MessageListener
onMessage
 
Methods inherited from interface gov.nasa.worldwind.Disposable
dispose
 

Method Detail

getClutterFilter

ClutterFilter getClutterFilter()
Returns the current clutter filter.

Returns:
the current clutter filter. May be null, in which case decluttering is not performed.

getDrawContext

DrawContext getDrawContext()
Returns the current draw context.

Returns:
the current draw context.

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.

getGLRuntimeCapabilities

GLRuntimeCapabilities getGLRuntimeCapabilities()
Returns the GLRuntimeCapabilities associated with this SceneController.

Returns:
this SceneController's associated GLRuntimeCapabilities.

getGpuResourceCache

GpuResourceCache getGpuResourceCache()
Returns this scene controller's GPU Resource cache.

Returns:
this scene controller's GPU Resource cache.

getModel

Model getModel()
Indicates the scene controller's model. This returns null if the scene controller has no model.

Returns:
the scene controller's model, or null if the scene controller has no model.

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.

getPerFrameStatistics

Collection<PerformanceStatistic> getPerFrameStatistics()
Returns the current per-frame statistics.

Returns:
the current per-frame statistics.

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.

getPickPoint

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)

getPickRectangle

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)

getRenderingExceptions

Collection<Throwable> getRenderingExceptions()
Returns the rendering exceptions accumulated by this SceneController during the last frame as a Collection of Throwable objects.

Returns:
the Collection of accumulated rendering exceptions.

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)

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.

getVerticalExaggeration

double getVerticalExaggeration()
Indicates the current vertical exaggeration.

Returns:
the current vertical exaggeration.

getView

View getView()
Returns the current view. This method fires an AVKey.VIEW property change event.

Returns:
the current view.

isDeepPickEnabled

boolean isDeepPickEnabled()
Indicates whether all items under the cursor are identified during picking and within SelectEvents.

Returns:
true if all items under the cursor are identified during picking, otherwise false.

reinitialize

void reinitialize()
Reinitializes the scene controller.


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.

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.

setDeepPickEnabled

void setDeepPickEnabled(boolean tf)
Specifies whether all items under the cursor are identified during picking and within SelectEvents.

Parameters:
tf - true to identify all items under the cursor during picking, otherwise false.

setGLRuntimeCapabilities

void setGLRuntimeCapabilities(GLRuntimeCapabilities capabilities)
Sets the GLRuntimeCapabilities associated with this SceneController to the specified parameter.

Parameters:
capabilities - the GLRuntimeCapabilities to be associated with this SceneController.
Throws:
IllegalArgumentException - if the capabilities are null.

setGpuResourceCache

void setGpuResourceCache(GpuResourceCache gpuResourceCache)
Specifies the GPU Resource cache to use.

Parameters:
gpuResourceCache - the texture cache.

setModel

void setModel(Model model)
Specifies the scene controller's model. This method fires an AVKey.MODEL property change event.

Parameters:
model - the scene controller's model.

setPerFrameStatisticsKeys

void setPerFrameStatisticsKeys(Set<String> keys)
Specifies the performance values to monitor. See PerformanceStatistic for the available keys.

Parameters:
keys - the performance statistic keys to monitor.

setPickPoint

void setPickPoint(Point pickPoint)
Specifies the current pick point in AWT screen coordinates, or null 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 calling getPickedObjectList().

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, or null.

setPickRectangle

void setPickRectangle(Rectangle pickRect)
Specifies the current pick rectangle in AWT screen coordinates, or null 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 calling getObjectsInPickRectangle().

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, or null.

setScreenCreditController

void setScreenCreditController(ScreenCreditController screenCreditRenderer)
Specifies the ScreenCreditController 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.

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.

setView

void setView(View view)
Sets the current view.

Parameters:
view - the view.

NASA World Wind