|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface DrawContext
| 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)
Adds a collection of picked objects to the current picked-object list |
void |
addPickPointFrustum()
Creates a frustum around the current pickpoint and adds it to the list of Pick Frustums The frustum size is set with setPickPointFrustumSize(). |
void |
addScreenCredit(ScreenCredit credit)
|
void |
disablePickingMode()
Disables color picking mode |
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 searchSector)
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 annotationRenderer)
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 statistic)
|
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 viewportCenterPoint)
|
void |
setVisibleSector(Sector s)
Sets the visible Sector. |
| 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.Disposable |
|---|
dispose |
| Method Detail |
|---|
void addOrderedRenderable(OrderedRenderable orderedRenderable)
void addPickedObject(PickedObject pickedObject)
pickedObject - the object to addvoid addPickedObjects(PickedObjectList pickedObjects)
pickedObjects - the objects to addvoid addPickPointFrustum()
void addScreenCredit(ScreenCredit credit)
void disablePickingMode()
void drawUnitQuad()
void drawUnitQuad(com.sun.opengl.util.texture.TextureCoords texCoords)
void enablePickingMode()
AnnotationRenderer getAnnotationRenderer()
AnnotationLayer.
java.awt.Color getClearColor()
Layer getCurrentLayer()
int getDrawableHeight()
DrawContext.
DrawCOntextint getDrawableWidth()
DrawContext.
DrawCOntextlong getFrameTimeStamp()
SurfaceTileRenderer getGeographicSurfaceTileRenderer()
javax.media.opengl.GL getGL()
javax.media.opengl.GL. A GL or GLU is required for
all graphical rendering in World Wind.
GL if available, null otherwisejavax.media.opengl.GLContext getGLContext()
DrawContexts javax.media.opengl.GLContext. If this method returns null,
then there are potentially no active GLContexts and rendering should be aborted.
DrawContexts javax.media.opengl.GLContext.javax.media.opengl.GLDrawable getGLDrawable()
javax.media.opengl.GLDrawable. A GLDrawable can be used to create
a GLContext, which can then be used for rendering.
GLDrawable, null if none availableGlobe getGlobe()
Globe, which may be null.
Globe, which may be nullGLRuntimeCapabilities getGLRuntimeCapabilities()
GLRuntimeCapabilities associated with this DrawContext.
javax.media.opengl.glu.GLU getGLU()
javax.media.opengl.glu.GLU. A GLU or GL is required
for all graphical rendering in World Wind.
GLU if available, null otherwiseLayerList getLayers()
LayerList containing all the current layersModel getModel()
Model, which may be null.
Model, which may be nulljava.util.Queue<OrderedRenderable> getOrderedRenderables()
java.util.Collection<PerformanceStatistic> getPerFrameStatistics()
java.util.Set<java.lang.String> getPerFrameStatisticsKeys()
PickedObjectList getPickedObjects()
PickPointFrustumList getPickFrustums()
java.awt.Point getPickPoint()
java.awt.Dimension getPickPointFrustumDimension()
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()
SectorGeometryList containing every SectorGeometry rendered so far this
render pass.TextRendererCache getTextRendererCache()
TextureCache getTextureCache()
java.awt.Color getUniquePickColor()
double getVerticalExaggeration()
Globe. A vertical exaggeration of 3 will create mountains and valleys which are three times as
high/deep as they really are.
View getView()
View, which may be null.
View, which may be nullPosition getViewportCenterPosition()
java.awt.Point getViewportCenterScreenPoint()
Sector getVisibleSector()
Sector 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.
Sector at least the size of the curernt visible sector, null if unavailable
java.util.List<Sector> getVisibleSectors(double[] resolutions,
long timeLimit,
Sector searchSector)
resolutions - the resolutions of the sectors to return, in latitude.timeLimit - the amount of time, in milliseconds, to allow for searching.searchSector - the sector to decompose into visible sectors.
java.lang.IllegalArgumentException - if the resolutions array or the search sector is null.void initialize(javax.media.opengl.GLContext glContext)
DrawContext. This method should be called at the beginning of each frame to prepare
the DrawContext for the coming render pass.
glContext - the javax.media.opengl.GLContext to use for this render passboolean isPickingMode()
void setAnnotationRenderer(AnnotationRenderer annotationRenderer)
Annotations 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.
annotationRenderer - the new annotation renderer for the draw context.
java.lang.IllegalArgumentException - if annotationRenderer is null;void setCurrentLayer(Layer layer)
layer - the current layer or null.void setFrameTimeStamp(long frameTimeStamp)
void setGLContext(javax.media.opengl.GLContext glContext)
DrawContext a new javax.media.opengl.GLContext. May throw a
NullPointerException if glContext is null.
glContext - the new javax.media.opengl.GLContext
java.lang.NullPointerException - if glContext is nullvoid setGLRuntimeCapabilities(GLRuntimeCapabilities capabilities)
GLRuntimeCapabilities associated with this DrawContext to the specified parameter.
capabilities - the GLRuntimeCapabilities to be associated with this DrawContext.
java.lang.IllegalArgumentException - if the capabilities are null.void setModel(Model model)
Model. 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.
model - the new Model
void setPerFrameStatistic(java.lang.String key,
java.lang.String displayName,
java.lang.Object statistic)
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)
dim - dimension of pick point frustumvoid setRedrawRequested(int redrawRequested)
void setSurfaceGeometry(SectorGeometryList surfaceGeometry)
void setTextRendererCache(TextRendererCache textRendererCache)
void setTextureCache(TextureCache textureCache)
void setVerticalExaggeration(double verticalExaggeration)
Globe. A vertical exaggeration of 3 will create mountains and valleys which are three times as
high/deep as they really are.
verticalExaggeration - the new vertical exaggeration.void setView(View view)
View. 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.
view - the enw Viewvoid setViewportCenterPosition(Position viewportCenterPosition)
void setViewportCenterScreenPoint(java.awt.Point viewportCenterPoint)
void setVisibleSector(Sector s)
Sector. The new visible sector must completely encompass the Sector which is
visible on the display.
s - the new visible Sector
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||