|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunlekker.geom.Intersect
public class Intersect
Geometry utilities. Intersections, collisions etc.
Field Summary | |
---|---|
static float |
intersectX
The point of intersection, if any. |
static float |
intersectY
The point of intersection, if any. |
static boolean |
isIntersecting
Indicates the result of the last intersection check. |
Constructor Summary | |
---|---|
Intersect()
|
Method Summary | |
---|---|
static boolean |
insidePolygon(float x,
float y,
float[] poly)
Calculates whether a point is inside a 2D polygon. |
static boolean |
intersect(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4)
Calculates the intersection between two lines. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static float intersectX
public static float intersectY
public static boolean isIntersecting
Constructor Detail |
---|
public Intersect()
Method Detail |
---|
public static boolean intersect(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
public static boolean insidePolygon(float x, float y, float[] poly)
x,y
- The point to check.poly
- Array containing the pairs of X,Y coordinates that define the polygon. Must be in the correct order.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |