NASA World Wind

gov.nasa.worldwind.render
Class ConformingEllipticalPolygon

java.lang.Object
  extended by gov.nasa.worldwind.render.ConformingShape
      extended by gov.nasa.worldwind.render.ConformingPolygon
          extended by gov.nasa.worldwind.render.ConformingEllipticalPolygon
All Implemented Interfaces:
Disposable, MeasurableArea, MeasurableLength, Movable, Renderable, Restorable
Direct Known Subclasses:
ConformingCircularPolygon

public class ConformingEllipticalPolygon
extends ConformingPolygon

This class provides a convenient way to create a polygon inscribed in an ellipse. Its interface is basd on the SurfaceEllipse class. The constructor takes the geometric parameters of an ellipse along with the desired number of polygon edges. Using a suficiently large number of edges results in a very good approximation to an ellipse, BUT this is not recommended. If a true ellipse is actually desired, you should use ConformingEllipse which is optimized for defining and manipulating ellipses. While arbitrarily large values for number of polygon edges (i.e., "int intervals") works with this class, as a general rule of thumb, you should carefully consider before using more than 10 or 15.


Nested Class Summary
 
Nested classes/interfaces inherited from class gov.nasa.worldwind.render.ConformingShape
ConformingShape.CacheKey
 
Field Summary
 
Fields inherited from class gov.nasa.worldwind.render.ConformingPolygon
globe
 
Fields inherited from class gov.nasa.worldwind.render.ConformingShape
borderColor, borderWidth, CONFORMINGSHAPE_CACHE_KEY, CONFORMINGSHAPE_CACHE_NAME, drawBorder, drawInterior, fillColor
 
Constructor Summary
ConformingEllipticalPolygon(Globe globe, LatLon center, double semiMajorAxisLength, double semiMinorAxisLength, Angle orientation, int intervals)
           
ConformingEllipticalPolygon(Globe globe, LatLon center, double semiMajorAxisLength, double semiMinorAxisLength, Angle orientation, int intervals, Color fillColor, Color borderColor)
           
 
Method Summary
protected  void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
           
protected  void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
           
 LatLon getCenter()
           
 int getIntervals()
           
 Angle getOrientation()
           
 double getSemiMajorAxisLength()
           
 double getSemiMinorAxisLength()
           
static Iterable<LatLon> makePositions(Globe globe, LatLon center, double majorAxis, double minorAxis, Angle orientation, int intervals)
           
 void setAxisLengths(double majorAxisLength, double minorAxisLength)
           
 void setCenter(LatLon center)
           
 void setIntervals(int intervals)
           
 void setOrientation(Angle orientation)
           
 
Methods inherited from class gov.nasa.worldwind.render.ConformingPolygon
getArea, getHeight, getLength, getPerimeter, getReferencePosition, getWidth, invalidateCache, moveTo, renderBoundary, renderInterior, setOriginalVertices
 
Methods inherited from class gov.nasa.worldwind.render.ConformingShape
dispose, getBorderColor, getBorderWidth, getInteriorColor, getRestorableState, getUniqueSerialNumber, getUseFrustumCull, isAntiAlias, isDrawBorder, isDrawInterior, isExpired, move, render, restoreState, setAntiAlias, setBorderColor, setBorderWidth, setDrawBorder, setDrawInterior, setInteriorColor, setUseFrustumCull, sizeInBytesOf, updateExpiryCriteria
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConformingEllipticalPolygon

public ConformingEllipticalPolygon(Globe globe,
                                   LatLon center,
                                   double semiMajorAxisLength,
                                   double semiMinorAxisLength,
                                   Angle orientation,
                                   int intervals)

ConformingEllipticalPolygon

public ConformingEllipticalPolygon(Globe globe,
                                   LatLon center,
                                   double semiMajorAxisLength,
                                   double semiMinorAxisLength,
                                   Angle orientation,
                                   int intervals,
                                   Color fillColor,
                                   Color borderColor)
Method Detail

doGetRestorableState

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

doRestoreState

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

getCenter

public LatLon getCenter()

getIntervals

public int getIntervals()

getOrientation

public Angle getOrientation()

getSemiMajorAxisLength

public double getSemiMajorAxisLength()

getSemiMinorAxisLength

public double getSemiMinorAxisLength()

makePositions

public static Iterable<LatLon> makePositions(Globe globe,
                                             LatLon center,
                                             double majorAxis,
                                             double minorAxis,
                                             Angle orientation,
                                             int intervals)

setAxisLengths

public void setAxisLengths(double majorAxisLength,
                           double minorAxisLength)

setCenter

public void setCenter(LatLon center)

setIntervals

public void setIntervals(int intervals)

setOrientation

public void setOrientation(Angle orientation)

NASA World Wind