public abstract class AbstractSceneController extends WWObjectImpl implements SceneController
| Modifier and Type | Field and Description | 
|---|---|
| protected ClutterFilter | clutterFilter | 
| protected DrawContext | dc | 
| protected boolean | deepPick | 
| protected boolean | deferOrderedRendering | 
| protected long | frame | 
| protected double | framesPerSecond | 
| protected double | frameTime | 
| protected GLRuntimeCapabilities | glRuntimeCaps | 
| protected GpuResourceCache | gpuResourceCache | 
| protected PickedObjectList | lastObjectsInPickRectThe list of picked objects that intersect the current pick rectangle. | 
| protected PickedObjectList | lastPickedObjectsThe list of picked objects at the current pick point. | 
| protected Model | model | 
| protected Collection<PerformanceStatistic> | perFrameStatistics | 
| protected Set<String> | perFrameStatisticsKeys | 
| protected Map<Integer,PickedObject> | pickableObjectsMap of integer color codes to picked objects used to quickly resolve the top picked objects in  doResolveTopPick(gov.nasa.worldwind.render.DrawContext, java.awt.Rectangle). | 
| protected Point | pickPointThe pick point in AWT screen coordinates, or  nullif the pick point is disabled. | 
| protected ArrayList<Point> | pickPoints | 
| protected Rectangle | pickRectThe pick rectangle in AWT screen coordinates, or  nullif the pick rectangle is disabled. | 
| protected double | pickTime | 
| protected Collection<Throwable> | renderingExceptions | 
| protected ScreenCreditController | screenCreditController | 
| protected static String | SURFACE_OBJECT_TILE_COUNT_NAMEThe display name for the surface object tile count performance statistic. | 
| protected SurfaceObjectTileBuilder | surfaceObjectTileBuilderSupport class used to build the composite representation of surface objects as a list of SurfaceTiles. | 
| protected TextRendererCache | textRendererCache | 
| protected long | timebase | 
| protected double | verticalExaggeration | 
| protected View | view | 
| Constructor and Description | 
|---|
| AbstractSceneController() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | applyView(DrawContext dc) | 
| protected void | buildCompositeSurfaceObjects(DrawContext dc)Builds a composite representation for all  SurfaceObjectinstances in the draw
 context's ordered surface renderable queue. | 
| protected void | checkGLErrors(DrawContext dc)Called to check for openGL errors. | 
| protected void | clearFrame(DrawContext dc) | 
| protected void | createPickFrustum(DrawContext dc) | 
| protected void | createTerrain(DrawContext dc) | 
| void | dispose()Releases resources associated with this scene controller. | 
| protected void | doDeepPick(DrawContext dc) | 
| protected void | doNonTerrainPick(DrawContext dc) | 
| protected abstract void | doRepaint(DrawContext dc) | 
| protected void | doResolveTopPick(DrawContext dc,
                Point pickPoint) | 
| protected void | doResolveTopPick(DrawContext dc,
                Rectangle pickRect) | 
| protected void | draw(DrawContext dc) | 
| protected void | drawCompositeSurfaceObjects(DrawContext dc)Causes the scene controller to draw the composite representation of all  SurfaceObjectinstances in the draw context's ordered surface renderable queue. | 
| protected void | drawOrderedSurfaceRenderables(DrawContext dc) | 
| protected void | finalizeFrame(DrawContext dc) | 
| 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  GLRuntimeCapabilitiesassociated 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  CollectionofThrowableobjects. | 
| ScreenCreditController | getScreenCreditController()Returns the current screen credit controller. | 
| SectorGeometryList | getTerrain()Returns the terrain geometry used to draw the most recent frame. | 
| TextRendererCache | getTextRendererCache() | 
| double | getVerticalExaggeration()Indicates the current vertical exaggeration. | 
| View | getView()Returns the current view. | 
| protected Point | getViewportCenter(DrawContext dc) | 
| protected void | initializeDrawContext(DrawContext dc) | 
| protected void | initializeFrame(DrawContext dc) | 
| boolean | isDeepPickEnabled()Indicates whether all items under the cursor are identified during picking and within  SelectEvents. | 
| boolean | isDeferOrderedRendering() | 
| protected PickedObjectList | mergePickedObjectLists(PickedObjectList listA,
                      PickedObjectList listB) | 
| protected void | pick(DrawContext dc) | 
| protected void | pickLayers(DrawContext dc) | 
| protected void | pickOrderedSurfaceRenderables(DrawContext dc) | 
| protected void | pickTerrain(DrawContext dc) | 
| protected void | preRender(DrawContext dc) | 
| protected void | preRenderOrderedSurfaceRenderables(DrawContext dc) | 
| void | reinitialize()Reinitializes the scene controller. | 
| int | repaint()Cause the window to regenerate the frame, including pick resolution. | 
| protected void | resolveTopPick(DrawContext dc) | 
| 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 | setDeferOrderedRendering(boolean deferOrderedRendering) | 
| void | setGLRuntimeCapabilities(GLRuntimeCapabilities capabilities)Sets the  GLRuntimeCapabilitiesassociated 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. | 
| protected void | setPickedObjectList(PickedObjectList pol) | 
| void | setPickPoint(Point pickPoint)Specifies the current pick point in AWT screen coordinates, or  nullto indicate that there is no
 pick point. | 
| void | setPickRectangle(Rectangle pickRect)Specifies the current pick rectangle in AWT screen coordinates, or  nullto indicate that there is no
 pick rectangle. | 
| void | setScreenCreditController(ScreenCreditController screenCreditController)Specifies the  ScreenCreditControllerto 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. | 
onMessage, propertyChangeaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuespropertyChangeonMessageprotected ClutterFilter clutterFilter
protected DrawContext dc
protected boolean deepPick
protected boolean deferOrderedRendering
protected long frame
protected double framesPerSecond
protected double frameTime
protected GLRuntimeCapabilities glRuntimeCaps
protected GpuResourceCache gpuResourceCache
protected PickedObjectList lastObjectsInPickRect
null.protected PickedObjectList lastPickedObjects
null.protected Model model
protected Collection<PerformanceStatistic> perFrameStatistics
protected Map<Integer,PickedObject> pickableObjects
doResolveTopPick(gov.nasa.worldwind.render.DrawContext, java.awt.Rectangle). This map is used only when a pick
 rectangle is specified. Initialized to a new HashMap.protected Point pickPoint
null if the pick point is disabled. Initially
 null.protected Rectangle pickRect
null if the pick rectangle is disabled. Initially
 null.protected double pickTime
protected Collection<Throwable> renderingExceptions
protected ScreenCreditController screenCreditController
protected static final String SURFACE_OBJECT_TILE_COUNT_NAME
protected SurfaceObjectTileBuilder surfaceObjectTileBuilder
protected TextRendererCache textRendererCache
protected long timebase
protected double verticalExaggeration
protected View view
protected void applyView(DrawContext dc)
protected void buildCompositeSurfaceObjects(DrawContext dc)
SurfaceObject instances in the draw
 context's ordered surface renderable queue. While building the composite representation this invokes Renderable.render(gov.nasa.worldwind.render.DrawContext) in ordered rendering mode.
 This does nothing if the ordered surface renderable queue is empty, or if it does not contain any
 SurfaceObjects.
 
 This method is called during the preRender phase, and is therefore free to modify the framebuffer contents to
 create the composite representation.dc - The drawing context containing the surface objects to build a composite representation for.DrawContext.getOrderedSurfaceRenderables()protected void checkGLErrors(DrawContext dc)
dc - the relevant DrawContextprotected void clearFrame(DrawContext dc)
protected void createPickFrustum(DrawContext dc)
protected void createTerrain(DrawContext dc)
public void dispose()
dispose in interface Disposableprotected void doDeepPick(DrawContext dc)
protected void doNonTerrainPick(DrawContext dc)
protected abstract void doRepaint(DrawContext dc)
protected void doResolveTopPick(DrawContext dc, Point pickPoint)
protected void doResolveTopPick(DrawContext dc, Rectangle pickRect)
protected void draw(DrawContext dc)
protected void drawCompositeSurfaceObjects(DrawContext dc)
SurfaceObject instances in the draw context's ordered surface renderable queue. This
 representation was built during the preRender phase. This does nothing if the ordered surface renderable queue is
 empty, or if it does not contain any SurfaceObjects.dc - The drawing context containing the surface objects who's composite representation is drawn.protected void drawOrderedSurfaceRenderables(DrawContext dc)
