public class TrackAirspace extends AbstractAirspace
Box
objects.AbstractAirspace.AirspaceInfo
Modifier and Type | Field and Description |
---|---|
protected boolean |
enableCenterLine |
protected boolean |
enableInnerCaps |
protected List<Box> |
legs |
protected boolean |
legsOutOfDate |
protected Angle |
smallAngleThreshold
Denotes the the threshold that defines whether the angle between two adjacent legs is small.
|
activeAttributes, airspaceInfo, alwaysOnTop, ARC_SLICES, attributes, currentInfo, DEFAULT_HIGHLIGHT_MATERIAL, DEFAULT_INTERIOR_MATERIAL, DEFAULT_OUTLINE_MATERIAL, DEFAULT_OUTLINE_PICK_WIDTH, defaultAttributes, delegateOwner, detailLevels, DISABLE_TERRAIN_CONFORMANCE, dragEnabled, draggableSupport, drawSurfaceShape, elevationMap, enableBatchPicking, enableBatchRendering, enableDepthOffset, enableLevelOfDetail, EXPIRY_TIME, expiryTime, frameTimeStamp, GEOMETRY_CACHE_KEY, GEOMETRY_CACHE_NAME, geometryBuilder, GLOBE_KEY, groundReference, highlightAttributes, highlighted, LENGTH_SLICES, LOOPS, lowerAltitude, lowerAltitudeDatum, lowerTerrainConforming, maxExpiryTime, minExpiryTime, mustRegenerateSurfaceShape, outlinePickWidth, outlineShapeRenderer, pickLayer, pickSupport, PILLARS, rand, SLICES, SPLIT_THRESHOLD, STACKS, SUBDIVISIONS, surfaceShape, upperAltitude, upperAltitudeDatum, upperTerrainConforming, VERTICAL_EXAGGERATION, visible
DRAW_STYLE_FILL, DRAW_STYLE_OUTLINE
Constructor and Description |
---|
TrackAirspace() |
TrackAirspace(AirspaceAttributes attributes) |
TrackAirspace(Collection<Box> legs) |
TrackAirspace(TrackAirspace source) |
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 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(Globe globe,
Position oldRef,
Position newRef) |
protected void |
doMoveTo(Position oldRef,
Position newRef) |
protected void |
doRenderGeometry(DrawContext dc,
String drawStyle) |
protected void |
doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context) |
protected void |
doUpdateLegs() |
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.
|
protected void |
invalidateAirspaceData() |
boolean |
isAirspaceVisible(DrawContext dc)
Test if this airspace is visible in the specified draw context.
|
boolean |
isEnableCenterLine() |
boolean |
isEnableInnerCaps() |
protected boolean |
isLegsOutOfDate() |
protected void |
joinLegs(Box leg1,
Box leg2)
Modifies the adjacent edges of the specified adjacent legs to produce a seamless transition from the first leg to
the second.
|
protected boolean |
mustJoinLegs(Box leg1,
Box leg2)
Specifies whether the legs must have their adjacent edges joined.
|
void |
preRender(DrawContext dc) |
void |
removeAllLegs() |
void |
render(DrawContext dc)
Causes this
Renderable to render itself using the provided draw context. |
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 |
setDrawSurfaceShape(boolean drawSurfaceShape)
Specifies whether this airspace should be drawn flat and on the surface, ignoring any altitude information
specified in the shape.
|
void |
setEnableCenterLine(boolean enable) |
void |
setEnableDepthOffset(boolean enable)
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 |
setEnableInnerCaps(boolean draw) |
void |
setLegs(Collection<Box> legs) |
protected void |
setLegsOutOfDate(boolean tf) |
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, beginRendering, clearElevationMap, computeDetailLevel, computeElevationAt, computeEyeDistance, computeMinimalGeometry, computePointFromPosition, computeReferencePosition, createPickedObject, createSurfaceShape, determineActiveAttributes, doDrag, doDrawOrderedRenderable, drag, drawBatched, drawGeometry, drawInterior, drawOrderedRenderable, drawOutline, endRendering, getActiveAttributes, getAirspaceInfo, getAltitudeDatum, getAltitudes, getAltitudes, getAttributes, getDelegateOwner, getDetailLevels, getDistanceFromEye, getExpiryRange, getExpiryTime, getExtent, getExtent, getGeometryBuilder, getGeometryCache, getGroundReference, getHighlightAttributes, getOutlinePickWidth, getRestorableState, isAirspaceCollapsed, isAlwaysOnTop, isDragEnabled, isDrawSurfaceShape, isEnableBatchPicking, isEnableBatchRendering, isEnableDepthOffset, isEnableLevelOfDetail, isExpired, isHighlighted, isTerrainConforming, isVisible, makeExtremePoints, makeOrderedRenderable, move, moveTo, moveTo, mustDrawInterior, mustDrawOutline, nextExpiryTime, pick, regenerateSurfaceShape, restoreState, setAltitude, setAltitudeDatum, setAttributes, setAttributes, setDelegateOwner, setDetailLevels, setDragEnabled, setEnableBatchPicking, setEnableBatchRendering, setEnableLevelOfDetail, setExpiryRange, setExpiryTime, setGeometryBuilder, setGroundReference, setHighlightAttributes, setHighlightAttributes, setHighlighted, setOutlinePickWidth, setTerrainConforming, setVisible, updateExpiryCriteria, updateSurfaceShape
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
protected boolean enableCenterLine
protected boolean enableInnerCaps
protected boolean legsOutOfDate
protected Angle smallAngleThreshold
public TrackAirspace()
public TrackAirspace(AirspaceAttributes attributes)
public TrackAirspace(Collection<Box> legs)
public TrackAirspace(TrackAirspace source)
protected void addLeg(Box leg)
public Box addLeg(LatLon start, LatLon end, double lowerAltitude, double upperAltitude, double leftWidth, double rightWidth)
protected Extent computeExtent(DrawContext dc)
computeExtent
in class AbstractAirspace
protected Extent computeExtent(Globe globe, double verticalExaggeration)
computeExtent
in class AbstractAirspace
protected List<Vec4> computeMinimalGeometry(Globe globe, double verticalExaggeration)
computeMinimalGeometry
in class AbstractAirspace
protected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
doGetRestorableState
in class AbstractAirspace
protected void doMoveTo(Globe globe, Position oldRef, Position newRef)
doMoveTo
in class AbstractAirspace
protected void doMoveTo(Position oldRef, Position newRef)
doMoveTo
in class AbstractAirspace
protected void doRenderGeometry(DrawContext dc, String drawStyle)
doRenderGeometry
in class AbstractAirspace
protected void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
doRestoreState
in class AbstractAirspace
protected void doUpdateLegs()
public Position getReferencePosition()
Movable
public Angle getSmallAngleThreshold()
setSmallAngleThreshold(gov.nasa.worldwind.geom.Angle)
protected void invalidateAirspaceData()
invalidateAirspaceData
in class AbstractAirspace
public boolean isAirspaceVisible(DrawContext dc)
AbstractAirspace
isAirspaceVisible
in interface Airspace
isAirspaceVisible
in class AbstractAirspace
dc
- the draw context the airspace is related to.public boolean isEnableCenterLine()
public boolean isEnableInnerCaps()
protected boolean isLegsOutOfDate()
protected void joinLegs(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 edges, the geometry of the
two adjacent boxes contains a gap on one side and an intersection on the other.
This has no effect if the legs cannot be joined for any reason.leg1
- the first leg.leg2
- the second leg.protected 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 edges 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 preRender(DrawContext dc)
preRender
in interface PreRenderable
preRender
in class AbstractAirspace
public void removeAllLegs()
public void render(DrawContext dc)
Renderable
Renderable
to render itself using the provided draw context.render
in interface Renderable
render
in class AbstractAirspace
dc
- the DrawContext
to be usedDrawContext
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
setAltitudes
in class AbstractAirspace
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
setAlwaysOnTop
in class AbstractAirspace
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 setDrawSurfaceShape(boolean drawSurfaceShape)
Airspace
setDrawSurfaceShape
in interface Airspace
setDrawSurfaceShape
in class AbstractAirspace
drawSurfaceShape
- true
if this shape is drawn flat and on the surface, otherwise
false
.public void setEnableCenterLine(boolean enable)
public void setEnableDepthOffset(boolean enable)
AbstractAirspace
setEnableDepthOffset
in interface Airspace
setEnableDepthOffset
in class AbstractAirspace
enable
- true if depth offset is applied, otherwise false.public void setEnableInnerCaps(boolean draw)
public void setLegs(Collection<Box> legs)
protected void setLegsOutOfDate(boolean tf)
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)
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
setTerrainConforming
in class AbstractAirspace
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)