Eclipse Draw2d
3.1

org.eclipse.draw2d.geometry
Class Geometry

java.lang.Object
  extended byorg.eclipse.draw2d.geometry.Geometry

public class Geometry
extends Object

A Utilities class for geometry operations.

Since:
3.1

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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Geometry

public Geometry()
Method Detail

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 1
uy - y coordinate of starting point of line 1
vx - x coordinate of ending point of line 1
vy - y coordinate of endpoing point of line 1
sx - x coordinate of the starting point of line 2
sy - y coordinate of the starting point of line 2
tx - x coordinate of the ending point of line 2
ty - 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

Eclipse Draw2d
3.1

Copyright (c) IBM Corp. and others 2000, 2005. All Rights Reserved.