computational.geometry
Class Turn

java.lang.Object
  extended by computational.geometry.Turn
All Implemented Interfaces:
java.lang.Cloneable

public class Turn
extends java.lang.Object
implements java.lang.Cloneable


Field Summary
static int COLLINEAR
          Static member representing collinearity between two segments.
static int LEFT
          Static member representing a left turn between two segments.
static int RIGHT
          Static member representing a right turn between two segments.
 
Constructor Summary
Turn(Point p0, Point p1, Point p2)
          Builds a Turn object wrapping information about turn between the three points.
 
Method Summary
 java.lang.Object clone()
           
 java.util.List getPoints()
          Returns a list containing the three points interested in this turn.
 int getType()
          Returns the type of turn between the three points.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COLLINEAR

public static final int COLLINEAR
Static member representing collinearity between two segments.

See Also:
Constant Field Values

LEFT

public static final int LEFT
Static member representing a left turn between two segments.

See Also:
Constant Field Values

RIGHT

public static final int RIGHT
Static member representing a right turn between two segments.

See Also:
Constant Field Values
Constructor Detail

Turn

public Turn(Point p0,
            Point p1,
            Point p2)
Builds a Turn object wrapping information about turn between the three points.

Parameters:
p0 - the first point.
p1 - the second point.
p2 - the third point.
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getPoints

public java.util.List getPoints()
Returns a list containing the three points interested in this turn.

Returns:
a list containing the three points.

getType

public int getType()
Returns the type of turn between the three points.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object