From 150daa7d3e596b6905014234e186604e2dfd1ed8 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Sun, 8 Jan 2012 14:47:08 -0800 Subject: j3dcore: annotate lists of OrderedBins and a RenderAtonListInfo collection Signed-off-by: Harvey Harrison --- .../share/javax/media/j3d/OrderedCollection.java | 4 +- src/classes/share/javax/media/j3d/RenderBin.java | 48 +++++++++++----------- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/src/classes/share/javax/media/j3d/OrderedCollection.java b/src/classes/share/javax/media/j3d/OrderedCollection.java index 502d12e..b6df71b 100644 --- a/src/classes/share/javax/media/j3d/OrderedCollection.java +++ b/src/classes/share/javax/media/j3d/OrderedCollection.java @@ -42,8 +42,8 @@ class OrderedCollection extends Object implements ObjectUpdate{ LightBin lightBin = null; - // a list of top level orderedBins under this orderedCollection - ArrayList childOrderedBins = new ArrayList(); +// a list of top level orderedBins under this orderedCollection +ArrayList childOrderedBins = new ArrayList(); // LightBin used for next frame LightBin nextFrameLightBin = null; diff --git a/src/classes/share/javax/media/j3d/RenderBin.java b/src/classes/share/javax/media/j3d/RenderBin.java index 4cc2bfc..5f72730 100644 --- a/src/classes/share/javax/media/j3d/RenderBin.java +++ b/src/classes/share/javax/media/j3d/RenderBin.java @@ -189,11 +189,11 @@ ArrayList positionDirtyList = new ArrayList(5); private Comparator transparencySortComparator = null; - private ArrayList toBeAddedTextureResourceFreeList = new ArrayList(5); +private ArrayList toBeAddedTextureResourceFreeList = new ArrayList(5); private ArrayList displayListResourceFreeList = new ArrayList(5); - // a list of top level OrderedGroups - ArrayList orderedBins = new ArrayList(5); +// a list of top level OrderedGroups +ArrayList orderedBins = new ArrayList(5); // List of changed elements in the environment that needs to // be reloaded @@ -224,10 +224,10 @@ private ArrayList displayListResourceFreeList = new ArrayList( new IndexedUnorderSet(RenderMolecule.class, RenderMolecule.RENDER_MOLECULE_LIST, null); - // List of renderAtoms that have a shared dlist (due to geo.refCount > 1) - // Fix for Issue 5: change this to a Set rather than a list to - // avoid duplicates entried - Collection sharedDList = new HashSet(); +// List of renderAtoms that have a shared dlist (due to geo.refCount > 1) +// Fix for Issue 5: change this to a Set rather than a list to +// avoid duplicates entried +Collection sharedDList = new HashSet(); ArrayList dirtyRenderMoleculeList = new ArrayList(5); @@ -282,7 +282,7 @@ ArrayList obList = new ArrayList(5); // background geometry processing LightBin bgOpaqueBin = null; LightBin bgAddOpaqueBin = null; - ArrayList bgOrderedBins = new ArrayList(5); +ArrayList bgOrderedBins = new ArrayList(5); TransparentRenderingInfo bgTransparentInfo; @@ -1225,7 +1225,7 @@ ArrayList removeDlistPerRinfo = new ArrayList= rdr.textureIDResourceTable.size()) || (id <= 0) || @@ -1310,7 +1310,7 @@ ArrayList removeDlistPerRinfo = new ArrayList= cv.textureIDResourceTable.size()) || (id <= 0) || @@ -3267,7 +3267,7 @@ System.err.println("......tb.soleUser= " + RenderAtomListInfo ra; GeometryArrayRetained geo; RenderAtomListInfo arr[] = new RenderAtomListInfo[size]; - arr = (RenderAtomListInfo []) sharedDList.toArray(arr); + arr = sharedDList.toArray(arr); int bitMask = cv.canvasBit; // We need two passes to avoid extra buildDisplayList @@ -3316,7 +3316,7 @@ System.err.println("......tb.soleUser= " + size = sharedDList.size(); if (size > 0) { RenderAtomListInfo arr[] = new RenderAtomListInfo[size]; - arr = (RenderAtomListInfo []) sharedDList.toArray(arr); + arr = sharedDList.toArray(arr); RenderAtomListInfo ra; if (!setCtx) { @@ -4467,7 +4467,7 @@ System.err.println("......tb.soleUser= " + OrderedGroupRetained og; OrderedCollection oc = null; ArrayList ocs; - ArrayList parentChildOrderedBins; + ArrayList parentChildOrderedBins; OrderedBin parentOrderedBin; int parentOrderedChildId; OrderedBin ob; @@ -5187,15 +5187,13 @@ System.err.println("......tb.soleUser= " + renderOrderedBins(cv, orderedBins, false); } - void renderOrderedBins(Canvas3D cv, ArrayList bins, boolean doInfinite) { - int sz = bins.size(); +void renderOrderedBins(Canvas3D cv, ArrayList bins, boolean doInfinite) { + int sz = bins.size(); - for (int i=0; i