Overview | Package | Class | Use | Tree | Index | Help
| NASA World Wind
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gov.nasa.worldwind
Class DrawContextImpl

    java.lang.Object
      gov.nasa.worldwind.AVListImpl
          gov.nasa.worldwind.WWObjectImpl
              gov.nasa.worldwind.DrawContextImpl

All Implemented Interfaces:
  AVList, DrawContext, WWObject, PropertyChangeListener, EventListener

    public class DrawContextImpl

extends WWObjectImpl
implements DrawContext

Field Summary

Fields inherited from class gov.nasa.worldwind.AVListImpl
`changeSupport`

Fields inherited from interface gov.nasa.worldwind.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` | `drawUnitQuad()`
`void` | `drawUnitQuad(TextureCoords texCoords)`
`void` | `enablePickingMode()` Enables color picking mode
`Color` | `getClearColor()`
`int` | `getDrawableHeight()` Retrieves the drawable height of this `DrawContext`.
`int` | `getDrawableWidth()` Retrieves the drawable width of this `DrawContext`.
`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()`
`Queue<OrderedRenderable>` | `getOrderedRenderables()`
`PickedObjectList` | `getPickedObjects()` Returns the list of objects picked during the most recent pick traversal.
`Point` | `getPointOnGlobe(Angle latitude, Angle longitude)`
`SectorGeometryList` | `getSurfaceGeometry()` Retrieves a list of all the sectors rendered so far this frame.
`SurfaceTileRenderer` | `getSurfaceTileRenderer()`
`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.
`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` | `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` | `setSurfaceGeometry(SectorGeometryList surfaceGeometry)`
`void` | `setVerticalExaggeration(double verticalExaggeration)` Sets the vertical exaggeration.
`void` | `setView(View view)` Assigns a new `View`.
`void` | `setVisibleSector(Sector s)` Sets the visible `Sector`.

Methods inherited from class gov.nasa.worldwind.AVListImpl
`addPropertyChangeListener, addPropertyChangeListener, copy, firePropertyChange, firePropertyChange, getStringValue, getValue, hasKey, propertyChange, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue`

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
`addPropertyChangeListener, addPropertyChangeListener, copy, firePropertyChange, firePropertyChange, getStringValue, getValue, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue`

Methods inherited from interface java.beans.PropertyChangeListener
`propertyChange`

Constructor Detail

### DrawContextImpl

    public DrawContextImpl()

Method Detail

### addOrderedRenderable

    public void addOrderedRenderable(OrderedRenderable orderedRenderable)

  Specified by:
    `addOrderedRenderable` in interface `DrawContext`

### addPickedObject

    public void addPickedObject(PickedObject pickedObject)

  Adds a single insatnce of the picked object to the current picked-object list

  Specified by:
    `addPickedObject` in interface `DrawContext`
  Parameters:
    `pickedObject` - the object to add
  Throws:
    `IllegalArgumentException` - if `picked Object is null`

### addPickedObjects

    public void addPickedObjects(PickedObjectList pickedObjects)

  Add picked objects to the current list of picked objects.

  Specified by:
    `addPickedObjects` in interface `DrawContext`
  Parameters:
    `pickedObjects` - the list of picked objects to add
  Throws:
    `IllegalArgumentException` - if `pickedObjects is null`

### disablePickingMode

    public void disablePickingMode()

  Disables color picking mode

  Specified by:
    `disablePickingMode` in interface `DrawContext`

### drawUnitQuad

    public void drawUnitQuad()

  Specified by:
    `drawUnitQuad` in interface `DrawContext`

### drawUnitQuad

    public void drawUnitQuad(TextureCoords texCoords)

  Specified by:
    `drawUnitQuad` in interface `DrawContext`

### enablePickingMode

    public void enablePickingMode()

  Enables color picking mode

  Specified by:
    `enablePickingMode` in interface `DrawContext`

### getClearColor

    public Color getClearColor()

  Specified by:
    `getClearColor` in interface `DrawContext`

