Package gov.nasa.worldwind.render
Class SurfaceMultiPolygon
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.WWObjectImpl
-
- gov.nasa.worldwind.render.AbstractSurfaceObject
-
- gov.nasa.worldwind.render.AbstractSurfaceShape
-
- gov.nasa.worldwind.render.SurfaceMultiPolygon
-
- All Implemented Interfaces:
AVList
,Draggable
,MessageListener
,ExtentHolder
,MeasurableArea
,MeasurableLength
,Movable
,Movable2
,Attributable
,Highlightable
,OrderedRenderable
,PreRenderable
,Renderable
,SurfaceObject
,SurfaceRenderable
,SurfaceShape
,Restorable
,Combinable
,WWObject
,java.beans.PropertyChangeListener
,java.util.EventListener
public class SurfaceMultiPolygon extends AbstractSurfaceShape
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nasa.worldwind.render.AbstractSurfaceShape
AbstractSurfaceShape.GeometryKey, AbstractSurfaceShape.SurfaceShapeStateKey
-
Nested classes/interfaces inherited from class gov.nasa.worldwind.render.AbstractSurfaceObject
AbstractSurfaceObject.CacheEntry, AbstractSurfaceObject.SurfaceObjectStateKey
-
-
Field Summary
Fields Modifier and Type Field Description protected ContourList
boundaries
-
Fields inherited from class gov.nasa.worldwind.render.AbstractSurfaceShape
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
-
Fields inherited from class gov.nasa.worldwind.render.AbstractSurfaceObject
delegateOwner, drawBoundingSectors, enableBatchPicking, extentCache, lastModifiedTime, nextUniqueId, pickLayer, pickSupport, pickTileBuilder, uniqueId, visible
-
-
Constructor Summary
Constructors Constructor Description SurfaceMultiPolygon()
Constructs a new surface multi polygon with the default attributes and no locations.SurfaceMultiPolygon(ShapeAttributes normalAttrs)
SurfaceMultiPolygon(ShapeAttributes normalAttrs, ContourList contours)
SurfaceMultiPolygon(ShapeAttributes normalAttrs, java.lang.Iterable<? extends LatLon> iterable)
SurfaceMultiPolygon(SurfaceMultiPolygon source)
SurfaceMultiPolygon(ContourList contours)
SurfaceMultiPolygon(java.lang.Iterable<? extends LatLon> iterable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAllBoundaries(ContourList contours)
void
addBoundary(java.lang.Iterable<? extends LatLon> iterable)
protected java.util.List<java.util.List<LatLon>>
createGeometry(Globe globe, double edgeIntervalsPerDegree)
protected void
doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
protected void
doMoveTo(Position oldReferencePosition, Position newReferencePosition)
protected void
doMoveTo(Globe globe, Position oldReferencePosition, Position newReferencePosition)
protected void
doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
protected void
exportAsKML(java.lang.Object output)
java.lang.Iterable<? extends LatLon>
getBoundary(int index)
int
getBoundaryCount()
java.lang.Iterable<? extends LatLon>
getLocations(Globe globe)
Returns the shape's locations as they appear on the specifiedglobe
, or null if the shape has no locations.Position
getReferencePosition()
A position associated with the object that indicates its aggregate geographic position.protected void
handleUnsuccessfulInteriorTessellation(DrawContext dc)
Overridden to clear the multi-polygon's boundary list upon an unsuccessful tessellation attempt.void
removeAllBoundaries()
-
Methods inherited from class gov.nasa.worldwind.render.AbstractSurfaceShape
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, generateIntermediateLocations, getActiveAttributes, getActiveGeometry, getArea, getArea, getAttributes, getCachedGeometry, getExtent, getHeight, getHighlightAttributes, getInteriorTexture, getLength, getMinAndMaxEdgeIntervals, getPathType, getPerimeter, getRestorableState, getSectors, getStateKey, getTexelsPerEdgeInterval, getWidth, isDragEnabled, isExportFormatSupported, isHighlighted, isSectorEmpty, legacyRestoreState, makeOrderedPreRenderable, move, moveTo, moveTo, pathTypeFromString, repeatAroundDateline, restoreState, setAttributes, setDragEnabled, setHighlightAttributes, setHighlighted, setMinAndMaxEdgeIntervals, setPathType, setTexelsPerEdgeInterval, setupAreaMeasurer, tessellateInterior, tessellateInteriorVertices
-
Methods inherited from class gov.nasa.worldwind.render.AbstractSurfaceObject
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
-
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
onMessage, propertyChange
-
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
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
-
Methods inherited from class java.lang.Object
clone, equals, 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
-
Methods inherited from interface gov.nasa.worldwind.render.Renderable
render
-
Methods inherited from interface gov.nasa.worldwind.render.SurfaceObject
getDelegateOwner, getDistanceFromEye, getExtent, isEnableBatchPicking, isVisible, pick, preRender, setDelegateOwner, setEnableBatchPicking, setVisible
-
-
-
-
Field Detail
-
boundaries
protected ContourList boundaries
-
-
Constructor Detail
-
SurfaceMultiPolygon
public SurfaceMultiPolygon()
Constructs a new surface multi polygon with the default attributes and no locations.
-
SurfaceMultiPolygon
public SurfaceMultiPolygon(SurfaceMultiPolygon source)
-
SurfaceMultiPolygon
public SurfaceMultiPolygon(ShapeAttributes normalAttrs)
-
SurfaceMultiPolygon
public SurfaceMultiPolygon(java.lang.Iterable<? extends LatLon> iterable)
-
SurfaceMultiPolygon
public SurfaceMultiPolygon(ContourList contours)
-
SurfaceMultiPolygon
public SurfaceMultiPolygon(ShapeAttributes normalAttrs, java.lang.Iterable<? extends LatLon> iterable)
-
SurfaceMultiPolygon
public SurfaceMultiPolygon(ShapeAttributes normalAttrs, ContourList contours)
-
-
Method Detail
-
getBoundaryCount
public int getBoundaryCount()
-
getBoundary
public java.lang.Iterable<? extends LatLon> getBoundary(int index)
-
addBoundary
public void addBoundary(java.lang.Iterable<? extends LatLon> iterable)
-
addAllBoundaries
public void addAllBoundaries(ContourList contours)
-
removeAllBoundaries
public void removeAllBoundaries()
-
getReferencePosition
public Position getReferencePosition()
Description copied from interface:Movable
A position associated with the object that indicates its aggregate geographic position. The chosen position varies among implementers of this interface. For objects defined by a list of positions, the reference position is typically the first position in the list. For symmetric objects the reference position is often the center of the object. In many cases the object's reference position may be explicitly specified by the application.- Specified by:
getReferencePosition
in interfaceMovable
- Specified by:
getReferencePosition
in interfaceMovable2
- Specified by:
getReferencePosition
in classAbstractSurfaceShape
- Returns:
- the object's reference position, or null if no reference position is available.
-
doMoveTo
protected void doMoveTo(Position oldReferencePosition, Position newReferencePosition)
- Specified by:
doMoveTo
in classAbstractSurfaceShape
-
doMoveTo
protected void doMoveTo(Globe globe, Position oldReferencePosition, Position newReferencePosition)
- Specified by:
doMoveTo
in classAbstractSurfaceShape
-
createGeometry
protected java.util.List<java.util.List<LatLon>> createGeometry(Globe globe, double edgeIntervalsPerDegree)
- Specified by:
createGeometry
in classAbstractSurfaceShape
-
getLocations
public java.lang.Iterable<? extends LatLon> getLocations(Globe globe)
Description copied from interface:SurfaceShape
Returns the shape's locations as they appear on the specifiedglobe
, or null if the shape has no locations.- Parameters:
globe
- the globe the shape is related to.- Returns:
- the shapes locations on the globe, or null if the shape has no locations.
-
handleUnsuccessfulInteriorTessellation
protected void handleUnsuccessfulInteriorTessellation(DrawContext dc)
Overridden to clear the multi-polygon's boundary list upon an unsuccessful tessellation attempt. This ensures the multi-polygon won't attempt to re-tessellate itself each frame.- Overrides:
handleUnsuccessfulInteriorTessellation
in classAbstractSurfaceShape
- Parameters:
dc
- the current DrawContext.
-
doGetRestorableState
protected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
- Overrides:
doGetRestorableState
in classAbstractSurfaceShape
-
doRestoreState
protected void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
- Overrides:
doRestoreState
in classAbstractSurfaceShape
-
exportAsKML
protected void exportAsKML(java.lang.Object output) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Overrides:
exportAsKML
in classAbstractSurfaceShape
- Throws:
java.io.IOException
javax.xml.stream.XMLStreamException
-
-