Skip to content

Commit

Permalink
Say that Intersection.testPolygonPolygon only works for convex polygons
Browse files Browse the repository at this point in the history
  • Loading branch information
httpdigest committed Jul 23, 2021
1 parent 3ca7519 commit b8f531c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/org/joml/Intersectiond.java
Original file line number Diff line number Diff line change
Expand Up @@ -4762,13 +4762,13 @@ private static boolean separatingAxis(Vector2d[] v1s, Vector2d[] v2s, double aX,
}

/**
* Test if the two polygons, given via their vertices, intersect.
* Test if the two convex polygons, given via their vertices, intersect.
*
* @param v1s
* the vertices of the first polygon
* the vertices of the first convex polygon
* @param v2s
* the vertices of the second polygon
* @return <code>true</code> if the polygons intersect; <code>false</code> otherwise
* the vertices of the second convex polygon
* @return <code>true</code> if the convex polygons intersect; <code>false</code> otherwise
*/
public static boolean testPolygonPolygon(Vector2d[] v1s, Vector2d[] v2s) {
/* Try to find a separating axis using the first polygon's edges */
Expand Down
8 changes: 4 additions & 4 deletions src/org/joml/Intersectionf.java
Original file line number Diff line number Diff line change
Expand Up @@ -4762,13 +4762,13 @@ private static boolean separatingAxis(Vector2f[] v1s, Vector2f[] v2s, float aX,
}

/**
* Test if the two polygons, given via their vertices, intersect.
* Test if the two convex polygons, given via their vertices, intersect.
*
* @param v1s
* the vertices of the first polygon
* the vertices of the first convex polygon
* @param v2s
* the vertices of the second polygon
* @return <code>true</code> if the polygons intersect; <code>false</code> otherwise
* the vertices of the second convex polygon
* @return <code>true</code> if the convex polygons intersect; <code>false</code> otherwise
*/
public static boolean testPolygonPolygon(Vector2f[] v1s, Vector2f[] v2s) {
/* Try to find a separating axis using the first polygon's edges */
Expand Down

0 comments on commit b8f531c

Please sign in to comment.