public class SphereAirspace extends AbstractAirspace
AbstractAirspace.AirspaceInfo| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_SUBDIVISIONS |
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 |
|---|
SphereAirspace() |
SphereAirspace(AirspaceAttributes attributes) |
SphereAirspace(LatLon location,
double radius) |
| Modifier and Type | Method and Description |
|---|---|
protected Sphere |
computeExtent(DrawContext dc) |
protected Extent |
computeExtent(Globe globe,
double verticalExaggeration) |
protected double |
computeEyeDistance(DrawContext dc) |
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 |
doRenderGeometry(DrawContext dc,
String drawStyle) |
protected void |
doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context) |
protected void |
drawSphere(DrawContext dc) |
protected void |
drawUnitSphere(DrawContext dc,
int subdivisions) |
Extent |
getExtent(DrawContext dc)
Returns this SphereAirspace's
Extent for the specified DrawContext. |
LatLon |
getLocation()
Returns the center location of the sphere.
|
double |
getRadius()
Returns the radius of the sphere in meters.
|
Position |
getReferencePosition()
A position associated with the object that indicates its aggregate geographic position.
|
protected int |
getSubdivisions() |
protected void |
makeSphere(double radius,
int subdivisions,
Geometry dest) |
void |
setLocation(LatLon location)
Sets the center location of the sphere.
|
void |
setRadius(double radius)
Sets the radius of the sphere in meters.
|
protected void |
setSubdivisions(int subdivisions) |
addDetailLevels, adjustForGroundReference, clearElevationMap, computeDetailLevel, computeElevationAt, computeMinimalGeometry, computePointFromPosition, computeReferencePosition, doRender, doRenderExtent, getAirspaceInfo, getAltitudeDatum, getAltitudes, getAltitudes, getAttributes, getDetailLevels, getExpiryRange, getExpiryTime, getExtent, getGeometryBuilder, getGeometryCache, getGroundReference, getRenderer, getRestorableState, isAirspaceCollapsed, isAirspaceVisible, isEnableLevelOfDetail, isExpired, isTerrainConforming, isVisible, makeExtremePoints, makeOrderedRenderable, move, moveTo, nextExpiryTime, render, renderExtent, renderGeometry, restoreState, setAltitude, setAltitudeDatum, setAltitudes, setAttributes, setDetailLevels, setEnableLevelOfDetail, setExpiryRange, setExpiryTime, setExtentOutOfDate, setGeometryBuilder, setGroundReference, setRenderer, setTerrainConforming, 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 static final int DEFAULT_SUBDIVISIONS
public SphereAirspace()
public SphereAirspace(AirspaceAttributes attributes)
public SphereAirspace(LatLon location, double radius)
protected Sphere computeExtent(DrawContext dc)
computeExtent in class AbstractAirspaceprotected Extent computeExtent(Globe globe, double verticalExaggeration)
computeExtent in class AbstractAirspaceprotected double computeEyeDistance(DrawContext dc)
computeEyeDistance 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 doRenderGeometry(DrawContext dc, String drawStyle)
doRenderGeometry in class AbstractAirspaceprotected void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
doRestoreState in class AbstractAirspaceprotected void drawSphere(DrawContext dc)
protected void drawUnitSphere(DrawContext dc, int subdivisions)
public Extent getExtent(DrawContext dc)
Extent for the specified DrawContext. This
overrides AbstractAirspace.getExtent(gov.nasa.worldwind.render.DrawContext)
in order to bypass the superclass' extent caching. Unlike other Airspace's Extents, SphereAirspace's Extent is a
perfect fitting Sphere, who's center point depends on the current surface
geometry. For this reason SphereAirspace's exact bounding volume can be easily computed, and should not be
cached.getExtent in interface AirspacegetExtent in class AbstractAirspacedc - the current DrawContext.IllegalArgumentException - if the DrawContext is null, or if the Globe held by the DrawContext is null.public LatLon getLocation()
public double getRadius()
public Position getReferencePosition()
Movableprotected int getSubdivisions()
protected void makeSphere(double radius,
int subdivisions,
Geometry dest)
public void setLocation(LatLon location)
location - the location of the sphere.IllegalArgumentException - if location is nullpublic void setRadius(double radius)
radius - the radius of the sphere.IllegalArgumentException - if radius is less than zeroprotected void setSubdivisions(int subdivisions)