diff options
author | Curtis Rueden <[email protected]> | 2015-04-09 13:31:32 -0500 |
---|---|---|
committer | Curtis Rueden <[email protected]> | 2015-10-06 07:00:11 -0500 |
commit | a7b41b3d7f972089da468f25931236241c566de7 (patch) | |
tree | 217093e03922bfc8fa52468af7838a9a0f790c20 | |
parent | 7a2e20caac9db6f789a7b3fab344b9758af45335 (diff) |
Font3D: count points in a separate loop
This makes the subsequent logic easier to refactor.
-rw-r--r-- | src/javax/media/j3d/Font3D.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/javax/media/j3d/Font3D.java b/src/javax/media/j3d/Font3D.java index 7dc3a44..e99a661 100644 --- a/src/javax/media/j3d/Font3D.java +++ b/src/javax/media/j3d/Font3D.java @@ -466,12 +466,14 @@ private static class IntVector { Point3f q1 = new Point3f(), q2 = new Point3f(), q3 = new Point3f(); Vector3f n1 = new Vector3f(), n2 = new Vector3f(); numPoints = 0; + for (i = 0; i < islandCounts.length; i++) { + numPoints += outVerts[i].length; + } //Now loop thru each island, calling triangulator once per island. //Combine triangle data for all islands together in one object. NormalGenerator ng = new NormalGenerator(); for (i = 0; i < islandCounts.length; i++) { contourCounts[0] = islandCounts[i].length; - numPoints += outVerts[i].length; GeometryInfo gi = new GeometryInfo(GeometryInfo.POLYGON_ARRAY); gi.setCoordinates(outVerts[i]); gi.setStripCounts(islandCounts[i]); |