From 99ff4b60e8165b667776b81f049455ca50e15998 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Sun, 27 Jan 2013 09:43:19 -0800 Subject: j3dcore: annotate Maps in TextureBin Signed-off-by: Harvey Harrison --- src/classes/share/javax/media/j3d/RenderBin.java | 5 +++-- src/classes/share/javax/media/j3d/TextureBin.java | 23 +++++++++++------------ 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 43135b9..a156ecf 100644 --- a/src/classes/share/javax/media/j3d/RenderBin.java +++ b/src/classes/share/javax/media/j3d/RenderBin.java @@ -4746,7 +4746,7 @@ private void processOrderedGroupInserted(J3dMessage m) { ArrayList list; TextureUnitStateRetained texUnitState[]; RenderingAttributesRetained renderingAttributes; - HashMap rmap = null, addmap = null; + HashMap addmap = null; if (ra.app == null) { polygonAttributes = null; @@ -4769,6 +4769,7 @@ private void processOrderedGroupInserted(J3dMessage m) { } // Get the renderMoleculelist for this xform + HashMap rmap = null; if (ra.isOpaque()) { rmap = textureBin.opaqueRenderMoleculeMap; addmap = textureBin.addOpaqueRMs; @@ -4777,7 +4778,7 @@ private void processOrderedGroupInserted(J3dMessage m) { rmap = textureBin.transparentRenderMoleculeMap; addmap = textureBin.addTransparentRMs; } - currentBin = (RenderMolecule)rmap.get(ra.geometryAtom.source.localToVworld[0]); + currentBin = rmap.get(ra.geometryAtom.source.localToVworld[0]); while (currentBin != null) { if (currentBin.equals(ra, diff --git a/src/classes/share/javax/media/j3d/TextureBin.java b/src/classes/share/javax/media/j3d/TextureBin.java index 8e0f253..7ab84a2 100644 --- a/src/classes/share/javax/media/j3d/TextureBin.java +++ b/src/classes/share/javax/media/j3d/TextureBin.java @@ -121,10 +121,10 @@ class TextureBin extends Object implements ObjectUpdate { HashMap addTransparentRMs = new HashMap(); - // A hashmap based on localToVworld for fast - // insertion of new renderMolecules - HashMap opaqueRenderMoleculeMap = new HashMap(); - HashMap transparentRenderMoleculeMap = new HashMap(); +// A hashmap based on localToVworld for fast +// insertion of new renderMolecules +HashMap opaqueRenderMoleculeMap = new HashMap(); +HashMap transparentRenderMoleculeMap = new HashMap(); // List of renderMolecules - used in rendering .. RenderMolecule opaqueRMList = null; @@ -829,7 +829,7 @@ class TextureBin extends Object implements ObjectUpdate { * with the same localToVworld and attributes in * findRenderMolecule(). */ - RenderMolecule addAll(HashMap renderMoleculeMap, HashMap addRMs, + RenderMolecule addAll(HashMap renderMoleculeMap, HashMap addRMs, RenderMolecule startList, boolean opaqueList) { int i; @@ -853,8 +853,7 @@ class TextureBin extends Object implements ObjectUpdate { continue; } // Get the list of renderMolecules for this transform - renderMoleculeList = (RenderMolecule)renderMoleculeMap.get( - r.localToVworld); + renderMoleculeList = renderMoleculeMap.get(r.localToVworld); if (renderMoleculeList == null) { renderMoleculeList = r; renderMoleculeMap.put(r.localToVworld, renderMoleculeList); @@ -1010,7 +1009,7 @@ class TextureBin extends Object implements ObjectUpdate { boolean found = false; RenderMolecule renderMoleculeList, rmlist; HashMap addMap; - HashMap allMap; + HashMap allMap; r.textureBin = null; if (r.isOpaqueOrInOG) { @@ -1307,7 +1306,7 @@ class TextureBin extends Object implements ObjectUpdate { void changeLists(RenderMolecule r) { RenderMolecule renderMoleculeList, rmlist = null, head; - HashMap allMap = null; + HashMap allMap = null; ArrayList list; int index; boolean newRM = false; @@ -1357,7 +1356,7 @@ class TextureBin extends Object implements ObjectUpdate { } } } - HashMap renderMoleculeMap; + HashMap renderMoleculeMap; RenderMolecule startList; // Now insert in the other bin @@ -1403,7 +1402,7 @@ class TextureBin extends Object implements ObjectUpdate { } } - renderMoleculeList = (RenderMolecule)renderMoleculeMap.get(r.localToVworld); + renderMoleculeList = renderMoleculeMap.get(r.localToVworld); if (renderMoleculeList == null) { renderMoleculeList = r; @@ -1470,7 +1469,7 @@ class TextureBin extends Object implements ObjectUpdate { } } - RenderMolecule removeOneRM(RenderMolecule r, HashMap allMap, RenderMolecule list) { + RenderMolecule removeOneRM(RenderMolecule r, HashMap allMap, RenderMolecule list) { RenderMolecule rmlist = list; // In the middle, just remove and update if (r.prev != null && r.next != null) { -- cgit v1.2.3