|
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 |
Fields inherited from interface gov.nasa.worldwind.render.DrawContext |
---|
HIGH_PRIORITY, LOW_PRIORITY |
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 |
disablePickingMode()
Disables color picking mode |
void |
dispose()
Free internal resources held by this draw context. |
void |
drawUnitQuad()
|
void |
drawUnitQuad(TextureCoords texCoords)
|
void |
enablePickingMode()
Enables color picking mode |
AnnotationRenderer |
getAnnotationRenderer()
|
java.awt.Color |
getClearColor()
|
int |
getDrawableHeight()
Retrieves the drawable height of this DrawContext . |
int |
getDrawableWidth()
Retrieves the drawable width of this DrawContext . |
SurfaceTileRenderer |
getGeographicSurfaceTileRenderer()
|
GL |
getGL()
Retrieves the current javax.media.opengl.GL . |
GLContext |
getGLContext()
Retrieves this DrawContext s javax.media.opengl.GLContext. |
GLDrawable |
getGLDrawable()
Retrieves the current javax.media.opengl.GLDrawable . |
Globe |
getGlobe()
Retrieves the current Globe , which may be null. |
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. |
int |
getNumTextureUnits()
|
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. |
java.awt.Point |
getPickPoint()
|
Vec4 |
getPointOnGlobe(Angle latitude,
Angle longitude)
|
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. |
Vec4 |
getViewportCenterGlobePoint()
|
Position |
getViewportCenterPosition()
|
java.awt.Point |
getViewportCenterScreenPoint()
|
Vec4 |
getViewportCenterSurfacePoint()
|
Sector |
getVisibleSector()
Retrieves a Sector which is at least as large as the current visible sector. |
void |
initialize(GLContext glContext)
Initializes this DrawContext . |
boolean |
isPickingMode()
Returns true if the Picking mode is active, otherwise return false |
void |
reinitialize()
|
void |
setAnnotationRenderer(AnnotationRenderer ar)
|
void |
setGLContext(GLContext glContext)
Assigns this DrawContext a new javax.media.opengl.GLContext. |
void |
setModel(Model model)
Assign a new Model . |
void |
setNumTextureUnits(int numTextureUnits)
|
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 |
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 DrawContext
public void addPickedObject(PickedObject pickedObject)
addPickedObject
in interface DrawContext
pickedObject
- the object to add
java.lang.IllegalArgumentException
- if picked Object is null
public void addPickedObjects(PickedObjectList pickedObjects)
addPickedObjects
in interface DrawContext
pickedObjects
- the list of picked objects to add
java.lang.IllegalArgumentException
- if pickedObjects is null
public void disablePickingMode()
disablePickingMode
in interface DrawContext
public void dispose()
dispose
in interface Disposable
javax.media.opengl.GLException
- - If an OpenGL context is not current when this method is called.public void drawUnitQuad()
drawUnitQuad
in interface DrawContext
public void drawUnitQuad(TextureCoords texCoords)
drawUnitQuad
in interface DrawContext
public void enablePickingMode()
enablePickingMode
in interface DrawContext
public AnnotationRenderer getAnnotationRenderer()
getAnnotationRenderer
in interface DrawContext
public java.awt.Color getClearColor()
getClearColor
in interface DrawContext
public final int getDrawableHeight()
DrawContext
DrawContext
.
getDrawableHeight
in interface DrawContext
DrawCOntext
public final int getDrawableWidth()
DrawContext
DrawContext
.
getDrawableWidth
in interface DrawContext
DrawCOntext
public SurfaceTileRenderer getGeographicSurfaceTileRenderer()
getGeographicSurfaceTileRenderer
in interface DrawContext
public final GL getGL()
DrawContext
javax.media.opengl.GL
. A GL
or GLU
is required for
all graphical rendering in World Wind Raptor.
getGL
in interface DrawContext
GL
if available, null otherwisepublic final GLContext getGLContext()
DrawContext
DrawContext
s javax.media.opengl.GLContext. If this method returns null,
then there are potentially no active GLContext
s and rendering should be aborted.
getGLContext
in interface DrawContext
DrawContext
s javax.media.opengl.GLContext.public final GLDrawable getGLDrawable()
DrawContext
javax.media.opengl.GLDrawable
. A GLDrawable
can be used to create
a GLContext
, which can then be used for rendering.
getGLDrawable
in interface DrawContext
GLDrawable
, null if none availablepublic final Globe getGlobe()
DrawContext
Globe
, which may be null.
getGlobe
in interface DrawContext
Globe
, which may be nullpublic final GLU getGLU()
DrawContext
javax.media.opengl.glu.GLU
. A GLU
or GL
is required
for all graphical rendering in World Wind Raptor.
getGLU
in interface DrawContext
GLU
if available, null otherwisepublic final LayerList getLayers()
DrawContext
getLayers
in interface DrawContext
LayerList
containing all the current layerspublic final Model getModel()
DrawContext
Model
, which may be null.
getModel
in interface DrawContext
Model
, which may be nullpublic int getNumTextureUnits()
getNumTextureUnits
in interface DrawContext
public java.util.Queue<OrderedRenderable> getOrderedRenderables()
getOrderedRenderables
in interface DrawContext
public java.util.Collection<PerformanceStatistic> getPerFrameStatistics()
getPerFrameStatistics
in interface DrawContext
public java.util.Set<java.lang.String> getPerFrameStatisticsKeys()
getPerFrameStatisticsKeys
in interface DrawContext
public PickedObjectList getPickedObjects()
DrawContext
getPickedObjects
in interface DrawContext
public java.awt.Point getPickPoint()
getPickPoint
in interface DrawContext
public Vec4 getPointOnGlobe(Angle latitude, Angle longitude)
getPointOnGlobe
in interface DrawContext
public SectorGeometryList getSurfaceGeometry()
DrawContext
getSurfaceGeometry
in interface DrawContext
SectorGeometryList
containing every SectorGeometry
rendered so far this
render pass.public TextRendererCache getTextRendererCache()
getTextRendererCache
in interface DrawContext
public TextureCache getTextureCache()
getTextureCache
in interface DrawContext
public java.awt.Color getUniquePickColor()
DrawContext
getUniquePickColor
in interface DrawContext
public final double getVerticalExaggeration()
DrawContext
Globe
. A vertical exaggeration of 3 will create mountains and valleys which are three times as
high/deep as they really are.
getVerticalExaggeration
in interface DrawContext
public final View getView()
DrawContext
View
, which may be null.
getView
in interface DrawContext
View
, which may be nullpublic Vec4 getViewportCenterGlobePoint()
getViewportCenterGlobePoint
in interface DrawContext
public Position getViewportCenterPosition()
getViewportCenterPosition
in interface DrawContext
public java.awt.Point getViewportCenterScreenPoint()
getViewportCenterScreenPoint
in interface DrawContext
public Vec4 getViewportCenterSurfacePoint()
getViewportCenterSurfacePoint
in interface DrawContext
public final Sector getVisibleSector()
DrawContext
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.
getVisibleSector
in interface DrawContext
Sector
at least the size of the curernt visible sector, null if unavailablepublic final void initialize(GLContext glContext)
DrawContext
DrawContext
. This method should be called at the beginning of each frame to prepare
the DrawContext
for the coming render pass.
initialize
in interface DrawContext
glContext
- the javax.media.opengl.GLContext
to use for this render passpublic boolean isPickingMode()
isPickingMode
in interface DrawContext
public void reinitialize()
public void setAnnotationRenderer(AnnotationRenderer ar)
setAnnotationRenderer
in interface DrawContext
public final void setGLContext(GLContext glContext)
DrawContext
DrawContext
a new javax.media.opengl.GLContext. May throw a
NullPointerException
if glContext
is null.
setGLContext
in interface DrawContext
glContext
- the new javax.media.opengl.GLContext
public final void setModel(Model model)
DrawContext
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.
setModel
in interface DrawContext
model
- the new Model
public void setNumTextureUnits(int numTextureUnits)
setNumTextureUnits
in interface DrawContext
public void setPerFrameStatistic(java.lang.String key, java.lang.String displayName, java.lang.Object value)
setPerFrameStatistic
in interface DrawContext
public 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 DrawContext
public void setPickPoint(java.awt.Point pickPoint)
setPickPoint
in interface DrawContext
public void setSurfaceGeometry(SectorGeometryList surfaceGeometry)
setSurfaceGeometry
in interface DrawContext
public void setTextRendererCache(TextRendererCache textRendererCache)
setTextRendererCache
in interface DrawContext
public void setTextureCache(TextureCache textureCache)
setTextureCache
in interface DrawContext
public final void setVerticalExaggeration(double verticalExaggeration)
DrawContext
Globe
. A vertical exaggeration of 3 will create mountains and valleys which are three times as
high/deep as they really are.
setVerticalExaggeration
in interface DrawContext
verticalExaggeration
- the new vertical exaggeration.public final void setView(View view)
DrawContext
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.
setView
in interface DrawContext
view
- the enw View
public void setViewportCenterPosition(Position viewportCenterPosition)
setViewportCenterPosition
in interface DrawContext
public void setViewportCenterScreenPoint(java.awt.Point viewportCenterScreenPoint)
setViewportCenterScreenPoint
in interface DrawContext
public final void setVisibleSector(Sector s)
DrawContext
Sector
. The new visible sector must completely encompass the Sector which is
visible on the display.
setVisibleSector
in interface DrawContext
s
- the new visible Sector
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |