From a7b41b3d7f972089da468f25931236241c566de7 Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Thu, 9 Apr 2015 13:31:32 -0500 Subject: Font3D: count points in a separate loop This makes the subsequent logic easier to refactor. --- src/javax/media/j3d/Font3D.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/javax/media/j3d/Font3D.java') 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]); -- cgit v1.2.3