NASA World Wind

gov.nasa.worldwind.render.airspaces
Interface Airspace

All Superinterfaces:
AVList, ExtentHolder, Renderable, Restorable
All Known Implementing Classes:
AbstractAirspace, Box, Cake, Cake.Layer, CappedCylinder, Curtain, ElevationPlane, Orbit, PartialCappedCylinder, PolyArc, Polygon, Route, SphereAirspace, TrackAirspace

public interface Airspace
extends Renderable, Restorable, AVList, ExtentHolder


Field Summary
static String DRAW_STYLE_FILL
           
static String DRAW_STYLE_OUTLINE
           
 
Method Summary
 String[] getAltitudeDatum()
          Returns the current altitude datum of the airspace's lower and upper surfaces.
 double[] getAltitudes()
          Returns the current airspace surface altitudes.
 AirspaceAttributes getAttributes()
           
 Iterable<DetailLevel> getDetailLevels()
           
 Extent getExtent(DrawContext dc)
          Returns this Airspace's enclosing volume as an Extent in model coordinates, given a specified DrawContext.
 Extent getExtent(Globe globe, double verticalExaggeration)
          Returns this Airspace's enclosing volume as an Extent in model coordinates, given a specified Globe and vertical exaggeration (see SceneController.getVerticalExaggeration().
 LatLon getGroundReference()
          Returns the current ground reference location.
 boolean isAirspaceVisible(DrawContext dc)
          Test if this airspace is visible in the specified draw context.
 boolean isEnableLevelOfDetail()
           
 boolean[] isTerrainConforming()
          Returns the old-style indicators of the airspace's lower and upper surface datums.
 boolean isVisible()
           
 void makeOrderedRenderable(DrawContext dc, AirspaceRenderer renderer)
           
 void renderExtent(DrawContext dc)
           
 void renderGeometry(DrawContext dc, String drawStyle)
           
 void setAltitude(double altitude)
          Sets the lower and upper airspace surface altitudes to the same value.
 void setAltitudeDatum(String lowerAltitudeDatum, String upperAltitudeDatum)
          Sets the altitude datum, which indicates whether airspace altitudes are relative to mean sea level, ground level or a single ground reference location.
 void setAltitudes(double lowerAltitude, double upperAltitude)
          Sets the lower and upper airspace surface altitudes.
 void setAttributes(AirspaceAttributes attributes)
           
 void setDetailLevels(Collection<DetailLevel> detailLevels)
           
 void setEnableLevelOfDetail(boolean enableLevelOfDetail)
           
 void setGroundReference(LatLon groundReference)
          Sets the reference location used to determine the elevation offset for airspace surfaces whose altitude datum is AVKey.ABOVE_GROUND_REFERENCE.
 void setTerrainConforming(boolean terrainConformant)
          Sets the altitude datum for both the lower and upper airspace surface to the same specified value.
 void setTerrainConforming(boolean lowerTerrainConformant, boolean upperTerrainConformant)
          Sets the altitude datum, which indicates whether airspace altitudes are relative to mean sea level, ground level or a single ground reference location.
 void setVisible(boolean visible)
           
 
Methods inherited from interface gov.nasa.worldwind.render.Renderable
render
 
Methods inherited from interface gov.nasa.worldwind.Restorable
getRestorableState, restoreState
 
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
 

Field Detail

DRAW_STYLE_FILL

static final String DRAW_STYLE_FILL
See Also:
Constant Field Values

DRAW_STYLE_OUTLINE

static final String DRAW_STYLE_OUTLINE
See Also:
Constant Field Values
Method Detail

getAltitudeDatum

String[] getAltitudeDatum()
Returns the current altitude datum of the airspace's lower and upper surfaces.

Returns:
a two-element array containing at position 0 the lower altitude datum, and at position 1 the upper altitude datum.
See Also:
setAltitudeDatum(String, String)

getAltitudes

double[] getAltitudes()
Returns the current airspace surface altitudes.

