From bb5071116384f780ce9f64119358ccacdba03981 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Fri, 23 Nov 2012 23:37:43 -0800 Subject: j3dcore: annotate list of ClipRetained Signed-off-by: Harvey Harrison --- .../media/j3d/RenderingEnvironmentStructure.java | 37 ++++++++++------------ 1 file changed, 16 insertions(+), 21 deletions(-) (limited to 'src/classes/share') diff --git a/src/classes/share/javax/media/j3d/RenderingEnvironmentStructure.java b/src/classes/share/javax/media/j3d/RenderingEnvironmentStructure.java index d29920b..c9cf923 100644 --- a/src/classes/share/javax/media/j3d/RenderingEnvironmentStructure.java +++ b/src/classes/share/javax/media/j3d/RenderingEnvironmentStructure.java @@ -1000,12 +1000,10 @@ int processBgs(ArrayList globalBgs, BoundingSphere bounds, i double[] backClipDistanceInVworld (BoundingSphere bounds, View view) { int j; - int nclips; Bounds closestBounds; boolean backClipActive; double[] backClipDistance; double distance; - ArrayList globalClips; // Need to lock intersectedBounds, since on a multi-processor // system with 2 views on a single universe, there might @@ -1013,17 +1011,16 @@ int processBgs(ArrayList globalBgs, BoundingSphere bounds, i synchronized(lockObj) { backClipDistance = null; backClipActive = false; - nclips = 0; + int nclips = 0; distance = 0.0; if (intersectedBounds.length < numberOfClips) intersectedBounds = new Bounds[numberOfClips]; - if ((globalClips = (ArrayList)viewScopedClips.get(view)) != null) { - nclips = processClips(globalClips, bounds, nclips); - } - nclips = processClips(nonViewScopedClips, bounds, nclips); - + ArrayList globalClips = viewScopedClips.get(view); + if (globalClips != null) + nclips = processClips(globalClips, bounds, nclips); + nclips = processClips(nonViewScopedClips, bounds, nclips); if (nclips == 1) { @@ -1048,22 +1045,20 @@ int processBgs(ArrayList globalBgs, BoundingSphere bounds, i } } - int processClips(ArrayList globalClips, BoundingSphere bounds, int nclips) { - int i; +int processClips(ArrayList globalClips, BoundingSphere bounds, int nclips) { int size = globalClips.size(); - ClipRetained clip; - - for (i=0 ; i