Class Curtain
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.WWObjectImpl
-
- gov.nasa.worldwind.render.airspaces.AbstractAirspace
-
- gov.nasa.worldwind.render.airspaces.Curtain
-
- All Implemented Interfaces:
AVList,Draggable,MessageListener,ExtentHolder,Movable,Movable2,Airspace,Attributable,Highlightable,OrderedRenderable,PreRenderable,Renderable,Restorable,WWObject,java.beans.PropertyChangeListener,java.util.EventListener
public class Curtain extends AbstractAirspace
A curtain is a series of adjacent rectangular planes. The upper edges of the planes are the connecting line segments between the vertices of a polyline. The lower edges of the planes are parallel to the upper edges at a specified altitude.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classCurtain.CurtainGeometryprotected static classCurtain.SectionRenderInfo-
Nested classes/interfaces inherited from class gov.nasa.worldwind.render.airspaces.AbstractAirspace
AbstractAirspace.AirspaceInfo
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanapplyPositionAltitudeprotected java.util.List<LatLon>locationsprotected java.lang.StringpathTypeprotected doublesplitThreshold-
Fields inherited from class gov.nasa.worldwind.render.airspaces.AbstractAirspace
activeAttributes, airspaceInfo, alwaysOnTop, ARC_SLICES, attributes, currentInfo, DEFAULT_HIGHLIGHT_MATERIAL, DEFAULT_INTERIOR_MATERIAL, DEFAULT_OUTLINE_MATERIAL, DEFAULT_OUTLINE_PICK_WIDTH, defaultAttributes, delegateOwner, detailLevels, DISABLE_TERRAIN_CONFORMANCE, dragEnabled, draggableSupport, drawSurfaceShape, elevationMap, enableBatchPicking, enableBatchRendering, enableDepthOffset, enableLevelOfDetail, EXPIRY_TIME, expiryTime, frameTimeStamp, GEOMETRY_CACHE_KEY, GEOMETRY_CACHE_NAME, geometryBuilder, GLOBE_KEY, groundReference, highlightAttributes, highlighted, LENGTH_SLICES, LOOPS, lowerAltitude, lowerAltitudeDatum, lowerTerrainConforming, maxExpiryTime, minExpiryTime, mustRegenerateSurfaceShape, outlinePickWidth, outlineShapeRenderer, pickLayer, pickSupport, PILLARS, rand, SLICES, SPLIT_THRESHOLD, STACKS, SUBDIVISIONS, surfaceShape, upperAltitude, upperAltitudeDatum, upperTerrainConforming, VERTICAL_EXAGGERATION, visible
-
Fields inherited from interface gov.nasa.worldwind.render.airspaces.Airspace
DRAW_STYLE_FILL, DRAW_STYLE_OUTLINE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddLocations(java.lang.Iterable<? extends LatLon> newLocations)protected ExtentcomputeExtent(Globe globe, double verticalExaggeration)protected java.util.List<Vec4>computeMinimalGeometry(Globe globe, double verticalExaggeration)protected Vec4computeReferenceCenter(DrawContext dc)protected SurfaceShapecreateSurfaceShape()Returns aSurfaceShapethat corresponds to this Airspace and is used for drawing on 2D globes.protected voiddoGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)protected voiddoMoveTo(Position oldRef, Position newRef)protected voiddoMoveTo(Globe globe, Position oldRef, Position newRef)protected voiddoRenderGeometry(DrawContext dc, java.lang.String drawStyle)protected voiddoRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)protected voiddrawCurtainFill(DrawContext dc, int count, LatLon[] locations, java.lang.String pathType, double splitThreshold, double[] altitudes, boolean[] terrainConformant, Vec4 referenceCenter)protected voiddrawCurtainOutline(DrawContext dc, int count, LatLon[] locations, java.lang.String pathType, double splitThreshold, double[] altitudes, boolean[] terrainConformant, Vec4 referenceCenter)protected Curtain.CurtainGeometrygetCurtainGeometry(DrawContext dc, int count, LatLon[] locations, java.lang.String pathType, double splitThreshold, double[] altitudes, boolean[] terrainConformant, Vec4 referenceCenter)java.lang.Iterable<LatLon>getLocations()Returns the curtain's locations.java.lang.StringgetPathType()PositiongetReferencePosition()A position associated with the object that indicates its aggregate geographic position.protected intgetSectionFillDrawMode()protected intgetSectionFillIndexCount(int pillars)protected intgetSectionOutlineDrawMode()protected intgetSectionOutlineIndexCount(int pillars)protected intgetSectionPillarCount(DrawContext dc, LatLon begin, LatLon end, java.lang.String pathType, double splitThreshold)protected intgetSectionVertexCount(int pillars)protected doublegetSplitThreshold()booleanisApplyPositionAltitude()protected voidmakeCurtainGeometry(DrawContext dc, int count, LatLon[] locations, java.lang.String pathType, double splitThreshold, double[] altitudes, boolean[] terrainConformant, Vec4 referenceCenter, Curtain.CurtainGeometry dest)protected voidmakeDefaultDetailLevels()protected voidmakeSectionFillIndices(int pillars, int vertexPos, int indexPos, int[] dest)protected voidmakeSectionInfo(DrawContext dc, int count, LatLon[] locations, java.lang.String pathType, double splitThreshold, Curtain.SectionRenderInfo[] ri, int[] counts)protected voidmakeSectionOutlineIndices(int pillars, int vertexPos, int indexPos, int[] dest)protected voidmakeSectionVertices(DrawContext dc, LatLon begin, LatLon end, java.lang.String pathType, double[] altitude, boolean[] terrainConformant, int pillars, int vertexPos, float[] dest, Vec4 referenceCenter)protected voidmakeSegment(Globe globe, LatLon locA, LatLon locB, java.util.List<LatLon> tessellatedLocations)protected voidmakeTessellatedLocations(Globe globe, java.util.List<LatLon> tessellatedLocations)protected voidregenerateSurfaceShape(DrawContext dc, SurfaceShape shape)Regenerates surface shape geometry prior to picking and rendering the 2D shape used to represent this Airspace on 2D globes.voidsetApplyPositionAltitude(boolean applyPositionAltitude)voidsetLocations(java.lang.Iterable<? extends LatLon> locations)Sets the curtain's locations, in geographic coordinates.voidsetPathType(java.lang.String pathType)protected voidsetSplitThreshold(double splitThreshold)protected voidupdateSurfaceShape(DrawContext dc, SurfaceShape shape)Sets surface shape parameters prior to picking and rendering the 2D shape used to represent this Airspace on 2D globes.-
Methods inherited from class gov.nasa.worldwind.render.airspaces.AbstractAirspace
addDetailLevels, adjustForGroundReference, beginRendering, clearElevationMap, computeDetailLevel, computeElevationAt, computeExtent, computeEyeDistance, computeMinimalGeometry, computePointFromPosition, computeReferencePosition, createPickedObject, determineActiveAttributes, doDrag, doDrawOrderedRenderable, drag, drawBatched, drawGeometry, drawInterior, drawOrderedRenderable, drawOutline, endRendering, getActiveAttributes, getAirspaceInfo, getAltitudeDatum, getAltitudes, getAltitudes, getAttributes, getDelegateOwner, getDetailLevels, getDistanceFromEye, getExpiryRange, getExpiryTime, getExtent, getExtent, getGeometryBuilder, getGeometryCache, getGroundReference, getHighlightAttributes, getOutlinePickWidth, getRestorableState, invalidateAirspaceData, isAirspaceCollapsed, isAirspaceVisible, isAlwaysOnTop, isDragEnabled, isDrawSurfaceShape, isEnableBatchPicking, isEnableBatchRendering, isEnableDepthOffset, isEnableLevelOfDetail, isExpired, isHighlighted, isTerrainConforming, isVisible, makeExtremePoints, makeOrderedRenderable, move, moveTo, moveTo, mustDrawInterior, mustDrawOutline, nextExpiryTime, pick, preRender, render, restoreState, setAltitude, setAltitudeDatum, setAltitudes, setAlwaysOnTop, setAttributes, setAttributes, setDelegateOwner, setDetailLevels, setDragEnabled, setDrawSurfaceShape, setEnableBatchPicking, setEnableBatchRendering, setEnableDepthOffset, setEnableLevelOfDetail, setExpiryRange, setExpiryTime, setGeometryBuilder, setGroundReference, setHighlightAttributes, setHighlightAttributes, setHighlighted, setOutlinePickWidth, setTerrainConforming, setTerrainConforming, setVisible, updateExpiryCriteria
-
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
-
-
-
-
Field Detail
-
locations
protected java.util.List<LatLon> locations
-
pathType
protected java.lang.String pathType
-
splitThreshold
protected double splitThreshold
-
applyPositionAltitude
protected boolean applyPositionAltitude
-
-
Constructor Detail
-
Curtain
public Curtain(java.lang.Iterable<? extends LatLon> locations)
-
Curtain
public Curtain(AirspaceAttributes attributes)
-
Curtain
public Curtain()
-
Curtain
public Curtain(Curtain source)
-
-
Method Detail
-
makeDefaultDetailLevels
protected void makeDefaultDetailLevels()
-
getLocations
public java.lang.Iterable<LatLon> getLocations()
Returns the curtain's locations.- Returns:
- the curtain's locations in geographic coordinates.
-
setLocations
public void setLocations(java.lang.Iterable<? extends LatLon> locations)
Sets the curtain's locations, in geographic coordinates.- Parameters:
locations- a list of geographic coordinates (latitude and longitude) specifying the upper edge of the shape.- Throws:
java.lang.IllegalArgumentException- if the locations list is null or contains fewer than two points.
-
addLocations
protected void addLocations(java.lang.Iterable<? extends LatLon> newLocations)
-
getPathType
public java.lang.String getPathType()
-
setPathType
public void setPathType(java.lang.String pathType)
-
isApplyPositionAltitude
public boolean isApplyPositionAltitude()
-
setApplyPositionAltitude
public void setApplyPositionAltitude(boolean applyPositionAltitude)
-
getReferencePosition
public Position getReferencePosition()
Description copied from interface:MovableA 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.- Returns:
- the object's reference position, or null if no reference position is available.
-
computeExtent
protected Extent computeExtent(Globe globe, double verticalExaggeration)
- Specified by:
computeExtentin classAbstractAirspace
-
computeMinimalGeometry
protected java.util.List<Vec4> computeMinimalGeometry(Globe globe, double verticalExaggeration)
- Specified by:
computeMinimalGeometryin classAbstractAirspace
-
createSurfaceShape
protected SurfaceShape createSurfaceShape()
Description copied from class:AbstractAirspaceReturns aSurfaceShapethat corresponds to this Airspace and is used for drawing on 2D globes.- Overrides:
createSurfaceShapein classAbstractAirspace- Returns:
- The surface shape to represent this Airspace on a 2D globe.
-
updateSurfaceShape
protected void updateSurfaceShape(DrawContext dc, SurfaceShape shape)
Description copied from class:AbstractAirspaceSets surface shape parameters prior to picking and rendering the 2D shape used to represent this Airspace on 2D globes. Subclasses should override this method if they need to update more than the attributes and the delegate owner.- Overrides:
updateSurfaceShapein classAbstractAirspace- Parameters:
dc- the current drawing context.shape- the surface shape to update.
-
regenerateSurfaceShape
protected void regenerateSurfaceShape(DrawContext dc, SurfaceShape shape)
Description copied from class:AbstractAirspaceRegenerates surface shape geometry prior to picking and rendering the 2D shape used to represent this Airspace on 2D globes.- Overrides:
regenerateSurfaceShapein classAbstractAirspace- Parameters:
dc- the current drawing context.shape- the surface shape to regenerate.
-
doMoveTo
protected void doMoveTo(Globe globe, Position oldRef, Position newRef)
- Overrides:
doMoveToin classAbstractAirspace
-
doMoveTo
protected void doMoveTo(Position oldRef, Position newRef)
- Overrides:
doMoveToin classAbstractAirspace
-
getSplitThreshold
protected double getSplitThreshold()
-
setSplitThreshold
protected void setSplitThreshold(double splitThreshold)
-
computeReferenceCenter
protected Vec4 computeReferenceCenter(DrawContext dc)
-
doRenderGeometry
protected void doRenderGeometry(DrawContext dc, java.lang.String drawStyle)
- Specified by:
doRenderGeometryin classAbstractAirspace
-
getCurtainGeometry
protected Curtain.CurtainGeometry getCurtainGeometry(DrawContext dc, int count, LatLon[] locations, java.lang.String pathType, double splitThreshold, double[] altitudes, boolean[] terrainConformant, Vec4 referenceCenter)
-
drawCurtainFill
protected void drawCurtainFill(DrawContext dc, int count, LatLon[] locations, java.lang.String pathType, double splitThreshold, double[] altitudes, boolean[] terrainConformant, Vec4 referenceCenter)
-
drawCurtainOutline
protected void drawCurtainOutline(DrawContext dc, int count, LatLon[] locations, java.lang.String pathType, double splitThreshold, double[] altitudes, boolean[] terrainConformant, Vec4 referenceCenter)
-
makeCurtainGeometry
protected void makeCurtainGeometry(DrawContext dc, int count, LatLon[] locations, java.lang.String pathType, double splitThreshold, double[] altitudes, boolean[] terrainConformant, Vec4 referenceCenter, Curtain.CurtainGeometry dest)
-
makeSectionInfo
protected void makeSectionInfo(DrawContext dc, int count, LatLon[] locations, java.lang.String pathType, double splitThreshold, Curtain.SectionRenderInfo[] ri, int[] counts)
-
getSectionPillarCount
protected int getSectionPillarCount(DrawContext dc, LatLon begin, LatLon end, java.lang.String pathType, double splitThreshold)
-
getSectionFillDrawMode
protected int getSectionFillDrawMode()
-
getSectionOutlineDrawMode
protected int getSectionOutlineDrawMode()
-
getSectionFillIndexCount
protected int getSectionFillIndexCount(int pillars)
-
getSectionOutlineIndexCount
protected int getSectionOutlineIndexCount(int pillars)
-
getSectionVertexCount
protected int getSectionVertexCount(int pillars)
-
makeSectionFillIndices
protected void makeSectionFillIndices(int pillars, int vertexPos, int indexPos, int[] dest)
-
makeSectionOutlineIndices
protected void makeSectionOutlineIndices(int pillars, int vertexPos, int indexPos, int[] dest)
-
makeSectionVertices
protected void makeSectionVertices(DrawContext dc, LatLon begin, LatLon end, java.lang.String pathType, double[] altitude, boolean[] terrainConformant, int pillars, int vertexPos, float[] dest, Vec4 referenceCenter)
-
makeTessellatedLocations
protected void makeTessellatedLocations(Globe globe, java.util.List<LatLon> tessellatedLocations)
-
makeSegment
protected void makeSegment(Globe globe, LatLon locA, LatLon locB, java.util.List<LatLon> tessellatedLocations)
-
doGetRestorableState
protected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
- Overrides:
doGetRestorableStatein classAbstractAirspace
-
doRestoreState
protected void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
- Overrides:
doRestoreStatein classAbstractAirspace
-
-