Package gov.nasa.worldwind.render
Class ContourLinePolygon
- java.lang.Object
-
- gov.nasa.worldwind.render.ContourLine
-
- gov.nasa.worldwind.render.ContourLinePolygon
-
- All Implemented Interfaces:
Renderable
public class ContourLinePolygon extends ContourLine
Renders a contour line on the terrain at a given elevation. The controur line extent is bounded by a polygon defined by a list ofLatLon
.
-
-
Field Summary
-
Fields inherited from class gov.nasa.worldwind.render.ContourLine
globeStateKey, maxConnectingDistance
-
-
Constructor Summary
Constructors Constructor Description ContourLinePolygon()
ContourLinePolygon(double elevation)
ContourLinePolygon(double elevation, java.util.ArrayList<? extends LatLon> positions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.ArrayList<Intersection>
filterIntersections(DrawContext dc, java.util.ArrayList<Intersection> list)
Filters the given intersection segments list according to some criteria - here the inclusion inside the current polygon.java.util.List<? extends LatLon>
getPositions()
Get the list ofLatLon
that describe the current bounding polygon.void
setPositions(java.util.ArrayList<? extends LatLon> positions)
Set the list ofLatLon
that describes a closed polygon - one which last position is equal to the first, used to delineate the extent of the contour line.-
Methods inherited from class gov.nasa.worldwind.render.ContourLine
filterIntersectionsOnViewFrustum, getColor, getElevation, getLineWidth, getRenderables, getSector, isEnabled, isValid, isViewClippingEnabled, makeContourLine, makePathsConnected, render, setColor, setElevation, setEnabled, setLineWidth, setSector, setViewClippingEnabled, update
-
-
-
-
Constructor Detail
-
ContourLinePolygon
public ContourLinePolygon()
-
ContourLinePolygon
public ContourLinePolygon(double elevation)
-
ContourLinePolygon
public ContourLinePolygon(double elevation, java.util.ArrayList<? extends LatLon> positions)
-
-
Method Detail
-
getPositions
public java.util.List<? extends LatLon> getPositions()
Get the list ofLatLon
that describe the current bounding polygon.- Returns:
- the list of
LatLon
that describe the current bounding polygon.
-
setPositions
public void setPositions(java.util.ArrayList<? extends LatLon> positions)
Set the list ofLatLon
that describes a closed polygon - one which last position is equal to the first, used to delineate the extent of the contour line.- Parameters:
positions
- the list ofLatLon
that describe a closed polygon.- Throws:
java.lang.IllegalArgumentException
- if positions isnull
.
-
filterIntersections
protected java.util.ArrayList<Intersection> filterIntersections(DrawContext dc, java.util.ArrayList<Intersection> list)
Filters the given intersection segments list according to some criteria - here the inclusion inside the current polygon.- Overrides:
filterIntersections
in classContourLine
- Parameters:
dc
- the currentDrawContext
list
- the list ofIntersection
to be filtered.- Returns:
- the filtered list.
-
-