public interface Airspace extends Renderable, Restorable, AVList, ExtentHolder, Highlightable, Attributable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DRAW_STYLE_FILL |
static java.lang.String |
DRAW_STYLE_OUTLINE |
Modifier and Type | Method and Description |
---|---|
java.lang.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()
Return the shape's current attributes.
|
java.lang.Object |
getDelegateOwner() |
java.lang.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.
|
AirspaceAttributes |
getHighlightAttributes()
Returns this shape's highlight attributes.
|
int |
getOutlinePickWidth()
Indicates the outline line width to use during picking.
|
boolean |
isAirspaceVisible(DrawContext dc)
Test if this airspace is visible in the specified draw context.
|
boolean |
isAlwaysOnTop()
Indicates the state of this airspace's always-on-top flag.
|
boolean |
isDrawSurfaceShape()
Indicates whether this surface shape is always drawn flat and on the surface.
|
boolean |
isEnableBatchPicking()
Indicates whether batch picking is enabled.
|
boolean |
isEnableBatchRendering()
Indicates whether batch rendering is enabled for the concrete shape type of this shape.
|
boolean |
isEnableDepthOffset()
Indicates whether the filled sides of this shape should be offset towards the viewer to help eliminate artifacts
when two or more faces of this or other filled shapes are coincident.
|
boolean |
isEnableLevelOfDetail() |
boolean[] |
isTerrainConforming()
Returns the old-style indicators of the airspace's lower and upper surface datums.
|
boolean |
isVisible() |
void |
setAltitude(double altitude)
Sets the lower and upper airspace surface altitudes to the same value.
|
void |
setAltitudeDatum(java.lang.String lowerAltitudeDatum,
java.lang.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 |
setAlwaysOnTop(boolean alwaysOnTop)
Specifies whether this airspace should have visual priority over other displayed shapes in 3D mode.
|
void |
setAttributes(AirspaceAttributes attributes) |
void |
setDelegateOwner(java.lang.Object delegateOwner) |
void |
setDetailLevels(java.util.Collection<DetailLevel> detailLevels) |
void |
setDrawSurfaceShape(boolean drawSurfaceShape)
Specifies whether this airspace should be drawn flat and on the surface, ignoring any altitude information
specified in the shape.
|
void |
setEnableBatchPicking(boolean enableBatchPicking)
Specifies whether adjacent shapes of this shape's concrete type in the ordered renderable list may be pick-tested
together if they are contained in the same layer.
|
void |
setEnableBatchRendering(boolean enableBatchRendering)
Specifies whether adjacent shapes of this shape's concrete type in the ordered renderable list may be rendered
together if they are contained in the same layer.
|
void |
setEnableDepthOffset(boolean enableDepthOffset)
Specifies whether the filled sides of this shape should be offset towards the viewer to help eliminate artifacts
when two or more faces of this or other filled shapes are coincident.
|
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 |
setHighlightAttributes(AirspaceAttributes highlightAttrs)
Specifies this shape's highlight attributes.
|
void |
setOutlinePickWidth(int outlinePickWidth)
Specifies the outline line width to use during picking.
|
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) |
render
getRestorableState, restoreState
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
isHighlighted, setHighlighted
setAttributes, setHighlightAttributes
static final java.lang.String DRAW_STYLE_FILL
static final java.lang.String DRAW_STYLE_OUTLINE
java.lang.String[] getAltitudeDatum()
setAltitudeDatum(String, String)
double[] getAltitudes()
double
with element 0 containing the lower surface altitude, and
element 1 containing the upper surface altitude.setAltitudes(double, double)
,
setAltitudeDatum(java.lang.String, java.lang.String)
,
setGroundReference(gov.nasa.worldwind.geom.LatLon)
AirspaceAttributes getAttributes()
Attributable
getAttributes
in interface Attributable
java.lang.Object getDelegateOwner()
java.lang.Iterable<DetailLevel> getDetailLevels()
Extent getExtent(DrawContext dc)
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)
.dc
- the current DrawContext.java.lang.IllegalArgumentException
- if the DrawContext is null, or if the Globe held by the DrawContext is null.Extent getExtent(Globe globe, double verticalExaggeration)
Extent
in model coordinates, given
a specified Globe
and vertical exaggeration (see SceneController.getVerticalExaggeration()
.getExtent
in interface ExtentHolder
globe
- the Globe this Airspace is related to.verticalExaggeration
- the vertical exaggeration of the scene containing this Airspace.java.lang.IllegalArgumentException
- if the Globe is null.LatLon getGroundReference()
AirspaceAttributes getHighlightAttributes()
getHighlightAttributes
in interface Attributable
int getOutlinePickWidth()
boolean isAirspaceVisible(DrawContext dc)
dc
- the draw context the airspace is related to.boolean isAlwaysOnTop()
isAlwaysOnTop()
boolean isDrawSurfaceShape()
true
if this shape is drawn flat and on the surface, otherwise false
.boolean isEnableBatchPicking()
setEnableBatchPicking(boolean)
boolean isEnableBatchRendering()
setEnableBatchRendering(boolean)
boolean isEnableDepthOffset()
boolean isEnableLevelOfDetail()
boolean[] isTerrainConforming()
boolean isVisible()
void setAltitude(double altitude)
setAltitudeDatum(String, String)
for a description of the possible interpretations and the means to specify
them.altitude
- the lower surface altitude, in meters.setAltitudes(double, double)
,
setAltitudeDatum(java.lang.String, java.lang.String)
,
setGroundReference(gov.nasa.worldwind.geom.LatLon)
void setAltitudeDatum(java.lang.String lowerAltitudeDatum, java.lang.String upperAltitudeDatum)
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)
.
lowerAltitudeDatum
- the lower altitude datum.upperAltitudeDatum
- the upper altitude datumjava.lang.IllegalArgumentException
- if either the lower or upper altitude datum is null.setGroundReference(gov.nasa.worldwind.geom.LatLon)
,
setAltitudes(double, double)
void setAltitudes(double lowerAltitude, double upperAltitude)
setAltitudeDatum(String, String)
for a description of the
possible interpretations and the means to specify them.lowerAltitude
- the lower surface altitude, in meters.upperAltitude
- the upper surface altitude, in meters.setAltitudes(double, double)
,
setAltitudeDatum(java.lang.String, java.lang.String)
,
setGroundReference(gov.nasa.worldwind.geom.LatLon)
void setAlwaysOnTop(boolean alwaysOnTop)
true
, this shape is drawn after all others. This property is ignored by Cake
airspaces.alwaysOnTop
- if true
, this airspace is drawn after all others. Otherwise this airspace is
drawn with its normal priority, which is its relative distance to the eye point.void setAttributes(AirspaceAttributes attributes)
void setDelegateOwner(java.lang.Object delegateOwner)
void setDetailLevels(java.util.Collection<DetailLevel> detailLevels)
void setDrawSurfaceShape(boolean drawSurfaceShape)
drawSurfaceShape
- true
if this shape is drawn flat and on the surface, otherwise
false
.void setEnableBatchPicking(boolean enableBatchPicking)
SelectEvent
even if several of the polygons are at
the pick position.
Batch rendering (setEnableBatchRendering(boolean)
) must be enabled in order for batch picking to occur.
enableBatchPicking
- true to enable batch rendering, otherwise false.void setEnableBatchRendering(boolean enableBatchRendering)
enableBatchRendering
- true to enable batch rendering, otherwise false.void setEnableDepthOffset(boolean enableDepthOffset)
enableDepthOffset
- true if depth offset is applied, otherwise false.void setEnableLevelOfDetail(boolean enableLevelOfDetail)
void setGroundReference(LatLon groundReference)
AVKey.ABOVE_GROUND_REFERENCE
. The reference location is unused if the altitude datum is a value other
than this.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.setAltitudeDatum(String, String)
void setHighlightAttributes(AirspaceAttributes highlightAttrs)
highlightAttrs
- the highlight attributes. May be null, in which case default attributes are used.void setOutlinePickWidth(int outlinePickWidth)
Note that the size of the pick aperture also affects the precision necessary to pick.
outlinePickWidth
- the outline pick width. The default is 10.java.lang.IllegalArgumentException
- if the width is less than 0.void setTerrainConforming(boolean terrainConformant)
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.terrainConformant
- the altitude datum. See setTerrainConforming(boolean, boolean)
for a
description of the possible values.void setTerrainConforming(boolean lowerTerrainConformant, boolean upperTerrainConformant)
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.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.setAltitudeDatum(String, String)
void setVisible(boolean visible)