### getDrawableHeight

    public final int getDrawableHeight()

  Description copied from interface: `DrawContext`
  Retrieves the drawable height of this `DrawContext`.

  Specified by:
    `getDrawableHeight` in interface `DrawContext`
  Returns:
    the drawable height of this `DrawCOntext`

### getDrawableWidth

    public final int getDrawableWidth()

  Description copied from interface: `DrawContext`
  Retrieves the drawable width of this `DrawContext`.

  Specified by:
    `getDrawableWidth` in interface `DrawContext`
  Returns:
    the drawable width of this `DrawCOntext`

### getGL

    public final GL getGL()

  Description copied from interface: `DrawContext`
  Retrieves the current `javax.media.opengl.GL`. A `GL` or `GLU` is required for all graphical rendering in World Wind Raptor.

  Specified by:
    `getGL` in interface `DrawContext`
  Returns:
    the current `GL` if available, null otherwise

### getGLContext

    public final GLContext getGLContext()

  Description copied from interface: `DrawContext`
  Retrieves this `DrawContext`s javax.media.opengl.GLContext. If this method returns null, then there are potentially no active `GLContext`s and rendering should be aborted.

  Specified by:
    `getGLContext` in interface `DrawContext`
  Returns:
    this `DrawContext`s javax.media.opengl.GLContext.

### getGLDrawable

    public final GLDrawable getGLDrawable()

  Description copied from interface: `DrawContext`
  Retrieves the current`javax.media.opengl.GLDrawable`. A `GLDrawable` can be used to create a `GLContext`, which can then be used for rendering.

  Specified by:
    `getGLDrawable` in interface `DrawContext`
  Returns:
    the current `GLDrawable`, null if none available

### getGlobe

    public final Globe getGlobe()

  Description copied from interface: `DrawContext`
  Retrieves the current `Globe`, which may be null.

  Specified by:
    `getGlobe` in interface `DrawContext`
  Returns:
    the current `Globe`, which may be null

### getGLU

    public final GLU getGLU()

  Description copied from interface: `DrawContext`
  Retrieves the current `javax.media.opengl.glu.GLU`. A `GLU` or `GL` is required for all graphical rendering in World Wind Raptor.

  Specified by:
    `getGLU` in interface `DrawContext`
  Returns:
    the current `GLU` if available, null otherwise

### getLayers

    public final LayerList getLayers()

  Description copied from interface: `DrawContext`
  Retrieves a list containing all the current layers. No guarantee is made about the order of the layers.

  Specified by:
    `getLayers` in interface `DrawContext`
  Returns:
    a `LayerList` containing all the current layers

### getModel

    public final Model getModel()

  Description copied from interface: `DrawContext`
  Retrieves the current `Model`, which may be null.

  Specified by:
    `getModel` in interface `DrawContext`
  Returns:
    the current `Model`, which may be null

### getNumTextureUnits

    public int getNumTextureUnits()

  Specified by:
    `getNumTextureUnits` in interface `DrawContext`

### getOrderedRenderables

    public Queue<OrderedRenderable> getOrderedRenderables()

  Specified by:
    `getOrderedRenderables` in interface `DrawContext`

### getPickedObjects

    public PickedObjectList getPickedObjects()

  Description copied from interface: `DrawContext`
  Returns the list of objects picked during the most recent pick traversal.

  Specified by:
    `getPickedObjects` in interface `DrawContext`
  Returns:
    the list of picked objects

### getPointOnGlobe

    public Point getPointOnGlobe(Angle latitude,
                                 Angle longitude)

  Specified by:
    `getPointOnGlobe` in interface `DrawContext`

### getSurfaceGeometry

    public SectorGeometryList getSurfaceGeometry()

  Description copied from interface: `DrawContext`
  Retrieves a list of all the sectors rendered so far this frame.

  Specified by:
    `getSurfaceGeometry` in interface `DrawContext`
  Returns:
    a `SectorGeometryList` containing every `SectorGeometry` rendered so far this render pass.

### getSurfaceTileRenderer

    public SurfaceTileRenderer getSurfaceTileRenderer()

  Specified by:
    `getSurfaceTileRenderer` in interface `DrawContext`

