Class Cake
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.WWObjectImpl
-
- gov.nasa.worldwind.render.airspaces.AbstractAirspace
-
- gov.nasa.worldwind.render.airspaces.Cake
-
- All Implemented Interfaces:
AVList
,Draggable
,MessageListener
,ExtentHolder
,Movable
,Movable2
,Airspace
,Attributable
,Highlightable
,OrderedRenderable
,PreRenderable
,Renderable
,Restorable
,WWObject
,java.beans.PropertyChangeListener
,java.util.EventListener
public class Cake extends AbstractAirspace
A cake consists of mutiple adjacent cylinder segments. Each cylinder is defined by its center location in latitude longitude, its radius in meters, and two aziumths specifying the active circumferential portion of the cylinder. Cake segments are altitude-limited shapes and therefore have an associated minimum and maximum altitude.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Cake.Layer
An inner class ofCake
defining the parameters of one of the cake's cylinders.-
Nested classes/interfaces inherited from class gov.nasa.worldwind.render.airspaces.AbstractAirspace
AbstractAirspace.AirspaceInfo
-
-
Field Summary
-
Fields inherited from class gov.nasa.worldwind.render.airspaces.AbstractAirspace
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
-
Fields inherited from interface gov.nasa.worldwind.render.airspaces.Airspace
DRAW_STYLE_FILL, DRAW_STYLE_OUTLINE
-
-
Constructor Summary
Constructors Constructor Description Cake()
Cake(AirspaceAttributes attributes)
Cake(java.util.Collection<Cake.Layer> layers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addLayers(java.lang.Iterable<Cake.Layer> newLayers)
protected Extent
computeExtent(Globe globe, double verticalExaggeration)
protected java.util.List<Vec4>
computeMinimalGeometry(Globe globe, double verticalExaggeration)
protected void
doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
protected void
doMoveTo(Position oldRef, Position newRef)
protected void
doMoveTo(Globe globe, Position oldRef, Position newRef)
protected void
doRenderGeometry(DrawContext dc, java.lang.String drawStyle)
protected void
doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
java.util.List<Cake.Layer>
getLayers()
Returns the partial cylinders comprising the shape.Position
getReferencePosition()
A position associated with the object that indicates its aggregate geographic position.boolean
isAirspaceVisible(DrawContext dc)
Test if this airspace is visible in the specified draw context.void
preRender(DrawContext dc)
void
render(DrawContext dc)
Causes thisRenderable
to render itself using the provided draw context.void
setEnableCaps(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
setLayers(java.util.Collection<Cake.Layer> layers)
Set the partial cylinders comprising the shape.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.-
Methods inherited from class gov.nasa.worldwind.render.airspaces.AbstractAirspace
addDetailLevels, adjustForGroundReference, beginRendering, clearElevationMap, computeDetailLevel, computeElevationAt, computeExtent, 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, invalidateAirspaceData, 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, setAltitudes, setAlwaysOnTop, setAttributes, setAttributes, setDelegateOwner, setDetailLevels, setDragEnabled, setDrawSurfaceShape, setEnableBatchPicking, setEnableBatchRendering, setEnableLevelOfDetail, setExpiryRange, setExpiryTime, setGeometryBuilder, setGroundReference, setHighlightAttributes, setHighlightAttributes, setHighlighted, setOutlinePickWidth, setTerrainConforming, setVisible, updateExpiryCriteria, updateSurfaceShape
-
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
onMessage, propertyChange
-
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, 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
-
-
-
-
Constructor Detail
-
Cake
public Cake(java.util.Collection<Cake.Layer> layers)
-
Cake
public Cake(AirspaceAttributes attributes)
-
Cake
public Cake()
-
-
Method Detail
-
getLayers
public java.util.List<Cake.Layer> getLayers()
Returns the partial cylinders comprising the shape.- Returns:
- the cylinders comprising the shape, or an empty list if the shape contains no layers.
-
setLayers
public void setLayers(java.util.Collection<Cake.Layer> layers)
Set the partial cylinders comprising the shape.- Parameters:
layers
- the cylinders comprising the shape. May be an empty list.- Throws:
java.lang.IllegalArgumentException
- if the list reference is null.
-
addLayers
protected void addLayers(java.lang.Iterable<Cake.Layer> newLayers)
-
setEnableCaps
public void setEnableCaps(boolean enable)
-
setEnableDepthOffset
public void setEnableDepthOffset(boolean enable)
Description copied from class:AbstractAirspace
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.- Specified by:
setEnableDepthOffset
in interfaceAirspace
- Overrides:
setEnableDepthOffset
in classAbstractAirspace
- Parameters:
enable
- true if depth offset is applied, otherwise false.
-
setTerrainConforming
public void setTerrainConforming(boolean lowerTerrainConformant, boolean upperTerrainConformant)
Description copied from interface:Airspace
Sets the altitude datum, which indicates whether airspace altitudes are relative to mean sea level, ground level or a single ground reference location. The datum is normally set viaAirspace.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.- Specified by:
setTerrainConforming
in interfaceAirspace
- Overrides:
setTerrainConforming
in classAbstractAirspace
- Parameters:
lowerTerrainConformant
- the lower altitude datum. A value of true indicates a lower altitude datum ofAVKey.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 ofAVKey.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.- See Also:
Airspace.setAltitudeDatum(String, String)
-
isAirspaceVisible
public boolean isAirspaceVisible(DrawContext dc)
Description copied from class:AbstractAirspace
Test if this airspace is visible in the specified draw context. During picking mode, this tests intersection against all of the draw context's pick frustums. During rendering mode, this tests intersection against the draw context's viewing frustum.- Specified by:
isAirspaceVisible
in interfaceAirspace
- Overrides:
isAirspaceVisible
in classAbstractAirspace
- Parameters:
dc
- the draw context the airspace is related to.- Returns:
- true if this airspace is visible; false otherwise.
-
getReferencePosition
public Position getReferencePosition()
Description copied from interface:Movable
A position associated with the object that indicates its aggregate geographic position. The chosen position varies among implementers of this interface. For objects defined by a list of positions, the reference position is typically the first position in the list. For symmetric objects the reference position is often the center of the object. In many cases the object's reference position may be explicitly specified by the application.- Returns:
- the object's reference position, or null if no reference position is available.
-
computeExtent
protected Extent computeExtent(Globe globe, double verticalExaggeration)
- Specified by:
computeExtent
in classAbstractAirspace
-
computeMinimalGeometry
protected java.util.List<Vec4> computeMinimalGeometry(Globe globe, double verticalExaggeration)
- Specified by:
computeMinimalGeometry
in classAbstractAirspace
-
doMoveTo
protected void doMoveTo(Globe globe, Position oldRef, Position newRef)
- Overrides:
doMoveTo
in classAbstractAirspace
-
doMoveTo
protected void doMoveTo(Position oldRef, Position newRef)
- Overrides:
doMoveTo
in classAbstractAirspace
-
preRender
public void preRender(DrawContext dc)
- Specified by:
preRender
in interfacePreRenderable
- Overrides:
preRender
in classAbstractAirspace
-
render
public void render(DrawContext dc)
Description copied from interface:Renderable
Causes thisRenderable
to render itself using the provided draw context.- Specified by:
render
in interfaceRenderable
- Overrides:
render
in classAbstractAirspace
- Parameters:
dc
- theDrawContext
to be used- See Also:
DrawContext
-
doRenderGeometry
protected void doRenderGeometry(DrawContext dc, java.lang.String drawStyle)
- Specified by:
doRenderGeometry
in classAbstractAirspace
-
doGetRestorableState
protected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
- Overrides:
doGetRestorableState
in classAbstractAirspace
-
doRestoreState
protected void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
- Overrides:
doRestoreState
in classAbstractAirspace
-
-