gov.nasa.worldwind.render
Class ConformingEllipticalPolygon
java.lang.Object
gov.nasa.worldwind.render.ConformingShape
gov.nasa.worldwind.render.ConformingPolygon
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.
|
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)
|
| 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 |
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)
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)