### getUniquePickColor

    public Color getUniquePickColor()

  Description copied from interface: `DrawContext`
  Returns a unique color to serve as a pick identifier during picking.

  Specified by:
    `getUniquePickColor` in interface `DrawContext`
  Returns:
    a unique pick color

### getVerticalExaggeration

    public final double getVerticalExaggeration()

  Description copied from interface: `DrawContext`
  Retrieves the current vertical exaggeration. Vertical exaggeration affects the appearance of areas with varied elevation. A vertical exaggeration of zero creates a surface which exactly fits the shape of the underlying `Globe`. A vertical exaggeration of 3 will create mountains and valleys which are three times as high/deep as they really are.

  Specified by:
    `getVerticalExaggeration` in interface `DrawContext`
  Returns:
    the current vertical exaggeration

### getView

    public final View getView()

  Description copied from interface: `DrawContext`
  Retrieves the current `View`, which may be null.

  Specified by:
    `getView` in interface `DrawContext`
  Returns:
    the current `View`, which may be null

### getVisibleSector

    public final Sector getVisibleSector()

  Description copied from interface: `DrawContext`
  Retrieves a `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.

  Specified by:
    `getVisibleSector` in interface `DrawContext`
  Returns:
    a `Sector` at least the size of the curernt visible sector, null if unavailable

### initialize

    public final void initialize(GLContext glContext)

  Description copied from interface: `DrawContext`
  Initializes this `DrawContext`. This method should be called at the beginning of each frame to prepare the `DrawContext` for the coming render pass.

  Specified by:
    `initialize` in interface `DrawContext`
  Parameters:
    `glContext` - the `javax.media.opengl.GLContext` to use for this render pass

### isPickingMode

    public boolean isPickingMode()

  Returns true if the Picking mode is active, otherwise return false

  Specified by:
    `isPickingMode` in interface `DrawContext`
  Returns:
    true for Picking mode, otherwise false

### setGLContext

    public final void setGLContext(GLContext glContext)

  Description copied from interface: `DrawContext`
  Assigns this `DrawContext` a new javax.media.opengl.GLContext. May throw a `NullPointerException` if `glContext` is null.

  Specified by:
    `setGLContext` in interface `DrawContext`
  Parameters:
    `glContext` - the new `javax.media.opengl.GLContext`

### setModel

    public final void setModel(Model model)

  Description copied from interface: `DrawContext`
  Assign a new `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.

  Specified by:
    `setModel` in interface `DrawContext`
  Parameters:
    `model` - the new `Model`

### setNumTextureUnits

    public void setNumTextureUnits(int numTextureUnits)

  Specified by:
    `setNumTextureUnits` in interface `DrawContext`

### setSurfaceGeometry

    public void setSurfaceGeometry(SectorGeometryList surfaceGeometry)

  Specified by:
    `setSurfaceGeometry` in interface `DrawContext`

### setVerticalExaggeration

    public final void setVerticalExaggeration(double verticalExaggeration)

  Description copied from interface: `DrawContext`
  Sets the vertical exaggeration. Vertical exaggeration affects the appearance of areas with varied elevation. A vertical exaggeration of zero creates a surface which exactly fits the shape of the underlying `Globe`. A vertical exaggeration of 3 will create mountains and valleys which are three times as high/deep as they really are.

  Specified by:
    `setVerticalExaggeration` in interface `DrawContext`
  Parameters:
    `verticalExaggeration` - the new vertical exaggeration.

### setView

    public final void setView(View view)

  Description copied from interface: `DrawContext`
  Assigns a new `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.

  Specified by:
    `setView` in interface `DrawContext`
  Parameters:
    `view` - the enw `View`

### setVisibleSector

    public final void setVisibleSector(Sector s)

  Description copied from interface: `DrawContext`
  Sets the visible `Sector`. The new visible sector must completely encompass the Sector which is visible on the display.

  Specified by:
    `setVisibleSector` in interface `DrawContext`
  Parameters:
    `s` - the new visible `Sector`

Overview | Package | Class | Use | Tree | Index | Help
| NASA World Wind
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD