NASA World Wind

gov.nasa.worldwind.render.airspaces
Class Polygon

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

public class Polygon
extends AbstractAirspace


Nested Class Summary
protected static class Polygon.PolygonGeometry
           
 
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
Polygon()
           
Polygon(AirspaceAttributes attributes)
           
Polygon(List<? extends LatLon> locations)
           
 
Method Summary
protected  void addLocations(Iterable<? extends LatLon> newLocations)
           
protected  int computeCartesianPolygon(DrawContext dc, List<? extends LatLon> locations, List<Boolean> edgeFlags, Vec4[] points, Boolean[] edgeFlagArray, Matrix[] transform)
           
protected  Vec4 computeReferenceCenter(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 doRenderGeometry(DrawContext dc, String drawStyle, List<LatLon> locations, List<Boolean> edgeFlags)
           
protected  void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
           
protected  List<LatLon> getLocationList()
           
 List<LatLon> getLocations()
           
 Position getReferencePosition()
           
protected  int getSubdivisions()
           
 boolean isEnableCaps()
           
 void setEnableCaps(boolean enable)
           
 void setLocations(Iterable<? extends LatLon> locations)
           
protected  void setSubdivisions(int subdivisions)
           
 
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
 

Constructor Detail

Polygon

public Polygon()

Polygon

public Polygon(AirspaceAttributes attributes)

Polygon

public Polygon(List<? extends LatLon> locations)
Method Detail

addLocations

protected void addLocations(Iterable<? extends LatLon> newLocations)

computeCartesianPolygon

protected int computeCartesianPolygon(DrawContext dc,
                                      List<? extends LatLon> locations,
                                      List<Boolean> edgeFlags,
                                      Vec4[] points,
                                      Boolean[] edgeFlagArray,
                                      Matrix[] transform)

computeReferenceCenter

protected Vec4 computeReferenceCenter(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

doRenderGeometry

protected void doRenderGeometry(DrawContext dc,
                                String drawStyle,
                                List<LatLon> locations,
                                List<Boolean> edgeFlags)

doRestoreState

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

getLocationList

protected List<LatLon> getLocationList()

getLocations

public List<LatLon> getLocations()

getReferencePosition

public Position getReferencePosition()

getSubdivisions

protected int getSubdivisions()

isEnableCaps

public boolean isEnableCaps()

setEnableCaps

public void setEnableCaps(boolean enable)

setLocations

public void setLocations(Iterable<? extends LatLon> locations)

setSubdivisions

protected void setSubdivisions(int subdivisions)

NASA World Wind