NASA World Wind

gov.nasa.worldwind.render.airspaces
Class Cake

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.render.airspaces.AbstractAirspace
          extended by gov.nasa.worldwind.render.airspaces.Cake
All Implemented Interfaces:
AVList, Movable, Airspace, Renderable, Restorable

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
static class Cake.Layer
          An inner class of Cake defining the parameters of one of the cake's cylinders.
 
Field Summary
 
Fields inherited from class gov.nasa.worldwind.render.airspaces.AbstractAirspace
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_EXAGGERATION
 
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl
changeSupport
 
Fields inherited from interface gov.nasa.worldwind.render.airspaces.Airspace
DRAW_STYLE_FILL, DRAW_STYLE_OUTLINE
 
Constructor Summary
Cake()
           
Cake(AirspaceAttributes attributes)
           
Cake(Collection<Cake.Layer> layers)
           
 
Method Summary
protected  void addLayers(Iterable<Cake.Layer> newLayers)
           
protected  Extent doComputeExtent(DrawContext dc)
           
protected  void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
           
protected  void doMoveTo(Position oldRef, Position newRef)
           
 void doRenderExtent(DrawContext dc)
           
protected  void doRenderGeometry(DrawContext dc, String drawStyle)
           
protected  void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
           
 List<Cake.Layer> getLayers()
          Returns the partial cylinders comprising the shape.
 Position getReferencePosition()
           
 boolean isAirspaceVisible(DrawContext dc)
           
 void setEnableCaps(boolean enable)
           
 void setLayers(Collection<Cake.Layer> layers)
          Set the partial cylinders comprising the shape.
 void setTerrainConforming(boolean lowerTerrainConformant, boolean upperTerrainConformant)
          Sets the value of the terrain-conforming attribute.
 
Methods inherited from class gov.nasa.worldwind.render.airspaces.AbstractAirspace
addDetailLevels, clearElevationMap, computeBoundingCylinder, computeDetailLevel, computeElevationAt, computePointFromPosition, computeReferencePosition, computeSplitSectors, doRender, getAltitudes, getAltitudes, getAttributes, getDetailLevels, getExpiryRange, getExpiryTime, getExtent, getGeometryBuilder, getGeometryCache, getRenderer, getRestorableState, isAirspaceCollapsed, isEnableLevelOfDetail, isExpired, isExtentOutOfDate, isTerrainConforming, isVisible, move, moveTo, nextExpiryTime, render, renderExtent, renderGeometry, restoreState, setAltitude, setAltitudes, setAttributes, setDetailLevels, setEnableLevelOfDetail, setExpiryRange, setExpiryTime, setExtentOutOfDate, setGeometryBuilder, setRenderer, setTerrainConforming, setVisible, updateExpiryCriteria
 
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, 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
 

Constructor Detail

Cake

public Cake()

Cake

public Cake(AirspaceAttributes attributes)

Cake

public Cake(Collection<Cake.Layer> layers)
Method Detail

addLayers

protected void addLayers(Iterable<Cake.Layer> newLayers)

doComputeExtent

protected Extent doComputeExtent(DrawContext dc)
Specified by:
doComputeExtent in class AbstractAirspace

doGetRestorableState

protected void doGetRestorableState(RestorableSupport rs,
                                    RestorableSupport.StateObject context)
Overrides:
doGetRestorableState in class AbstractAirspace

doMoveTo

protected void doMoveTo(Position oldRef,
                        Position newRef)
Overrides:
doMoveTo in class AbstractAirspace

doRenderExtent

public void doRenderExtent(DrawContext dc)
Overrides:
doRenderExtent in class AbstractAirspace

doRenderGeometry

protected void doRenderGeometry(DrawContext dc,
                                String drawStyle)
Specified by:
doRenderGeometry in class AbstractAirspace

doRestoreState

protected void doRestoreState(RestorableSupport rs,
                              RestorableSupport.StateObject context)
Overrides:
doRestoreState in class AbstractAirspace

getLayers

public 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.

getReferencePosition

public Position getReferencePosition()

isAirspaceVisible

public boolean isAirspaceVisible(DrawContext dc)
Specified by:
isAirspaceVisible in interface Airspace
Overrides:
isAirspaceVisible in class AbstractAirspace

setEnableCaps

public void setEnableCaps(boolean enable)

setLayers

public void setLayers(Collection<Cake.Layer> layers)
Set the partial cylinders comprising the shape.

Parameters:
layers - the cylinders comprising the shape. May be an empty list.
Throws:
IllegalArgumentException - if the list reference is null.

setTerrainConforming

public void setTerrainConforming(boolean lowerTerrainConformant,
                                 boolean upperTerrainConformant)
Description copied from class: AbstractAirspace
Sets the value of the terrain-conforming attribute.

Specified by:
setTerrainConforming in interface Airspace
Overrides:
setTerrainConforming in class AbstractAirspace
Parameters:
lowerTerrainConformant - the value of the lower altitude terrain-conforming attribute. A value of true indicates the object's lower altitude is terrain-conforming, a value of false indicates that it's not.
upperTerrainConformant - the value of the upper altitude terrain-conforming attribute. A value of true indicates the object's upper altitude is terrain-conforming, a value of false indicates that it's not.

NASA World Wind