public class SurfacePolygons extends SurfacePolylines
CompoundVecBuffer
.
Whether a polygon ring is filled or is a hole in another polygon depends on the vertices winding order and the winding rule used - see setWindingRule(String).
AbstractSurfaceShape.GeometryKey, AbstractSurfaceShape.SurfaceShapeStateKey
AbstractSurfaceObject.CacheEntry, AbstractSurfaceObject.SurfaceObjectStateKey
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object |
interiorDisplayListCacheKey |
protected boolean |
needsInteriorTessellation |
protected int[] |
polygonRingGroups |
protected WWTexture |
texture |
protected java.lang.String |
windingRule |
buffer, crossesDateLine, needsOutlineTessellation, outlineDisplayListCacheKey, sectors
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, vertexBuffer
delegateOwner, drawBoundingSectors, enableBatchPicking, extentCache, lastModifiedTime, nextUniqueId, pickLayer, pickSupport, pickTileBuilder, uniqueId, visible
Constructor and Description |
---|
SurfacePolygons(CompoundVecBuffer buffer) |
SurfacePolygons(Sector sector,
CompoundVecBuffer buffer) |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<double[]> |
computeDateLineCrossingPoints(VecBuffer vecBuffer) |
protected double[] |
computeDateLineEntryPoint(double[] from,
double[] to) |
protected int |
computePole(java.util.List<double[]> dateLineCrossingPoints) |
protected double[] |
computePoleWrappingPoint(int pole,
java.util.List<double[]> dateLineCrossingPoints) |
protected int[] |
doTessellateInterior(DrawContext dc,
LatLon referenceLocation) |
protected void |
drawInterior(DrawContext dc,
SurfaceTileDrawContext sdc) |
int[] |
getPolygonRingGroups()
Get a copy of the polygon ring groups array - can be null.
|
protected WWTexture |
getTexture() |
java.lang.String |
getWindingRule()
Get the winding rule used when tessellating polygons.
|
protected void |
handleUnsuccessfulInteriorTessellation(DrawContext dc) |
protected void |
onGeometryChanged() |
void |
setPolygonRingGroups(int[] ringGroups)
Set the polygon ring groups array - can be null.
|
void |
setWindingRule(java.lang.String windingRule)
Set the winding rule used when tessellating polygons.
|
protected int[] |
tessellateInterior(DrawContext dc,
LatLon referenceLocation) |
protected int |
tessellateInteriorVertices(com.jogamp.opengl.glu.GLUtessellator tess,
LatLon referenceLocation) |
protected boolean |
tessellateRing(com.jogamp.opengl.glu.GLUtessellator tess,
VecBuffer vecBuffer,
LatLon referenceLocation) |
canContainPole, createGeometry, createGeometry, determineActiveGeometry, doMoveTo, doMoveTo, drawOutline, getBuffer, getLocations, getLocations, getReferencePosition, getSectors, setLocations, tessellateOutline, tessellatePart
addIntermediateLocations, applyInteriorState, applyInteriorTextureState, applyModelviewTransform, applyOutlineState, beginDrawing, clearCaches, combine, combineBounds, combineContours, computeEdgeIntervalsPerDegree, computeEdgeIntervalsPerDegree, computeSectors, computeSectors, containsPole, createActiveAttributes, createGeometryKey, cutAlongDateLine, determineActiveAttributes, doCombineContour, doCombineContours, doDrag, doDrawGeographic, doGetRestorableState, doRestoreState, doTessellateInterior, drag, drawGeographic, drawLineStrip, endDrawing, export, exportAsKML, generateIntermediateLocations, getActiveAttributes, getActiveGeometry, getArea, getArea, getAttributes, getCachedGeometry, getExtent, getHeight, getHighlightAttributes, getInteriorTexture, getLength, getMinAndMaxEdgeIntervals, getPathType, getPerimeter, getRestorableState, 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
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 java.lang.Object interiorDisplayListCacheKey
protected boolean needsInteriorTessellation
protected int[] polygonRingGroups
protected WWTexture texture
protected java.lang.String windingRule
public SurfacePolygons(CompoundVecBuffer buffer)
public SurfacePolygons(Sector sector, CompoundVecBuffer buffer)
protected java.util.List<double[]> computeDateLineCrossingPoints(VecBuffer vecBuffer)
protected double[] computeDateLineEntryPoint(double[] from, double[] to)
protected int computePole(java.util.List<double[]> dateLineCrossingPoints)
protected double[] computePoleWrappingPoint(int pole, java.util.List<double[]> dateLineCrossingPoints)
protected int[] doTessellateInterior(DrawContext dc, LatLon referenceLocation)
protected void drawInterior(DrawContext dc, SurfaceTileDrawContext sdc)
drawInterior
in class SurfacePolylines
public int[] getPolygonRingGroups()
When not null the polygon ring groups array identifies the starting sub buffer index for each polygon. In that case rings from a same group will be tesselated together as part of the same polygon.
When null
polygon rings that follow the current winding rule are tessellated separatly as different
polygons. Rings that are reverse winded are considered holes to be applied to the last straight winded ring
polygon.
protected WWTexture getTexture()
public java.lang.String getWindingRule()
AVKey.CLOCKWISE
(default) or AVKey.COUNTER_CLOCKWISE
.
When set to AVKey.CLOCKWISE
polygons which run clockwise will be filled and those which run counter
clockwise will produce 'holes'. The interpretation is reversed when the winding rule is set to AVKey.COUNTER_CLOCKWISE
.
protected void handleUnsuccessfulInteriorTessellation(DrawContext dc)
handleUnsuccessfulInteriorTessellation
in class AbstractSurfaceShape
protected void onGeometryChanged()
onGeometryChanged
in class SurfacePolylines
public void setPolygonRingGroups(int[] ringGroups)
When not null the polygon ring groups array identifies the starting sub buffer index for each polygon. In that case rings from a same group will be tesselated together as part of the same polygon.
When null
polygon rings that follow the current winding rule are tessellated separatly as different
polygons. Rings that are reverse winded are considered holes to be applied to the last straight winded ring
polygon.
ringGroups
- a copy of the polygon ring groups array - can be null.public void setWindingRule(java.lang.String windingRule)
AVKey.CLOCKWISE
(default) or AVKey.COUNTER_CLOCKWISE
.
When set to AVKey.CLOCKWISE
polygons which run clockwise will be filled and those which run counter
clockwise will produce 'holes'. The interpretation is reversed when the winding rule is set to AVKey.COUNTER_CLOCKWISE
.
windingRule
- the winding rule to use when tessellating polygons.protected int[] tessellateInterior(DrawContext dc, LatLon referenceLocation)
protected int tessellateInteriorVertices(com.jogamp.opengl.glu.GLUtessellator tess, LatLon referenceLocation)