|
Eclipse Draw2d 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.draw2d.geometry.Geometry
public class Geometry
A Utilities class for geometry operations.
Constructor Summary | |
---|---|
Geometry()
|
Method Summary | |
---|---|
static boolean |
linesIntersect(int ux,
int uy,
int vx,
int vy,
int sx,
int sy,
int tx,
int ty)
Determines whether the two line segments formed by the given coordinates intersect. |
static boolean |
polygonContainsPoint(PointList points,
int x,
int y)
One simple way of finding whether the point is inside or outside a simple polygon is to test how many times a ray starting from the point intersects the edges of the polygon. |
static boolean |
polylineContainsPoint(PointList points,
int x,
int y,
int tolerance)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Geometry()
Method Detail |
---|
public static boolean linesIntersect(int ux, int uy, int vx, int vy, int sx, int sy, int tx, int ty)
ux
- x coordinate of starting point of line 1uy
- y coordinate of starting point of line 1vx
- x coordinate of ending point of line 1vy
- y coordinate of endpoing point of line 1sx
- x coordinate of the starting point of line 2sy
- y coordinate of the starting point of line 2tx
- x coordinate of the ending point of line 2ty
- y coordinate of the ending point of line 2
true
if the two line segments formed by the given coordinates
crosspublic static boolean polylineContainsPoint(PointList points, int x, int y, int tolerance)
PointList.polylineContainsPoint(int, int, int)
public static boolean polygonContainsPoint(PointList points, int x, int y)
PointList.polygonContainsPoint(int, int)
|
Eclipse Draw2d 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |