NASA World Wind

gov.nasa.worldwind.render.airspaces
Class CappedCylinder

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.CappedCylinder
All Implemented Interfaces:
AVList, Movable, Airspace, Renderable, Restorable
Direct Known Subclasses:
PartialCappedCylinder

public class CappedCylinder
extends AbstractAirspace

A cylinder defined by a geographic position, a radius in meters, and minimum and maximum altitudes.


Field Summary
protected static int DEFAULT_LOOPS
           
protected static int DEFAULT_SLICES
           
protected static int DEFAULT_STACKS
           
 
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
CappedCylinder()
           
CappedCylinder(AirspaceAttributes attributes)
           
CappedCylinder(LatLon location, double radius)
           
 
Method Summary
protected  Vec4 computeReferenceCenter(DrawContext dc)
           
protected  Matrix computeTransform(DrawContext dc)
           
protected  Extent doComputeExtent(DrawContext dc)
           
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)
           
 LatLon getCenter()
          Returns the geographic location of the cylinder's center.
protected  int getLoops()
           
 double[] getRadii()
          Returns the cylinder's inner and outer radius, in meters.
 Position getReferencePosition()
           
protected  int getSlices()
           
protected  int getStacks()
           
 boolean isEnableCaps()
           
 void setCenter(LatLon location)
          Sets the cylinder's center.
 void setEnableCaps(boolean enable)
           
protected  void setLoops(int loops)
           
 void setRadii(double innerRadius, double outerRadius)
          Sets the cylinder's inner and outer radius.
 void setRadius(double radius)
          Sets the cylinder's radius.
protected  void setSlices(int slices)
           
 
Methods inherited from class gov.nasa.worldwind.render.airspaces.AbstractAirspace
addDetailLevels, clearElevationMap, computeBoundingCylinder, computeDetailLevel, computeElevationAt, computePointFromPosition, computeReferencePosition, computeSplitSectors, doRender, doRenderExtent, getAltitudes, getAltitudes, getAttributes, getDetailLevels, getExpiryRange, getExpiryTime, getExtent, getGeometryBuilder, getGeometryCache, getRenderer, getRestorableState, isAirspaceCollapsed, isAirspaceVisible, isEnableLevelOfDetail, isExpired, isExtentOutOfDate, isTerrainConforming, isVisible, move, moveTo, nextExpiryTime, render, renderExtent, renderGeometry, restoreState, setAltitude, setAltitudes, setAttributes, setDetailLevels, setEnableLevelOfDetail, setExpiryRange, setExpiryTime, setExtentOutOfDate, setGeometryBuilder, setRenderer, setTerrainConforming, 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
 

Field Detail

DEFAULT_LOOPS

protected static final int DEFAULT_LOOPS
See Also:
Constant Field Values

DEFAULT_SLICES

protected static final int DEFAULT_SLICES
See Also:
Constant Field Values

DEFAULT_STACKS

protected static final int DEFAULT_STACKS
See Also:
Constant Field Values
Constructor Detail

CappedCylinder

public CappedCylinder()

CappedCylinder

public CappedCylinder(AirspaceAttributes attributes)

CappedCylinder

public CappedCylinder(LatLon location,
                      double radius)
Method Detail

computeReferenceCenter

protected Vec4 computeReferenceCenter(DrawContext dc)

computeTransform

protected Matrix computeTransform(DrawContext dc)

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

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

getCenter

public LatLon getCenter()
Returns the geographic location of the cylinder's center.

Returns:
the cylinder's center

getLoops

protected int getLoops()

getRadii

public double[] getRadii()
Returns the cylinder's inner and outer radius, in meters.

Returns:
the cylinder's inner and outer radius, in meters.

getReferencePosition

public Position getReferencePosition()

getSlices

protected int getSlices()

getStacks

protected int getStacks()

isEnableCaps

public boolean isEnableCaps()

setCenter

public void setCenter(LatLon location)
Sets the cylinder's center.

Parameters:
location - the geographic position (latitude and longitude) of the cylinder's center.
Throws:
IllegalArgumentException - if the location is null.

setEnableCaps

public void setEnableCaps(boolean enable)

setLoops

protected void setLoops(int loops)

setRadii

public void setRadii(double innerRadius,
                     double outerRadius)
Sets the cylinder's inner and outer radius.

Parameters:
innerRadius - the cylinder's inner radius, in meters.
outerRadius - the cylinder's inner radius, in meters.
Throws:
IllegalArgumentException - if either radius is less than zero.

setRadius

public void setRadius(double radius)
Sets the cylinder's radius.

Parameters:
radius - the cylinder's radius, in meters.
Throws:
IllegalArgumentException - if the radius is less than zero.

setSlices

protected void setSlices(int slices)

NASA World Wind