2 Copyright (C) 2001, 2006 United States Government
3 as represented by the Administrator of the
4 National Aeronautics and Space Administration.
7 package gov
.nasa
.worldwind
.geom
;
9 import gov
.nasa
.worldwind
.*;
12 import java
.awt
.image
.*;
17 * @version $Id: SurfaceQuadrilateral.java 1680 2007-05-02 00:30:25Z tgaskins $
19 public class SurfaceQuadrilateral
extends SurfacePolygon
22 public SurfaceQuadrilateral(Sector sector
, Color color
, Color borderColor
)
24 super(makePositions(sector
), color
, borderColor
);
27 public SurfaceQuadrilateral(Sector sector
)
29 super(makePositions(sector
), null, null);
32 private static Iterable
<LatLon
> makePositions(Sector sector
)
36 String message
= WorldWind
.retrieveErrMsg("nullValue.SectorIsNull");
37 WorldWind
.logger().log(java
.util
.logging
.Level
.FINE
, message
);
38 throw new IllegalArgumentException(message
);
41 ArrayList
<LatLon
> positions
= new ArrayList
<LatLon
>(5);
43 positions
.add(0, new LatLon(sector
.getMinLatitude(), sector
.getMinLongitude()));
44 positions
.add(1, new LatLon(sector
.getMinLatitude(), sector
.getMaxLongitude()));
45 positions
.add(2, new LatLon(sector
.getMaxLatitude(), sector
.getMaxLongitude()));
46 positions
.add(3, new LatLon(sector
.getMaxLatitude(), sector
.getMinLongitude()));
47 positions
.add(4, new LatLon(sector
.getMinLatitude(), sector
.getMinLongitude()));