|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.render.DrawContextImpl
public class DrawContextImpl
| Field Summary |
|---|
| Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
changeSupport |
| Constructor Summary | |
|---|---|
DrawContextImpl()
|
|
| Method Summary | |
|---|---|
void |
addOrderedRenderable(OrderedRenderable orderedRenderable)
|
void |
addPickedObject(PickedObject pickedObject)
Adds a single insatnce of the picked object to the current picked-object list |
void |
addPickedObjects(PickedObjectList pickedObjects)
Add picked objects to the current list of picked objects. |
void |
addPickPointFrustum()
Creates a frustum around the current pickpoint and adds it to the list of Pick Frustums. |
void |
addScreenCredit(ScreenCredit credit)
|
void |
disablePickingMode()
Disables color picking mode |
void |
dispose()
Free internal resources held by this draw context. |
void |
drawUnitQuad()
|
void |
drawUnitQuad(com.sun.opengl.util.texture.TextureCoords texCoords)
|
void |
enablePickingMode()
Enables color picking mode |
AnnotationRenderer |
getAnnotationRenderer()
Returns the draw context's annotation renderer, typically used by annotations that are not contained in an AnnotationLayer. |
java.awt.Color |
getClearColor()
|
Layer |
getCurrentLayer()
Returns the current-layer. |
int |
getDrawableHeight()
Retrieves the drawable height of this DrawContext. |
int |
getDrawableWidth()
Retrieves the drawable width of this DrawContext. |
long |
getFrameTimeStamp()
|
SurfaceTileRenderer |
getGeographicSurfaceTileRenderer()
|
javax.media.opengl.GL |
getGL()
Retrieves the current javax.media.opengl.GL. |
javax.media.opengl.GLContext |
getGLContext()
Retrieves this DrawContexts javax.media.opengl.GLContext. |
javax.media.opengl.GLDrawable |
getGLDrawable()
Retrieves the current javax.media.opengl.GLDrawable. |
Globe |
getGlobe()
Retrieves the current Globe, which may be null. |
GLRuntimeCapabilities |
getGLRuntimeCapabilities()
Returns the GLRuntimeCapabilities associated with this DrawContext. |
javax.media.opengl.glu.GLU |
getGLU()
Retrieves the current javax.media.opengl.glu.GLU. |
LayerList |
getLayers()
Retrieves a list containing all the current layers. |
Model |
getModel()
Retrieves the current Model, which may be null. |
java.util.Queue<OrderedRenderable> |
getOrderedRenderables()
|
java.util.Collection<PerformanceStatistic> |
getPerFrameStatistics()
|
java.util.Set<java.lang.String> |
getPerFrameStatisticsKeys()
|
PickedObjectList |
getPickedObjects()
Returns the list of objects picked during the most recent pick traversal. |
PickPointFrustumList |
getPickFrustums()
Gets the FrustumList containing all the current Pick Frustums |
java.awt.Point |
getPickPoint()
|
java.awt.Dimension |
getPickPointFrustumDimension()
Gets the dimension of the current Pick Point Frustum |
Vec4 |
getPointOnGlobe(Angle latitude,
Angle longitude)
|
int |
getRedrawRequested()
|
java.util.Map<ScreenCredit,java.lang.Long> |
getScreenCredits()
|
Vec4 |
getScreenPoint(Angle latitude,
Angle longitude,
double metersElevation)
|
Vec4 |
getScreenPoint(Position position)
|
Vec4 |
getScreenPoint(Vec4 modelPoint)
|
SectorGeometryList |
getSurfaceGeometry()
Retrieves a list of all the sectors rendered so far this frame. |
TextRendererCache |
getTextRendererCache()
|
TextureCache |
getTextureCache()
|
java.awt.Color |
getUniquePickColor()
Returns a unique color to serve as a pick identifier during picking. |
double |
getVerticalExaggeration()
Retrieves the current vertical exaggeration. |
View |
getView()
Retrieves the current View, which may be null. |
Position |
getViewportCenterPosition()
|
java.awt.Point |
getViewportCenterScreenPoint()
|
Sector |
getVisibleSector()
Retrieves a Sector which is at least as large as the current visible sector. |
java.util.List<Sector> |
getVisibleSectors(double[] resolutions,
long timeLimit,
Sector sector)
Returns the visible sectors at one of several specified resolutions within a specfied search sector. |
void |
initialize(javax.media.opengl.GLContext glContext)
Initializes this DrawContext. |
boolean |
isPickingMode()
Returns true if the Picking mode is active, otherwise return false |
void |
setAnnotationRenderer(AnnotationRenderer ar)
Since Annotations are Renderables, they can be exist outside an AnnotationLayer, in which
case they are responsible for rendering themselves. |
void |
setCurrentLayer(Layer layer)
Sets the current-layer field to the specified layer or null. |
void |
setFrameTimeStamp(long frameTimeStamp)
|
void |
setGLContext(javax.media.opengl.GLContext glContext)
Assigns this DrawContext a new javax.media.opengl.GLContext. |
void |
setGLRuntimeCapabilities(GLRuntimeCapabilities capabilities)
Sets the GLRuntimeCapabilities associated with this DrawContext to the specified parameter. |
void |
setModel(Model model)
Assign a new Model. |
void |
setPerFrameStatistic(java.lang.String key,
java.lang.String displayName,
java.lang.Object value)
|
void |
setPerFrameStatistics(java.util.Collection<PerformanceStatistic> stats)
|
void |
setPerFrameStatisticsKeys(java.util.Set<java.lang.String> statKeys,
java.util.Collection<PerformanceStatistic> stats)
|
void |
setPickPoint(java.awt.Point pickPoint)
|
void |
setPickPointFrustumDimension(java.awt.Dimension dim)
Set the size (in pixels) of the pick point frustum at the near plane. |
void |
setRedrawRequested(int redrawRequested)
|
void |
setSurfaceGeometry(SectorGeometryList surfaceGeometry)
|
void |
setTextRendererCache(TextRendererCache textRendererCache)
|
void |
setTextureCache(TextureCache textureCache)
|
void |
setVerticalExaggeration(double verticalExaggeration)
Sets the vertical exaggeration. |
void |
setView(View view)
Assigns a new View. |
void |
setViewportCenterPosition(Position viewportCenterPosition)
|
void |
setViewportCenterScreenPoint(java.awt.Point viewportCenterScreenPoint)
|
void |
setVisibleSector(Sector s)
Sets the visible Sector. |
| Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
|---|
propertyChange |
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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 |
| Constructor Detail |
|---|
public DrawContextImpl()
| Method Detail |
|---|
public void addOrderedRenderable(OrderedRenderable orderedRenderable)
addOrderedRenderable in interface DrawContextpublic void addPickedObject(PickedObject pickedObject)
addPickedObject in interface DrawContextpickedObject - the object to add
java.lang.IllegalArgumentException - if picked Object is nullpublic void addPickedObjects(PickedObjectList pickedObjects)
addPickedObjects in interface DrawContextpickedObjects - the list of picked objects to add
java.lang.IllegalArgumentException - if pickedObjects is nullpublic void addPickPointFrustum()
addPickPointFrustum in interface DrawContextpublic void addScreenCredit(ScreenCredit credit)
addScreenCredit in interface DrawContextpublic void disablePickingMode()
disablePickingMode in interface DrawContextpublic void dispose()
dispose in interface Disposablejavax.media.opengl.GLException - - If an OpenGL context is not current when this method is called.public void drawUnitQuad()
drawUnitQuad in interface DrawContextpublic void drawUnitQuad(com.sun.opengl.util.texture.TextureCoords texCoords)
drawUnitQuad in interface DrawContextpublic void enablePickingMode()
enablePickingMode in interface DrawContextpublic AnnotationRenderer getAnnotationRenderer()
DrawContextAnnotationLayer.
getAnnotationRenderer in interface DrawContextpublic java.awt.Color getClearColor()
getClearColor in interface DrawContextpublic Layer getCurrentLayer()
DrawContext
getCurrentLayer in interface DrawContextpublic final int getDrawableHeight()
DrawContextDrawContext.
getDrawableHeight in interface DrawContextDrawCOntextpublic final int getDrawableWidth()
DrawContextDrawContext.
getDrawableWidth in interface DrawContextDrawCOntextpublic long getFrameTimeStamp()
getFrameTimeStamp in interface DrawContextpublic SurfaceTileRenderer getGeographicSurfaceTileRenderer()
getGeographicSurfaceTileRenderer in interface DrawContextpublic final javax.media.opengl.GL getGL()
DrawContextjavax.media.opengl.GL. A GL or GLU is required for
all graphical rendering in World Wind.
getGL in interface DrawContextGL if available, null otherwisepublic final javax.media.opengl.GLContext getGLContext()
DrawContextDrawContexts javax.media.opengl.GLContext. If this method returns null,
then there are potentially no active GLContexts and rendering should be aborted.
getGLContext in interface DrawContextDrawContexts javax.media.opengl.GLContext.public final javax.media.opengl.GLDrawable getGLDrawable()
DrawContextjavax.media.opengl.GLDrawable. A GLDrawable can be used to create
a GLContext, which can then be used for rendering.
getGLDrawable in interface DrawContextGLDrawable, null if none availablepublic final Globe getGlobe()
DrawContextGlobe, which may be null.
getGlobe in interface DrawContextGlobe, which may be nullpublic GLRuntimeCapabilities getGLRuntimeCapabilities()
DrawContextGLRuntimeCapabilities associated with this DrawContext.
getGLRuntimeCapabilities in interface DrawContextpublic final javax.media.opengl.glu.GLU getGLU()
DrawContextjavax.media.opengl.glu.GLU. A GLU or GL is required
for all graphical rendering in World Wind.
getGLU in interface DrawContextGLU if available, null otherwisepublic final LayerList getLayers()
DrawContext
getLayers in interface DrawContextLayerList containing all the current layerspublic final Model getModel()
DrawContextModel, which may be null.
getModel in interface DrawContextModel, which may be nullpublic java.util.Queue<OrderedRenderable> getOrderedRenderables()
getOrderedRenderables in interface DrawContextpublic java.util.Collection<PerformanceStatistic> getPerFrameStatistics()
getPerFrameStatistics in interface DrawContextpublic java.util.Set<java.lang.String> getPerFrameStatisticsKeys()
getPerFrameStatisticsKeys in interface DrawContextpublic PickedObjectList getPickedObjects()
DrawContext
getPickedObjects in interface DrawContextpublic PickPointFrustumList getPickFrustums()
getPickFrustums in interface DrawContextpublic java.awt.Point getPickPoint()
getPickPoint in interface DrawContextpublic java.awt.Dimension getPickPointFrustumDimension()
getPickPointFrustumDimension in interface DrawContext
public Vec4 getPointOnGlobe(Angle latitude,
Angle longitude)
getPointOnGlobe in interface DrawContextpublic int getRedrawRequested()
getRedrawRequested in interface DrawContextpublic java.util.Map<ScreenCredit,java.lang.Long> getScreenCredits()
getScreenCredits in interface DrawContext
public Vec4 getScreenPoint(Angle latitude,
Angle longitude,
double metersElevation)
getScreenPoint in interface DrawContextpublic Vec4 getScreenPoint(Position position)
getScreenPoint in interface DrawContextpublic Vec4 getScreenPoint(Vec4 modelPoint)
getScreenPoint in interface DrawContextpublic SectorGeometryList getSurfaceGeometry()
DrawContext
getSurfaceGeometry in interface DrawContextSectorGeometryList containing every SectorGeometry rendered so far this
render pass.public TextRendererCache getTextRendererCache()
getTextRendererCache in interface DrawContextpublic TextureCache getTextureCache()
getTextureCache in interface DrawContextpublic java.awt.Color getUniquePickColor()
DrawContext
getUniquePickColor in interface DrawContextpublic final double getVerticalExaggeration()
DrawContextGlobe. A vertical exaggeration of 3 will create mountains and valleys which are three times as
high/deep as they really are.
getVerticalExaggeration in interface DrawContextpublic final View getView()
DrawContextView, which may be null.
getView in interface DrawContextView, which may be nullpublic Position getViewportCenterPosition()
getViewportCenterPosition in interface DrawContextpublic java.awt.Point getViewportCenterScreenPoint()
getViewportCenterScreenPoint in interface DrawContextpublic final Sector getVisibleSector()
DrawContextSector which is at least as large as the current visible sector. The value returned is
the value passed to SetVisibleSector. This method may return null.
getVisibleSector in interface DrawContextSector at least the size of the curernt visible sector, null if unavailable
public java.util.List<Sector> getVisibleSectors(double[] resolutions,
long timeLimit,
Sector sector)
DrawContext
getVisibleSectors in interface DrawContextresolutions - the resolutions of the sectors to return, in latitude.timeLimit - the amount of time, in milliseconds, to allow for searching.sector - the sector to decompose into visible sectors.
public final void initialize(javax.media.opengl.GLContext glContext)
DrawContextDrawContext. This method should be called at the beginning of each frame to prepare
the DrawContext for the coming render pass.
initialize in interface DrawContextglContext - the javax.media.opengl.GLContext to use for this render passpublic boolean isPickingMode()
isPickingMode in interface DrawContextpublic void setAnnotationRenderer(AnnotationRenderer ar)
DrawContextAnnotations are Renderables, they can be exist outside an AnnotationLayer, in which
case they are responsible for rendering themselves. The draw context's annotation renderer provides an active
renderer for that purpose.
setAnnotationRenderer in interface DrawContextar - the new annotation renderer for the draw context.public void setCurrentLayer(Layer layer)
DrawContext
setCurrentLayer in interface DrawContextlayer - the current layer or null.public void setFrameTimeStamp(long frameTimeStamp)
setFrameTimeStamp in interface DrawContextpublic final void setGLContext(javax.media.opengl.GLContext glContext)
DrawContextDrawContext a new javax.media.opengl.GLContext. May throw a
NullPointerException if glContext is null.
setGLContext in interface DrawContextglContext - the new javax.media.opengl.GLContextpublic void setGLRuntimeCapabilities(GLRuntimeCapabilities capabilities)
DrawContextGLRuntimeCapabilities associated with this DrawContext to the specified parameter.
setGLRuntimeCapabilities in interface DrawContextcapabilities - the GLRuntimeCapabilities to be associated with this DrawContext.public final void setModel(Model model)
DrawContextModel. Some layers cannot function properly with a null Model. It is
recommended that the Model is never set to null during a normal render pass.
setModel in interface DrawContextmodel - the new Model
public void setPerFrameStatistic(java.lang.String key,
java.lang.String displayName,
java.lang.Object value)
setPerFrameStatistic in interface DrawContextpublic void setPerFrameStatistics(java.util.Collection<PerformanceStatistic> stats)
setPerFrameStatistics in interface DrawContext
public void setPerFrameStatisticsKeys(java.util.Set<java.lang.String> statKeys,
java.util.Collection<PerformanceStatistic> stats)
setPerFrameStatisticsKeys in interface DrawContextpublic void setPickPoint(java.awt.Point pickPoint)
setPickPoint in interface DrawContextpublic void setPickPointFrustumDimension(java.awt.Dimension dim)
setPickPointFrustumDimension in interface DrawContextdim - dimension of pick point frustumpublic void setRedrawRequested(int redrawRequested)
setRedrawRequested in interface DrawContextpublic void setSurfaceGeometry(SectorGeometryList surfaceGeometry)
setSurfaceGeometry in interface DrawContextpublic void setTextRendererCache(TextRendererCache textRendererCache)
setTextRendererCache in interface DrawContextpublic void setTextureCache(TextureCache textureCache)
setTextureCache in interface DrawContextpublic final void setVerticalExaggeration(double verticalExaggeration)
DrawContextGlobe. A vertical exaggeration of 3 will create mountains and valleys which are three times as
high/deep as they really are.
setVerticalExaggeration in interface DrawContextverticalExaggeration - the new vertical exaggeration.public final void setView(View view)
DrawContextView. Some layers cannot function properly with a null View. It is
recommended that the View is never set to null during a normal render pass.
setView in interface DrawContextview - the enw Viewpublic void setViewportCenterPosition(Position viewportCenterPosition)
setViewportCenterPosition in interface DrawContextpublic void setViewportCenterScreenPoint(java.awt.Point viewportCenterScreenPoint)
setViewportCenterScreenPoint in interface DrawContextpublic final void setVisibleSector(Sector s)
DrawContextSector. The new visible sector must completely encompass the Sector which is
visible on the display.
setVisibleSector in interface DrawContexts - the new visible Sector
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||