Skip to content

Commit

Permalink
Fix splitTriangle
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkyenus committed Jul 22, 2015
1 parent 55c5a02 commit 0a009cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gdx/src/com/badlogic/gdx/math/Intersector.java
Expand Up @@ -1056,13 +1056,13 @@ public static void splitTriangle (float[] triangle, Plane plane, SplitTriangle s

// set number of triangles
split.total = 3;
split.numFront = (r1 ? 1 : 0) + (r2 ? 1 : 0) + (r3 ? 1 : 0);
split.numFront = (r1 ? 0 : 1) + (r2 ? 0 : 1) + (r3 ? 0 : 1);
split.numBack = split.total - split.numFront;

// hard case, split the three edges on the plane
// determine which array to fill first, front or back, flip if we
// cross the plane
split.setSide(r1);
split.setSide(!r1);

// split first edge
int first = 0;
Expand Down

0 comments on commit 0a009cf

Please sign in to comment.