From ff861a3aa4ddf6b729d7a1b5eef4d234b8ee5d56 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Sun, 27 Jan 2013 14:03:18 -0800 Subject: j3dcore: annotate list of RenderAtoms in RenderBin Signed-off-by: Harvey Harrison --- src/classes/share/javax/media/j3d/RenderBin.java | 26 +++++++++++----------- .../share/javax/media/j3d/RenderMolecule.java | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/classes/share/javax/media/j3d/RenderBin.java b/src/classes/share/javax/media/j3d/RenderBin.java index 7a97a69..b55343e 100644 --- a/src/classes/share/javax/media/j3d/RenderBin.java +++ b/src/classes/share/javax/media/j3d/RenderBin.java @@ -313,14 +313,14 @@ ArrayList textureBinList = new ArrayList(5); */ ArrayList dirtyReferenceGeomList = new ArrayList(5); - // list of all Oriented RenderAtoms - ArrayList orientedRAs = new ArrayList(5); +// list of all Oriented RenderAtoms +ArrayList orientedRAs = new ArrayList(5); - // list of Oriented RenderAtoms whose orientedTransforms require update - ArrayList dirtyOrientedRAs = new ArrayList(5); +// list of Oriented RenderAtoms whose orientedTransforms require update +ArrayList dirtyOrientedRAs = new ArrayList(5); - // Cached copy of dirty oriented RAs to be updated in MasterControl - ArrayList cachedDirtyOrientedRAs = null; +// Cached copy of dirty oriented RAs to be updated in MasterControl +ArrayList cachedDirtyOrientedRAs = null; // list of offScreen message that ArrayList offScreenMessage = new ArrayList(5); @@ -799,7 +799,7 @@ ArrayList removeDlistPerRinfo = new ArrayList 0) { // Keep a copy to be handled by mastercontrol - cachedDirtyOrientedRAs = (ArrayList)dirtyOrientedRAs.clone(); + cachedDirtyOrientedRAs = new ArrayList(dirtyOrientedRAs); } boolean sortAll = false; if (reEvaluateSortMode && transpSortMode != cachedTranspSortMode) { @@ -5756,7 +5756,7 @@ void reEvaluateEnv(ArrayList mLts, ArrayList fogs, // clear the dirtyMask for(i=0; i mLts, ArrayList fogs, // Mark Oriented shape as dirty, since multiple ra could point // to the same OrientShape3D, compute the xform only once for(i=0; i mLts, ArrayList fogs, // Mark Oriented shape as dirty, since multiple ra could point // to the same OrientShape3D, compute the xform only once for(i=0; i mLts, ArrayList fogs, ra.setRenderBin(false); ra.renderMolecule.removeRenderAtom(ra); if (ra.inDirtyOrientedRAs()) { - dirtyOrientedRAs.remove(dirtyOrientedRAs.indexOf(ra)); + dirtyOrientedRAs.remove(ra); ra.dirtyMask &= ~RenderAtom.IN_DIRTY_ORIENTED_RAs; } if (ra.inDepthSortList()) { diff --git a/src/classes/share/javax/media/j3d/RenderMolecule.java b/src/classes/share/javax/media/j3d/RenderMolecule.java index 81a2456..070b97a 100644 --- a/src/classes/share/javax/media/j3d/RenderMolecule.java +++ b/src/classes/share/javax/media/j3d/RenderMolecule.java @@ -1137,7 +1137,7 @@ class RenderMolecule extends IndexedObject implements ObjectUpdate, NodeComponen r.nextRemove = null; r.prevRemove = null; if (r.isOriented()) { - renderBin.orientedRAs.remove(renderBin.orientedRAs.indexOf(r)); + renderBin.orientedRAs.remove(r); } if ((textureBin.environmentSet.lightBin.geometryBackground == null) && -- cgit v1.2.3