| Modifier and Type | Class and Description |
|---|---|
| public static class | Intersector.
Minimum translation required to separate two polygons. |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static Vector3 | |
| private static final Vector3 | |
| private static final Vector2 | |
| private static final Vector2 | |
| private static final Vector2 | |
| private static final FloatArray | |
| private static final FloatArray | |
| private static final Vector3 | |
| pack-priv static Vector3 | |
| private static final Vector2 | |
| private static final Plane | |
| private static final Vector2 | |
| private static final Vector3 | |
| pack-priv static Vector3 | |
| pack-priv static Vector3 | |
| pack-priv static Vector3 | |
| pack-priv static Vector3 | |
| private static final Vector3 | |
| private static final Vector3 | |
| private static final Vector3 | |
| pack-priv static Vector2 | |
| pack-priv static Vector2 | |
| pack-priv static Vector2 | |
| pack-priv static Vector2 |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static float | |
| pack-priv static double | |
| public static float | distanceLinePoint(float startX, float startY, float endX, float endY, float pointX, float pointY)
Returns the distance between the given line and point. |
| public static float | distanceSegmentPoint(float startX, float startY, float endX, float endY, float pointX, float pointY)
Returns the distance between the given segment and point. |
| public static float | distanceSegmentPoint(Vector2 start, Vector2 end, Vector2 point)
Returns the distance between the given segment and point. |
| public static boolean | Returns: if geometries are intersecting- Axes to be tested axes, Vector3[] - Vertices from geometry A aVertices, Vector3[] - Vertices from geometry B bVertices)Returns whether two geometries (defined as an array of vertices) have at least one point of intersection using SAT (separating axis theorem) |
| public static boolean | Returns: Whether the bounding box and the plane intersect.Quick check whether the given |
| public static boolean | Returns: Whether the bounding box and the plane intersect.The center of the bounding box center, Vector3 Half of the dimensions (width, height and depth) of the bounding box halfDimensions, Vector3 The normal of the plane normal, float The distance of the plane distance)Quick check whether the given bounding box and a plane intersect. |
| public static boolean | Returns: Whether the frustum intersects the bounding boxThe frustum frustum, BoundingBox The bounding box bounds)Returns whether the given |
| public static boolean | Returns: Whether the frustum intersects the oriented bounding boxThe frustum frustum, OrientedBoundingBox The oriented bounding box obb)Returns whether the given |
| public static float | intersectLinePlane(float x, float y, float z, float x2, float y2, float z2, Plane plane, Vector3 intersection)
Intersects a line and a plane. |
| public static boolean | Returns: Whether polygon and line intersectsThe first point of the line p1, Vector2 The second point of the line p2, Polygon polygon)Check whether the given line and |
| public static boolean | Returns: Whether the two lines intersectThe first point of the first line p1, Vector2 The second point of the first line p2, Vector2 The first point of the second line p3, Vector2 The second point of the second line p4, Vector2 The intersection point. May be null. intersection)Intersects the two lines and returns the intersection point in intersection. |
| public static boolean | Returns: Whether the two lines intersectThe intersection point, or null. intersection)Intersects the two lines and returns the intersection point in intersection. |
| public static boolean | |
| public static boolean | intersectPolygonEdges(FloatArray polygon1, FloatArray polygon2)
Returns true if the lines of the specified polygons intersect. |
| public static boolean | Returns: Whether the two polygons intersect.The polygon that is being clipped p1, Polygon The clip polygon p2, Polygon The intersection of the two polygons (can be null, if an intersection polygon is not needed) overlap)Intersects two convex polygons with clockwise vertices and sets the overlap polygon resulting from the intersection. |
| public static boolean | intersectPolygons(FloatArray polygon1, FloatArray polygon2)
Returns true if the specified polygons intersect. |
| public static boolean | Returns: Whether an intersection is present.The intersection point (optional) intersection)Intersects a |
| public static boolean | Returns: Whether the ray and the bounding box intersect.Quick check whether the given |
| public static boolean | Returns: Whether the ray and the bounding box intersect.The center of the bounding box center, Vector3 The dimensions (width, height and depth) of the bounding box dimensions)Quick check whether the given |
| public static boolean | Returns: Whether an intersection is present.The intersection point (optional) intersection)Check whether the given |
| public static boolean | Returns: Whether an intersection is present.The intersection point (optional) intersection)Check whether the given |
| public static boolean | Returns: Whether the ray and the oriented bounding box intersect.Check whether the given |
| public static boolean | Returns: Whether the ray and the oriented bounding box intersect.- the BoundingBox transformation transform)Check whether the given |
| public static boolean | |
| public static float | Returns: scalar parameter on the first ray describing the point where the intersection happens. May be negative. In case the rays are collinear, Float.POSITIVE_INFINITY will be returned.Where the first ray start start1, Vector2 The direction the first ray is pointing direction1, Vector2 Where the second ray start start2, Vector2 The direction the second ray is pointing direction2)Intersect two 2D Rays and return the scalar parameter of the first ray at the intersection point. |
| public static boolean | Returns: Whether an intersection is present.The ray, the direction component must be normalized before calling this method ray, Vector3 The center of the sphere center, float The radius of the sphere radius, Vector3 The intersection point (optional, can be null) intersection)Intersects a |
| public static boolean | Returns: True in case an intersection is present.The first vertex of the triangle t1, Vector3 The second vertex of the triangle t2, Vector3 The third vertex of the triangle t3, Vector3 The intersection point (optional) intersection)Intersect a |
| public static boolean | Returns: Whether the ray and the triangles intersect.The triangles, each successive 9 elements are the 3 vertices of a triangle, a vertex is made of 3
successive floats (XYZ) triangles, Vector3 The nearest intersection point (optional) intersection)Intersects the given ray with list of triangles. |
| public static boolean | Returns: Whether the ray and the triangles intersect.the indices, each successive 3 shorts index the 3 vertices of a triangle indices, int the size of a vertex in floats vertexSize, Vector3 The nearest intersection point (optional) intersection)Intersects the given ray with list of triangles. |
| public static boolean | Returns: Whether the ray and the triangles intersect.The triangles, each successive 3 elements are the 3 vertices of a triangle triangles, Vector3 The nearest intersection point (optional) intersection)Intersects the given ray with list of triangles. |
| public static boolean | Returns: Whether the rectangles intersectDetermines whether the given rectangles intersect and, if they do, sets the supplied |
| public static boolean | Returns: Whether the line segment and the circle intersectThe start point of the line segment start, Vector2 The end point of the line segment end, Vector2 The center of the circle center, float The squared radius of the circle squareRadius)Returns whether the given line segment intersects the given circle. |
| public static boolean | Returns: Whether the line segment and the circle intersectThe start point of the line segment start, Vector2 The end point of the line segment end, Circle The circle circle, Intersector.A Minimum Translation Vector to fill in the case of a collision, or null (optional). mtvReturns whether the given line segment intersects the given circle. |
| public static boolean | |
| public static boolean | Returns: Whether polygon and segment intersectThe first point of the segment p1, Vector2 The second point of the segment p2, Polygon polygon)Check whether the given line segment and |
| public static boolean | Returns: whether the rectangle intersects with the line segmentx-coordinate start of line segment startX, float y-coordinate start of line segment startY, float y-coordinate end of line segment endX, float y-coordinate end of line segment endY, Rectangle rectangle that is being tested for collision rectangle)Determines whether the given rectangle and segment intersect |
| public static boolean | |
| public static boolean | Returns: Whether the two line segments intersectThe first point of the first line segment p1, Vector2 The second point of the first line segment p2, Vector2 The first point of the second line segment p3, Vector2 The second point of the second line segment p4, Vector2 The intersection point. May be null. intersection)Intersects the two line segments and returns the intersection point in intersection. |
| public static boolean | intersectSegments(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, Vector2
May be null. intersection)
|
| public static boolean | Returns: true if the point is in the polygonThe polygon vertices passed as an array polygon, Vector2 point)Checks whether the given point is in the polygon. |
| public static boolean | isPointInPolygon(float[] polygon, int
Starting polygon index. offset, int Number of array indices to use after offset. count, float x, float y)Returns true if the specified point is in the polygon. |
| public static boolean | Returns: whether the point is in the trianglethe first vertex of the triangle t1, Vector3 the second vertex of the triangle t2, Vector3 the third vertex of the triangle t3)Returns whether the given point is inside the triangle. |
| public static boolean | isPointInTriangle(Vector2 p, Vector2 a, Vector2 b, Vector2 c)
Returns true if the given point is inside the triangle. |
| public static boolean | isPointInTriangle(float px, float py, float ax, float ay, float bx, float by, float cx, float cy)
Returns true if the given point is inside the triangle. |
| public static Vector2 | nearestSegmentPoint(Vector2 start, Vector2 end, Vector2 point, Vector2 nearest)
Returns a point on the segment nearest to the specified point. |
| public static Vector2 | nearestSegmentPoint(float startX, float startY, float endX, float endY, float pointX, float pointY, Vector2 nearest)
Returns a point on the segment nearest to the specified point. |
| public static boolean | Returns: Whether polygons overlap.The first polygon. p1, Polygon The second polygon. p2)Check whether specified convex polygons overlap (clockwise or counter-clockwise wound doesn't matter). |
| public static boolean | Returns: Whether polygons overlap.The first polygon. p1, Polygon The second polygon. p2, Intersector.A Minimum Translation Vector to fill in the case of a collision, or null (optional). mtvCheck whether convex polygons overlap (clockwise or counter-clockwise wound doesn't matter). |
| public static boolean | |
| public static boolean | Returns: Whether polygons overlap.Vertices of the first polygon. verts1, int the offset of the verts1 array offset1, int the amount that is added to the offset1 count1, float[] Vertices of the second polygon. verts2, int the offset of the verts2 array offset2, int the amount that is added to the offset2 count2, Intersector.A Minimum Translation Vector to fill in the case of a collision, or null (optional). mtvCheck whether polygons defined by the given vertex arrays overlap (clockwise or counter-clockwise wound doesn't matter). |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| private static boolean | overlapsOnAxisOfShape(float[] verts1, int
offset of verts1 offset1, int count of verts1 count1, float[] verts2, int offset of verts2 offset2, int count of verts2 count2, Intersector.the minimum translation vector mtv,states if shape a and b are shifted. Important for calculating the axis translation for verts1. shapesShifted)Implementation of the separating axis theorem (SAT) algorithm |
| public static int | pointLineSide(Vector2 linePoint1, Vector2 linePoint2, Vector2 point)
Determines on which side of the given line the point is. |
| public static int | pointLineSide(float linePoint1X, float linePoint1Y, float linePoint2X, float linePoint2Y, float pointX, float pointY)
|
| private static void | |
| public static void | splitTriangle(float[] triangle, Plane plane, Intersector.
output SplitTriangle splitSplits the triangle by the plane. |