public class TrackAirspace extends AbstractAirspace
AbstractAirspace.AirspaceInfo| Modifier and Type | Field and Description |
|---|---|
protected boolean |
enableInnerCaps |
protected List<Box> |
legs |
protected Angle |
smallAngleThreshold
Denotes the the threshold that defines whether the angle between two adjacent legs is small.
|
airspaceInfo, ARC_SLICES, DISABLE_TERRAIN_CONFORMANCE, EXPIRY_TIME, GEOMETRY_CACHE_KEY, GEOMETRY_CACHE_NAME, GLOBE_KEY, LENGTH_SLICES, LOOPS, PILLARS, SLICES, SPLIT_THRESHOLD, STACKS, SUBDIVISIONS, VERTICAL_EXAGGERATIONDRAW_STYLE_FILL, DRAW_STYLE_OUTLINE| Constructor and Description |
|---|
TrackAirspace() |
TrackAirspace(AirspaceAttributes attributes) |
TrackAirspace(Collection<Box> legs) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addLeg(Box leg) |
Box |
addLeg(LatLon start,
LatLon end,
double lowerAltitude,
double upperAltitude,
double leftWidth,
double rightWidth) |
protected void |
addLegs(Iterable<Box> newLegs) |
protected Plane |
computeBisectingPlane(Globe globe,
Box leg1,
Box leg2)
Returns a
Plane that bisects the angle between the two legs at the point at their common location. |
protected Extent |
computeExtent(DrawContext dc) |
protected Extent |
computeExtent(Globe globe,
double verticalExaggeration) |
protected List<Vec4> |
computeMinimalGeometry(Globe globe,
double verticalExaggeration) |
protected void |
doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context) |
protected void |
doMoveTo(Position oldRef,
Position newRef) |
protected void |
doRenderExtent(DrawContext dc) |
protected void |
doRenderGeometry(DrawContext dc,
String drawStyle) |
protected void |
doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context) |
protected void |
doUpdateLegs(DrawContext dc) |
List<Box> |
getLegs() |
Position |
getReferencePosition()
A position associated with the object that indicates its aggregate geographic position.
|
Angle |
getSmallAngleThreshold()
Desnotes the threshold that defines whether the angle between two adjacent legs is small.
|
boolean |
isAirspaceVisible(DrawContext dc)
Test if this airspace is visible in the specified draw context.
|
boolean |
isEnableInnerCaps() |
protected boolean |
isLegsOutOfDate(DrawContext dc) |
protected boolean |
isRightTurn(Globe globe,
Box leg1,
Box leg2)
Specifies whether the two adjacent legs make a right turn relative to the surface of the specified
globe. |
protected boolean |
isSmallAngle(Globe globe,
Box leg1,
Box leg2)
Specifies whether the angle between the two adjacent legs is less than a specified threshold.
|
protected void |
joinLegs(Globe globe,
double verticalExaggeration,
Box leg1,
Box leg2)
Modifies the vertices of the specified adjacent legs to produce a seamless transition from the first leg to the
second.
|
void |
makeOrderedRenderable(DrawContext dc,
AirspaceRenderer renderer) |
protected boolean |
mustJoinLegs(Box leg1,
Box leg2)
Specifies whether the legs must have their adjacent vertices joined.
|
void |
removeAllLegs() |
void |
setAltitudes(double lowerAltitude,
double upperAltitude)
Sets the lower and upper airspace surface altitudes.
|
void |
setEnableInnerCaps(boolean draw) |
void |
setLegs(Collection<Box> legs) |
protected void |
setLegsOutOfDate() |
void |
setSmallAngleThreshold(Angle angle)
Specifies the threshold that defines whether the angle between two adjacent legs is small.
|
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.
|
addDetailLevels, adjustForGroundReference, clearElevationMap, computeDetailLevel, computeElevationAt, computeEyeDistance, computeMinimalGeometry, computePointFromPosition, computeReferencePosition, doRender, getAirspaceInfo, getAltitudeDatum, getAltitudes, getAltitudes, getAttributes, getDetailLevels, getExpiryRange, getExpiryTime, getExtent, getExtent, getGeometryBuilder, getGeometryCache, getGroundReference, getRenderer, getRestorableState, isAirspaceCollapsed, isEnableLevelOfDetail, isExpired, isTerrainConforming, isVisible, makeExtremePoints, move, moveTo, nextExpiryTime, render, renderExtent, renderGeometry, restoreState, setAltitude, setAltitudeDatum, setAttributes, setDetailLevels, setEnableLevelOfDetail, setExpiryRange, setExpiryTime, setExtentOutOfDate, setGeometryBuilder, setGroundReference, setRenderer, setTerrainConforming, setVisible, updateExpiryCriteriaaddPropertyChangeListener, 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, setValuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuesprotected boolean enableInnerCaps
protected Angle smallAngleThreshold
public TrackAirspace()
public TrackAirspace(AirspaceAttributes attributes)
public TrackAirspace(Collection<Box> legs)
protected void addLeg(Box leg)
public Box addLeg(LatLon start, LatLon end, double lowerAltitude, double upperAltitude, double leftWidth, double rightWidth)
protected Plane computeBisectingPlane(Globe globe, Box leg1, Box leg2)
Plane that bisects the angle between the two legs at the point at their common location.
leg1 must precede leg2, and they must share a common location at the end of
leg1 and the beginning of leg2. This returns null if the legs overlap and
cannot be bisected.globe - the Globe the legs are related to.leg1 - the first leg.leg2 - the second leg.Plane that bisects the geometry of the two legs.protected Extent computeExtent(DrawContext dc)
computeExtent in class AbstractAirspaceprotected Extent computeExtent(Globe globe, double verticalExaggeration)
computeExtent in class AbstractAirspaceprotected List<Vec4> computeMinimalGeometry(Globe globe, double verticalExaggeration)
computeMinimalGeometry in class AbstractAirspaceprotected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
doGetRestorableState in class AbstractAirspaceprotected void doMoveTo(Position oldRef, Position newRef)
doMoveTo in class AbstractAirspaceprotected void doRenderExtent(DrawContext dc)
doRenderExtent in class AbstractAirspaceprotected void doRenderGeometry(DrawContext dc, String drawStyle)
doRenderGeometry in class AbstractAirspaceprotected void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
doRestoreState in class AbstractAirspaceprotected void doUpdateLegs(DrawContext dc)
public Position getReferencePosition()
Movablepublic Angle getSmallAngleThreshold()
setSmallAngleThreshold(gov.nasa.worldwind.geom.Angle)public boolean isAirspaceVisible(DrawContext dc)
AbstractAirspaceisAirspaceVisible in interface AirspaceisAirspaceVisible in class AbstractAirspacedc - the draw context the airspace is related to.public boolean isEnableInnerCaps()
protected boolean isLegsOutOfDate(DrawContext dc)
protected boolean isRightTurn(Globe globe, Box leg1, Box leg2)
globe. leg1 must precede leg2, and they must share a common location at
the end of leg1 and the beginning of leg2.globe - the Globe the legs are related to.leg1 - the first leg.leg2 - the second leg.true if the legs make a right turn on the specified globe, otherwise
false.protected boolean isSmallAngle(Globe globe, Box leg1, Box leg2)
setSmallAngleThreshold(gov.nasa.worldwind.geom.Angle). leg1 must
precede leg2, and they must share a common location at the end of leg1 and the
beginning of leg2.globe - the Globe the legs are related to.leg1 - the first leg.leg2 - the second leg.true if the angle between the two legs is small, otherwise false.protected void joinLegs(Globe globe, double verticalExaggeration, Box leg1, Box leg2)
leg1 must precede leg2, and they must share a common location at the end of
leg1 and the beginning of leg2. Without joining the adjacent vertices, the geometry of
two adjacent boxes contains a gap on one side and an intersection on the other.
This does nothing if the legs cannot be joined for any reason.globe - the Globe the legs are related to.verticalExaggeration - the vertical exaggeration of the scene.leg1 - the first leg.leg2 - the second leg.public void makeOrderedRenderable(DrawContext dc, AirspaceRenderer renderer)
makeOrderedRenderable in interface AirspacemakeOrderedRenderable in class AbstractAirspaceprotected boolean mustJoinLegs(Box leg1, Box leg2)
leg1 must precede
leg2. A track's legs must be joined when two adjacent legs share a common location. In this case,
the geometry of the two adjacent boxes contains a gap on one side and an intersection on the other. Joining the
legs modifies the vertices of each leg at their common location to produce a seamless transition from the first
leg to the second.leg1 - the first leg.leg2 - the second leg.true if the legs must be joined, otherwise false.public void removeAllLegs()
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 AirspacesetAltitudes in class AbstractAirspacelowerAltitude - 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 setEnableInnerCaps(boolean draw)
public void setLegs(Collection<Box> legs)
protected void setLegsOutOfDate()
public void setSmallAngleThreshold(Angle angle)
TrackAirspace uses a method that
avoids this peak and produces a seamless transition between the adjacent legs.angle - the angle to use when determining when the angle between two adjacent legs is small.IllegalArgumentException - if angle is null.getSmallAngleThreshold()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 AirspacesetTerrainConforming in class AbstractAirspacelowerTerrainConformant - 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)