public abstract class AbstractAirspace extends WWObjectImpl implements Airspace, OrderedRenderable, PreRenderable, Movable, Movable2, Draggable
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractAirspace.AirspaceInfo |
Modifier and Type | Field and Description |
---|---|
protected AirspaceAttributes |
activeAttributes |
protected java.util.HashMap<GlobeStateKey,AbstractAirspace.AirspaceInfo> |
airspaceInfo |
protected boolean |
alwaysOnTop |
protected static java.lang.String |
ARC_SLICES |
protected AirspaceAttributes |
attributes |
protected AbstractAirspace.AirspaceInfo |
currentInfo |
protected static Material |
DEFAULT_HIGHLIGHT_MATERIAL
The default highlight color.
|
protected static Material |
DEFAULT_INTERIOR_MATERIAL
The default interior color.
|
protected static Material |
DEFAULT_OUTLINE_MATERIAL
The default outline color.
|
protected static int |
DEFAULT_OUTLINE_PICK_WIDTH
The default outline pick width.
|
protected static AirspaceAttributes |
defaultAttributes
The attributes used if attributes are not specified.
|
protected java.lang.Object |
delegateOwner |
protected java.util.Collection<DetailLevel> |
detailLevels |
protected static java.lang.String |
DISABLE_TERRAIN_CONFORMANCE |
protected boolean |
dragEnabled |
protected DraggableSupport |
draggableSupport |
protected boolean |
drawSurfaceShape |
protected java.util.Map<LatLon,java.lang.Double> |
elevationMap |
protected boolean |
enableBatchPicking |
protected boolean |
enableBatchRendering |
protected boolean |
enableDepthOffset |
protected boolean |
enableLevelOfDetail |
protected static java.lang.String |
EXPIRY_TIME |
protected long |
expiryTime |
protected long |
frameTimeStamp |
protected static java.lang.String |
GEOMETRY_CACHE_KEY |
protected static java.lang.String |
GEOMETRY_CACHE_NAME |
protected GeometryBuilder |
geometryBuilder |
protected static java.lang.String |
GLOBE_KEY |
protected LatLon |
groundReference |
protected AirspaceAttributes |
highlightAttributes |
protected boolean |
highlighted |
protected static java.lang.String |
LENGTH_SLICES |
protected static java.lang.String |
LOOPS |
protected double |
lowerAltitude |
protected java.lang.String |
lowerAltitudeDatum |
protected boolean |
lowerTerrainConforming |
protected long |
maxExpiryTime |
protected long |
minExpiryTime |
protected boolean |
mustRegenerateSurfaceShape |
protected int |
outlinePickWidth |
protected OutlinedShape |
outlineShapeRenderer |
protected Layer |
pickLayer |
protected PickSupport |
pickSupport |
protected static java.lang.String |
PILLARS |
protected static java.util.Random |
rand |
protected static java.lang.String |
SLICES |
protected static java.lang.String |
SPLIT_THRESHOLD |
protected static java.lang.String |
STACKS |
protected static java.lang.String |
SUBDIVISIONS |
protected SurfaceShape |
surfaceShape |
protected double |
upperAltitude |
protected java.lang.String |
upperAltitudeDatum |
protected boolean |
upperTerrainConforming |
protected static java.lang.String |
VERTICAL_EXAGGERATION |
protected boolean |
visible |
DRAW_STYLE_FILL, DRAW_STYLE_OUTLINE
Constructor and Description |
---|
AbstractAirspace() |
AbstractAirspace(AbstractAirspace source) |
AbstractAirspace(AirspaceAttributes attributes) |
Modifier and Type | Method and Description |
---|---|
protected void |
addDetailLevels(java.util.Collection<DetailLevel> newDetailLevels) |
protected void |
adjustForGroundReference(DrawContext dc,
boolean[] terrainConformant,
double[] altitudes,
LatLon groundRef) |
protected void |
beginRendering(DrawContext dc) |
protected void |
clearElevationMap() |
protected DetailLevel |
computeDetailLevel(DrawContext dc) |
protected double |
computeElevationAt(DrawContext dc,
Angle latitude,
Angle longitude) |
protected Extent |
computeExtent(DrawContext dc) |
protected abstract Extent |
computeExtent(Globe globe,
double verticalExaggeration) |
protected double |
computeEyeDistance(DrawContext dc) |
protected java.util.List<Vec4> |
computeMinimalGeometry(DrawContext dc) |
protected abstract java.util.List<Vec4> |
computeMinimalGeometry(Globe globe,
double verticalExaggeration) |
Vec4 |
computePointFromPosition(DrawContext dc,
Angle latitude,
Angle longitude,
double elevation,
boolean terrainConformant) |
protected Position |
computeReferencePosition(java.util.List<? extends LatLon> locations,
double[] altitudes) |
protected PickedObject |
createPickedObject(int colorCode) |
protected SurfaceShape |
createSurfaceShape()
Returns a
SurfaceShape that corresponds to this Airspace and is used for drawing on 2D globes. |
protected void |
determineActiveAttributes(DrawContext dc)
Determines which attributes -- normal, highlight or default -- to use each frame.
|
protected void |
doDrag(DragContext dragContext) |
protected void |
doDrawOrderedRenderable(DrawContext dc,
PickSupport pickCandidates) |
protected void |
doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context) |
protected void |
doMoveTo(Globe globe,
Position oldRef,
Position newRef) |
protected void |
doMoveTo(Position oldRef,
Position newRef) |
protected abstract void |
doRenderGeometry(DrawContext dc,
java.lang.String drawStyle) |
protected void |
doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context) |
void |
drag(DragContext dragContext)
Drag the object given the provided
DragContext . |
protected void |
drawBatched(DrawContext dc) |
protected void |
drawGeometry(DrawContext dc,
Geometry indices,
Geometry vertices) |
protected void |
drawInterior(DrawContext dc) |
protected void |
drawOrderedRenderable(DrawContext dc) |
protected void |
drawOutline(DrawContext dc) |
protected void |
endRendering(DrawContext dc) |
AirspaceAttributes |
getActiveAttributes()
Returns this shape's currently active attributes, as determined during the most recent call to
determineActiveAttributes(gov.nasa.worldwind.render.DrawContext) . |
protected AbstractAirspace.AirspaceInfo |
getAirspaceInfo(DrawContext dc) |
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.
|
protected double[] |
getAltitudes(double verticalExaggeration) |
AirspaceAttributes |
getAttributes()
Return the shape's current attributes.
|
java.lang.Object |
getDelegateOwner() |
java.lang.Iterable<DetailLevel> |
getDetailLevels() |
double |
getDistanceFromEye()
Returns the ordered renderable's distance from the current view's eye point.
|
protected long[] |
getExpiryRange() |
protected long |
getExpiryTime() |
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() . |
protected GeometryBuilder |
getGeometryBuilder() |
protected MemoryCache |
getGeometryCache() |
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.
|
java.lang.String |
getRestorableState()
Returns an XML document string describing the object's state.
|
protected void |
invalidateAirspaceData() |
boolean |
isAirspaceCollapsed() |
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 |
isDragEnabled()
Indicates whether the object is enabled for dragging.
|
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() |
protected boolean |
isExpired(DrawContext dc,
Geometry geom) |
boolean |
isHighlighted()
Indicates whether to highlight the shape.
|
boolean[] |
isTerrainConforming()
Returns the old-style indicators of the airspace's lower and upper surface datums.
|
boolean |
isVisible() |
protected void |
makeExtremePoints(Globe globe,
double verticalExaggeration,
java.lang.Iterable<? extends LatLon> locations,
java.util.List<Vec4> extremePoints) |
protected void |
makeOrderedRenderable(DrawContext dc) |
void |
move(Position position)
Shift the shape over the globe's surface while maintaining its original azimuth, its orientation relative to
North.
|
void |
moveTo(Globe globe,
Position position)
Move the shape over the globe's surface while maintaining its original azimuth, its orientation relative to
North.
|
void |
moveTo(Position position)
Move the shape over the globe's surface while maintaining its original azimuth, its orientation relative to
North.
|
protected boolean |
mustDrawInterior(DrawContext dc) |
protected boolean |
mustDrawOutline(DrawContext dc) |
protected long |
nextExpiryTime(DrawContext dc,
boolean[] terrainConformance) |
void |
pick(DrawContext dc,
java.awt.Point pickPoint)
Executes a pick of the ordered renderable.
|
void |
preRender(DrawContext dc) |
protected void |
regenerateSurfaceShape(DrawContext dc,
SurfaceShape shape)
Regenerates surface shape geometry prior to picking and rendering the 2D shape used to represent this Airspace on
2D globes.
|
void |
render(DrawContext dc)
Causes this
Renderable to render itself using the provided draw context. |
void |
restoreState(java.lang.String stateInXml)
Restores the object's state to what is described in the specified XML document string.
|
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 |
setAttributes(ShapeAttributes attributes)
Set the shape's attributes.
|
void |
setDelegateOwner(java.lang.Object delegateOwner) |
void |
setDetailLevels(java.util.Collection<DetailLevel> detailLevels) |
void |
setDragEnabled(boolean enabled)
Controls whether the object is enabled for dragging.
|
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) |
protected void |
setExpiryRange(long minTimeMillis,
long maxTimeMillis) |
protected void |
setExpiryTime(long timeMillis) |
protected void |
setGeometryBuilder(GeometryBuilder gb) |
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 |
setHighlightAttributes(ShapeAttributes highlightAttributes)
Set the shape's highlight attributes.
|
void |
setHighlighted(boolean highlighted)
Specifies whether to highlight the shape.
|
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) |
protected void |
updateExpiryCriteria(DrawContext dc,
Geometry geom) |
protected void |
updateSurfaceShape(DrawContext dc,
SurfaceShape shape)
Sets surface shape parameters prior to picking and rendering the 2D shape used to represent this Airspace on 2D
globes.
|
onMessage, propertyChange
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
getReferencePosition
getReferencePosition
protected AirspaceAttributes activeAttributes
protected java.util.HashMap<GlobeStateKey,AbstractAirspace.AirspaceInfo> airspaceInfo
protected boolean alwaysOnTop
protected static final java.lang.String ARC_SLICES
protected AirspaceAttributes attributes
protected AbstractAirspace.AirspaceInfo currentInfo
protected static final Material DEFAULT_HIGHLIGHT_MATERIAL
protected static final Material DEFAULT_INTERIOR_MATERIAL
protected static final Material DEFAULT_OUTLINE_MATERIAL
protected static final int DEFAULT_OUTLINE_PICK_WIDTH
protected static AirspaceAttributes defaultAttributes
protected java.lang.Object delegateOwner
protected java.util.Collection<DetailLevel> detailLevels
protected static final java.lang.String DISABLE_TERRAIN_CONFORMANCE
protected boolean dragEnabled
protected DraggableSupport draggableSupport
protected boolean drawSurfaceShape
protected java.util.Map<LatLon,java.lang.Double> elevationMap
protected boolean enableBatchPicking
protected boolean enableBatchRendering
protected boolean enableDepthOffset
protected boolean enableLevelOfDetail
protected static final java.lang.String EXPIRY_TIME
protected long expiryTime
protected long frameTimeStamp
protected static final java.lang.String GEOMETRY_CACHE_KEY
protected static final java.lang.String GEOMETRY_CACHE_NAME
protected GeometryBuilder geometryBuilder
protected static final java.lang.String GLOBE_KEY
protected LatLon groundReference
protected AirspaceAttributes highlightAttributes
protected boolean highlighted
protected static final java.lang.String LENGTH_SLICES
protected static final java.lang.String LOOPS
protected double lowerAltitude
protected java.lang.String lowerAltitudeDatum
protected boolean lowerTerrainConforming
protected long maxExpiryTime
protected long minExpiryTime
protected boolean mustRegenerateSurfaceShape
protected int outlinePickWidth
protected OutlinedShape outlineShapeRenderer
protected Layer pickLayer
protected PickSupport pickSupport
protected static final java.lang.String PILLARS
protected static java.util.Random rand
protected static final java.lang.String SLICES
protected static final java.lang.String SPLIT_THRESHOLD
protected static final java.lang.String STACKS
protected static final java.lang.String SUBDIVISIONS
protected SurfaceShape surfaceShape
protected double upperAltitude
protected java.lang.String upperAltitudeDatum
protected boolean upperTerrainConforming
protected static final java.lang.String VERTICAL_EXAGGERATION
protected boolean visible
public AbstractAirspace()
public AbstractAirspace(AbstractAirspace source)
public AbstractAirspace(AirspaceAttributes attributes)
protected void addDetailLevels(java.util.Collection<DetailLevel> newDetailLevels)
protected void adjustForGroundReference(DrawContext dc, boolean[] terrainConformant, double[] altitudes, LatLon groundRef)
protected void beginRendering(DrawContext dc)
protected void clearElevationMap()
protected DetailLevel computeDetailLevel(DrawContext dc)
protected double computeElevationAt(DrawContext dc, Angle latitude, Angle longitude)
protected Extent computeExtent(DrawContext dc)
protected double computeEyeDistance(DrawContext dc)
protected java.util.List<Vec4> computeMinimalGeometry(DrawContext dc)
protected abstract java.util.List<Vec4> computeMinimalGeometry(Globe globe, double verticalExaggeration)
public Vec4 computePointFromPosition(DrawContext dc, Angle latitude, Angle longitude, double elevation, boolean terrainConformant)
protected Position computeReferencePosition(java.util.List<? extends LatLon> locations, double[] altitudes)
protected PickedObject createPickedObject(int colorCode)
protected SurfaceShape createSurfaceShape()
SurfaceShape
that corresponds to this Airspace and is used for drawing on 2D globes.protected void determineActiveAttributes(DrawContext dc)
getActiveAttributes()
protected void doDrag(DragContext dragContext)
protected void doDrawOrderedRenderable(DrawContext dc, PickSupport pickCandidates)
protected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
protected abstract void doRenderGeometry(DrawContext dc, java.lang.String drawStyle)
protected void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
public void drag(DragContext dragContext)
Draggable
DragContext
.drag
in interface Draggable
dragContext
- the DragContext
of this dragging event.protected void drawBatched(DrawContext dc)
protected void drawGeometry(DrawContext dc, Geometry indices, Geometry vertices)
protected void drawInterior(DrawContext dc)
protected void drawOrderedRenderable(DrawContext dc)
protected void drawOutline(DrawContext dc)
protected void endRendering(DrawContext dc)
public AirspaceAttributes getActiveAttributes()
determineActiveAttributes(gov.nasa.worldwind.render.DrawContext)
. The active attributes are either the normal
or highlight attributes, depending on this shape's highlight flag, and incorporates default attributes for those
not specified in the applicable attribute set.protected AbstractAirspace.AirspaceInfo getAirspaceInfo(DrawContext dc)
public java.lang.String[] getAltitudeDatum()
Airspace
getAltitudeDatum
in interface Airspace
Airspace.setAltitudeDatum(String, String)
public double[] getAltitudes()
Airspace
getAltitudes
in interface Airspace
double
with element 0 containing the lower surface altitude, and
element 1 containing the upper surface altitude.Airspace.setAltitudes(double, double)
,
Airspace.setAltitudeDatum(java.lang.String, java.lang.String)
,
Airspace.setGroundReference(gov.nasa.worldwind.geom.LatLon)
protected double[] getAltitudes(double verticalExaggeration)
public AirspaceAttributes getAttributes()
Attributable
getAttributes
in interface Airspace
getAttributes
in interface Attributable
public java.lang.Object getDelegateOwner()
getDelegateOwner
in interface Airspace
public java.lang.Iterable<DetailLevel> getDetailLevels()
getDetailLevels
in interface Airspace
public double getDistanceFromEye()
OrderedRenderable
getDistanceFromEye
in interface OrderedRenderable
protected long[] getExpiryRange()
protected long getExpiryTime()
public Extent getExtent(DrawContext dc)
Airspace
Extent
in model coordinates, given
a specified DrawContext
. The returned Extent may be different than the Extent
returned by calling Airspace.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 Airspace.getExtent(gov.nasa.worldwind.globes.Globe, double)
.public Extent getExtent(Globe globe, double verticalExaggeration)
Airspace
Extent
in model coordinates, given
a specified Globe
and vertical exaggeration (see SceneController.getVerticalExaggeration()
.getExtent
in interface ExtentHolder
getExtent
in interface Airspace
globe
- the Globe this Airspace is related to.verticalExaggeration
- the vertical exaggeration of the scene containing this Airspace.protected GeometryBuilder getGeometryBuilder()
protected MemoryCache getGeometryCache()
public LatLon getGroundReference()
Airspace
getGroundReference
in interface Airspace
public AirspaceAttributes getHighlightAttributes()
Airspace
getHighlightAttributes
in interface Airspace
getHighlightAttributes
in interface Attributable
public int getOutlinePickWidth()
getOutlinePickWidth
in interface Airspace
public java.lang.String getRestorableState()
Restorable
restoreState
and passing the XML document.getRestorableState
in interface Restorable
protected void invalidateAirspaceData()
public boolean isAirspaceCollapsed()
public boolean isAirspaceVisible(DrawContext dc)
isAirspaceVisible
in interface Airspace
dc
- the draw context the airspace is related to.public boolean isAlwaysOnTop()
Airspace
isAlwaysOnTop
in interface Airspace
Airspace.isAlwaysOnTop()
public boolean isDragEnabled()
Draggable
isDragEnabled
in interface Draggable
public boolean isDrawSurfaceShape()
Airspace
isDrawSurfaceShape
in interface Airspace
true
if this shape is drawn flat and on the surface, otherwise false
.public boolean isEnableBatchPicking()
isEnableBatchPicking
in interface Airspace
Airspace.setEnableBatchPicking(boolean).
public boolean isEnableBatchRendering()
isEnableBatchRendering
in interface Airspace
Airspace.setEnableBatchRendering(boolean).
public boolean isEnableDepthOffset()
isEnableDepthOffset
in interface Airspace
public boolean isEnableLevelOfDetail()
isEnableLevelOfDetail
in interface Airspace
protected boolean isExpired(DrawContext dc, Geometry geom)
public boolean isHighlighted()
Highlightable
isHighlighted
in interface Highlightable
public boolean[] isTerrainConforming()
Airspace
isTerrainConforming
in interface Airspace
protected void makeExtremePoints(Globe globe, double verticalExaggeration, java.lang.Iterable<? extends LatLon> locations, java.util.List<Vec4> extremePoints)
protected void makeOrderedRenderable(DrawContext dc)
public void move(Position position)
Movable
public void moveTo(Globe globe, Position position)
Movable2
public void moveTo(Position position)
Movable
protected boolean mustDrawInterior(DrawContext dc)
protected boolean mustDrawOutline(DrawContext dc)
protected long nextExpiryTime(DrawContext dc, boolean[] terrainConformance)
public void pick(DrawContext dc, java.awt.Point pickPoint)
OrderedRenderable
pick
in interface OrderedRenderable
dc
- the current draw context.pickPoint
- the pick point.public void preRender(DrawContext dc)
preRender
in interface PreRenderable
protected void regenerateSurfaceShape(DrawContext dc, SurfaceShape shape)
dc
- the current drawing context.shape
- the surface shape to regenerate.public void render(DrawContext dc)
Renderable
Renderable
to render itself using the provided draw context.render
in interface Renderable
dc
- the DrawContext
to be usedDrawContext
public void restoreState(java.lang.String stateInXml)
Restorable
restoreState
in interface Restorable
stateInXml
- an XML document string describing an object's state.public void setAltitude(double altitude)
Airspace
Airspace.setAltitudeDatum(String, String)
for a description of the possible interpretations and the means to specify
them.setAltitude
in interface Airspace
altitude
- the lower surface altitude, in meters.Airspace.setAltitudes(double, double)
,
Airspace.setAltitudeDatum(java.lang.String, java.lang.String)
,
Airspace.setGroundReference(gov.nasa.worldwind.geom.LatLon)
public void setAltitudeDatum(java.lang.String lowerAltitudeDatum, java.lang.String upperAltitudeDatum)
Airspace
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 Airspace.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 Airspace.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 Airspace.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 Airspace.setGroundReference(LatLon)
.setAltitudeDatum
in interface Airspace
lowerAltitudeDatum
- the lower altitude datum.upperAltitudeDatum
- the upper altitude datumAirspace.setGroundReference(gov.nasa.worldwind.geom.LatLon)
,
Airspace.setAltitudes(double, double)
public void setAltitudes(double lowerAltitude, double upperAltitude)
Airspace
Airspace.setAltitudeDatum(String, String)
for a description of the
possible interpretations and the means to specify them.setAltitudes
in interface Airspace
lowerAltitude
- the lower surface altitude, in meters.upperAltitude
- the upper surface altitude, in meters.Airspace.setAltitudes(double, double)
,
Airspace.setAltitudeDatum(java.lang.String, java.lang.String)
,
Airspace.setGroundReference(gov.nasa.worldwind.geom.LatLon)
public void setAlwaysOnTop(boolean alwaysOnTop)
Airspace
true
, this shape is drawn after all others. This property is ignored by Cake
airspaces.setAlwaysOnTop
in interface Airspace
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.public void setAttributes(AirspaceAttributes attributes)
setAttributes
in interface Airspace
public void setAttributes(ShapeAttributes attributes)
Attributable
setAttributes
in interface Attributable
attributes
- the attributes to assign to the shape.public void setDelegateOwner(java.lang.Object delegateOwner)
setDelegateOwner
in interface Airspace
public void setDetailLevels(java.util.Collection<DetailLevel> detailLevels)
setDetailLevels
in interface Airspace
public void setDragEnabled(boolean enabled)
Draggable
setDragEnabled
in interface Draggable
enabled
- true
if the object is enabled, else false
.public void setDrawSurfaceShape(boolean drawSurfaceShape)
Airspace
setDrawSurfaceShape
in interface Airspace
drawSurfaceShape
- true
if this shape is drawn flat and on the surface, otherwise
false
.public void setEnableBatchPicking(boolean enableBatchPicking)
SelectEvent
even if several of the polygons are at
the pick position.
Batch rendering (Airspace.setEnableBatchRendering(boolean)
) must be enabled in order for batch picking to occur.setEnableBatchPicking
in interface Airspace
enableBatchPicking
- true to enable batch rendering, otherwise false.public void setEnableBatchRendering(boolean enableBatchRendering)
setEnableBatchRendering
in interface Airspace
enableBatchRendering
- true to enable batch rendering, otherwise false.public void setEnableDepthOffset(boolean enableDepthOffset)
setEnableDepthOffset
in interface Airspace
enableDepthOffset
- true if depth offset is applied, otherwise false.public void setEnableLevelOfDetail(boolean enableLevelOfDetail)
setEnableLevelOfDetail
in interface Airspace
protected void setExpiryRange(long minTimeMillis, long maxTimeMillis)
protected void setExpiryTime(long timeMillis)
protected void setGeometryBuilder(GeometryBuilder gb)
public void setGroundReference(LatLon groundReference)
Airspace
AVKey.ABOVE_GROUND_REFERENCE
. The reference location is unused if the altitude datum is a value other
than this.setGroundReference
in interface Airspace
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.Airspace.setAltitudeDatum(String, String)
public void setHighlightAttributes(AirspaceAttributes highlightAttrs)
Airspace
setHighlightAttributes
in interface Airspace
highlightAttrs
- the highlight attributes. May be null, in which case default attributes are used.public void setHighlightAttributes(ShapeAttributes highlightAttributes)
Attributable
setHighlightAttributes
in interface Attributable
highlightAttributes
- the highlight attributes to assign to the shape.public void setHighlighted(boolean highlighted)
Highlightable
setHighlighted
in interface Highlightable
highlighted
- true to highlight the shape, otherwise false.public void setOutlinePickWidth(int outlinePickWidth)
setOutlinePickWidth
in interface Airspace
outlinePickWidth
- the outline pick width. The default is 10.public void setTerrainConforming(boolean terrainConformant)
Airspace
Airspace.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.setTerrainConforming
in interface Airspace
terrainConformant
- the altitude datum. See Airspace.setTerrainConforming(boolean, boolean)
for a
description of the possible values.public void setTerrainConforming(boolean lowerTerrainConformant, boolean upperTerrainConformant)
Airspace
Airspace.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.setTerrainConforming
in interface Airspace
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.Airspace.setAltitudeDatum(String, String)
public void setVisible(boolean visible)
setVisible
in interface Airspace
protected void updateExpiryCriteria(DrawContext dc, Geometry geom)
protected void updateSurfaceShape(DrawContext dc, SurfaceShape shape)
dc
- the current drawing context.shape
- the surface shape to update.