protected void finalizeFrame(DrawContext dc)
public ClutterFilter getClutterFilter()
SceneControllergetClutterFilter in interface SceneControllerpublic DrawContext getDrawContext()
SceneControllergetDrawContext in interface SceneControllerpublic double getFramesPerSecond()
SceneControllergetFramesPerSecond in interface SceneControllerpublic double getFrameTime()
SceneControllergetFrameTime in interface SceneControllerpublic GLRuntimeCapabilities getGLRuntimeCapabilities()
GLRuntimeCapabilities associated with this SceneController.getGLRuntimeCapabilities in interface SceneControllerpublic GpuResourceCache getGpuResourceCache()
SceneControllergetGpuResourceCache in interface SceneControllerpublic Model getModel()
SceneControllernull if the scene controller has no model.getModel in interface SceneControllernull if the scene controller has no model.public PickedObjectList getObjectsInPickRectangle()
getObjectsInPickRectangle in interface SceneControllerpublic Collection<PerformanceStatistic> getPerFrameStatistics()
SceneControllergetPerFrameStatistics in interface SceneControllerpublic PickedObjectList getPickedObjectList()
getPickedObjectList in interface SceneControllerpublic Point getPickPoint()
getPickPoint in interface SceneControllernull if no pick point is current.SceneController.setPickPoint(java.awt.Point)public Rectangle getPickRectangle()
getPickRectangle in interface SceneControllernull if no pick rectangle is current.SceneController.setPickRectangle(java.awt.Rectangle)public Collection<Throwable> getRenderingExceptions()
SceneControllerCollection of Throwable objects.getRenderingExceptions in interface SceneControllerpublic ScreenCreditController getScreenCreditController()
SceneControllergetScreenCreditController in interface SceneControllerSceneController.setScreenCreditController(gov.nasa.worldwind.render.ScreenCreditController)public SectorGeometryList getTerrain()
SceneControllergetTerrain in interface SceneControllerpublic TextRendererCache getTextRendererCache()
public double getVerticalExaggeration()
SceneControllergetVerticalExaggeration in interface SceneControllerpublic View getView()
SceneControllerAVKey.VIEW property change
 event.getView in interface SceneControllerprotected Point getViewportCenter(DrawContext dc)
protected void initializeDrawContext(DrawContext dc)
protected void initializeFrame(DrawContext dc)
public boolean isDeepPickEnabled()
SceneControllerSelectEvents.isDeepPickEnabled in interface SceneControllerpublic boolean isDeferOrderedRendering()
protected PickedObjectList mergePickedObjectLists(PickedObjectList listA, PickedObjectList listB)
protected void pick(DrawContext dc)
protected void pickLayers(DrawContext dc)
protected void pickOrderedSurfaceRenderables(DrawContext dc)
protected void pickTerrain(DrawContext dc)
protected void preRender(DrawContext dc)
protected void preRenderOrderedSurfaceRenderables(DrawContext dc)
public void reinitialize()
SceneControllerreinitialize in interface SceneControllerpublic int repaint()
SceneControllerrepaint in interface SceneControllerprotected void resolveTopPick(DrawContext dc)
public void setClutterFilter(ClutterFilter clutterFilter)
SceneControllersetClutterFilter in interface SceneControllerclutterFilter - the clutter filter to use. May be null to indicate no decluttering.public void setDeepPickEnabled(boolean tf)
SceneControllerSelectEvents.setDeepPickEnabled in interface SceneControllertf - true to identify all items under the cursor during picking, otherwise false.public void setDeferOrderedRendering(boolean deferOrderedRendering)
public void setGLRuntimeCapabilities(GLRuntimeCapabilities capabilities)
GLRuntimeCapabilities associated with this SceneController to the specified parameter.setGLRuntimeCapabilities in interface SceneControllercapabilities - the GLRuntimeCapabilities to be associated with this SceneController.public void setGpuResourceCache(GpuResourceCache gpuResourceCache)
SceneControllersetGpuResourceCache in interface SceneControllergpuResourceCache - the texture cache.public void setModel(Model model)
SceneControllerAVKey.MODEL
 property change event.setModel in interface SceneControllermodel - the scene controller's model.public void setPerFrameStatisticsKeys(Set<String> keys)
SceneControllerPerformanceStatistic for the
 available keys.setPerFrameStatisticsKeys in interface SceneControllerkeys - the performance statistic keys to monitor.protected void setPickedObjectList(PickedObjectList pol)
public void setPickPoint(Point pickPoint)
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 SceneController.getPickedObjectList().
 
 If the pick point is null, this scene controller ignores the pick point and the list of objects
 returned by getPickedObjectList is empty.setPickPoint in interface SceneControllerpickPoint - the current pick point, or null.public void setPickRectangle(Rectangle pickRect)
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 SceneController.getObjectsInPickRectangle().
 
 If the pick rectangle is null, this scene controller ignores the pick rectangle and the list of
 objects returned by getObjectsInPickRectangle is empty.setPickRectangle in interface SceneControllerpickRect - the current pick rectangle, or null.public void setScreenCreditController(ScreenCreditController screenCreditController)
SceneControllerScreenCreditController to use for displaying screen credits for
 the model of this screen controller.setScreenCreditController in interface SceneControllerscreenCreditController - the screen credit controller. May be null, in which case screen credits are not
                             displayed.public void setVerticalExaggeration(double verticalExaggeration)
SceneControllersetVerticalExaggeration in interface SceneControllerverticalExaggeration - the vertical exaggeration to apply.public void setView(View view)
SceneControllersetView in interface SceneControllerview - the view.