ip.transforms
Class GeometryUtils

java.lang.Object
  extended by ip.transforms.GeometryUtils

public class GeometryUtils
extends java.lang.Object


Constructor Summary
GeometryUtils()
           
 
Method Summary
static int getNextDirection(java.awt.Point startPoint, java.awt.Point endPoint)
          getNextDirection returns an integer ranging from -1 to 8.
static void getNextDirectionTest()
           
static java.awt.Point getNextPointOnLine(java.awt.Point p1, java.awt.Point p2)
          Use Bresenham's algorithm to get the next point on a line.
static Points getNextPoints(java.awt.Point p1, java.awt.Point p2)
          grabs a few points in the general direction
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryUtils

public GeometryUtils()
Method Detail

getNextDirectionTest

public static void getNextDirectionTest()

getNextDirection

public static int getNextDirection(java.awt.Point startPoint,
                                   java.awt.Point endPoint)
getNextDirection returns an integer ranging from -1 to 8. -1 means it does not know the direction Here are the 8 directions 6 7 8 5 1 4 3 2


getNextPoints

public static Points getNextPoints(java.awt.Point p1,
                                   java.awt.Point p2)
grabs a few points in the general direction


getNextPointOnLine

public static java.awt.Point getNextPointOnLine(java.awt.Point p1,
                                                java.awt.Point p2)
Use Bresenham's algorithm to get the next point on a line.