faa.tg.geometry
Class Rectangle

java.lang.Object
  extended by faa.tg.geometry.Polygon
      extended by faa.tg.geometry.Rectangle
All Implemented Interfaces:
Shape, java.io.Serializable
Direct Known Subclasses:
CDRRunway

public class Rectangle
extends Polygon

  Rectangle extends Polygon in order to build a four sided
  polygon with parallel sides. 
 
See the source: Rectangle.java

Version:
$Id: Rectangle.java,v 3.2 2006/05/31 13:53:50 danaw Exp $
Author:
Michael E. Ross
See Also:
Serialized Form

Field Summary
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
(package private) static long serialVersionUID
           
 
Fields inherited from class faa.tg.geometry.Polygon
is3d, mapProjection, xArray, yArray
 
Constructor Summary
Rectangle(double[] x, double[] y, int vertices, StereoMapProjection smp)
          Constructor for Rectangle that accepts xy values & a StereoMapProjection.
Rectangle(Position[] vertexArray)
          Constructor to create a Rectangle object using an array of Positions to designate the vertices.
Rectangle(TrueBearing heading, Distance width, Position startPosition, Position endPosition)
           
Rectangle(TrueBearing heading, Position startPosition, Distance length, Distance width)
           
 
Method Summary
private  void makeRectangle(TrueBearing trueBearing, Distance width, Position startPosition, Position endPosition)
          Common-code private function for rectangle.
 
Methods inherited from class faa.tg.geometry.Polygon
calcArea, clone, contains, contains, getArea, getGeoCenter, getVertexCount, is3d, iterator, main, printPoints, setPoints
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

CVS_VERSION_ID

public static final java.lang.String CVS_VERSION_ID
The CVS Version ID

See Also:
Constant Field Values
Constructor Detail

Rectangle

public Rectangle(Position[] vertexArray)
Constructor to create a Rectangle object using an array of Positions to designate the vertices. The Altitude of the Positions is ignored since this is a 2-dimensional shape.

Parameters:
vertexArray - Array of Positions defining the Rectangle vertices.

Rectangle

public Rectangle(double[] x,
                 double[] y,
                 int vertices,
                 StereoMapProjection smp)
Constructor for Rectangle that accepts xy values & a StereoMapProjection.

Parameters:
x - Array of x values in nautical miles.
y - Array of y values in nautical miles.
vertices - The number of vertices in the polygon.
smp - The stereographic projection point for the xy values.

Rectangle

public Rectangle(TrueBearing heading,
                 Distance width,
                 Position startPosition,
                 Position endPosition)
Parameters:
heading - The orientation of the rectangle.
width - The width of the rectangle.
startPosition - Starting position, that is a midpoint on one end.
endPosition - Opposite end of starting point, also a midpoint.

Rectangle

public Rectangle(TrueBearing heading,
                 Position startPosition,
                 Distance length,
                 Distance width)
Parameters:
heading - The orientation of the rectangle.
startPosition - Starting position, that is a midpoint on one end.
length - The length of the rectangle.
width - The width of the rectangle.
Method Detail

makeRectangle

private void makeRectangle(TrueBearing trueBearing,
                           Distance width,
                           Position startPosition,
                           Position endPosition)
Common-code private function for rectangle.

Parameters:
trueBearing - The orientation of the rectangle.
width - The width of its rectangle.
startPosition - Starting position, that is a midpoint on one end.
endPosition - Opposite end of starting point, also a midpoint.