|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.render.airspaces.AbstractAirspace
public abstract class AbstractAirspace
| Nested Class Summary | |
|---|---|
protected static class |
AbstractAirspace.AirspaceInfo
|
| Field Summary | |
|---|---|
protected HashMap<Globe,AbstractAirspace.AirspaceInfo> |
airspaceInfo
|
protected static String |
ARC_SLICES
|
protected static String |
DISABLE_TERRAIN_CONFORMANCE
|
protected static String |
EXPIRY_TIME
|
protected static String |
GEOMETRY_CACHE_KEY
|
protected static String |
GEOMETRY_CACHE_NAME
|
protected static String |
GLOBE_KEY
|
protected static String |
LENGTH_SLICES
|
protected static String |
LOOPS
|
protected static String |
PILLARS
|
protected static String |
SLICES
|
protected static String |
SPLIT_THRESHOLD
|
protected static String |
STACKS
|
protected static String |
SUBDIVISIONS
|
protected static String |
VERTICAL_EXAGGERATION
|
| Fields inherited from interface gov.nasa.worldwind.render.airspaces.Airspace |
|---|
DRAW_STYLE_FILL, DRAW_STYLE_OUTLINE |
| Constructor Summary | |
|---|---|
AbstractAirspace()
|
|
AbstractAirspace(AirspaceAttributes attributes)
|
|
| Method Summary | |
|---|---|
protected void |
addDetailLevels(Collection<DetailLevel> newDetailLevels)
|
protected void |
adjustForGroundReference(DrawContext dc,
boolean[] terrainConformant,
double[] altitudes,
LatLon groundRef)
|
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 List<Vec4> |
computeMinimalGeometry(DrawContext dc)
|
protected abstract List<Vec4> |
computeMinimalGeometry(Globe globe,
double verticalExaggeration)
|
Vec4 |
computePointFromPosition(DrawContext dc,
Angle latitude,
Angle longitude,
double elevation,
boolean terrainConformant)
|
protected Position |
computeReferencePosition(List<? extends LatLon> locations,
double[] altitudes)
|
protected void |
doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected void |
doMoveTo(Position oldRef,
Position newRef)
|
protected void |
doRender(DrawContext dc)
|
protected void |
doRenderExtent(DrawContext dc)
|
protected abstract void |
doRenderGeometry(DrawContext dc,
String drawStyle)
|
protected void |
doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected AbstractAirspace.AirspaceInfo |
getAirspaceInfo(DrawContext dc)
|
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()
|
Iterable<DetailLevel> |
getDetailLevels()
|
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. |
AirspaceRenderer |
getRenderer()
|
String |
getRestorableState()
Returns an XML document string describing the object's state. |
boolean |
isAirspaceCollapsed()
|
boolean |
isAirspaceVisible(DrawContext dc)
Test if this airspace is visible in the specified draw context. |
boolean |
isEnableLevelOfDetail()
|
protected boolean |
isExpired(DrawContext dc,
Geometry geom)
|
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,
Iterable<? extends LatLon> locations,
List<Vec4> extremePoints)
|
void |
makeOrderedRenderable(DrawContext dc,
AirspaceRenderer renderer)
|
void |
move(Position position)
Shift 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 long |
nextExpiryTime(DrawContext dc,
boolean[] terrainConformance)
|
void |
render(DrawContext dc)
Causes this Renderable to render itself using the provided draw context. |
void |
renderExtent(DrawContext dc)
|
void |
renderGeometry(DrawContext dc,
String drawStyle)
|
void |
restoreState(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(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)
|
protected void |
setExpiryRange(long minTimeMillis,
long maxTimeMillis)
|
protected void |
setExpiryTime(long timeMillis)
|
protected void |
setExtentOutOfDate()
|
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. |
protected void |
setRenderer(AirspaceRenderer renderer)
|
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)
|
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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.Movable |
|---|
getReferencePosition |
| Field Detail |
|---|
protected HashMap<Globe,AbstractAirspace.AirspaceInfo> airspaceInfo
protected static final String ARC_SLICES
protected static final String DISABLE_TERRAIN_CONFORMANCE
protected static final String EXPIRY_TIME
protected static final String GEOMETRY_CACHE_KEY
protected static final String GEOMETRY_CACHE_NAME
protected static final String GLOBE_KEY
protected static final String LENGTH_SLICES
protected static final String LOOPS
protected static final String PILLARS
protected static final String SLICES
protected static final String SPLIT_THRESHOLD
protected static final String STACKS
protected static final String SUBDIVISIONS
protected static final String VERTICAL_EXAGGERATION
| Constructor Detail |
|---|
public AbstractAirspace()
public AbstractAirspace(AirspaceAttributes attributes)
| Method Detail |
|---|
protected void addDetailLevels(Collection<DetailLevel> newDetailLevels)
protected void adjustForGroundReference(DrawContext dc,
boolean[] terrainConformant,
double[] altitudes,
LatLon groundRef)
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 List<Vec4> computeMinimalGeometry(DrawContext dc)
protected abstract List<Vec4> computeMinimalGeometry(Globe globe,
double verticalExaggeration)
public Vec4 computePointFromPosition(DrawContext dc,
Angle latitude,
Angle longitude,
double elevation,
boolean terrainConformant)
protected Position computeReferencePosition(List<? extends LatLon> locations,
double[] altitudes)
protected void doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
protected void doMoveTo(Position oldRef,
Position newRef)
protected void doRender(DrawContext dc)
protected void doRenderExtent(DrawContext dc)
protected abstract void doRenderGeometry(DrawContext dc,
String drawStyle)
protected void doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
protected AbstractAirspace.AirspaceInfo getAirspaceInfo(DrawContext dc)
public String[] getAltitudeDatum()
Airspace
getAltitudeDatum in interface AirspaceAirspace.setAltitudeDatum(String, String)public double[] getAltitudes()
Airspace
getAltitudes in interface Airspacedouble 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()
getAttributes in interface Airspacepublic Iterable<DetailLevel> getDetailLevels()
getDetailLevels in interface Airspaceprotected long[] getExpiryRange()
protected long getExpiryTime()
public Extent getExtent(DrawContext dc)
AirspaceExtent 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).
getExtent in interface Airspacedc - the current DrawContext.
public Extent getExtent(Globe globe,
double verticalExaggeration)
AirspaceExtent in model coordinates, given
a specified Globe and vertical exaggeration (see SceneController.getVerticalExaggeration().
getExtent in interface ExtentHoldergetExtent in interface Airspaceglobe - 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 Airspacepublic AirspaceRenderer getRenderer()
public String getRestorableState()
RestorablerestoreState and passing the XML document.
getRestorableState in interface Restorablepublic boolean isAirspaceCollapsed()
public boolean isAirspaceVisible(DrawContext dc)
isAirspaceVisible in interface Airspacedc - the draw context the airspace is related to.
public boolean isEnableLevelOfDetail()
isEnableLevelOfDetail in interface Airspace
protected boolean isExpired(DrawContext dc,
Geometry geom)
public boolean[] isTerrainConforming()
Airspace
isTerrainConforming in interface Airspacepublic boolean isVisible()
isVisible in interface Airspace
protected void makeExtremePoints(Globe globe,
double verticalExaggeration,
Iterable<? extends LatLon> locations,
List<Vec4> extremePoints)
public void makeOrderedRenderable(DrawContext dc,
AirspaceRenderer renderer)
makeOrderedRenderable in interface Airspacepublic void move(Position position)
Movable
move in interface Movableposition - the latitude and longitude to add to the shape's reference position.public void moveTo(Position position)
Movable
moveTo in interface Movableposition - the new position of the shape's reference position.
protected long nextExpiryTime(DrawContext dc,
boolean[] terrainConformance)
public void render(DrawContext dc)
RenderableRenderable to render itself using the provided draw context.
render in interface Renderabledc - the DrawContext to be usedDrawContextpublic void renderExtent(DrawContext dc)
renderExtent in interface Airspace
public void renderGeometry(DrawContext dc,
String drawStyle)
renderGeometry in interface Airspacepublic void restoreState(String stateInXml)
Restorable
restoreState in interface RestorablestateInXml - an XML document string describing an object's state.public void setAltitude(double altitude)
AirspaceAirspace.setAltitudeDatum(String, String) for a description of the possible interpretations and the means to specify
them.
setAltitude in interface Airspacealtitude - 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(String lowerAltitudeDatum,
String upperAltitudeDatum)
AirspaceAVKey.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 AirspacelowerAltitudeDatum - 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)
AirspaceAirspace.setAltitudeDatum(String, String) for a description of the
possible interpretations and the means to specify them.
setAltitudes in interface AirspacelowerAltitude - 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 setAttributes(AirspaceAttributes attributes)
setAttributes in interface Airspacepublic void setDetailLevels(Collection<DetailLevel> detailLevels)
setDetailLevels in interface Airspacepublic void setEnableLevelOfDetail(boolean enableLevelOfDetail)
setEnableLevelOfDetail in interface Airspace
protected void setExpiryRange(long minTimeMillis,
long maxTimeMillis)
protected void setExpiryTime(long timeMillis)
protected void setExtentOutOfDate()
protected void setGeometryBuilder(GeometryBuilder gb)
public void setGroundReference(LatLon groundReference)
AirspaceAVKey.ABOVE_GROUND_REFERENCE. The reference location is unused if the altitude datum is a value other
than this.
setGroundReference in interface AirspacegroundReference - 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)protected void setRenderer(AirspaceRenderer renderer)
public void setTerrainConforming(boolean terrainConformant)
AirspaceAirspace.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 AirspaceterrainConformant - the altitude datum. See Airspace.setTerrainConforming(boolean, boolean) for a
description of the possible values.
public void setTerrainConforming(boolean lowerTerrainConformant,
boolean upperTerrainConformant)
AirspaceAirspace.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 AirspacelowerTerrainConformant - 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)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||