|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pzgui.math.IntersectionFinder
public class IntersectionFinder
Algorithms for finding the intersection points of lines and other shapes.
| Constructor Summary | |
|---|---|
IntersectionFinder()
|
|
| Method Summary | |
|---|---|
static Vector2i |
intersect(Vector2i p1,
Vector2i p2,
int width,
int height)
Returns the first intersection point of a ray cast from point p to the edge of a box. |
static Vector2f |
intersectBox(Line l,
int x,
int y,
int w,
int h)
Returns an intersection point of l and the specified box or null if they do not intersection |
static Vector2f |
intersectBox(Line l,
Node n)
Returns an intersection point of l and the area of the specified Icon or null if they do not intersection |
static Vector2f |
intersectLine(Line l1,
Line l2)
Returns the insersection point of l1 and l2, or null if they do not intersect |
static Vector2f |
intersectLineHelper(Line l1,
Line l2)
Returns the insersection point of infinite lines l1 and l2, or null if they are parallel |
static boolean |
isWithin(Vector2f i,
Line l)
returns true if i is within the bounds of l |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IntersectionFinder()
| Method Detail |
|---|
public static Vector2f intersectLineHelper(Line l1,
Line l2)
public static boolean isWithin(Vector2f i,
Line l)
public static Vector2f intersectLine(Line l1,
Line l2)
public static Vector2f intersectBox(Line l,
int x,
int y,
int w,
int h)
public static Vector2f intersectBox(Line l,
Node n)
public static Vector2i intersect(Vector2i p1,
Vector2i p2,
int width,
int height)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||