public class Intersector
extends java.lang.Object
Constructor and Description |
---|
Intersector() |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsPolygon(Polygon p1,
Polygon p2) |
static boolean |
intersectLines(com.badlogic.gdx.math.Vector2 p1,
com.badlogic.gdx.math.Vector2 p2,
com.badlogic.gdx.math.Vector2 p3,
com.badlogic.gdx.math.Vector2 p4,
com.badlogic.gdx.math.Vector2 intersection) |
static boolean |
intersectLineSegments(float segAX1,
float segAY1,
float segAX2,
float segAY2,
float segBX1,
float segBY1,
float segBX2,
float segBY2) |
static boolean |
intersects(Rectangle rectangle,
Circle circle) |
static boolean |
intersectSegmentPolygon(com.badlogic.gdx.math.Vector2 p1,
com.badlogic.gdx.math.Vector2 p2,
float[] vertices)
Check whether the given line segment and polygon intersect.
|
public static boolean intersectLines(com.badlogic.gdx.math.Vector2 p1, com.badlogic.gdx.math.Vector2 p2, com.badlogic.gdx.math.Vector2 p3, com.badlogic.gdx.math.Vector2 p4, com.badlogic.gdx.math.Vector2 intersection)
public static boolean intersectLineSegments(float segAX1, float segAY1, float segAX2, float segAY2, float segBX1, float segBY1, float segBX2, float segBY2)
public static boolean intersectSegmentPolygon(com.badlogic.gdx.math.Vector2 p1, com.badlogic.gdx.math.Vector2 p2, float[] vertices)
p1
- The first point of the segmentp2
- The second point of the segmentvertices
- The vertices of the polygon