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
Interface DrawContext

All Superinterfaces:
  AVList, EventListener, PropertyChangeListener, WWObject

All Known Implementing Classes:
  DrawContextImpl

    public interface DrawContext

extends WWObject

Field Summary
`static String` | `HIGH_PRIORITY`
`static String` | `LOW_PRIORITY`

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` | `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 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`

Field Detail

### HIGH_PRIORITY

    static final String HIGH_PRIORITY

See Also:
  Constant Field Values

### LOW_PRIORITY

    static final String LOW_PRIORITY

See Also:
  Constant Field Values

Method Detail

### addOrderedRenderable

    void addOrderedRenderable(OrderedRenderable orderedRenderable)

### addPickedObject

    void addPickedObject(PickedObject pickedObject)

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

  Parameters:
    `pickedObject` - the object to add

### addPickedObjects

    void addPickedObjects(PickedObjectList pickedObjects)

  Adds a collection of picked objects to the current picked-object list

  Parameters:
    `pickedObjects` - the objects to add

### disablePickingMode

    void disablePickingMode()

  Disables color picking mode

### drawUnitQuad

    void drawUnitQuad()

### drawUnitQuad

    void drawUnitQuad(TextureCoords texCoords)

### enablePickingMode

    void enablePickingMode()

  Enables color picking mode

### getClearColor

    Color getClearColor()

### getDrawableHeight

    int getDrawableHeight()

  Retrieves the drawable height of this `DrawContext`.

  Returns:
    the drawable height of this `DrawCOntext`
  Since:
    1.5

### getDrawableWidth

    int getDrawableWidth()

  Retrieves the drawable width of this `DrawContext`.

  Returns:
    the drawable width of this `DrawCOntext`
  Since:
    1.5

### getGL

    GL getGL()

  Retrieves the current `javax.media.opengl.GL`. A `GL` or `GLU` is required for all graphical rendering in World Wind Raptor.

  Returns:
    the current `GL` if available, null otherwise
  Since:
    1.5

### getGLContext

    GLContext getGLContext()

  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.

  Returns:
    this `DrawContext`s javax.media.opengl.GLContext.
  Since:
    1.5

### getGLDrawable

    GLDrawable getGLDrawable()

  Retrieves the current`javax.media.opengl.GLDrawable`. A `GLDrawable` can be used to create a `GLContext`, which can then be used for rendering.

  Returns:
    the current `GLDrawable`, null if none available
  Since:
    1.5

### getGlobe

    Globe getGlobe()

  Retrieves the current `Globe`, which may be null.

  Returns:
    the current `Globe`, which may be null
  Since:
    1.5

### getGLU

    GLU getGLU()

  Retrieves the current `javax.media.opengl.glu.GLU`. A `GLU` or `GL` is required for all graphical rendering in World Wind Raptor.

  Returns:
    the current `GLU` if available, null otherwise
  Since:
    1.5

### getLayers

    LayerList getLayers()

  Retrieves a list containing all the current layers. No guarantee is made about the order of the layers.

  Returns:
    a `LayerList` containing all the current layers
  Since:
    1.5

### getModel

    Model getModel()

  Retrieves the current `Model`, which may be null.

  Returns:
    the current `Model`, which may be null
  Since:
    1.5

### getNumTextureUnits

    int getNumTextureUnits()

### getOrderedRenderables

    Queue<OrderedRenderable> getOrderedRenderables()

### getPickedObjects

    PickedObjectList getPickedObjects()

  Returns the list of objects picked during the most recent pick traversal.

  Returns:
    the list of picked objects

### getPointOnGlobe

    Point getPointOnGlobe(Angle latitude,
                          Angle longitude)

### getSurfaceGeometry

    SectorGeometryList getSurfaceGeometry()

  Retrieves a list of all the sectors rendered so far this frame.

  Returns:
    a `SectorGeometryList` containing every `SectorGeometry` rendered so far this render pass.
  Since:
    1.5

### getSurfaceTileRenderer

    SurfaceTileRenderer getSurfaceTileRenderer()

### getUniquePickColor

    Color getUniquePickColor()

  Returns a unique color to serve as a pick identifier during picking.

  Returns:
    a unique pick color

### getVerticalExaggeration

    double getVerticalExaggeration()

  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.

  Returns:
    the current vertical exaggeration
  Since:
    1.5

### getView

    View getView()

  Retrieves the current `View`, which may be null.

  Returns:
    the current `View`, which may be null
  Since:
    1.5

### getVisibleSector

    Sector getVisibleSector()

  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.

  Returns:
    a `Sector` at least the size of the curernt visible sector, null if unavailable
  Since:
    1.5

### initialize

    void initialize(GLContext glContext)

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

  Parameters:
    `glContext` - the `javax.media.opengl.GLContext` to use for this render pass
  Since:
    1.5

### isPickingMode

    boolean isPickingMode()

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

  Returns:
    true for Picking mode, otherwise false

### setGLContext

    void setGLContext(GLContext glContext)

  Assigns this `DrawContext` a new javax.media.opengl.GLContext. May throw a `NullPointerException` if `glContext` is null.

  Parameters:
    `glContext` - the new `javax.media.opengl.GLContext`
  Throws:
    `NullPointerException` - if glContext is null
  Since:
    1.5

### setModel

    void setModel(Model model)

  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.

  Parameters:
    `model` - the new `Model`
  Since:
    1.5

### setNumTextureUnits

    void setNumTextureUnits(int numTextureUnits)

### setSurfaceGeometry

    void setSurfaceGeometry(SectorGeometryList surfaceGeometry)

### setVerticalExaggeration

    void setVerticalExaggeration(double verticalExaggeration)

  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.

  Parameters:
    `verticalExaggeration` - the new vertical exaggeration.
  Since:
    1.5

### setView

    void setView(View view)

  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.

  Parameters:
    `view` - the enw `View`
  Since:
    1.5

### setVisibleSector

    void setVisibleSector(Sector s)

  Sets the visible `Sector`. The new visible sector must completely encompass the Sector which is visible on the display.

  Parameters:
    `s` - the new visible `Sector`
  Since:
    1.5

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