|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tigris.gef.base.Geometry
A library of functions that do geometric opeations. These are all static methods, so you never need to make an instance of this class. Needs-More-Work: many of these are not done yet or not used yet.
Constructor Summary | |
Geometry()
|
Method Summary | |
static int |
counterClockWise(int x1,
int y1,
int x2,
int y2,
int x,
int y)
Reply true if the given point is counter-clockwise from the vector defined by the position of the given line. |
static boolean |
intersects(java.awt.Rectangle r,
int x1,
int y1,
int x2,
int y2)
Reply true if the given Rectangle intersects the given line segment. |
static boolean |
nearPolySegment(int[] xs,
int[] ys,
int n,
int x,
int y,
int grip)
Reply true iff the given point is within grip pixels of one of the segments of the given polygon. |
static boolean |
nearSegment(int x1,
int y1,
int x2,
int y2,
int x,
int y,
int grip)
Reply true if the given point is within grip pixels of the given segment. |
static java.awt.Point |
ptClosestTo(int[] xs,
int[] ys,
int n,
java.awt.Point p)
Given a polygon and a point, return a new point on the perimiter of the polygon that is closest to to the given point. |
static void |
ptClosestTo(int[] xs,
int[] ys,
int n,
java.awt.Point p,
java.awt.Point res)
Given a polygon and a point, set res to be the point on the perimiter of the polygon that is closest to to the given point. |
static java.awt.Point |
ptClosestTo(int x1,
int y1,
int x2,
int y2,
java.awt.Point p)
Given the coordinates of the endpoints of a line segment, and a point, return a new point that is the closest point on the segement to the given point. |
static void |
ptClosestTo(int x1,
int y1,
int x2,
int y2,
java.awt.Point p,
java.awt.Point res)
Given the coordinates of the endpoints of a line segment, and a point, set res to be the closest point on the segement to the given point. |
static java.awt.Point |
ptClosestTo(java.awt.Point p1,
java.awt.Point p2,
java.awt.Point p)
Given the endpoints of a line segment, and a point, return a new point that is the closest point on the segement to the given point. |
static java.awt.Point |
ptClosestTo(java.awt.Rectangle r,
java.awt.Point p)
Given a Rectangle and a point, return a new Point on or in the Rectangle that is closest to the given Point. |
static void |
ptClosestTo(java.awt.Rectangle r,
java.awt.Point p,
java.awt.Point res)
Given a Rectangle and a point, set res to be the point on or in the Rectangle that is closest to the given point. |
static double |
segmentAngle(java.awt.Point p1,
java.awt.Point p2)
Return the angle of the given line segment. |
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 void ptClosestTo(java.awt.Rectangle r, java.awt.Point p, java.awt.Point res)
public static java.awt.Point ptClosestTo(java.awt.Rectangle r, java.awt.Point p)
public static double segmentAngle(java.awt.Point p1, java.awt.Point p2)
public static void ptClosestTo(int x1, int y1, int x2, int y2, java.awt.Point p, java.awt.Point res)
public static java.awt.Point ptClosestTo(int x1, int y1, int x2, int y2, java.awt.Point p)
public static java.awt.Point ptClosestTo(java.awt.Point p1, java.awt.Point p2, java.awt.Point p)
public static void ptClosestTo(int[] xs, int[] ys, int n, java.awt.Point p, java.awt.Point res)
public static java.awt.Point ptClosestTo(int[] xs, int[] ys, int n, java.awt.Point p)
public static boolean nearPolySegment(int[] xs, int[] ys, int n, int x, int y, int grip)
public static boolean nearSegment(int x1, int y1, int x2, int y2, int x, int y, int grip)
public static boolean intersects(java.awt.Rectangle r, int x1, int y1, int x2, int y2)
public static int counterClockWise(int x1, int y1, int x2, int y2, int x, int y)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |