gov.nasa.worldwind.render
Class SurfacePolylines
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.SurfacePolylines
- All Implemented Interfaces:
- AVList, MessageListener, ExtentHolder, MeasurableArea, MeasurableLength, Movable, Highlightable, OrderedRenderable, PreRenderable, Renderable, SurfaceObject, SurfaceShape, Restorable, WWObject, PropertyChangeListener, EventListener
- Direct Known Subclasses:
- SurfacePolygons
public class SurfacePolylines
- extends AbstractSurfaceShape
This class renders fast multiple surface polylines in one pass. It relies on a CompoundVecBuffer.
| 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, 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, pickTiles, uniqueId, visible |
|
Method Summary |
protected boolean |
canContainPole()
Indicates whether the shape is a closed polygon that can enclose a pole, or an open path that cannot. |
protected List<List<LatLon>> |
createGeometry(Globe globe,
SurfaceTileDrawContext sdc)
|
protected void |
determineActiveGeometry(DrawContext dc,
SurfaceTileDrawContext sdc)
|
protected void |
doMoveTo(Position oldReferencePosition,
Position newReferencePosition)
|
protected void |
drawInterior(DrawContext dc,
SurfaceTileDrawContext sdc)
|
protected void |
drawOutline(DrawContext dc,
SurfaceTileDrawContext sdc)
|
CompoundVecBuffer |
getBuffer()
Get the underlying CompoundVecBuffer describing the geometry. |
Iterable<? extends LatLon> |
getLocations()
|
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. |
Position |
getReferencePosition()
A position associated with the object that indicates its aggregate geographic position. |
List<Sector> |
getSectors(DrawContext dc)
Returns a List of Sector instances that bound the surface
object on the specified DrawContext. |
protected void |
onGeometryChanged()
|
void |
setLocations(Iterable<? extends LatLon> iterable)
|
protected int[] |
tessellateOutline(DrawContext dc,
LatLon referenceLocation)
|
protected boolean |
tessellatePart(GL2 gl,
VecBuffer vecBuffer,
LatLon referenceLocation)
|
| Methods inherited from class gov.nasa.worldwind.render.AbstractSurfaceShape |
addIntermediateLocations, applyInteriorState, applyInteriorTextureState, applyModelviewTransform, applyOutlineState, beginDrawing, clearCaches, computeEdgeIntervalsPerDegree, computeSectors, computeSectors, containsPole, createActiveAttributes, createGeometryKey, cutAlongDateLine, determineActiveAttributes, doDrawGeographic, doGetRestorableState, doRestoreState, doTessellateInterior, drawGeographic, endDrawing, export, exportAsKML, generateIntermediateLocations, getActiveAttributes, getActiveGeometry, getArea, getArea, getAttributes, getCachedGeometry, getExtent, getHeight, getHighlightAttributes, getInteriorTexture, getLength, getMinAndMaxEdgeIntervals, getPathType, getPerimeter, getRestorableState, getStateKey, getTexelsPerEdgeInterval, getWidth, handleUnsuccessfulInteriorTessellation, intersectionWithMeridian, isExportFormatSupported, isHighlighted, isSectorEmpty, legacyRestoreState, makeOrderedPreRenderable, move, moveTo, onShapeChanged, pathTypeFromString, repeatAroundDateline, restoreState, setAttributes, 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, pick, pickBatched, pickOrderedRenderable, preRender, render, setDelegateOwner, setDrawBoundingSectors, setEnableBatchPicking, setVisible, updateModifiedTime |
| 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, finalize, 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 |
buffer
protected CompoundVecBuffer buffer
crossesDateLine
protected boolean crossesDateLine
needsOutlineTessellation
protected boolean needsOutlineTessellation
outlineDisplayListCacheKey
protected Object outlineDisplayListCacheKey
sectors
protected List<Sector> sectors
SurfacePolylines
public SurfacePolylines(CompoundVecBuffer buffer)
SurfacePolylines
public SurfacePolylines(Sector sector,
CompoundVecBuffer buffer)
canContainPole
protected boolean canContainPole()
- Indicates whether the shape is a closed polygon that can enclose a pole, or an open path that cannot. This makes
a difference when computing the bounding sector for a shape. For example, consider the positions (-100, 85), (0,
80), (100, 80). If these positions are treated as a closed polygon (a triangle over the North Pole) then the
bounding sector is 80 to 90 lat, -180 to 180 lon. But if they are treated as an open path (a line wrapping
partway around the pole) then the bounding sector is 80 to 85 lat, -100 to 100 lon. Overridden to treat the polylines as open paths rather than closed polygons.
- Overrides:
canContainPole in class AbstractSurfaceShape
- Returns:
- True if the shape is a closed polygon that can contain a pole, or false if it is treated as an open path
that cannot contain a pole.
createGeometry
protected List<List<LatLon>> createGeometry(Globe globe,
SurfaceTileDrawContext sdc)
- Specified by:
createGeometry in class AbstractSurfaceShape
determineActiveGeometry
protected void determineActiveGeometry(DrawContext dc,
SurfaceTileDrawContext sdc)
- Overrides:
determineActiveGeometry in class AbstractSurfaceShape
doMoveTo
protected void doMoveTo(Position oldReferencePosition,
Position newReferencePosition)
- Specified by:
doMoveTo in class AbstractSurfaceShape
drawInterior
protected void drawInterior(DrawContext dc,
SurfaceTileDrawContext sdc)
- Overrides:
drawInterior in class AbstractSurfaceShape
drawOutline
protected void drawOutline(DrawContext dc,
SurfaceTileDrawContext sdc)
- Overrides:
drawOutline in class AbstractSurfaceShape
getBuffer
public CompoundVecBuffer getBuffer()
- Get the underlying
CompoundVecBuffer describing the geometry.
- Returns:
- the underlying
CompoundVecBuffer.
getLocations
public Iterable<? extends LatLon> getLocations()
getLocations
public Iterable<? extends LatLon> getLocations(Globe globe)
- Description copied from interface:
SurfaceShape
- Returns the shape's locations as they appear on the specified
globe, 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.
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 interface Movable- Specified by:
getReferencePosition in class AbstractSurfaceShape
- Returns:
- the object's reference position, or null if no reference position is available.
getSectors
public List<Sector> getSectors(DrawContext dc)
- Description copied from interface:
SurfaceObject
- Returns a
List of Sector instances that bound the surface
object on the specified DrawContext.
- Specified by:
getSectors in interface SurfaceObject- Overrides:
getSectors in class AbstractSurfaceShape
- Parameters:
dc - the DrawContext the surface object is related to.
- Returns:
- the surface object's bounding Sectors.
onGeometryChanged
protected void onGeometryChanged()
setLocations
public void setLocations(Iterable<? extends LatLon> iterable)
tessellateOutline
protected int[] tessellateOutline(DrawContext dc,
LatLon referenceLocation)
tessellatePart
protected boolean tessellatePart(GL2 gl,
VecBuffer vecBuffer,
LatLon referenceLocation)