uavsim.datatypes
Class Line

java.lang.Object
  extended by uavsim.datatypes.Line

public class Line
extends java.lang.Object

Defines a line as start and end coordinates in arbitrary units.

Author:
Dan Tappan [23.06.11]

Field Summary
private  CoordinateCartesianAbsolute _end
          the end
private  CoordinateCartesianAbsolute _start
          the start
 
Constructor Summary
Line(CoordinateCartesianAbsolute start, CoordinateCartesianAbsolute end)
          Creates a line descriptor.
 
Method Summary
 CoordinateCartesianAbsolute calculateDistanceVector()
          Calculates the length vector components.
 double calculateLength()
          Calculates the length.
 CoordinateCartesianAbsolute calculateMidpoint()
          Calculates the midpoint.
 CoordinateCartesianAbsolute getEnd()
          Gets the end.
 CoordinateCartesianAbsolute getStart()
          Gets the start.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_end

private final CoordinateCartesianAbsolute _end
the end


_start

private final CoordinateCartesianAbsolute _start
the start

Constructor Detail

Line

public Line(CoordinateCartesianAbsolute start,
            CoordinateCartesianAbsolute end)
Creates a line descriptor.

Parameters:
start - - the start coordinate
end - - the end coordinate
Method Detail

calculateDistanceVector

public CoordinateCartesianAbsolute calculateDistanceVector()
Calculates the length vector components.

Returns:
the distance

calculateLength

public double calculateLength()
Calculates the length.

Returns:
the distance

calculateMidpoint

public CoordinateCartesianAbsolute calculateMidpoint()
Calculates the midpoint.

Returns:
the midpoint

getEnd

public CoordinateCartesianAbsolute getEnd()
Gets the end.

Returns:
the coordinate

getStart

public CoordinateCartesianAbsolute getStart()
Gets the start.

Returns:
the coordinate

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object