public class SurfaceEllipse extends AbstractSurfaceShape
AbstractSurfaceShape.GeometryKey, AbstractSurfaceShape.SurfaceShapeStateKey
AbstractSurfaceObject.CacheEntry, AbstractSurfaceObject.SurfaceObjectStateKey
Modifier and Type | Field and Description |
---|---|
protected LatLon |
center |
protected static int |
DEFAULT_NUM_INTERVALS |
protected Angle |
heading |
protected double |
majorRadius |
protected static int |
MIN_NUM_INTERVALS |
protected double |
minorRadius |
activeAttrs, activeGeometry, activeOutlineGeometry, areaMeasurer, areaMeasurerLastModifiedTime, DEFAULT_HIGHLIGHT_MATERIAL, DEFAULT_INTERIOR_MATERIAL, DEFAULT_MAX_EDGE_INTERVALS, DEFAULT_MIN_EDGE_INTERVALS, DEFAULT_OUTLINE_MATERIAL, DEFAULT_PATH_TYPE, DEFAULT_TEXELS_PER_EDGE_INTERVAL, defaultAttrs, dragEnabled, draggableSupport, geometryCache, highlightAttrs, highlighted, maxEdgeIntervals, minEdgeIntervals, normalAttrs, pathType, sectorCache, stackHandler, texelsPerEdgeInterval, texture, vertexBuffer
delegateOwner, drawBoundingSectors, enableBatchPicking, extentCache, lastModifiedTime, nextUniqueId, pickLayer, pickSupport, pickTileBuilder, uniqueId, visible
Constructor and Description |
---|
SurfaceEllipse()
Constructs a new surface ellipse with the default attributes, default center location, default radii, and default
heading.
|
SurfaceEllipse(LatLon center,
double majorRadius,
double minorRadius)
Constructs a new surface ellipse with the default attributes, the specified center location and radii (in
meters).
|
SurfaceEllipse(LatLon center,
double majorRadius,
double minorRadius,
Angle heading)
Constructs a new surface ellipse with the default attributes, the specified center location, radii (in meters),
and heading clockwise from North.
|
SurfaceEllipse(LatLon center,
double majorRadius,
double minorRadius,
Angle heading,
int intervals)
Constructs a new surface ellipse with the default attributes, the specified center location, radii (in meters),
heading clockwise from North, and initial number of geometry intervals.
|
SurfaceEllipse(ShapeAttributes normalAttrs)
Constructs a new surface ellipse with the specified normal (as opposed to highlight) attributes, default center
location, default radii, and default heading.
|
SurfaceEllipse(ShapeAttributes normalAttrs,
LatLon center,
double majorRadius,
double minorRadius)
Constructs a new surface ellipse with the specified normal (as opposed to highlight) attributes, the specified
center location, and radii (in meters).
|
SurfaceEllipse(ShapeAttributes normalAttrs,
LatLon center,
double majorRadius,
double minorRadius,
Angle heading)
Constructs a new surface ellipse with the specified normal (as opposed to highlight) attributes, the specified
center location, radii (in meters), and heading clockwise from North.
|
SurfaceEllipse(ShapeAttributes normalAttrs,
LatLon center,
double majorRadius,
double minorRadius,
Angle heading,
int intervals)
Constructs a new surface ellipse with the specified normal (as opposed to highlight) attributes, the specified
center location, radii (in meters), heading clockwise from North, and initial number of geometry intervals.
|
SurfaceEllipse(SurfaceEllipse source)
Creates a shallow copy of the specified source shape.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.List<LatLon> |
computeLocations(Globe globe,
int intervals) |
protected int |
computeNumEdgeIntervals(Globe globe,
double edgeIntervalsPerDegree) |
protected int |
computeNumIntervals(Globe globe,
double edgeIntervalsPerDegree) |
protected java.util.List<java.util.List<LatLon>> |
createGeometry(Globe globe,
double edgeIntervalsPerDegree) |
protected void |
doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context) |
protected void |
doMoveTo(Globe globe,
Position oldReferencePosition,
Position newReferencePosition) |
protected void |
doMoveTo(Position oldReferencePosition,
Position newReferencePosition) |
protected void |
doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context) |
LatLon |
getCenter() |
Angle |
getHeading() |
int |
getIntervals() |
java.lang.Iterable<? extends LatLon> |
getLocations(Globe globe)
Returns the shape's locations as they appear on the specified
globe , or null if the shape has no
locations. |
double |
getMajorRadius() |
double |
getMinorRadius() |
Position |
getReferencePosition()
A position associated with the object that indicates its aggregate geographic position.
|
java.lang.Object |
getStateKey(DrawContext dc)
Returns an object that uniquely identifies this renderable's state for the specified draw context.
|
protected void |
legacyRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
Restores state values from previous versions of the SurfaceShape state XML.
|
void |
setCenter(LatLon center) |
void |
setHeading(Angle heading) |
void |
setIntervals(int intervals) |
void |
setMajorRadius(double radius) |
void |
setMinorRadius(double radius) |
void |
setRadii(double majorRadius,
double minorRadius) |
addIntermediateLocations, applyInteriorState, applyInteriorTextureState, applyModelviewTransform, applyOutlineState, beginDrawing, canContainPole, clearCaches, combine, combineBounds, combineContours, computeEdgeIntervalsPerDegree, computeEdgeIntervalsPerDegree, computeSectors, computeSectors, containsPole, createActiveAttributes, createGeometry, createGeometryKey, cutAlongDateLine, determineActiveAttributes, determineActiveGeometry, doCombineContour, doCombineContours, doDrag, doDrawGeographic, doTessellateInterior, drag, drawGeographic, drawInterior, drawLineStrip, drawOutline, endDrawing, export, exportAsKML, generateIntermediateLocations, getActiveAttributes, getActiveGeometry, getArea, getArea, getAttributes, getCachedGeometry, getExtent, getHeight, getHighlightAttributes, getInteriorTexture, getLength, getMinAndMaxEdgeIntervals, getPathType, getPerimeter, getRestorableState, getSectors, getTexelsPerEdgeInterval, getWidth, handleUnsuccessfulInteriorTessellation, isDragEnabled, isExportFormatSupported, isHighlighted, isSectorEmpty, makeOrderedPreRenderable, move, moveTo, moveTo, pathTypeFromString, repeatAroundDateline, restoreState, setAttributes, setDragEnabled, setHighlightAttributes, setHighlighted, setMinAndMaxEdgeIntervals, setPathType, setTexelsPerEdgeInterval, setupAreaMeasurer, tessellateInterior, tessellateInteriorVertices
buildPickRepresentation, computeExtent, computeExtent, createPickedObject, createPickTileBuilder, drawBoundingSectors, drawOrderedRenderable, drawPickRepresentation, getDelegateOwner, getDistanceFromEye, getExtent, getUniqueId, intersectsFrustum, intersectsPickFrustum, intersectsVisibleSector, isDrawBoundingSectors, isEnableBatchPicking, isVisible, makeOrderedRenderable, nextUniqueId, onShapeChanged, pick, pickBatched, pickOrderedRenderable, preRender, render, setDelegateOwner, setDrawBoundingSectors, setEnableBatchPicking, setVisible, updateModifiedTime
onMessage, propertyChange
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDelegateOwner, getDistanceFromEye, getExtent, isEnableBatchPicking, isVisible, pick, preRender, setDelegateOwner, setEnableBatchPicking, setVisible
render
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
protected LatLon center
protected static final int DEFAULT_NUM_INTERVALS
protected Angle heading
protected double majorRadius
protected static final int MIN_NUM_INTERVALS
protected double minorRadius
public SurfaceEllipse()
public SurfaceEllipse(LatLon center, double majorRadius, double minorRadius)
center
- the ellipse's center location.majorRadius
- the ellipse's major radius, in meters.minorRadius
- the ellipse's minor radius, in meters.java.lang.IllegalArgumentException
- if the center is null, or if either radii is negative.public SurfaceEllipse(LatLon center, double majorRadius, double minorRadius, Angle heading)
center
- the ellipse's center location.majorRadius
- the ellipse's major radius, in meters.minorRadius
- the ellipse's minor radius, in meters.heading
- the ellipse's heading, clockwise from North.java.lang.IllegalArgumentException
- if the center or heading are null, or if either radii is negative.public SurfaceEllipse(LatLon center, double majorRadius, double minorRadius, Angle heading, int intervals)
center
- the ellipse's center location.majorRadius
- the ellipse's major radius, in meters.minorRadius
- the ellipse's minor radius, in meters.heading
- the ellipse's heading, clockwise from North.intervals
- the initial number of intervals (or slices) defining the ellipse's geometry.java.lang.IllegalArgumentException
- if the center or heading are null, if either radii is negative, or if the number
of intervals is less than 8.public SurfaceEllipse(ShapeAttributes normalAttrs)
normalAttrs
- the normal attributes. May be null, in which case default attributes are used.public SurfaceEllipse(ShapeAttributes normalAttrs, LatLon center, double majorRadius, double minorRadius)
normalAttrs
- the normal attributes. May be null, in which case default attributes are used.center
- the ellipse's center location.majorRadius
- the ellipse's major radius, in meters.minorRadius
- the ellipse's minor radius, in meters.java.lang.IllegalArgumentException
- if the center is null, or if either radii is negative.public SurfaceEllipse(ShapeAttributes normalAttrs, LatLon center, double majorRadius, double minorRadius, Angle heading)
normalAttrs
- the normal attributes. May be null, in which case default attributes are used.center
- the ellipse's center location.majorRadius
- the ellipse's major radius, in meters.minorRadius
- the ellipse's minor radius, in meters.heading
- the ellipse's heading, clockwise from North.java.lang.IllegalArgumentException
- if the center or heading are null, or if either radii is negative.public SurfaceEllipse(ShapeAttributes normalAttrs, LatLon center, double majorRadius, double minorRadius, Angle heading, int intervals)
normalAttrs
- the normal attributes. May be null, in which case default attributes are used.center
- the ellipse's center location.majorRadius
- the ellipse's major radius, in meters.minorRadius
- the ellipse's minor radius, in meters.heading
- the ellipse's heading, clockwise from North.intervals
- the initial number of intervals (or slices) defining the ellipse's geometry.java.lang.IllegalArgumentException
- if the center or heading are null, if either radii is negative, or if the number
of intervals is less than 8.public SurfaceEllipse(SurfaceEllipse source)
source
- the shape to copy.protected int computeNumEdgeIntervals(Globe globe, double edgeIntervalsPerDegree)
protected int computeNumIntervals(Globe globe, double edgeIntervalsPerDegree)
protected java.util.List<java.util.List<LatLon>> createGeometry(Globe globe, double edgeIntervalsPerDegree)
createGeometry
in class AbstractSurfaceShape
protected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
doGetRestorableState
in class AbstractSurfaceShape
protected void doMoveTo(Globe globe, Position oldReferencePosition, Position newReferencePosition)
doMoveTo
in class AbstractSurfaceShape
protected void doMoveTo(Position oldReferencePosition, Position newReferencePosition)
doMoveTo
in class AbstractSurfaceShape
protected void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
doRestoreState
in class AbstractSurfaceShape
public LatLon getCenter()
public Angle getHeading()
public int getIntervals()
public java.lang.Iterable<? extends LatLon> getLocations(Globe globe)
SurfaceShape
globe
, or null if the shape has no
locations.globe
- the globe the shape is related to.public double getMajorRadius()
public double getMinorRadius()
public Position getReferencePosition()
Movable
getReferencePosition
in interface Movable
getReferencePosition
in interface Movable2
getReferencePosition
in class AbstractSurfaceShape
public java.lang.Object getStateKey(DrawContext dc)
Callers can perform an equality test on two state keys using Object.equals(Object)
in order to determine
whether or not a renderable has changed. The returned object is guaranteed to be globally unique with respect to
other SurfaceRenderable state keys; an equality test with a state key from another renderable always returns
false.
The returned state key is constructed the SurfaceShape's unique ID, last modified time, and its active
attributes. The returned state key has no dependency on the Globe
. Subclasses
that depend on the Globe should return a state key that include the globe's state key.
Overridden to include the globe's state key in the returned state key.
getStateKey
in interface SurfaceRenderable
getStateKey
in class AbstractSurfaceShape
dc
- the draw context for which to determine this renderable's current state.Globe.getStateKey(DrawContext)
protected void legacyRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
AbstractSurfaceShape
AbstractSurfaceShape.doRestoreState(gov.nasa.worldwind.util.RestorableSupport,
gov.nasa.worldwind.util.RestorableSupport.StateObject)
.legacyRestoreState
in class AbstractSurfaceShape
rs
- RestorableSupport object which contains the state value properties.context
- active context in the RestorableSupport to read state from.public void setCenter(LatLon center)
public void setHeading(Angle heading)
public void setIntervals(int intervals)
public void setMajorRadius(double radius)
public void setMinorRadius(double radius)
public void setRadii(double majorRadius, double minorRadius)