NASA World Wind

gov.nasa.worldwind.render
Class ConformingCircularPolygon

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

public class ConformingCircularPolygon
extends ConformingEllipticalPolygon

This class provides a convenient way to create a polygon inscribed in a circle. Its interface is based on the SurfaceCircle class. The constructor takes the geometric parameters of a circle along with the desired number of polygon edges. Using a suficiently large number of edges results in a very good approximation to a circle, BUT this is not recommended. If a true circle is actually desired, you should use ConformingCircle which is optimized for defining and manipulating circles. 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
ConformingCircularPolygon(Globe globe, LatLon center, double radius, int intervals)
           
ConformingCircularPolygon(Globe globe, LatLon center, double radius, int intervals, Color fillColor, Color borderColor)
           
 
Method Summary
 double getRadius()
           
 void setRadius(double radius)
           
 
Methods inherited from class gov.nasa.worldwind.render.ConformingEllipticalPolygon
doGetRestorableState, doRestoreState, getCenter, getIntervals, getOrientation, getSemiMajorAxisLength, getSemiMinorAxisLength, makePositions, setAxisLengths, setCenter, setIntervals, setOrientation
 
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

ConformingCircularPolygon

public ConformingCircularPolygon(Globe globe,
                                 LatLon center,
                                 double radius,
                                 int intervals)

ConformingCircularPolygon

public ConformingCircularPolygon(Globe globe,
                                 LatLon center,
                                 double radius,
                                 int intervals,
                                 Color fillColor,
                                 Color borderColor)
Method Detail

getRadius

public double getRadius()

setRadius

public void setRadius(double radius)

NASA World Wind