public class SectorGeometryList extends java.util.ArrayList<SectorGeometry>
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<SectorGeometry,java.util.ArrayList<java.awt.Point>> |
pickSectors |
protected PickSupport |
pickSupport |
protected Sector |
sector
The spanning sector of all sector geometries contained in this list.
|
Constructor and Description |
---|
SectorGeometryList()
Constructs an empty sector geometry list.
|
SectorGeometryList(SectorGeometryList list)
Constructs a sector geometry list that contains a specified list of sector geometries.
|
Modifier and Type | Method and Description |
---|---|
void |
beginRendering(DrawContext dc)
Indicates that this list's sectors are about to be rendered.
|
protected void |
beginSectorGeometryPicking(DrawContext dc)
Indicates that sector geometry picking is about to be performed.
|
void |
endRendering(DrawContext dc)
Restores state established by
beginRendering(gov.nasa.worldwind.render.DrawContext) . |
protected void |
endSectorGeometryPicking(DrawContext dc)
Restores state established by
beginSectorGeometryPicking(gov.nasa.worldwind.render.DrawContext) . |
Sector |
getSector()
Indicates the spanning sector of all sector geometries in this list.
|
Vec4 |
getSurfacePoint(Angle latitude,
Angle longitude)
Computes a Cartesian point at a specified location on the terrain.
|
Vec4 |
getSurfacePoint(Angle latitude,
Angle longitude,
double metersOffset)
Computes a Cartesian point at a specified latitude, longitude and altitude above the terrain.
|
Vec4 |
getSurfacePoint(LatLon latLon)
Computes a Cartesian point at a specified location on the terrain.
|
Vec4 |
getSurfacePoint(Position position)
Computes a Cartesian point at a specified latitude, longitude and altitude above the terrain.
|
Intersection[] |
intersect(double elevation,
Sector sector)
Determines if and where the geometry intersects the ellipsoid at a given elevation.
|
Intersection[] |
intersect(Line line)
Determines if and where a ray intersects the geometry.
|
java.util.List<PickedObject> |
pick(DrawContext dc,
java.util.List<java.awt.Point> pickPoints)
Detects the locations of the sector geometries in this list that intersect any of the points in a specified list
of screen points.
|
void |
pick(DrawContext dc,
java.awt.Point pickPoint)
Detects the locations of the sector geometries in this list that intersect a specified screen point.
|
void |
setSector(Sector sector)
Specifies the sector this list spans.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
protected java.util.HashMap<SectorGeometry,java.util.ArrayList<java.awt.Point>> pickSectors
protected PickSupport pickSupport
protected Sector sector
public SectorGeometryList()
public SectorGeometryList(SectorGeometryList list)
list
- the secter geometries to place in the list.public void beginRendering(DrawContext dc)
endRendering(gov.nasa.worldwind.render.DrawContext)
must be called.dc
- the current draw context.protected void beginSectorGeometryPicking(DrawContext dc)
endSectorGeometryPicking(gov.nasa.worldwind.render.DrawContext)
must be called.dc
- the current draw context.public void endRendering(DrawContext dc)
beginRendering(gov.nasa.worldwind.render.DrawContext)
.dc
- the current draw context.protected void endSectorGeometryPicking(DrawContext dc)
beginSectorGeometryPicking(gov.nasa.worldwind.render.DrawContext)
.dc
- the current draw context.public Sector getSector()
public Vec4 getSurfacePoint(Angle latitude, Angle longitude)
latitude
- the latitude of the point to compute.longitude
- the longitude of the point to compute.public Vec4 getSurfacePoint(Angle latitude, Angle longitude, double metersOffset)
latitude
- the latitude of the point to compute.longitude
- the longitude of the point to compute.metersOffset
- the distance above the terrain of the point to compute.public Vec4 getSurfacePoint(LatLon latLon)
latLon
- the location of the point to compute.public Vec4 getSurfacePoint(Position position)
position
- the position to compute the Cartesian point for. The altitude element of the position is
considered to be distance above the terrain at the position's latitude and longitude.public Intersection[] intersect(double elevation, Sector sector)
The returned array of Intersection
describes a list of individual segments - two
Intersection
for each, corresponding to each geometry triangle that intersects the given elevation.
Note that the provided bounding Sector
only serves as a 'hint' to avoid processing unnecessary
geometry tiles. The returned intersection list may contain segments outside that sector.
elevation
- the elevation for which intersections are to be found.sector
- the sector inside which intersections are to be found.Intersection
pairs/segments describing a contour line at the given elevation.public Intersection[] intersect(Line line)
line
- the Line
for which an intersection is to be found.Vec4
point closest to the ray origin where an intersection has been found or null if no
intersection was found.public java.util.List<PickedObject> pick(DrawContext dc, java.util.List<java.awt.Point> pickPoints)
Note: Prior to calling this method, beginRendering(gov.nasa.worldwind.render.DrawContext)
must be
called.
dc
- the current draw context.pickPoints
- the points to test.public void pick(DrawContext dc, java.awt.Point pickPoint)
Note: Prior to calling this method, beginRendering(gov.nasa.worldwind.render.DrawContext)
must be
called.
dc
- the current draw context.pickPoint
- the screen point to test.public void setSector(Sector sector)
sector
- the sector spanned by this list.