org.eclipse.draw2d.geometry
Class Geometry
java.lang.Object
org.eclipse.draw2d.geometry.Geometry
- public class Geometry
- extends Object
A Utilities class for geometry operations.
- Since:
- 3.1
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Geometry
public Geometry()
linesIntersect
public 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. If
one of the two line segments starts or ends on the other line, then they are considered
to be intersecting.
- Parameters:
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
- Returns:
true
if the two line segments formed by the given coordinates
cross- Since:
- 3.1
Copyright (c) IBM Corp. and others 2000, 2005. All Rights Reserved.