Returns:
a two-element array of double with element 0 containing the lower surface altitude, and element 1 containing the upper surface altitude.
See Also:
setAltitudes(double, double), setAltitudeDatum(java.lang.String, java.lang.String), setGroundReference(gov.nasa.worldwind.geom.LatLon)

getAttributes

AirspaceAttributes getAttributes()

getDetailLevels

Iterable<DetailLevel> getDetailLevels()

getExtent

Extent getExtent(DrawContext dc)
Returns this Airspace's enclosing volume as an Extent in model coordinates, given a specified DrawContext. The returned Extent may be different than the Extent returned by calling getExtent(gov.nasa.worldwind.globes.Globe, double) with the DrawContext's Globe and vertical exaggeration. Additionally, this may cache the computed extent and is therefore potentially faster than calling getExtent(gov.nasa.worldwind.globes.Globe, double).

Parameters:
dc - the current DrawContext.
Returns:
this Airspace's Extent in model coordinates.
Throws:
IllegalArgumentException - if the DrawContext is null, or if the Globe held by the DrawContext is null.

getExtent

Extent getExtent(Globe globe,
                 double verticalExaggeration)
Returns this Airspace's enclosing volume as an Extent in model coordinates, given a specified Globe and vertical exaggeration (see SceneController.getVerticalExaggeration().

Specified by:
getExtent in interface ExtentHolder
Parameters:
globe - the Globe this Airspace is related to.
verticalExaggeration - the vertical exaggeration of the scene containing this Airspace.
Returns:
this Airspace's Extent in model coordinates.
Throws:
IllegalArgumentException - if the Globe is null.

getGroundReference

LatLon getGroundReference()
Returns the current ground reference location.

Returns:
the current ground reference location.

isAirspaceVisible

boolean isAirspaceVisible(DrawContext dc)
Test if this airspace is visible in the specified draw context. During picking mode, this tests intersection against all of the draw context's pick frustums. During rendering mode, this tests intersection against the draw context's viewing frustum.

Parameters:
dc - the draw context the airspace is related to.
Returns:
true if this airspace is visible; false otherwise.

isEnableLevelOfDetail

boolean isEnableLevelOfDetail()

isTerrainConforming

boolean[] isTerrainConforming()
Returns the old-style indicators of the airspace's lower and upper surface datums.

Returns:
the lower and upper surface datums.

isVisible

boolean isVisible()

makeOrderedRenderable

void makeOrderedRenderable(DrawContext dc,
                           AirspaceRenderer renderer)

renderExtent

void renderExtent(DrawContext dc)

renderGeometry

void renderGeometry(DrawContext dc,
                    String drawStyle)

setAltitude

void setAltitude(double altitude)
Sets the lower and upper airspace surface altitudes to the same value. The lower and upper altitudes are interpreted according to the current altitude datum of the respective surface. See setAltitudeDatum(String, String) for a description of the possible interpretations and the means to specify them.

Parameters:
altitude - the lower surface altitude, in meters.
See Also:
setAltitudes(double, double), setAltitudeDatum(java.lang.String, java.lang.String), setGroundReference(gov.nasa.worldwind.geom.LatLon)

setAltitudeDatum

void setAltitudeDatum(String lowerAltitudeDatum,
                      String upperAltitudeDatum)
Sets the altitude datum, which indicates whether airspace altitudes are relative to mean sea level, ground level or a single ground reference location.

A value of AVKey.ABOVE_MEAN_SEA_LEVEL, the default for both lower and upper datums, indicates a datum of mean sea level. The respective lower or upper surface of the airspace is drawn at the constant altitude specified by setAltitude(double).

A datum of AVKey.ABOVE_GROUND_LEVEL indicates that each position of the respective airspace surface is offset vertically from the altitude specified to setAltitude(double) by an amount equal to the terrain elevation at that position. For example, if the specified lower altitude is zero, the lower surface lies on and conforms to the terrain. If non-zero, the surface undulates in tandem with the terrain but relative to the specified altitude.

A datum of AVKey.ABOVE_GROUND_REFERENCE combines both of the above datums. It indicates that the respective surface is drawn at the altitude specified to setAltitude(double) but offset vertically by an amount equal to the elevation at a single reference location on the ground. This is useful for displaying surfaces that are "flat" but are positioned relative to the ground. An example is the roof of a building, which maintains a constant altitude even as the base of its building may conform to varying terrain. One method of representing buildings is to specify a lower altitude of 0, a lower altitude datum of AVKey.ABOVE_GROUND_LEVEL, an upper altitude that's the building's height, and an upper altitude datum of AVKey.ABOVE_GROUND_REFERENCE, where the ground reference is a location at the building's base. The reference position is specifed by setGroundReference(LatLon).

Parameters:
lowerAltitudeDatum - the lower altitude datum.
upperAltitudeDatum - the upper altitude datum
Throws:
IllegalArgumentException - if either the lower or upper altitude datum is null.
See Also:
setGroundReference(gov.nasa.worldwind.geom.LatLon), setAltitudes(double, double)

setAltitudes

void setAltitudes(double lowerAltitude,
                  double upperAltitude)
Sets the lower and upper airspace surface altitudes. The altitudes are interpreted according to the current altitude datum of the respective surface. See setAltitudeDatum(String, String) for a description of the possible interpretations and the means to specify them.

Parameters:
lowerAltitude - the lower surface altitude, in meters.
upperAltitude - the upper surface altitude, in meters.
See Also:
setAltitudes(double, double), setAltitudeDatum(java.lang.String, java.lang.String), setGroundReference(gov.nasa.worldwind.geom.LatLon)

setAttributes

void setAttributes(AirspaceAttributes attributes)

setDetailLevels

void setDetailLevels(Collection<DetailLevel> detailLevels)

setEnableLevelOfDetail

void setEnableLevelOfDetail(boolean enableLevelOfDetail)

setGroundReference

void setGroundReference(LatLon groundReference)
Sets the reference location used to determine the elevation offset for airspace surfaces whose altitude datum is AVKey.ABOVE_GROUND_REFERENCE. The reference location is unused if the altitude datum is a value other than this.

Parameters:
groundReference - the location at which to compute the terrain elevation used to offset an upper or lower airspace surface. The location need not be within the airspace's bounds. If null, an airspace-specific position is chosen from those defining the airspace. See the method descriptions for the individual airspaces to determine the position used.
See Also:
setAltitudeDatum(String, String)

setTerrainConforming

void setTerrainConforming(boolean terrainConformant)
Sets the altitude datum for both the lower and upper airspace surface to the same specified value. The datum is normally set via setAltitudeDatum(String, String), but this method is provided for backwards compatibility with the means of originally setting the datum. See the argument descriptions for the mapping of the boolean values of this method to the altitude-datum values.

Parameters:
terrainConformant - the altitude datum. See setTerrainConforming(boolean, boolean) for a description of the possible values.

setTerrainConforming

void setTerrainConforming(boolean lowerTerrainConformant,
                          boolean upperTerrainConformant)
Sets the altitude datum, which indicates whether airspace altitudes are relative to mean sea level, ground level or a single ground reference location. The datum is normally set via setAltitudeDatum(String, String), but this method is provided for backwards compatibility with the means of originally setting the datum. See the argument descriptions below for the mapping of the boolean values of this method to the altitude-datum values.

Parameters:
lowerTerrainConformant - the lower altitude datum. A value of true indicates a lower altitude datum of AVKey.ABOVE_GROUND_LEVEL (terrain conforming), a value of false indicates a lower altitude datum of {link AVKey#ABOVE_MEAN_SEA_LEVEL} (not terrain conforming). the terrain-conforming, a value of false indicates that it's not.
upperTerrainConformant - the upper altitude datum. A value of true indicates an upper altitude datum of AVKey.ABOVE_GROUND_LEVEL (terrain conforming), a value of false indicates an upper altitude datum of {link AVKey#ABOVE_MEAN_SEA_LEVEL} (not terrain conforming. the terrain-conforming, a value of false indicates that it's not.
See Also:
setAltitudeDatum(String, String)

setVisible

void setVisible(boolean visible)

NASA World Wind