Interface Airspace
-
- All Superinterfaces:
Attributable
,AVList
,ExtentHolder
,Highlightable
,Renderable
,Restorable
- All Known Implementing Classes:
AbstractAirspace
,Box
,Cake
,Cake.Layer
,CappedCylinder
,CappedEllipticalCylinder
,Curtain
,ElevationPlane
,Orbit
,PartialCappedCylinder
,PolyArc
,Polygon
,Route
,SphereAirspace
,TrackAirspace
public interface Airspace extends Renderable, Restorable, AVList, ExtentHolder, Highlightable, Attributable
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DRAW_STYLE_FILL
static java.lang.String
DRAW_STYLE_OUTLINE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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(Globe globe, double verticalExaggeration)
Returns this Airspace's enclosing volume as anExtent
in model coordinates, given a specifiedGlobe
and vertical exaggeration (seeSceneController.getVerticalExaggeration()
.Extent
getExtent(DrawContext dc)
Returns this Airspace's enclosing volume as anExtent
in model coordinates, given a specifiedDrawContext
.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 isAVKey.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)
-
Methods inherited from interface gov.nasa.worldwind.render.Attributable
setAttributes, setHighlightAttributes
-
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 gov.nasa.worldwind.render.Highlightable
isHighlighted, setHighlighted
-
Methods inherited from interface gov.nasa.worldwind.render.Renderable
render
-
Methods inherited from interface gov.nasa.worldwind.Restorable
getRestorableState, restoreState
-
-
-
-
Field Detail
-
DRAW_STYLE_FILL
static final java.lang.String DRAW_STYLE_FILL
- See Also:
- Constant Field Values
-
DRAW_STYLE_OUTLINE
static final java.lang.String DRAW_STYLE_OUTLINE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isVisible
boolean isVisible()
-
setVisible
void setVisible(boolean visible)
-
getAttributes
AirspaceAttributes getAttributes()
Description copied from interface:Attributable
Return the shape's current attributes.- Specified by:
getAttributes
in interfaceAttributable
- Returns:
- the shape's current attributes.
-
setAttributes
void setAttributes(AirspaceAttributes attributes)
-
getHighlightAttributes
AirspaceAttributes getHighlightAttributes()
Returns this shape's highlight attributes.- Specified by:
getHighlightAttributes
in interfaceAttributable
- Returns:
- this shape's highlight attributes. May be null.
-
setHighlightAttributes
void setHighlightAttributes(AirspaceAttributes highlightAttrs)
Specifies this shape's highlight attributes.- Parameters:
highlightAttrs
- the highlight attributes. May be null, in which case default attributes are used.
-
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)
-
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. SeesetAltitudeDatum(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)
-
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. SeesetAltitudeDatum(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)
-
isTerrainConforming
boolean[] isTerrainConforming()
Returns the old-style indicators of the airspace's lower and upper surface datums.- Returns:
- the lower and upper surface datums.
-
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 viasetAltitudeDatum(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 ofAVKey.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 ofAVKey.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)
-
isAlwaysOnTop
boolean isAlwaysOnTop()
Indicates the state of this airspace's always-on-top flag.- Returns:
- the state of this airspace's always-on-top flag.
- See Also:
isAlwaysOnTop()
-
setAlwaysOnTop
void setAlwaysOnTop(boolean alwaysOnTop)
Specifies whether this airspace should have visual priority over other displayed shapes in 3D mode. Iftrue
, this shape is drawn after all others. This property is ignored byCake
airspaces.- Parameters:
alwaysOnTop
- iftrue
, 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.
-
isDrawSurfaceShape
boolean isDrawSurfaceShape()
Indicates whether this surface shape is always drawn flat and on the surface.- Returns:
true
if this shape is drawn flat and on the surface, otherwisefalse
.
-
setDrawSurfaceShape
void setDrawSurfaceShape(boolean drawSurfaceShape)
Specifies whether this airspace should be drawn flat and on the surface, ignoring any altitude information specified in the shape.- Parameters:
drawSurfaceShape
-true
if this shape is drawn flat and on the surface, otherwisefalse
.
-
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 viasetAltitudeDatum(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. SeesetTerrainConforming(boolean, boolean)
for a description of the possible values.
-
isEnableLevelOfDetail
boolean isEnableLevelOfDetail()
-
setEnableLevelOfDetail
void setEnableLevelOfDetail(boolean enableLevelOfDetail)
-
getDetailLevels
java.lang.Iterable<DetailLevel> getDetailLevels()
-
setDetailLevels
void setDetailLevels(java.util.Collection<DetailLevel> detailLevels)
-
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.
-
getExtent
Extent getExtent(Globe globe, double verticalExaggeration)
Returns this Airspace's enclosing volume as anExtent
in model coordinates, given a specifiedGlobe
and vertical exaggeration (seeSceneController.getVerticalExaggeration()
.- Specified by:
getExtent
in interfaceExtentHolder
- 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:
java.lang.IllegalArgumentException
- if the Globe is null.
-
getExtent
Extent getExtent(DrawContext dc)
Returns this Airspace's enclosing volume as anExtent
in model coordinates, given a specifiedDrawContext
. The returned Extent may be different than the Extent returned by callinggetExtent(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 callinggetExtent(gov.nasa.worldwind.globes.Globe, double)
.- Parameters:
dc
- the current DrawContext.- Returns:
- this Airspace's Extent in model coordinates.
- Throws:
java.lang.IllegalArgumentException
- if the DrawContext is null, or if the Globe held by the DrawContext is null.
-
setAltitudeDatum
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.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 bysetAltitude(double)
.A datum of
AVKey.ABOVE_GROUND_LEVEL
indicates that each position of the respective airspace surface is offset vertically from the altitude specified tosetAltitude(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 tosetAltitude(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 ofAVKey.ABOVE_GROUND_LEVEL
, an upper altitude that's the building's height, and an upper altitude datum ofAVKey.ABOVE_GROUND_REFERENCE
, where the ground reference is a location at the building's base. The reference position is specifed bysetGroundReference(LatLon)
.- Parameters:
lowerAltitudeDatum
- the lower altitude datum.upperAltitudeDatum
- the upper altitude datum- Throws:
java.lang.IllegalArgumentException
- if either the lower or upper altitude datum is null.- See Also:
setGroundReference(gov.nasa.worldwind.geom.LatLon)
,setAltitudes(double, double)
-
getAltitudeDatum
java.lang.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)
-
setGroundReference
void setGroundReference(LatLon groundReference)
Sets the reference location used to determine the elevation offset for airspace surfaces whose altitude datum isAVKey.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)
-
getGroundReference
LatLon getGroundReference()
Returns the current ground reference location.- Returns:
- the current ground reference location.
-
isEnableBatchRendering
boolean isEnableBatchRendering()
Indicates whether batch rendering is enabled for the concrete shape type of this shape.- Returns:
- true if batch rendering is enabled, otherwise false.
- See Also:
setEnableBatchRendering(boolean)
-
setEnableBatchRendering
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. This increases performance. There is seldom a reason to disable it.- Parameters:
enableBatchRendering
- true to enable batch rendering, otherwise false.
-
isEnableBatchPicking
boolean isEnableBatchPicking()
Indicates whether batch picking is enabled.- Returns:
- true if batch rendering is enabled, otherwise false.
- See Also:
setEnableBatchPicking(boolean)
-
setEnableBatchPicking
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. This increases performance but allows only the top-most of the polygons to be reported in aSelectEvent
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.- Parameters:
enableBatchPicking
- true to enable batch rendering, otherwise false.
-
isEnableDepthOffset
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.- Returns:
- true if depth offset is applied, otherwise false.
-
setEnableDepthOffset
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.- Parameters:
enableDepthOffset
- true if depth offset is applied, otherwise false.
-
getOutlinePickWidth
int getOutlinePickWidth()
Indicates the outline line width to use during picking. A larger width than normal typically makes the outline easier to pick.- Returns:
- the outline line width used during picking.
-
setOutlinePickWidth
void setOutlinePickWidth(int outlinePickWidth)
Specifies the outline line width to use during picking. A larger width than normal typically makes the outline easier to pick.Note that the size of the pick aperture also affects the precision necessary to pick.
- Parameters:
outlinePickWidth
- the outline pick width. The default is 10.- Throws:
java.lang.IllegalArgumentException
- if the width is less than 0.
-
getDelegateOwner
java.lang.Object getDelegateOwner()
-
setDelegateOwner
void setDelegateOwner(java.lang.Object delegateOwner)
-
-