ip.transforms
Class GeometryUtils
java.lang.Object
ip.transforms.GeometryUtils
public class GeometryUtils
- extends java.lang.Object
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 |
GeometryUtils
public GeometryUtils()
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.