From 8bf4623d2a7c104dd2d24d852ad722d68a124d74 Mon Sep 17 00:00:00 2001 From: Kevin Rushforth Date: Thu, 12 Apr 2007 17:34:07 +0000 Subject: As part of the work for issue 293 (better error logging), I changed all occurrences of System.out.* to System.err.* Many of these should eventually be changed to use the logging system git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@817 ba19aa83-45c5-6ac9-afd3-db810772062c --- src/classes/share/javax/media/j3d/Alpha.java | 2 +- .../share/javax/media/j3d/AppearanceRetained.java | 8 +- .../share/javax/media/j3d/AttributeBin.java | 4 +- .../javax/media/j3d/AuralAttributesRetained.java | 2 +- .../share/javax/media/j3d/BHInsertStructure.java | 6 +- .../share/javax/media/j3d/BHInternalNode.java | 4 +- src/classes/share/javax/media/j3d/BHLeafNode.java | 2 +- src/classes/share/javax/media/j3d/BHNode.java | 12 +- src/classes/share/javax/media/j3d/BHTree.java | 68 +++--- .../share/javax/media/j3d/BackgroundRetained.java | 2 +- src/classes/share/javax/media/j3d/BoundingBox.java | 102 ++++----- .../share/javax/media/j3d/BoundingPolytope.java | 18 +- .../share/javax/media/j3d/BoundingSphere.java | 30 +-- src/classes/share/javax/media/j3d/Bounds.java | 66 +++--- .../share/javax/media/j3d/BranchGroupRetained.java | 2 +- .../share/javax/media/j3d/CachedFrustum.java | 2 +- .../share/javax/media/j3d/CachedTargets.java | 4 +- .../share/javax/media/j3d/CanvasViewCache.java | 240 ++++++++++----------- .../javax/media/j3d/CanvasViewEventCatcher.java | 6 +- .../javax/media/j3d/CgShaderProgramRetained.java | 2 +- .../media/j3d/ColoringAttributesRetained.java | 2 +- .../share/javax/media/j3d/CompileState.java | 42 ++-- .../share/javax/media/j3d/EventCatcher.java | 48 ++--- .../share/javax/media/j3d/FontExtrusion.java | 6 +- .../share/javax/media/j3d/FreeListManager.java | 4 +- .../javax/media/j3d/GLSLShaderProgramRetained.java | 2 +- .../share/javax/media/j3d/GeneralizedStrip.java | 70 +++--- .../javax/media/j3d/GeometryArrayRetained.java | 224 +++++++++---------- .../share/javax/media/j3d/GeometryAtom.java | 4 +- .../javax/media/j3d/GeometryDecompressor.java | 98 ++++----- .../media/j3d/GeometryDecompressorRetained.java | 58 ++--- .../media/j3d/GeometryDecompressorShape3D.java | 68 +++--- .../media/j3d/GeometryStripArrayRetained.java | 14 +- .../share/javax/media/j3d/GeometryStructure.java | 14 +- .../share/javax/media/j3d/GraphicsContext3D.java | 2 +- .../share/javax/media/j3d/GroupRetained.java | 10 +- .../media/j3d/IndexedGeometryArrayRetained.java | 6 +- .../share/javax/media/j3d/IndexedUnorderSet.java | 8 +- src/classes/share/javax/media/j3d/J3dDebug.java | 22 +- src/classes/share/javax/media/j3d/J3dMessage.java | 2 +- .../share/javax/media/j3d/LightRetained.java | 6 +- .../javax/media/j3d/LineAttributesRetained.java | 2 +- src/classes/share/javax/media/j3d/MRSWLock.java | 2 +- .../share/javax/media/j3d/MemoryFreeList.java | 32 +-- .../share/javax/media/j3d/MorphRetained.java | 8 +- .../share/javax/media/j3d/NnuIdManager.java | 2 +- .../share/javax/media/j3d/NodeRetained.java | 2 +- .../javax/media/j3d/OrderedGroupRetained.java | 12 +- src/classes/share/javax/media/j3d/OrderedPath.java | 6 +- src/classes/share/javax/media/j3d/PickConeRay.java | 6 +- .../share/javax/media/j3d/PickConeSegment.java | 6 +- .../share/javax/media/j3d/PickCylinderRay.java | 8 +- .../share/javax/media/j3d/PickCylinderSegment.java | 4 +- src/classes/share/javax/media/j3d/PickInfo.java | 22 +- .../javax/media/j3d/PointAttributesRetained.java | 2 +- .../javax/media/j3d/PolygonAttributesRetained.java | 2 +- src/classes/share/javax/media/j3d/RenderBin.java | 228 ++++++++++---------- .../share/javax/media/j3d/RenderMolecule.java | 46 ++-- .../media/j3d/RenderingAttributesRetained.java | 6 +- .../media/j3d/RenderingAttributesStructure.java | 6 +- .../media/j3d/RenderingEnvironmentStructure.java | 26 +-- .../javax/media/j3d/SceneGraphObjectRetained.java | 6 +- .../share/javax/media/j3d/SceneGraphPath.java | 2 +- src/classes/share/javax/media/j3d/Screen3D.java | 4 +- .../share/javax/media/j3d/ScreenViewCache.java | 2 +- .../javax/media/j3d/ShaderAppearanceRetained.java | 20 +- .../media/j3d/ShaderAttributeArrayRetained.java | 2 +- .../media/j3d/ShaderAttributeObjectRetained.java | 8 +- .../share/javax/media/j3d/ShaderAttributeSet.java | 2 +- .../media/j3d/ShaderAttributeSetRetained.java | 24 +-- .../media/j3d/ShaderAttributeValueRetained.java | 2 +- src/classes/share/javax/media/j3d/ShaderBin.java | 10 +- .../javax/media/j3d/Shape3DCompileRetained.java | 4 +- .../share/javax/media/j3d/Shape3DRetained.java | 26 +-- .../share/javax/media/j3d/SharedGroupRetained.java | 28 +-- .../share/javax/media/j3d/SoundRenderer.java | 28 +-- .../share/javax/media/j3d/SoundRetained.java | 4 +- .../share/javax/media/j3d/SoundScheduler.java | 2 +- .../share/javax/media/j3d/SoundSchedulerAtom.java | 2 +- .../share/javax/media/j3d/SoundStructure.java | 6 +- .../share/javax/media/j3d/SourceCodeShader.java | 2 +- .../javax/media/j3d/SourceCodeShaderRetained.java | 4 +- .../share/javax/media/j3d/SwitchRetained.java | 24 +-- src/classes/share/javax/media/j3d/SwitchState.java | 2 +- src/classes/share/javax/media/j3d/Targets.java | 10 +- .../media/j3d/TexCoordGenerationRetained.java | 2 +- .../share/javax/media/j3d/Text3DRetained.java | 2 +- .../share/javax/media/j3d/Texture3DRetained.java | 2 +- .../javax/media/j3d/TextureAttributesRetained.java | 8 +- src/classes/share/javax/media/j3d/TextureBin.java | 10 +- .../share/javax/media/j3d/TextureRetained.java | 22 +- .../javax/media/j3d/TextureUnitStateRetained.java | 6 +- src/classes/share/javax/media/j3d/Transform3D.java | 33 +-- .../javax/media/j3d/TransformGroupRetained.java | 44 ++-- .../media/j3d/TransparencyAttributesRetained.java | 2 +- .../share/javax/media/j3d/UpdateTargets.java | 4 +- src/classes/share/javax/media/j3d/View.java | 6 +- src/classes/share/javax/media/j3d/ViewCache.java | 8 +- .../javax/media/j3d/ViewPlatformRetained.java | 8 +- .../javax/media/j3d/ViewSpecificGroupRetained.java | 32 +-- .../share/javax/media/j3d/WakeupIndexedList.java | 12 +- 101 files changed, 1073 insertions(+), 1072 deletions(-) (limited to 'src') diff --git a/src/classes/share/javax/media/j3d/Alpha.java b/src/classes/share/javax/media/j3d/Alpha.java index d1d0348..8c4612e 100644 --- a/src/classes/share/javax/media/j3d/Alpha.java +++ b/src/classes/share/javax/media/j3d/Alpha.java @@ -441,7 +441,7 @@ public class Alpha extends NodeComponent { = (float)(atTime - startTime) * .001f; // startTime is in millisec float alpha, a1, a2, dt, alphaRampDuration; - // System.out.println("alpha mode: " + mode); + // System.err.println("alpha mode: " + mode); // If non-looping and before start // if ((loopCount != -1) && diff --git a/src/classes/share/javax/media/j3d/AppearanceRetained.java b/src/classes/share/javax/media/j3d/AppearanceRetained.java index 8120dc0..0ad9e24 100644 --- a/src/classes/share/javax/media/j3d/AppearanceRetained.java +++ b/src/classes/share/javax/media/j3d/AppearanceRetained.java @@ -874,7 +874,7 @@ class AppearanceRetained extends NodeComponentRetained { } void setLive(boolean backgroundGroup, int refCount) { - // System.out.println("AppearceRetained.setLive()"); + // System.err.println("AppearceRetained.setLive()"); doSetLive(backgroundGroup, refCount); markAsLive(); } @@ -884,7 +884,7 @@ class AppearanceRetained extends NodeComponentRetained { * objects. */ void doSetLive(boolean backgroundGroup, int refCount) { - // System.out.println("AppearceRetained.doSetLive()"); + // System.err.println("AppearceRetained.doSetLive()"); if (material != null) { @@ -1256,7 +1256,7 @@ class AppearanceRetained extends NodeComponentRetained { VirtualUniverse.mc.processMessage(createMessage); - // System.out.println("univList.size is " + univList.size()); + // System.err.println("univList.size is " + univList.size()); for(int i=0; i " + upper); + System.err.println("BoundingBox.intersect(p,d,p) called\n"); + System.err.println("bounds = " + lower + " -> " + upper); */ if( boundsIsEmpty ) { @@ -813,8 +813,8 @@ public class BoundingBox extends Bounds { dirz = direction.z*invMag; /* - System.out.println("dir = " + dirx + ", " + diry + ", " + dirz); - System.out.println("origin = " + origin); + System.err.println("dir = " + dirx + ", " + diry + ", " + dirz); + System.err.println("origin = " + origin); */ // initialize tnear and tfar to handle dir.? == 0 cases @@ -822,9 +822,9 @@ public class BoundingBox extends Bounds { tfar = Double.MAX_VALUE; if(dirx == 0.0) { - //System.out.println("dirx == 0.0"); + //System.err.println("dirx == 0.0"); if (origin.x < lower.x || origin.x > upper.x ) { - //System.out.println( "parallel to x plane and outside"); + //System.err.println( "parallel to x plane and outside"); return false; } } else { @@ -832,7 +832,7 @@ public class BoundingBox extends Bounds { t1 = (lower.x-origin.x)*invDir; t2 = (upper.x-origin.x)*invDir; - //System.out.println("x t1 = " + t1 + " t2 = " + t2); + //System.err.println("x t1 = " + t1 + " t2 = " + t2); if( t1 > t2) { tnear = t2; tfar = t1; @@ -841,21 +841,21 @@ public class BoundingBox extends Bounds { tfar = t2; } if( tfar < 0.0 ) { - //System.out.println( "x failed: tnear="+tnear+" tfar="+tfar); + //System.err.println( "x failed: tnear="+tnear+" tfar="+tfar); return false; } - //System.out.println("x tnear = " + tnear + " tfar = " + tfar); + //System.err.println("x tnear = " + tnear + " tfar = " + tfar); } // y if (diry == 0.0) { - //System.out.println("diry == 0.0"); + //System.err.println("diry == 0.0"); if( origin.y < lower.y || origin.y > upper.y ){ - //System.out.println( "parallel to y plane and outside"); + //System.err.println( "parallel to y plane and outside"); return false; } } else { invDir = 1.0/diry; - //System.out.println("invDir = " + invDir); + //System.err.println("invDir = " + invDir); t1 = (lower.y-origin.y)*invDir; t2 = (upper.y-origin.y)*invDir; @@ -864,22 +864,22 @@ public class BoundingBox extends Bounds { t1 = t2; t2 = tmp; } - //System.out.println("y t1 = " + t1 + " t2 = " + t2); + //System.err.println("y t1 = " + t1 + " t2 = " + t2); if( t1 > tnear) tnear = t1; if( t2 < tfar ) tfar = t2; if( (tfar < 0.0) || (tnear > tfar)){ - //System.out.println( "y failed: tnear="+tnear+" tfar="+tfar); + //System.err.println( "y failed: tnear="+tnear+" tfar="+tfar); return false; } - //System.out.println("y tnear = " + tnear + " tfar = " + tfar); + //System.err.println("y tnear = " + tnear + " tfar = " + tfar); } // z if (dirz == 0.0) { - //System.out.println("dirz == 0.0"); + //System.err.println("dirz == 0.0"); if( origin.z < lower.z || origin.z > upper.z ) { - //System.out.println( "parallel to z plane and outside"); + //System.err.println( "parallel to z plane and outside"); return false; } } else { @@ -892,15 +892,15 @@ public class BoundingBox extends Bounds { t1 = t2; t2 = tmp; } - //System.out.println("z t1 = " + t1 + " t2 = " + t2); + //System.err.println("z t1 = " + t1 + " t2 = " + t2); if( t1 > tnear) tnear = t1; if( t2 < tfar ) tfar = t2; if( (tfar < 0.0) || (tnear > tfar)){ - //System.out.println( "z failed: tnear="+tnear+" tfar="+tfar); + //System.err.println( "z failed: tnear="+tnear+" tfar="+tfar); return false; } - //System.out.println("z tnear = " + tnear + " tfar = " + tfar); + //System.err.println("z tnear = " + tnear + " tfar = " + tfar); } if((tnear < 0.0) && (tfar >= 0.0)) { @@ -989,17 +989,17 @@ public class BoundingBox extends Bounds { return intersect(start, position); dirLen = Math.sqrt(dirLen); - // System.out.println("dirLen is " + dirLen); + // System.err.println("dirLen is " + dirLen); invMag = 1.0/dirLen; dirx = dirx*invMag; diry = diry*invMag; dirz = dirz*invMag; /* - System.out.println("dir = " + dir); - System.out.println("start = " + start); - System.out.println("lower = " + lower); - System.out.println("upper = " + upper); + System.err.println("dir = " + dir); + System.err.println("start = " + start); + System.err.println("lower = " + lower); + System.err.println("upper = " + upper); */ // initialize tnear and tfar to handle dir.? == 0 cases @@ -1007,9 +1007,9 @@ public class BoundingBox extends Bounds { tfar = Double.MAX_VALUE; if(dirx == 0.0) { - //System.out.println("dirx == 0.0"); + //System.err.println("dirx == 0.0"); if (start.x < lower.x || start.x > upper.x ) { - //System.out.println( "parallel to x plane and outside"); + //System.err.println( "parallel to x plane and outside"); return false; } } else { @@ -1017,7 +1017,7 @@ public class BoundingBox extends Bounds { t1 = (lower.x-start.x)*invDir; t2 = (upper.x-start.x)*invDir; - //System.out.println("x t1 = " + t1 + " t2 = " + t2); + //System.err.println("x t1 = " + t1 + " t2 = " + t2); if( t1 > t2) { tnear = t2; tfar = t1; @@ -1026,21 +1026,21 @@ public class BoundingBox extends Bounds { tfar = t2; } if( tfar < 0.0 ) { - //System.out.println( "x failed: tnear="+tnear+" tfar="+tfar); + //System.err.println( "x failed: tnear="+tnear+" tfar="+tfar); return false; } - //System.out.println("x tnear = " + tnear + " tfar = " + tfar); + //System.err.println("x tnear = " + tnear + " tfar = " + tfar); } // y if (diry == 0.0) { - //System.out.println("diry == 0.0"); + //System.err.println("diry == 0.0"); if( start.y < lower.y || start.y > upper.y ){ - //System.out.println( "parallel to y plane and outside"); + //System.err.println( "parallel to y plane and outside"); return false; } } else { invDir = 1.0/diry; - //System.out.println("invDir = " + invDir); + //System.err.println("invDir = " + invDir); t1 = (lower.y-start.y)*invDir; t2 = (upper.y-start.y)*invDir; @@ -1049,22 +1049,22 @@ public class BoundingBox extends Bounds { t1 = t2; t2 = tmp; } - //System.out.println("y t1 = " + t1 + " t2 = " + t2); + //System.err.println("y t1 = " + t1 + " t2 = " + t2); if( t1 > tnear) tnear = t1; if( t2 < tfar ) tfar = t2; if( (tfar < 0.0) || (tnear > tfar)){ - //System.out.println( "y failed: tnear="+tnear+" tfar="+tfar); + //System.err.println( "y failed: tnear="+tnear+" tfar="+tfar); return false; } - //System.out.println("y tnear = " + tnear + " tfar = " + tfar); + //System.err.println("y tnear = " + tnear + " tfar = " + tfar); } // z if (dirz == 0.0) { - //System.out.println("dirz == 0.0"); + //System.err.println("dirz == 0.0"); if( start.z < lower.z || start.z > upper.z ) { - //System.out.println( "parallel to z plane and outside"); + //System.err.println( "parallel to z plane and outside"); return false; } } else { @@ -1077,15 +1077,15 @@ public class BoundingBox extends Bounds { t1 = t2; t2 = tmp; } - //System.out.println("z t1 = " + t1 + " t2 = " + t2); + //System.err.println("z t1 = " + t1 + " t2 = " + t2); if( t1 > tnear) tnear = t1; if( t2 < tfar ) tfar = t2; if( (tfar < 0.0) || (tnear > tfar)){ - //System.out.println( "z failed: tnear="+tnear+" tfar="+tfar); + //System.err.println( "z failed: tnear="+tnear+" tfar="+tfar); return false; } - //System.out.println("z tnear = " + tnear + " tfar = " + tfar); + //System.err.println("z tnear = " + tnear + " tfar = " + tfar); } if((tnear < 0.0) && (tfar >= 0.0)) { @@ -1099,7 +1099,7 @@ public class BoundingBox extends Bounds { if(tnear>dirLen) { // Segment is behind BBox. /* - System.out.println("PickSegment : intersected postion : " + position + System.err.println("PickSegment : intersected postion : " + position + " tnear " + tnear + " tfar " + tfar ); */ return false; @@ -1112,10 +1112,10 @@ public class BoundingBox extends Bounds { } /* - System.out.println("tnear = " + tnear + " tfar = " + tfar + " w " + + System.err.println("tnear = " + tnear + " tfar = " + tfar + " w " + position.w); - System.out.println("lower = " + lower); - System.out.println("upper = " + upper + "\n"); + System.err.println("lower = " + lower); + System.err.println("upper = " + upper + "\n"); */ return true; @@ -1356,7 +1356,7 @@ public class BoundingBox extends Bounds { return true; } else { - // System.out.println("intersect ?? "); + // System.err.println("intersect ?? "); } } @@ -1452,7 +1452,7 @@ public class BoundingBox extends Bounds { return false; } - // System.out.println("intersect Sphere "); + // System.err.println("intersect Sphere "); } else if(boundsObject.boundId == BOUNDING_POLYTOPE) { BoundingPolytope polytope = (BoundingPolytope)boundsObject; @@ -1765,8 +1765,8 @@ public class BoundingBox extends Bounds { if(boundsIsInfinite) return true; - // System.out.println("intersect frustum with box="+this.toString()); - // System.out.println("frustum "+frustum.toString()); + // System.err.println("intersect frustum with box="+this.toString()); + // System.err.println("frustum "+frustum.toString()); // check if box and bounding box of frustum intersect if ((upper.x < frustum.lower.x) || (lower.x > frustum.upper.x) || @@ -1775,7 +1775,7 @@ public class BoundingBox extends Bounds { (upper.z < frustum.lower.z) || (lower.z > frustum.upper.z) ) { - // System.out.println("*** box and bounding box of frustum do not intersect"); + // System.err.println("*** box and bounding box of frustum do not intersect"); return false; } @@ -1800,7 +1800,7 @@ public class BoundingBox extends Bounds { (( lower.x*vc.x + upper.y*vc.y + lower.z*vc.z + vc.w ) < 0.0 )) { // all corners outside this frustum plane - // System.out.println("*** all corners outside this frustum plane"); + // System.err.println("*** all corners outside this frustum plane"); return false; } } diff --git a/src/classes/share/javax/media/j3d/BoundingPolytope.java b/src/classes/share/javax/media/j3d/BoundingPolytope.java index 37fe7a1..23fc02b 100644 --- a/src/classes/share/javax/media/j3d/BoundingPolytope.java +++ b/src/classes/share/javax/media/j3d/BoundingPolytope.java @@ -937,7 +937,7 @@ public class BoundingPolytope extends Bounds { vd = planes[i].x*dx + planes[i].y*dy + planes[i].z*dz; v0 = -(planes[i].x*origin.x + planes[i].y*origin.y + planes[i].z*origin.z + planes[i].w); - // System.out.println("v0="+v0+" vd="+vd); + // System.err.println("v0="+v0+" vd="+vd); if(vd != 0.0) { // ray is parallel to plane t = v0/vd; @@ -946,7 +946,7 @@ public class BoundingPolytope extends Bounds { x = origin.x + dx*t; // compute intersection point y = origin.y + dy*t; z = origin.z + dz*t; - // System.out.println("t="+t+" point="+x+" "+y+" "+z); + // System.err.println("t="+t+" point="+x+" "+y+" "+z); if( pointInPolytope(x,y,z) ) { position.x = x; @@ -1006,7 +1006,7 @@ public class BoundingPolytope extends Bounds { double t,v0,vd,x,y,z; int i,j; - //System.out.println("line segment intersect : planes.length " + planes.length); + //System.err.println("line segment intersect : planes.length " + planes.length); if( boundsIsEmpty ) { return false; @@ -1031,18 +1031,18 @@ public class BoundingPolytope extends Bounds { planes[i].z*direction.z; v0 = -(planes[i].x*start.x + planes[i].y*start.y + planes[i].z*start.z + planes[i].w); - // System.out.println("v0="+v0+" vd="+vd); + // System.err.println("v0="+v0+" vd="+vd); if(vd != 0.0) { // ray is parallel to plane t = v0/vd; - // System.out.println("t is " + t); + // System.err.println("t is " + t); if( t >= 0.0) { // plane is behind start x = start.x + direction.x*t; // compute intersection point y = start.y + direction.y*t; z = start.z + direction.z*t; - // System.out.println("t="+t+" point="+x+" "+y+" "+z); + // System.err.println("t="+t+" point="+x+" "+y+" "+z); if( pointInPolytope(x,y,z) ) { // if((t*t) > (end.x-start.x)*(end.x-start.x) + @@ -1102,7 +1102,7 @@ public class BoundingPolytope extends Bounds { if( pointInPolytope(x,y,z) ) { return true; // ray intersects a face of polytope } else { - // System.out.println("point outside polytope"); + // System.err.println("point outside polytope"); } } } @@ -1562,9 +1562,9 @@ public class BoundingPolytope extends Bounds { planes[a].z*planes[b].x*planes[c].y - planes[a].z*planes[b].y*planes[c].x - planes[a].y*planes[b].x*planes[c].z - planes[a].x*planes[b].z*planes[c].y; - // System.out.println("\n det="+det); + // System.err.println("\n det="+det); if( det*det < EPSILON ){ - // System.out.println("parallel planes="+a+" "+b+" "+c); + // System.err.println("parallel planes="+a+" "+b+" "+c); return; // two planes are parallel } diff --git a/src/classes/share/javax/media/j3d/BoundingSphere.java b/src/classes/share/javax/media/j3d/BoundingSphere.java index d2ece73..71ad7c8 100644 --- a/src/classes/share/javax/media/j3d/BoundingSphere.java +++ b/src/classes/share/javax/media/j3d/BoundingSphere.java @@ -849,7 +849,7 @@ public class BoundingSphere extends Bounds { rad2 = radius*radius; if( l2oc < rad2 ){ - // System.out.println("ray origin inside sphere" ); + // System.err.println("ray origin inside sphere" ); return true; // ray origin inside sphere } @@ -862,7 +862,7 @@ public class BoundingSphere extends Bounds { tca = oc.x*dir.x + oc.y*dir.y + oc.z*dir.z; if( tca <= 0.0 ) { - // System.out.println("ray points away from sphere" ); + // System.err.println("ray points away from sphere" ); return false; // ray points away from sphere } @@ -870,14 +870,14 @@ public class BoundingSphere extends Bounds { if( t2hc > 0.0 ){ t = tca - Math.sqrt(t2hc); - // System.out.println("ray hits sphere:"+this.toString()+" t="+t+" direction="+dir ); + // System.err.println("ray hits sphere:"+this.toString()+" t="+t+" direction="+dir ); position.x = origin.x + dir.x*t; position.y = origin.y + dir.y*t; position.z = origin.z + dir.z*t; position.w = t; return true; // ray hits sphere }else { - // System.out.println("ray does not hit sphere" ); + // System.err.println("ray does not hit sphere" ); return false; } @@ -965,14 +965,14 @@ public class BoundingSphere extends Bounds { rad2 = radius*radius; if( l2oc < rad2 ){ - // System.out.println("ray origin inside sphere" ); + // System.err.println("ray origin inside sphere" ); return true; // ray origin inside sphere } tca = oc.x*dir.x + oc.y*dir.y + oc.z*dir.z; if( tca <= 0.0 ) { - // System.out.println("ray points away from sphere" ); + // System.err.println("ray points away from sphere" ); return false; // ray points away from sphere } @@ -1022,7 +1022,7 @@ public class BoundingSphere extends Bounds { rad2 = radius*radius; if( l2oc < rad2 ){ - // System.out.println("ray origin inside sphere" ); + // System.err.println("ray origin inside sphere" ); return true; // ray origin inside sphere } @@ -1035,17 +1035,17 @@ public class BoundingSphere extends Bounds { tca = oc.x*dir.x + oc.y*dir.y + oc.z*dir.z; if( tca <= 0.0 ) { - // System.out.println("ray points away from sphere" ); + // System.err.println("ray points away from sphere" ); return false; // ray points away from sphere } t2hc = rad2 - l2oc + tca*tca; if( t2hc > 0.0 ){ - // System.out.println("ray hits sphere" ); + // System.err.println("ray hits sphere" ); return true; // ray hits sphere }else { - // System.out.println("ray does not hit sphere" ); + // System.err.println("ray does not hit sphere" ); return false; } } @@ -1081,7 +1081,7 @@ public class BoundingSphere extends Bounds { rad2 = radius*radius; if( l2oc < rad2 ){ - // System.out.println("ray origin inside sphere" ); + // System.err.println("ray origin inside sphere" ); return true; // ray origin inside sphere } @@ -1094,7 +1094,7 @@ public class BoundingSphere extends Bounds { tca = oc.x*dir.x + oc.y*dir.y + oc.z*dir.z; if( tca <= 0.0 ) { - // System.out.println("ray points away from sphere" ); + // System.err.println("ray points away from sphere" ); return false; // ray points away from sphere } @@ -1105,10 +1105,10 @@ public class BoundingSphere extends Bounds { intersectPoint.x = origin.x + direction.x*t; intersectPoint.y = origin.y + direction.y*t; intersectPoint.z = origin.z + direction.z*t; - // System.out.println("ray hits sphere" ); + // System.err.println("ray hits sphere" ); return true; // ray hits sphere }else { - // System.out.println("ray does not hit sphere" ); + // System.err.println("ray does not hit sphere" ); return false; } } @@ -1688,7 +1688,7 @@ public class BoundingSphere extends Bounds { dist = planes[i].x*center.x + planes[i].y*center.y + planes[i].z*center.z + planes[i].w; if (dist < 0.0 && (dist + radius) < 0.0) { - //System.out.println("Tossing " + i + " " + dist + " " + radius); + //System.err.println("Tossing " + i + " " + dist + " " + radius); return(false); } } diff --git a/src/classes/share/javax/media/j3d/Bounds.java b/src/classes/share/javax/media/j3d/Bounds.java index 59ed825..b2d38c5 100644 --- a/src/classes/share/javax/media/j3d/Bounds.java +++ b/src/classes/share/javax/media/j3d/Bounds.java @@ -221,7 +221,7 @@ public abstract class Bounds extends Object implements Cloneable { double dist = (new_point.x*planes[i].x + new_point.y*planes[i].y + new_point.z*planes[i].z + planes[i].w ) ; if (dist > EPSILON ){ - System.out.println("new point is outside of" + + System.err.println("new point is outside of" + " plane["+i+"] dist = " + dist); } } @@ -317,7 +317,7 @@ public abstract class Bounds extends Object implements Cloneable { p.set(g); if (debug) { - System.out.println("closest_point():\nincoming g="+" "+g.x+" "+g.y+ + System.err.println("closest_point():\nincoming g="+" "+g.x+" "+g.y+ " "+g.z); } @@ -329,7 +329,7 @@ public abstract class Bounds extends Object implements Cloneable { while( !converged ) { if (debug) { - System.out.println("start: p="+" "+p.x+" "+p.y+" "+p.z); + System.err.println("start: p="+" "+p.x+" "+p.y+" "+p.z); } // test the current point against the planes, for each @@ -362,7 +362,7 @@ public abstract class Bounds extends Object implements Cloneable { if (dist > EPSILON ){ inside = false; if (debug) { - System.out.println("point outside plane["+i+"]=("+ + System.err.println("point outside plane["+i+"]=("+ pln.x+ ","+pln.y+",\n\t"+pln.z+ ","+ pln.w+")\ndist = " + dist); } @@ -371,7 +371,7 @@ public abstract class Bounds extends Object implements Cloneable { // see if we are done if (inside) { if (debug) { - System.out.println("p is inside"); + System.err.println("p is inside"); } if (firstPoint) { firstInside = true; @@ -391,10 +391,10 @@ public abstract class Bounds extends Object implements Cloneable { h33 = 1.0 + cc * w; if (debug) { - System.out.println(" hessin= "); - System.out.println(h11+" "+h12+" "+h13); - System.out.println(" "+h22+" "+h23); - System.out.println(" "+h33); + System.err.println(" hessin= "); + System.err.println(h11+" "+h12+" "+h13); + System.err.println(" "+h22+" "+h23); + System.err.println(" "+h33); } // these are the constant terms @@ -403,7 +403,7 @@ public abstract class Bounds extends Object implements Cloneable { b3 = g.z - w * cd; if (debug) { - System.out.println(" b1,b2,b3 = "+b1+" "+b2+" " +b3); + System.err.println(" b1,b2,b3 = "+b1+" "+b2+" " +b3); } // solve, d1, d2, d3 actually 1/dx, which is more useful @@ -417,8 +417,8 @@ public abstract class Bounds extends Object implements Cloneable { d3 = 1/(h33 - h13*l13 - t*l23); if (debug) { - System.out.println(" l12,l13,l23 "+l12+" "+l13+" "+l23); - System.out.println(" d1,d2,d3 "+ d1+" "+d2+" "+d3); + System.err.println(" l12,l13,l23 "+l12+" "+l13+" "+l23); + System.err.println(" d1,d2,d3 "+ d1+" "+d2+" "+d3); } // we have L and D, now solve for y @@ -427,7 +427,7 @@ public abstract class Bounds extends Object implements Cloneable { y3 = d3 * (b3 - h13*y1 - t*y2); if (debug) { - System.out.println(" y1,y2,y3 = "+y1+" "+y2+" "+y3); + System.err.println(" y1,y2,y3 = "+y1+" "+y2+" "+y3); } // we have y, solve for n @@ -436,14 +436,14 @@ public abstract class Bounds extends Object implements Cloneable { n.x = (y1 - l13*n.z - l12*n.y); if (debug) { - System.out.println("new point = " + n.x+" " + n.y+" " + + System.err.println("new point = " + n.x+" " + n.y+" " + n.z); test_point(planes, n); if (delta == null) delta = new Vector3d(); delta.sub(n, p); delta.normalize(); - System.out.println("p->n direction: " + delta); + System.err.println("p->n direction: " + delta); // check using the the javax.vecmath routine hMatrix.m00 = h11; @@ -459,7 +459,7 @@ public abstract class Bounds extends Object implements Cloneable { Point3d check = new Point3d(b1, b2, b3); hMatrix.transform(check); - System.out.println("check point = " + check.x+" " + + System.err.println("check point = " + check.x+" " + check.y+" " + check.z); } @@ -468,7 +468,7 @@ public abstract class Bounds extends Object implements Cloneable { (p.z-n.z)*(p.z-n.z); if (debug) { - System.out.println("p->n distance =" + dist ); + System.err.println("p->n distance =" + dist ); } if( dist < EPSILON) { // close enough @@ -485,10 +485,10 @@ public abstract class Bounds extends Object implements Cloneable { } } if (debug) { - System.out.println("returning pnt ("+new_point.x+" "+ + System.err.println("returning pnt ("+new_point.x+" "+ new_point.y+" "+new_point.z+")"); - if(firstInside) System.out.println("input point inside polytope "); + if(firstInside) System.err.println("input point inside polytope "); } return firstInside; } @@ -500,11 +500,11 @@ public abstract class Bounds extends Object implements Cloneable { if (debug) { - System.out.println("ptope_sphere intersect sphere ="+sphere); + System.err.println("ptope_sphere intersect sphere ="+sphere); } inside = closest_point( sphere.center, polyTope.planes, p ); if (debug) { - System.out.println("ptope sphere intersect point ="+p); + System.err.println("ptope sphere intersect point ="+p); } if (!inside){ // if distance between polytope and sphere center is greater than @@ -512,18 +512,18 @@ public abstract class Bounds extends Object implements Cloneable { if (p.distanceSquared( sphere.center) > sphere.radius*sphere.radius){ if (debug) { - System.out.println("ptope_sphere returns false"); + System.err.println("ptope_sphere returns false"); } return false; } else { if (debug) { - System.out.println("ptope_sphere returns true"); + System.err.println("ptope_sphere returns true"); } return true; } } else { if (debug) { - System.out.println("ptope_sphere returns true"); + System.err.println("ptope_sphere returns true"); } return true; } @@ -533,7 +533,7 @@ public abstract class Bounds extends Object implements Cloneable { Vector4d planes[] = new Vector4d[6]; if (debug) { - System.out.println("ptope_abox, box = " + box); + System.err.println("ptope_abox, box = " + box); } planes[0] = new Vector4d( -1.0, 0.0, 0.0, box.lower.x); planes[1] = new Vector4d( 1.0, 0.0, 0.0,-box.upper.x); @@ -547,7 +547,7 @@ public abstract class Bounds extends Object implements Cloneable { boolean result = intersect_ptope_ptope( polyTope, pbox ); if (debug) { - System.out.println("ptope_abox returns " + result); + System.err.println("ptope_abox returns " + result); } return(result); } @@ -572,7 +572,7 @@ public abstract class Bounds extends Object implements Cloneable { // get the closest points on each polytope if (debug) { - System.out.println("ptope_ptope: first g = "+g); + System.err.println("ptope_ptope: first g = "+g); } intersect = closest_point( g, poly2.planes, p); @@ -581,11 +581,11 @@ public abstract class Bounds extends Object implements Cloneable { } if (debug) { - System.out.println("first p = "+p+"\n"); + System.err.println("first p = "+p+"\n"); } intersect = closest_point( p, poly1.planes, gnew); if (debug) { - System.out.println("gnew = "+gnew+" intersect="+intersect); + System.err.println("gnew = "+gnew+" intersect="+intersect); } // loop until the closest points on the two polytopes are not changing @@ -601,7 +601,7 @@ public abstract class Bounds extends Object implements Cloneable { g.set(gnew); intersect = closest_point( g, poly2.planes, pnew ); if (debug) { - System.out.println("pnew = "+pnew+" intersect="+intersect); + System.err.println("pnew = "+pnew+" intersect="+intersect); } } else { g.set(gnew); @@ -615,7 +615,7 @@ public abstract class Bounds extends Object implements Cloneable { if( !intersect ) { intersect = closest_point( p, poly1.planes, gnew ); if (debug) { - System.out.println("gnew = "+gnew+" intersect="+ + System.err.println("gnew = "+gnew+" intersect="+ intersect); } } @@ -627,8 +627,8 @@ public abstract class Bounds extends Object implements Cloneable { } if (debug) { - System.out.println("gnew="+" "+gnew.x+" "+gnew.y+" "+gnew.z); - System.out.println("pnew="+" "+pnew.x+" "+pnew.y+" "+pnew.z); + System.err.println("gnew="+" "+gnew.x+" "+gnew.y+" "+gnew.z); + System.err.println("pnew="+" "+pnew.x+" "+pnew.y+" "+pnew.z); } return intersect; } diff --git a/src/classes/share/javax/media/j3d/BranchGroupRetained.java b/src/classes/share/javax/media/j3d/BranchGroupRetained.java index ca3b1a6..568f04b 100644 --- a/src/classes/share/javax/media/j3d/BranchGroupRetained.java +++ b/src/classes/share/javax/media/j3d/BranchGroupRetained.java @@ -193,7 +193,7 @@ class BranchGroupRetained extends GroupRetained { } if (J3dDebug.doDebug(J3dDebug.compileState, J3dDebug.LEVEL_5)) { this.traverse(false, 1); - System.out.println(); + System.err.println(); } } } diff --git a/src/classes/share/javax/media/j3d/CachedFrustum.java b/src/classes/share/javax/media/j3d/CachedFrustum.java index 670d535..4f17d79 100644 --- a/src/classes/share/javax/media/j3d/CachedFrustum.java +++ b/src/classes/share/javax/media/j3d/CachedFrustum.java @@ -191,7 +191,7 @@ class CachedFrustum { if( det*det < EPSILON ){ - // System.out.println("************** Two planes are parallel : det = " + det); + // System.err.println("************** Two planes are parallel : det = " + det); return; // two planes are parallel } diff --git a/src/classes/share/javax/media/j3d/CachedTargets.java b/src/classes/share/javax/media/j3d/CachedTargets.java index 9af07a5..29d5861 100644 --- a/src/classes/share/javax/media/j3d/CachedTargets.java +++ b/src/classes/share/javax/media/j3d/CachedTargets.java @@ -98,9 +98,9 @@ class CachedTargets { void dump() { for(int i=0; i= J3dDebug.LEVEL_2) { - System.out.println("Get canvas position and size"); - System.out.println("Before"); - System.out.println("Canvas pos = (" + awtCanvasX + ", " + + System.err.println("Get canvas position and size"); + System.err.println("Before"); + System.err.println("Canvas pos = (" + awtCanvasX + ", " + awtCanvasY + "), size = " + awtCanvasWidth + "x" + awtCanvasHeight); - System.out.println("After"); + System.err.println("After"); } awtCanvasX = canvas.newPosition.x; awtCanvasY = canvas.newPosition.y; @@ -243,7 +243,7 @@ class CanvasViewCache extends Object { } if (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_1) { - System.out.println("Canvas pos = (" + awtCanvasX + ", " + + System.err.println("Canvas pos = (" + awtCanvasX + ", " + awtCanvasY + "), size = " + awtCanvasWidth + "x" + awtCanvasHeight); } @@ -376,7 +376,7 @@ class CanvasViewCache extends Object { if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_1)) { synchronized(debugLock) { - System.out.println("------------------------------"); + System.err.println("------------------------------"); doComputeDerivedData(currentFlag,cvc,frustumBBox,doInfinite); } } @@ -412,20 +412,20 @@ class CanvasViewCache extends Object { if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { if(cvcDirtyMask != 0) - System.out.println("cvcDirtyMask : " + cvcDirtyMask); + System.err.println("cvcDirtyMask : " + cvcDirtyMask); if(scrvcDirtyMask != 0) - System.out.println("scrvcDirtyMask : "+ scrvcDirtyMask); + System.err.println("scrvcDirtyMask : "+ scrvcDirtyMask); if(viewCache.vcDirtyMask != 0) - System.out.println("vcDirtyMask : " + viewCache.vcDirtyMask); + System.err.println("vcDirtyMask : " + viewCache.vcDirtyMask); } // NOTE: This fix is only fixing the symptoms, but not the // root of the bug. We shouldn't have to check for null here. if(viewCache.vpRetained == null) { - System.out.println("CanvasViewCache : Error! viewCache.vpRetained is null"); + System.err.println("CanvasViewCache : Error! viewCache.vpRetained is null"); return; } @@ -463,14 +463,14 @@ class CanvasViewCache extends Object { vpcToVworld.set(viewCache.vpRetained.getLastLocalToVworld(null)); } - // System.out.println("vpcToVworld is \n" + vpcToVworld); + // System.err.println("vpcToVworld is \n" + vpcToVworld); try { vworldToVpc.invert(vpcToVworld); } catch (SingularMatrixException e) { vworldToVpc.setIdentity(); - //System.out.println("SingularMatrixException encountered when doing vworldToVpc invert"); + //System.err.println("SingularMatrixException encountered when doing vworldToVpc invert"); } if (doInfinite) { vworldToVpc.getRotation(infVworldToVpc); @@ -519,23 +519,23 @@ class CanvasViewCache extends Object { if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_1)) { // Print some data : - System.out.println("useStereo = " + useStereo); - System.out.println("leftProjection:\n" + leftProjection); - System.out.println("rightProjection:\n " + rightProjection); - System.out.println("leftVpcToEc:\n" + leftVpcToEc); - System.out.println("rightVpcToEc:\n" + rightVpcToEc); - System.out.println("vpcToVworld:\n" + vpcToVworld); - System.out.println("vworldToVpc:\n" + vworldToVpc); + System.err.println("useStereo = " + useStereo); + System.err.println("leftProjection:\n" + leftProjection); + System.err.println("rightProjection:\n " + rightProjection); + System.err.println("leftVpcToEc:\n" + leftVpcToEc); + System.err.println("rightVpcToEc:\n" + rightVpcToEc); + System.err.println("vpcToVworld:\n" + vpcToVworld); + System.err.println("vworldToVpc:\n" + vworldToVpc); if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { int i; for (i = 0; i < leftFrustumPlanes.length; i++) { - System.out.println("leftFrustumPlanes " + i + " is " + + System.err.println("leftFrustumPlanes " + i + " is " + leftFrustumPlanes[i]); } for (i = 0; i < rightFrustumPlanes.length; i++) { - System.out.println("rightFrustumPlanes " + i + " is " + + System.err.println("rightFrustumPlanes " + i + " is " + rightFrustumPlanes[i]); } } @@ -590,20 +590,20 @@ class CanvasViewCache extends Object { physicalWindowCenter.z = 0.0; if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { - System.out.println("Canvas pos = (" + awtCanvasX + ", " + + System.err.println("Canvas pos = (" + awtCanvasX + ", " + awtCanvasY + "), size = " + awtCanvasWidth + "x" + awtCanvasHeight); - System.out.println("Window LL corner (in plate coordinates): " + + System.err.println("Window LL corner (in plate coordinates): " + "(" + physicalWindowXLeft + "," + physicalWindowYBottom + ")"); - System.out.println("Window size (in plate coordinates): " + + System.err.println("Window size (in plate coordinates): " + "(" + physicalWindowWidth + "," + physicalWindowHeight + ")"); - System.out.println("Window center (in plate coordinates): " + + System.err.println("Window center (in plate coordinates): " + physicalWindowCenter); - System.out.println(); + System.err.println(); } // Compute the view platform scale. This combines @@ -616,7 +616,7 @@ class CanvasViewCache extends Object { switch(effectiveMonoscopicViewPolicy) { case View.CYCLOPEAN_EYE_VIEW: if(J3dDebug.devPhase) { - System.out.println("CanvasViewCache : Should never reach here.\n" + + System.err.println("CanvasViewCache : Should never reach here.\n" + "HMD_VIEW with CYCLOPEAN_EYE_VIEW is not allowed"); } break; @@ -665,19 +665,19 @@ class CanvasViewCache extends Object { viewPlatformScale = windowScale * screenScale; if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { - System.out.println("viewCache.windowResizePolicy = " + + System.err.println("viewCache.windowResizePolicy = " + viewCache.windowResizePolicy); - System.out.println("physicalWindowWidth = " + physicalWindowWidth); - System.out.println("physicalScreenWidth = " + physicalScreenWidth); - System.out.println("windowScale = " + windowScale); - System.out.println("screenScale = " + screenScale); - System.out.println("viewPlatformScale = " + viewPlatformScale); + System.err.println("physicalWindowWidth = " + physicalWindowWidth); + System.err.println("physicalScreenWidth = " + physicalScreenWidth); + System.err.println("windowScale = " + windowScale); + System.err.println("screenScale = " + screenScale); + System.err.println("viewPlatformScale = " + viewPlatformScale); } } private void cacheEyePosFixedField() { if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_1)) - System.out.println("cacheEyePosFixedField:"); + System.err.println("cacheEyePosFixedField:"); // y is always the window center rightEyeInImagePlate.y = @@ -735,7 +735,7 @@ class CanvasViewCache extends Object { private void cacheEyePosWindowRelative() { if ((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_1)) - System.out.println("cacheEyePosWindowRelative:"); + System.err.println("cacheEyePosWindowRelative:"); // y is always the window center rightEyeInImagePlate.y = @@ -803,7 +803,7 @@ class CanvasViewCache extends Object { */ private void cacheEyePosScreenRelative(Point3d leftEye, Point3d rightEye) { if ((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_1)) - System.out.println("cacheEyePosScreenRelative:"); + System.err.println("cacheEyePosScreenRelative:"); if (!useStereo) { switch(effectiveMonoscopicViewPolicy) { @@ -862,18 +862,18 @@ class CanvasViewCache extends Object { */ private void computeTrackedEyePosition() { if ((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { - System.out.println("computeTrackedEyePosition:"); - System.out.println("viewCache.headTrackerToTrackerBase:"); - System.out.println(viewCache.headTrackerToTrackerBase); + System.err.println("computeTrackedEyePosition:"); + System.err.println("viewCache.headTrackerToTrackerBase:"); + System.err.println(viewCache.headTrackerToTrackerBase); - System.out.println("viewCache.headToHeadTracker:"); - System.out.println(viewCache.headToHeadTracker); + System.err.println("viewCache.headToHeadTracker:"); + System.err.println(viewCache.headToHeadTracker); } if (viewCache.viewPolicy != View.HMD_VIEW) { if ((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { - System.out.println("screenViewCache.trackerBaseToImagePlate:"); - System.out.println(screenViewCache.trackerBaseToImagePlate); + System.err.println("screenViewCache.trackerBaseToImagePlate:"); + System.err.println(screenViewCache.trackerBaseToImagePlate); } headToLeftImagePlate.set(coexistenceCenter); @@ -889,8 +889,8 @@ class CanvasViewCache extends Object { } else { if ((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { - System.out.println("headTrackerToLeftImagePlate:"); - System.out.println(headTrackerToLeftImagePlate); + System.err.println("headTrackerToLeftImagePlate:"); + System.err.println(headTrackerToLeftImagePlate); } headToLeftImagePlate.mul(headTrackerToLeftImagePlate, @@ -914,10 +914,10 @@ class CanvasViewCache extends Object { } if ((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { - System.out.println("headToLeftImagePlate:"); - System.out.println(headToLeftImagePlate); - System.out.println("headToRightImagePlate:"); - System.out.println(headToRightImagePlate); + System.err.println("headToLeftImagePlate:"); + System.err.println(headToLeftImagePlate); + System.err.println("headToRightImagePlate:"); + System.err.println(headToRightImagePlate); } } @@ -971,15 +971,15 @@ class CanvasViewCache extends Object { nominalEyeOffset = viewCache.nominalEyeOffsetFromNominalScreen; if ((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_1)) { - System.out.println("leftEyeInImagePlate = " + + System.err.println("leftEyeInImagePlate = " + leftEyeInImagePlate); - System.out.println("rightEyeInImagePlate = " + + System.err.println("rightEyeInImagePlate = " + rightEyeInImagePlate); - System.out.println("centerEyeInImagePlate = " + + System.err.println("centerEyeInImagePlate = " + centerEyeInImagePlate); - System.out.println("nominalEyeOffset = " + + System.err.println("nominalEyeOffset = " + nominalEyeOffset); - System.out.println(); + System.err.println(); } } @@ -996,7 +996,7 @@ class CanvasViewCache extends Object { catch (SingularMatrixException e) { leftPlateToVpc.setIdentity(); /* - System.out.println("SingularMatrixException encountered when doing" + + System.err.println("SingularMatrixException encountered when doing" + " leftPlateToVpc invert"); */ } @@ -1011,7 +1011,7 @@ class CanvasViewCache extends Object { catch (SingularMatrixException e) { rightPlateToVpc.setIdentity(); /* - System.out.println("SingularMatrixException encountered when doing" + + System.err.println("SingularMatrixException encountered when doing" + " rightPlateToVpc invert"); */ } @@ -1022,13 +1022,13 @@ class CanvasViewCache extends Object { } if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { - System.out.println("vpcToVworld:"); - System.out.println(vpcToVworld); - System.out.println("vpcToLeftPlate:"); - System.out.println(vpcToLeftPlate); + System.err.println("vpcToVworld:"); + System.err.println(vpcToVworld); + System.err.println("vpcToLeftPlate:"); + System.err.println(vpcToLeftPlate); if(useStereo) { - System.out.println("vpcToRightPlate:"); - System.out.println(vpcToRightPlate); + System.err.println("vpcToRightPlate:"); + System.err.println(vpcToRightPlate); } @@ -1054,12 +1054,12 @@ class CanvasViewCache extends Object { headToVworld.mul(leftPlateToVworld, headToLeftImagePlate); if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { - System.out.println("leftPlateToVworld:"); - System.out.println(leftPlateToVworld); - System.out.println("headToLeftImagePlate:"); - System.out.println(headToLeftImagePlate); - System.out.println("...gives -> headToVworld:"); - System.out.println(headToVworld); + System.err.println("leftPlateToVworld:"); + System.err.println(leftPlateToVworld); + System.err.println("headToLeftImagePlate:"); + System.err.println(headToLeftImagePlate); + System.err.println("...gives -> headToVworld:"); + System.err.println(headToVworld); } } @@ -1138,8 +1138,8 @@ class CanvasViewCache extends Object { } if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { - System.out.println("vpcToCoexistence:"); - System.out.println(vpcToCoexistence); + System.err.println("vpcToCoexistence:"); + System.err.println(vpcToCoexistence); } } @@ -1174,7 +1174,7 @@ class CanvasViewCache extends Object { if(J3dDebug.devPhase) { if (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_1) { - System.out.println("coexistenceCenter = " + coexistenceCenter); + System.err.println("coexistenceCenter = " + coexistenceCenter); } } } @@ -1208,11 +1208,11 @@ class CanvasViewCache extends Object { } if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { - System.out.println("coexistenceToLeftPlate:"); - System.out.println(coexistenceToLeftPlate); + System.err.println("coexistenceToLeftPlate:"); + System.err.println(coexistenceToLeftPlate); if(useStereo) { - System.out.println("coexistenceToRightPlate:"); - System.out.println(coexistenceToRightPlate); + System.err.println("coexistenceToRightPlate:"); + System.err.println(coexistenceToRightPlate); } } @@ -1243,7 +1243,7 @@ class CanvasViewCache extends Object { } if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { - System.out.println("vworldToCoexistenceScale = " + + System.err.println("vworldToCoexistenceScale = " + vworldToCoexistenceScale); } @@ -1258,11 +1258,11 @@ class CanvasViewCache extends Object { leftVpcToEc.set(viewCache.compatVpcToEc); if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_1)) { - System.out.println("Left projection and view matrices"); - System.out.println("ecToCc (leftProjection) :"); - System.out.println(leftProjection); - System.out.println("vpcToEc:"); - System.out.println(leftVpcToEc); + System.err.println("Left projection and view matrices"); + System.err.println("ecToCc (leftProjection) :"); + System.err.println(leftProjection); + System.err.println("vpcToEc:"); + System.err.println(leftVpcToEc); } computeFrustumPlanes(leftProjection, leftVpcToEc, @@ -1274,10 +1274,10 @@ class CanvasViewCache extends Object { rightVpcToEc.set(viewCache.compatVpcToEc); if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_1)) { - System.out.println("Right projection and view matrices"); - System.out.println("ecToCc:"); - System.out.println("vpcToEc:"); - System.out.println(rightVpcToEc); + System.err.println("Right projection and view matrices"); + System.err.println("ecToCc:"); + System.err.println("vpcToEc:"); + System.err.println(rightVpcToEc); } computeFrustumPlanes(rightProjection, rightVpcToEc, @@ -1360,11 +1360,11 @@ class CanvasViewCache extends Object { // Call buildProjView to build the projection and view matrices. if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { - System.out.println("Left projection and view matrices"); - System.out.println("Fl " + Fl + " B " + B); - System.out.println("leftEyeInImagePlate\n" + leftEyeInImagePlate); - System.out.println("Before : leftProjection\n" + leftProjection); - System.out.println("Before leftVpcToEc\n" + leftVpcToEc); + System.err.println("Left projection and view matrices"); + System.err.println("Fl " + Fl + " B " + B); + System.err.println("leftEyeInImagePlate\n" + leftEyeInImagePlate); + System.err.println("Before : leftProjection\n" + leftProjection); + System.err.println("Before leftVpcToEc\n" + leftVpcToEc); } buildProjView(leftEyeInImagePlate, coexistenceToLeftPlate, @@ -1372,8 +1372,8 @@ class CanvasViewCache extends Object { if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { - System.out.println("After : leftProjection\n" + leftProjection); - System.out.println("After leftVpcToEc\n" + leftVpcToEc); + System.err.println("After : leftProjection\n" + leftProjection); + System.err.println("After leftVpcToEc\n" + leftVpcToEc); } computeFrustumPlanes(leftProjection, leftVpcToEc, @@ -1382,7 +1382,7 @@ class CanvasViewCache extends Object { if(useStereo) { if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) - System.out.println("Right projection and view matrices"); + System.err.println("Right projection and view matrices"); buildProjView(rightEyeInImagePlate, coexistenceToRightPlate, vpcToRightPlate, Fr, B, rightProjection, @@ -1442,16 +1442,16 @@ class CanvasViewCache extends Object { */ private void analyzeProjection(Transform3D p, double xMax) { if (viewCache.projectionPolicy == View.PARALLEL_PROJECTION) - System.out.println("PARALLEL_PROJECTION ="); + System.err.println("PARALLEL_PROJECTION ="); else - System.out.println("PERSPECTIVE_PROJECTION ="); + System.err.println("PERSPECTIVE_PROJECTION ="); - System.out.println(p); + System.err.println(p); double projectionPlaneZ = ((p.mat[0] * xMax + p.mat[3] - p.mat[15]) / (p.mat[14] - p.mat[2])); - System.out.println("projection plane at z = " + projectionPlaneZ); + System.err.println("projection plane at z = " + projectionPlaneZ); } /** @@ -1510,10 +1510,10 @@ class CanvasViewCache extends Object { */ if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { - System.out.println("ep = " + ep); - System.out.println("Lx = " + Lx + ", Hx = " + Hx); - System.out.println("Ly = " + Ly + ", Hy = " + Hy); - System.out.println("F = " + F + ", B = " + B); + System.err.println("ep = " + ep); + System.err.println("Lx = " + Lx + ", Hx = " + Hx); + System.err.println("Ly = " + Ly + ", Hy = " + Hy); + System.err.println("F = " + F + ", B = " + B); } // Compute the proper projection equation. Note that we @@ -1569,7 +1569,7 @@ class CanvasViewCache extends Object { ecToCc.mul(tMat1); if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { - System.out.println("ecToCc:"); + System.err.println("ecToCc:"); analyzeProjection(ecToCc, Hx); } @@ -1587,8 +1587,8 @@ class CanvasViewCache extends Object { vpcToEc.mul(tMat1, vpc2Plate); if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { - System.out.println("vpcToEc:"); - System.out.println(vpcToEc); + System.err.println("vpcToEc:"); + System.err.println(vpcToEc); } } else { @@ -1634,23 +1634,23 @@ class CanvasViewCache extends Object { // gives us the Cc to Vworld transform. tMat2.mul(ecToCc, vpcToEc); ccToVworld.mul(tMat2, vworldToVpc); - // System.out.println("ccToVworld = " + ccToVworld); + // System.err.println("ccToVworld = " + ccToVworld); try { ccToVworld.invert(); } catch (SingularMatrixException e) { ccToVworld.setIdentity(); - // System.out.println("SingularMatrixException encountered when doing invert in computeFrustumPlanes"); + // System.err.println("SingularMatrixException encountered when doing invert in computeFrustumPlanes"); } if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_2)) { Transform3D t = new Transform3D(); t.mul(ecToCc, vpcToEc); t.mul(vworldToVpc); - System.out.println("\nvworldToCc = " + t); - System.out.println("ccToVworld = " + ccToVworld); + System.err.println("\nvworldToCc = " + t); + System.err.println("ccToVworld = " + ccToVworld); t.mul(ccToVworld); - System.out.println("vworldToCc * ccToVworld = " + t); + System.err.println("vworldToCc * ccToVworld = " + t); } // Transform the 8 corners of the viewing frustum into Vpc @@ -1704,12 +1704,12 @@ class CanvasViewCache extends Object { frustumPoints[6], frustumPoints[5], frustumPlanes[5]); - //System.out.println("left plane = " + frustumPlanes[0]); - //System.out.println("right plane = " + frustumPlanes[1]); - //System.out.println("top plane = " + frustumPlanes[2]); - //System.out.println("bottom plane = " + frustumPlanes[3]); - //System.out.println("front plane = " + frustumPlanes[4]); - //System.out.println("back plane = " + frustumPlanes[5]); + //System.err.println("left plane = " + frustumPlanes[0]); + //System.err.println("right plane = " + frustumPlanes[1]); + //System.err.println("top plane = " + frustumPlanes[2]); + //System.err.println("bottom plane = " + frustumPlanes[3]); + //System.err.println("front plane = " + frustumPlanes[4]); + //System.err.println("back plane = " + frustumPlanes[5]); } private void computePlaneEq(Point4d p1, Point4d p2, Point4d p3, Point4d p4, @@ -1947,8 +1947,8 @@ class CanvasViewCache extends Object { // eye->imagePlate Plane dist / eye->imagePlatePt dist // eye dist to plane is eyePos.z (eye is in +z space) // image->eye dist is -tVec1.z (image->eye is in -z dir) - //System.out.println("eye dist = " + (centerEyeInImagePlate.z)); - //System.out.println("image dist = " + (-tVec1.z)); + //System.err.println("eye dist = " + (centerEyeInImagePlate.z)); + //System.err.println("image dist = " + (-tVec1.z)); if (tVec1.z != 0) { double zScale = centerEyeInImagePlate.z / (-tVec1.z); screenX = centerEyeInImagePlate.x + tVec1.x * zScale; @@ -1964,14 +1964,14 @@ class CanvasViewCache extends Object { screenY = imagePlatePoint.y; } - //System.out.println("screenX = " + screenX + " screenY = " + screenY); + //System.err.println("screenX = " + screenX + " screenY = " + screenY); // Note: screenPt is in image plate coords, at z=0 // Transform from image plate coords to screen coords pixelLocation.x = (screenX / screenViewCache.metersPerPixelX) - canvasX; pixelLocation.y = screenViewCache.screenHeight - 1 - (screenY / screenViewCache.metersPerPixelY) - canvasY; - //System.out.println("pixelLocation = " + pixelLocation); + //System.err.println("pixelLocation = " + pixelLocation); } /** @@ -2010,7 +2010,7 @@ class CanvasViewCache extends Object { } if((J3dDebug.devPhase) && (J3dDebug.canvasViewCache >= J3dDebug.LEVEL_1)) - System.out.println("Constructed a CanvasViewCache"); + System.err.println("Constructed a CanvasViewCache"); } synchronized void setCanvas(Canvas3D c) { diff --git a/src/classes/share/javax/media/j3d/CanvasViewEventCatcher.java b/src/classes/share/javax/media/j3d/CanvasViewEventCatcher.java index 20af887..ee72c94 100644 --- a/src/classes/share/javax/media/j3d/CanvasViewEventCatcher.java +++ b/src/classes/share/javax/media/j3d/CanvasViewEventCatcher.java @@ -33,12 +33,12 @@ class CanvasViewEventCatcher extends ComponentAdapter { public void componentResized(ComponentEvent e) { if (DEBUG) { - System.out.println("Component resized " + e); + System.err.println("Component resized " + e); } if(e.getComponent() == canvas ) { if (DEBUG) { - System.out.println("It is canvas!"); + System.err.println("It is canvas!"); } synchronized(canvas) { synchronized (canvas.dirtyMaskLock) { @@ -59,7 +59,7 @@ class CanvasViewEventCatcher extends ComponentAdapter { public void componentMoved(ComponentEvent e) { if (DEBUG) { - System.out.println("Component moved " + e); + System.err.println("Component moved " + e); } synchronized(canvas) { diff --git a/src/classes/share/javax/media/j3d/CgShaderProgramRetained.java b/src/classes/share/javax/media/j3d/CgShaderProgramRetained.java index f504067..afcaa4d 100644 --- a/src/classes/share/javax/media/j3d/CgShaderProgramRetained.java +++ b/src/classes/share/javax/media/j3d/CgShaderProgramRetained.java @@ -26,7 +26,7 @@ class CgShaderProgramRetained extends ShaderProgramRetained { } synchronized void createMirrorObject() { - // System.out.println("CgShaderProgramRetained : createMirrorObject"); + // System.err.println("CgShaderProgramRetained : createMirrorObject"); // This method should only call by setLive(). if (mirror == null) { CgShaderProgramRetained mirrorCgSP = new CgShaderProgramRetained(); diff --git a/src/classes/share/javax/media/j3d/ColoringAttributesRetained.java b/src/classes/share/javax/media/j3d/ColoringAttributesRetained.java index ea49ce9..bd03a36 100644 --- a/src/classes/share/javax/media/j3d/ColoringAttributesRetained.java +++ b/src/classes/share/javax/media/j3d/ColoringAttributesRetained.java @@ -216,7 +216,7 @@ class ColoringAttributesRetained extends NodeComponentRetained { VirtualUniverse.mc.processMessage(createMessage); - // System.out.println("univList.size is " + univList.size()); + // System.err.println("univList.size is " + univList.size()); for(int i=0; i maxFreeListNum) { - if (DEBUG) System.out.println("illegal list"); + if (DEBUG) System.err.println("illegal list"); return null; } else { diff --git a/src/classes/share/javax/media/j3d/GLSLShaderProgramRetained.java b/src/classes/share/javax/media/j3d/GLSLShaderProgramRetained.java index 008d6a4..2d870b8 100644 --- a/src/classes/share/javax/media/j3d/GLSLShaderProgramRetained.java +++ b/src/classes/share/javax/media/j3d/GLSLShaderProgramRetained.java @@ -26,7 +26,7 @@ class GLSLShaderProgramRetained extends ShaderProgramRetained { } synchronized void createMirrorObject() { - // System.out.println("GLSLShaderProgramRetained : createMirrorObject"); + // System.err.println("GLSLShaderProgramRetained : createMirrorObject"); // This method should only call by setLive(). if (mirror == null) { GLSLShaderProgramRetained mirrorGLSLSP = new GLSLShaderProgramRetained(); diff --git a/src/classes/share/javax/media/j3d/GeneralizedStrip.java b/src/classes/share/javax/media/j3d/GeneralizedStrip.java index a0dff86..5717c82 100644 --- a/src/classes/share/javax/media/j3d/GeneralizedStrip.java +++ b/src/classes/share/javax/media/j3d/GeneralizedStrip.java @@ -86,7 +86,7 @@ class GeneralizedStrip { System.arraycopy(ints, 0, newints, 0, count) ; ints = newints ; if (debug) - System.out.println + System.err.println ("GeneralizedStrip.IntList: reallocated " + (2*count) + " ints") ; } @@ -281,29 +281,29 @@ class GeneralizedStrip { (J3dI18N.getString("GeneralizedStrip0")) ; if (debug) { - System.out.println("GeneralizedStrip.toStripsAndFans") ; + System.err.println("GeneralizedStrip.toStripsAndFans") ; if (v > size) - System.out.println(" ended with a degenerate triangle:" + + System.err.println(" ended with a degenerate triangle:" + " number of vertices: " + (v-size)) ; - System.out.println("\n number of strips: " + stripCounts.count) ; + System.err.println("\n number of strips: " + stripCounts.count) ; if (stripCounts.count > 0) { - System.out.println(" number of vertices: " + stripVerts.count) ; - System.out.println(" vertices/strip: " + + System.err.println(" number of vertices: " + stripVerts.count) ; + System.err.println(" vertices/strip: " + (float)stripVerts.count/stripCounts.count) ; - System.out.println(" strip counts: " + stripCounts.toString()) ; - // System.out.println(" indices: " + stripVerts.toString()) ; + System.err.println(" strip counts: " + stripCounts.toString()) ; + // System.err.println(" indices: " + stripVerts.toString()) ; } - System.out.println("\n number of fans: " + fanCounts.count) ; + System.err.println("\n number of fans: " + fanCounts.count) ; if (fanCounts.count > 0) { - System.out.println(" number of vertices: " + fanVerts.count) ; - System.out.println(" vertices/strip: " + + System.err.println(" number of vertices: " + fanVerts.count) ; + System.err.println(" vertices/strip: " + (float)fanVerts.count/fanCounts.count) ; - System.out.println(" fan counts: " + fanCounts.toString()) ; - // System.out.println(" indices: " + fanVerts.toString()) ; + System.err.println(" fan counts: " + fanCounts.toString()) ; + // System.err.println(" indices: " + fanVerts.toString()) ; } - System.out.println("\n total vertices: " + + System.err.println("\n total vertices: " + (stripVerts.count + fanVerts.count) + "\n original number of vertices: " + size + "\n") ; @@ -444,21 +444,21 @@ class GeneralizedStrip { StripArray sa = new StripArray(stripVerts, stripCounts) ; if (debug) { - System.out.println("GeneralizedStrip.toTriangleStrips" + + System.err.println("GeneralizedStrip.toTriangleStrips" + "\n number of strips: " + sa.stripCounts.count) ; if (sa.stripCounts.count > 0) { - System.out.println(" number of vertices: " + + System.err.println(" number of vertices: " + sa.vertices.count + "\n vertices/strip: " + ((float)sa.vertices.count / (float)sa.stripCounts.count)) ; - System.out.print(" strip counts: [") ; + System.err.print(" strip counts: [") ; for (i = 0 ; i < sa.stripCounts.count-1 ; i++) - System.out.print(sa.stripCounts.ints[i] + ", ") ; - System.out.println(sa.stripCounts.ints[i] + "]") ; + System.err.print(sa.stripCounts.ints[i] + ", ") ; + System.err.println(sa.stripCounts.ints[i] + "]") ; } - System.out.println() ; + System.err.println() ; } return sa ; } @@ -536,7 +536,7 @@ class GeneralizedStrip { vertexCount += 3 * getTriangleCount(sa[1].stripCounts) ; if (debug) - System.out.println("GeneralizedStrip.toTriangles\n" + + System.err.println("GeneralizedStrip.toTriangles\n" + " number of triangles: " + vertexCount/3 + "\n" + " number of vertices: " + vertexCount + "\n") ; int t = 0 ; @@ -636,7 +636,7 @@ class GeneralizedStrip { } if (debug) - System.out.print("GeneralizedStrip.toStripsAndTriangles\n" + + System.err.print("GeneralizedStrip.toStripsAndTriangles\n" + " short strip size: " + shortStripSize + " short strips tolerated: " + maxShortStrips + " number of short strips: " + shortStripCount + @@ -673,17 +673,17 @@ class GeneralizedStrip { sa[1] = new StripArray(new IntList(triangles), null) ; if (debug) { - System.out.println(" triangles separated: " + triangleCount) ; + System.err.println(" triangles separated: " + triangleCount) ; if (longStripCount > 0) { - System.out.println + System.err.println (" new vertices/strip: " + ((float)longStripVertexCount/(float)longStripCount)) ; - System.out.print(" long strip counts: [") ; + System.err.print(" long strip counts: [") ; for (int i = 0 ; i < longStripCount-1 ; i++) - System.out.print(newStripCounts[i++] + ", ") ; + System.err.print(newStripCounts[i++] + ", ") ; - System.out.println + System.err.println (newStripCounts[longStripCount-1] + "]\n") ; } } @@ -746,19 +746,19 @@ class GeneralizedStrip { (J3dI18N.getString("GeneralizedStrip0")) ; if (debug) { - System.out.println("GeneralizedStrip.toLineStrips\n") ; + System.err.println("GeneralizedStrip.toLineStrips\n") ; if (v > size) - System.out.println(" ended with a degenerate line") ; + System.err.println(" ended with a degenerate line") ; - System.out.println(" number of strips: " + stripCounts.count) ; + System.err.println(" number of strips: " + stripCounts.count) ; if (stripCounts.count > 0) { - System.out.println(" number of vertices: " + stripVerts.count) ; - System.out.println(" vertices/strip: " + + System.err.println(" number of vertices: " + stripVerts.count) ; + System.err.println(" vertices/strip: " + (float)stripVerts.count/stripCounts.count) ; - System.out.println(" strip counts: " + stripCounts.toString()) ; - // System.out.println(" indices: " + stripVerts.toString()) ; + System.err.println(" strip counts: " + stripCounts.toString()) ; + // System.err.println(" indices: " + stripVerts.toString()) ; } - System.out.println() ; + System.err.println() ; } if (stripCounts.count > 0) diff --git a/src/classes/share/javax/media/j3d/GeometryArrayRetained.java b/src/classes/share/javax/media/j3d/GeometryArrayRetained.java index 1ef439c..005f654 100644 --- a/src/classes/share/javax/media/j3d/GeometryArrayRetained.java +++ b/src/classes/share/javax/media/j3d/GeometryArrayRetained.java @@ -355,7 +355,7 @@ abstract class GeometryArrayRetained extends GeometryRetained{ super.doSetLive(inBackgroundGroup, refCount); super.markAsLive(); // Send message to RenderingAttribute structure to obtain a dlistId - // System.out.println("Geometry - "+this+"refCount = "+this.refCount); + // System.err.println("Geometry - "+this+"refCount = "+this.refCount); if (this.refCount > 1) { // Send to rendering attribute structure, /* @@ -412,14 +412,14 @@ abstract class GeometryArrayRetained extends GeometryRetained{ void computeBoundingBox() { - // System.out.println("computeBoundingBox ...."); + // System.err.println("computeBoundingBox ...."); if ((vertexFormat & GeometryArray.BY_REFERENCE) == 0) { // by copy computeBoundingBox(initialVertexIndex, vertexData); } else if ((vertexFormat & GeometryArray.USE_NIO_BUFFER) != 0) { // USE_NIO_BUFFER - //System.out.println("vertexFormat & GeometryArray.USE_NIO_BUFFER"); + //System.err.println("vertexFormat & GeometryArray.USE_NIO_BUFFER"); if((vertexFormat & GeometryArray.INTERLEAVED) != 0) { computeBoundingBox(initialCoordIndex, interleavedFloatBufferImpl); } else if((vertexType & PF) != 0) { @@ -429,19 +429,19 @@ abstract class GeometryArrayRetained extends GeometryRetained{ } } else if ((vertexFormat & GeometryArray.INTERLEAVED) != 0) { - //System.out.println("vertexFormat & GeometryArray.INTERLEAVED"); + //System.err.println("vertexFormat & GeometryArray.INTERLEAVED"); computeBoundingBox(initialCoordIndex, interLeavedVertexData); } else if ((vertexType & PF) != 0) { - //System.out.println("vertexType & PF"); + //System.err.println("vertexType & PF"); computeBoundingBox(floatRefCoords); } else if ((vertexType & P3F) != 0) { - //System.out.println("vertexType & P3F"); + //System.err.println("vertexType & P3F"); computeBoundingBox(p3fRefCoords); } else if ((vertexType & P3D) != 0) { - //System.out.println("vertexType & P3D"); + //System.err.println("vertexType & P3D"); computeBoundingBox(p3dRefCoords); } else if ((vertexType & PD) != 0) { - //System.out.println("vertexType & PD"); + //System.err.println("vertexType & PD"); computeBoundingBox(doubleRefCoords); } } @@ -451,9 +451,9 @@ abstract class GeometryArrayRetained extends GeometryRetained{ void processCoordsChanged(boolean nullGeo) { /* - System.out.println("processCoordsChanged : nullGeo " + nullGeo); - System.out.println("Before :processCoordsChanged : geoBounds "); - System.out.println(geoBounds); + System.err.println("processCoordsChanged : nullGeo " + nullGeo); + System.err.println("Before :processCoordsChanged : geoBounds "); + System.err.println(geoBounds); */ if (nullGeo) { synchronized(geoBounds) { @@ -479,8 +479,8 @@ abstract class GeometryArrayRetained extends GeometryRetained{ } /* - System.out.println("After :processCoordsChanged : geoBounds "); - System.out.println(geoBounds); + System.err.println("After :processCoordsChanged : geoBounds "); + System.err.println(geoBounds); */ } } @@ -491,8 +491,8 @@ abstract class GeometryArrayRetained extends GeometryRetained{ double xmin, xmax, ymin, ymax, zmin, zmax; - //System.out.println("Before : computeBoundingBox : geoBounds "); - // System.out.println(geoBounds); + //System.err.println("Before : computeBoundingBox : geoBounds "); + // System.err.println(geoBounds); synchronized(geoBounds) { @@ -536,8 +536,8 @@ abstract class GeometryArrayRetained extends GeometryRetained{ boundsDirty = false; } /* - System.out.println("After : computeBoundingBox : geoBounds "); - System.out.println(geoBounds); + System.err.println("After : computeBoundingBox : geoBounds "); + System.err.println(geoBounds); */ } @@ -688,7 +688,7 @@ abstract class GeometryArrayRetained extends GeometryRetained{ } void computeBoundingBox(float[] coords) { - // System.out.println("GeometryArrayRetained : computeBoundingBox(float[] coords)"); + // System.err.println("GeometryArrayRetained : computeBoundingBox(float[] coords)"); int i, j, k, sIndex; double xmin, xmax, ymin, ymax, zmin, zmax; @@ -730,9 +730,9 @@ abstract class GeometryArrayRetained extends GeometryRetained{ } geoBounds.setUpper(xmax, ymax, zmax); - // System.out.println("max(" + xmax + ", " + ymax + ", " + zmax + ")"); + // System.err.println("max(" + xmax + ", " + ymax + ", " + zmax + ")"); geoBounds.setLower(xmin, ymin, zmin); - // System.out.println("min(" + xmin + ", " + ymin + ", " + zmin + ")"); + // System.err.println("min(" + xmin + ", " + ymin + ", " + zmin + ")"); boundsDirty = false; } @@ -1654,7 +1654,7 @@ abstract class GeometryArrayRetained extends GeometryRetained{ float[] updateAlphaInFloatRefColors(Canvas3D cv, int screen, float alpha) { - //System.out.println("updateAlphaInFloatRefColors screen = " + screen + + //System.err.println("updateAlphaInFloatRefColors screen = " + screen + // " alpha " + alpha ); // no need to update alpha values if canvas supports global alpha @@ -1688,7 +1688,7 @@ abstract class GeometryArrayRetained extends GeometryRetained{ lastAlpha = la; } - //System.out.println("updateAlphaInFloatRefColors screen is " + screen + //System.err.println("updateAlphaInFloatRefColors screen is " + screen // + " mirrorFloatRefColors.length " + // mirrorFloatRefColors.length); @@ -1718,10 +1718,10 @@ abstract class GeometryArrayRetained extends GeometryRetained{ assert lastAlpha[screen] >= 0.0; /* - System.out.println("updateAlphaInFloatRefColors ** : lastAlpha[screen] " + + System.err.println("updateAlphaInFloatRefColors ** : lastAlpha[screen] " + lastAlpha[screen]); - System.out.println("((colorChanged & (1<= 0.0; /* - System.out.println("updateAlphaInByteRefColors ## : lastAlpha[screen] " + + System.err.println("updateAlphaInByteRefColors ## : lastAlpha[screen] " + lastAlpha[screen]); - System.out.println("((colorChanged & (1< start = "+start+" end = "+end); + // System.err.println("===> start = "+start+" end = "+end); for (index= start; index < end; index++) { if ((vertexFormat & GeometryArray.NORMALS) != 0){ System.arraycopy(vdata, @@ -2791,12 +2791,12 @@ abstract class GeometryArrayRetained extends GeometryRetained{ vertexData, vOffset + normalOffset, 3); } if (colorStride == 4){ - // System.out.println("===> copying color3"); + // System.err.println("===> copying color3"); System.arraycopy(vdata, src.indexColor[index]*src.stride + src.colorOffset, vertexData, vOffset + colorOffset, colorStride); } else if (colorStride == 3) { - // System.out.println("===> copying color4"); + // System.err.println("===> copying color4"); System.arraycopy(vdata, src.indexColor[index]*src.stride + src.colorOffset, vertexData, vOffset + colorOffset, colorStride); @@ -2834,7 +2834,7 @@ abstract class GeometryArrayRetained extends GeometryRetained{ } if ((vertexFormat & GeometryArray.COORDINATES) != 0){ - // System.out.println("===> copying coords"); + // System.err.println("===> copying coords"); System.arraycopy(vdata, src.indexCoord[index]*src.stride + src.coordinateOffset, @@ -3088,7 +3088,7 @@ abstract class GeometryArrayRetained extends GeometryRetained{ else if ((src.vertexFormat & GeometryArray.COLOR) != 0) colorStride = 3; - // System.out.println("===> start = "+start+" end = "+end); + // System.err.println("===> start = "+start+" end = "+end); for (index= start; index < end; index++) { if ((vertexFormat & GeometryArray.NORMALS) != 0){ src.interleavedFloatBufferImpl.position(src.indexNormal[index]*src.stride + src.normalOffset); @@ -3469,7 +3469,7 @@ abstract class GeometryArrayRetained extends GeometryRetained{ synchronized(liveStateLock) { if (source != null && source.isLive()) { - // System.out.println("In GeometryArrayRetained - "); + // System.err.println("In GeometryArrayRetained - "); // Send a message to renderBin to rebuild the display list or // process the vertex array accordingly @@ -6303,22 +6303,22 @@ abstract class GeometryArrayRetained extends GeometryRetained{ } if(j == (coordinates.length-1)) { - // System.out.println("(1) Degenerate polygon."); + // System.err.println("(1) Degenerate polygon."); return false; // Degenerate polygon. } /* for(i=0; i 1.0 )) { - // System.out.println("Edge intersects the plane behind the start or exceed end."); + // System.err.println("Edge intersects the plane behind the start or exceed end."); return false; } @@ -6901,7 +6901,7 @@ abstract class GeometryArrayRetained extends GeometryRetained{ axis = 2; } - // System.out.println("Normal " + normal + " axis " + axis ); + // System.err.println("Normal " + normal + " axis " + axis ); for(i=0; i0.0 && du0du2>0.0) { - // System.out.println("In intersectTriTri : du0du1>0.0 && du0du2>0.0"); + // System.err.println("In intersectTriTri : du0du1>0.0 && du0du2>0.0"); return false; } @@ -7365,7 +7365,7 @@ abstract class GeometryArrayRetained extends GeometryRetained{ n2.cross(e1,e2); if(n2.length() == 0.0) { - // System.out.println("(2) Degenerate triangle."); + // System.err.println("(2) Degenerate triangle."); return false; // Degenerate triangle. } @@ -7392,7 +7392,7 @@ abstract class GeometryArrayRetained extends GeometryRetained{ // same sign on all of them + not equal 0 ? // no intersection occurs if(dv0dv1>0.0 && dv0dv2>0.0) { - // System.out.println("In intersectTriTri : dv0dv1>0.0 && dv0dv2>0.0"); + // System.err.println("In intersectTriTri : dv0dv1>0.0 && dv0dv2>0.0"); return false; } // compute direction of intersection line. @@ -7505,7 +7505,7 @@ abstract class GeometryArrayRetained extends GeometryRetained{ } else { // triangles are coplanar - // System.out.println("In intersectTriTri : coplanarTriTri test 2"); + // System.err.println("In intersectTriTri : coplanarTriTri test 2"); boolean toreturn = coplanarTriTri(n2, v0, v1, v2, u0, u1, u2); return toreturn; } @@ -7538,12 +7538,12 @@ abstract class GeometryArrayRetained extends GeometryRetained{ } if(isect1E1.0)) {// Before or after the end points of line. - // System.out.println("Before or after the end points of line. " + t); + // System.err.println("Before or after the end points of line. " + t); return false; } @@ -8113,7 +8113,7 @@ abstract class GeometryArrayRetained extends GeometryRetained{ tmp2 = start.z + t * lDir.z; if((tmp1 < (tmp2 - EPS)) || (tmp1 > (tmp2 + EPS))) { - // System.out.println("No intersection : tmp1 " + tmp1 + " tmp2 " + tmp2); + // System.err.println("No intersection : tmp1 " + tmp1 + " tmp2 " + tmp2); return false; } @@ -8126,7 +8126,7 @@ abstract class GeometryArrayRetained extends GeometryRetained{ iPnt.z = ori.z + dir.z * dist[0]; } - // System.out.println("Intersected : tmp1 " + tmp1 + " tmp2 " + tmp2); + // System.err.println("Intersected : tmp1 " + tmp1 + " tmp2 " + tmp2); return true; } @@ -8265,7 +8265,7 @@ abstract class GeometryArrayRetained extends GeometryRetained{ distance = originToIpnt.length(); radius = Math.tan (cone.getSpreadAngle()) * distance; if (sqDistToEdge <= radius*radius) { - // System.out.println ("intersectCone: edge "+i+" intersected"); + // System.err.println ("intersectCone: edge "+i+" intersected"); dist[0] = distance; return true; } diff --git a/src/classes/share/javax/media/j3d/GeometryAtom.java b/src/classes/share/javax/media/j3d/GeometryAtom.java index c06a4de..d2dd734 100644 --- a/src/classes/share/javax/media/j3d/GeometryAtom.java +++ b/src/classes/share/javax/media/j3d/GeometryAtom.java @@ -98,9 +98,9 @@ class GeometryAtom extends Object implements BHLeafInterface, NnuId { public BoundingBox computeBoundingHull() { /* - System.out.println("Bounds is " + source.vwcBounds); + System.err.println("Bounds is " + source.vwcBounds); for(int i=0; i 64) continue ; - System.out.println("{ " + gcNormals[i][j][0] + + System.err.println("{ " + gcNormals[i][j][0] + ", " + gcNormals[i][j][1] + ", " + gcNormals[i][j][2] + " }") ; } - System.out.println("},") ; + System.err.println("},") ; } - System.out.println("}") ; + System.err.println("}") ; } } @@ -274,7 +274,7 @@ abstract class GeometryDecompressor { */ void decompress(int start, int length, byte data[]) { if (debug) - System.out.println("GeometryDecompressor.decompress\n" + + System.err.println("GeometryDecompressor.decompress\n" + " start: " + start + " length: " + length + " data array size: " + data.length) ; @@ -320,12 +320,12 @@ abstract class GeometryDecompressor { int bits ; if (debug) - System.out.print(" getBits(" + bitCount + ") " + d + ", " + + System.err.print(" getBits(" + bitCount + ") " + d + ", " + bitBufferCount + " available at gcIndex " + gcIndex) ; if (bitCount == 0) { - if (debug) System.out.println(": got 0x0") ; + if (debug) System.err.println(": got 0x0") ; return 0 ; } @@ -361,7 +361,7 @@ abstract class GeometryDecompressor { } if (debug) - System.out.println(": got 0x" + Integer.toHexString(bits)) ; + System.err.println(": got 0x" + Integer.toHexString(bits)) ; return bits ; } @@ -481,7 +481,7 @@ abstract class GeometryDecompressor { private void processSetState() { int ii ; if (debug) - System.out.println("GeometryDecompressor.processSetState") ; + System.err.println("GeometryDecompressor.processSetState") ; ii = getBits(3, "bundling") ; @@ -490,7 +490,7 @@ abstract class GeometryDecompressor { doingAlpha = (((ii >>> 1) & 0x1) != 0) ; if (debug) - System.out.println(" bundling normal: " + bundlingNorm + + System.err.println(" bundling normal: " + bundlingNorm + " bundling color: " + bundlingColor + " alpha present: " + doingAlpha) ; @@ -510,7 +510,7 @@ abstract class GeometryDecompressor { int ii, index ; if (debug) - System.out.println("GeometryDecompressor.processSetTable") ; + System.err.println("GeometryDecompressor.processSetTable") ; // Get reference to approprate 64 entry table. index = (currentHeader & 0x6) >>> 1 ; @@ -544,7 +544,7 @@ abstract class GeometryDecompressor { adr = (adr << (6 - tagLength)) & 0x3F ; if (debug) - System.out.println(" table " + ((currentHeader & 0x6) >>> 1) + + System.err.println(" table " + ((currentHeader & 0x6) >>> 1) + " address " + adr + " tag length " + tagLength + " data length " + dataLength + @@ -579,7 +579,7 @@ abstract class GeometryDecompressor { // Get a reference to the approprate tag table entry. gct = gctables[0][currentHeader & 0x3F] ; - if (debug) System.out.println("GeometryDecompressor.processVertex\n" + + if (debug) System.err.println("GeometryDecompressor.processVertex\n" + gct.toString()) ; // Get the true length of the data. @@ -650,11 +650,11 @@ abstract class GeometryDecompressor { // Update current position, first adding deltas if in relative mode. if (gct.absolute != 0) { curX = dx ; curY = dy ; curZ = dz ; - if (debug) System.out.println(" absolute position: " + + if (debug) System.err.println(" absolute position: " + curX + " " + curY + " " + curZ) ; } else { curX += dx ; curY += dy ; curZ += dz ; - if (debug) System.out.println(" delta position: " + + if (debug) System.err.println(" delta position: " + dx + " " + dy + " " + dz) ; } @@ -666,7 +666,7 @@ abstract class GeometryDecompressor { meshBuffer[meshIndex].y = curY ; meshBuffer[meshIndex].z = curZ ; if (debug) - System.out.println(" pushed position into mesh buffer at " + + System.err.println(" pushed position into mesh buffer at " + meshIndex) ; } @@ -675,7 +675,7 @@ abstract class GeometryDecompressor { fY = curY ; fY /= 32768.0 ; fZ = curZ ; fZ /= 32768.0 ; if (debug) - System.out.println(" result position " + fX + " " + fY + " " + fZ) ; + System.err.println(" result position " + fX + " " + fY + " " + fZ) ; curPos.set(fX, fY, fZ) ; return mbp ; @@ -697,7 +697,7 @@ abstract class GeometryDecompressor { gct = gctables[2][currentHeader & 0x3F] ; if (debug) - System.out.println("GeometryDecompressor.processSetNormal\n" + + System.err.println("GeometryDecompressor.processSetNormal\n" + gct.toString()) ; // subtract up-shift amount to get true data (u, v) length @@ -728,11 +728,11 @@ abstract class GeometryDecompressor { if (debug) { if (curSex < 6) - System.out.println(" absolute normal: sex " + curSex + + System.err.println(" absolute normal: sex " + curSex + " oct " + curOct + " u " + curU + " v " + curV) ; else - System.out.println(" special normal: sex " + curSex + + System.err.println(" special normal: sex " + curSex + " oct " + curOct) ; } } else { @@ -780,7 +780,7 @@ abstract class GeometryDecompressor { curV += dv ; if (debug) - System.out.println(" delta normal: du " + du + " dv " + dv) ; + System.err.println(" delta normal: du " + du + " dv " + dv) ; // // Check for normal wrap. @@ -832,7 +832,7 @@ abstract class GeometryDecompressor { // do optional mesh buffer push if (mbp != 0) { if (debug) - System.out.println(" pushing normal into mesh buffer at " + + System.err.println(" pushing normal into mesh buffer at " + meshIndex) ; meshBuffer[meshIndex].sextant = (short)curSex ; @@ -856,7 +856,7 @@ abstract class GeometryDecompressor { private void indexNormal(int sex, int oct, int u, int v, Vector3f n) { float nx, ny, nz, t ; - if (debug) System.out.println(" sextant " + sex + " octant " + oct + + if (debug) System.err.println(" sextant " + sex + " octant " + oct + " u " + u + " v " + v) ; if (sex > 5) { // special normals @@ -902,7 +902,7 @@ abstract class GeometryDecompressor { // return resulting normal n.set(nx, ny, nz) ; if (debug) - System.out.println(" result normal: " + nx + " " + ny + " " + nz) ; + System.err.println(" result normal: " + nx + " " + ny + " " + nz) ; } @@ -923,7 +923,7 @@ abstract class GeometryDecompressor { gct = gctables[1][currentHeader & 0x3F] ; if (debug) - System.out.println("GeometryDecompressor.processSetColor\n" + + System.err.println("GeometryDecompressor.processSetColor\n" + gct.toString()) ; // Get the true length of the data. @@ -1014,13 +1014,13 @@ abstract class GeometryDecompressor { if (gct.absolute != 0) { curR = dr ; curG = dg ; curB = db ; if (doingAlpha) curA = da ; - if (debug) System.out.println(" absolute color: r " + curR + + if (debug) System.err.println(" absolute color: r " + curR + " g " + curG + " b " + curB + " a " + curA) ; } else { curR += dr ; curG += dg ; curB += db ; if (doingAlpha) curA += da ; - if (debug) System.out.println(" delta color: dr " + dr + + if (debug) System.err.println(" delta color: dr " + dr + " dg " + dg + " db " + db + " da " + da) ; } @@ -1028,7 +1028,7 @@ abstract class GeometryDecompressor { // Do optional mesh buffer push. if (mbp != 0) { if (debug) - System.out.println(" pushing color into mesh buffer at " + + System.err.println(" pushing color into mesh buffer at " + meshIndex) ; meshBuffer[meshIndex].r = curR ; @@ -1044,7 +1044,7 @@ abstract class GeometryDecompressor { fA = curA ; fA /= 32768.0 ; curColor.set(fR, fG, fB, fA) ; - if (debug) System.out.println(" result color: " + fR + + if (debug) System.err.println(" result color: " + fR + " " + fG + " " + fB + " " + fA) ; // A set color opcode when colors aren't bundled with the vertices @@ -1062,7 +1062,7 @@ abstract class GeometryDecompressor { int ii ; if (debug) - System.out.println("GeometryDecompressor.processMeshBR") ; + System.err.println("GeometryDecompressor.processMeshBR") ; ii = getBits(1, "mbr") ; @@ -1072,7 +1072,7 @@ abstract class GeometryDecompressor { // Adjust index to proper place in fifo. index = (meshIndex - index) & 0xf ; if (debug) - System.out.println(" using index " + index) ; + System.err.println(" using index " + index) ; // Get reference to mesh buffer entry. entry = meshBuffer[index] ; @@ -1085,7 +1085,7 @@ abstract class GeometryDecompressor { ((float)curY)/32768.0f, ((float)curZ)/32768.0f) ; - if (debug) System.out.println(" retrieved position " + curPos.x + + if (debug) System.err.println(" retrieved position " + curPos.x + " " + curPos.y + " " + curPos.z + " replace code " + repCode) ; @@ -1099,7 +1099,7 @@ abstract class GeometryDecompressor { // Convert normal back to -1.0 - 1.0 floating point from index. normal = (curSex<<15) | (curOct<<12) | (curU<<6) | curV ; - if (debug) System.out.println(" retrieving normal") ; + if (debug) System.err.println(" retrieving normal") ; indexNormal(curSex, curOct, curU, curV, curNorm) ; } @@ -1119,7 +1119,7 @@ abstract class GeometryDecompressor { curColor.w = curA ; curColor.w /= 32768.0 ; } if (debug) - System.out.println(" retrieved color " + curColor.x + + System.err.println(" retrieved color " + curColor.x + " " + curColor.y + " " + curColor.z + " " + curColor.w) ; } @@ -1131,13 +1131,13 @@ abstract class GeometryDecompressor { // Process a end-of-stream opcode. private void processEos() { - if (debug) System.out.println("GeometryDecompressor.processEos") ; + if (debug) System.err.println("GeometryDecompressor.processEos") ; } // Process a variable length no-op opcode. private void processVNoop() { int ii, ct ; - if (debug) System.out.println("GeometryDecompressor.processVNoop") ; + if (debug) System.err.println("GeometryDecompressor.processVNoop") ; ct = getBits(5, "noop count") ; ii = getBits(ct, "noop bits") ; @@ -1147,7 +1147,7 @@ abstract class GeometryDecompressor { private void processPassThrough() { int ignore ; if (debug) - System.out.println("GeometryDecompressor.processPassThrough") ; + System.err.println("GeometryDecompressor.processPassThrough") ; ignore = getBits(24, "passthrough") ; ignore = getBits(32, "passthrough") ; @@ -1156,42 +1156,42 @@ abstract class GeometryDecompressor { // Process a skip-8 opcode. private void processSkip8() { int skip ; - if (debug) System.out.println("GeometryDecompressor.processSkip8") ; + if (debug) System.err.println("GeometryDecompressor.processSkip8") ; skip = getBits(8, "skip8") ; } private void benchmarkStart(int length) { vertexCount = 0 ; - System.out.println(" GeometryDecompressor: decompressing " + + System.err.println(" GeometryDecompressor: decompressing " + length + " bytes...") ; startTime = J3dClock.currentTimeMillis() ; } private void benchmarkPrint(int length) { float t = (J3dClock.currentTimeMillis() - startTime) / 1000.0f ; - System.out.println + System.err.println (" done in " + t + " sec." + "\n" + " decompressed " + vertexCount + " vertices at " + (vertexCount/t) + " vertices/sec\n") ; - System.out.print(" vertex data present: coords") ; + System.err.print(" vertex data present: coords") ; int floatVertexSize = 12 ; if (bundlingNorm) { - System.out.print(" normals") ; + System.err.print(" normals") ; floatVertexSize += 12 ; } if (bundlingColor) { - System.out.println(" colors") ; + System.err.println(" colors") ; floatVertexSize += 12 ; } if (doingAlpha) { - System.out.println(" alpha") ; + System.err.println(" alpha") ; floatVertexSize += 4 ; } - System.out.println() ; + System.err.println() ; - System.out.println + System.err.println (" bytes of data in generalized strip output: " + (vertexCount * floatVertexSize) + "\n" + " compression ratio: " + diff --git a/src/classes/share/javax/media/j3d/GeometryDecompressorRetained.java b/src/classes/share/javax/media/j3d/GeometryDecompressorRetained.java index d5de66d..ebb596d 100644 --- a/src/classes/share/javax/media/j3d/GeometryDecompressorRetained.java +++ b/src/classes/share/javax/media/j3d/GeometryDecompressorRetained.java @@ -218,12 +218,12 @@ class GeometryDecompressorRetained extends GeometryDecompressor { vlist.addVertex(position, normal, color, vertexReplaceCode) ; if (debug) { - System.out.println("outputVertex: flag " + vertexReplaceCode) ; - System.out.println(" position " + position.toString()) ; + System.err.println("outputVertex: flag " + vertexReplaceCode) ; + System.err.println(" position " + position.toString()) ; if (normal != null) - System.out.println(" normal " + normal.toString()) ; + System.err.println(" normal " + normal.toString()) ; if (color != null) - System.out.println(" color " + color.toString()) ; + System.err.println(" color " + color.toString()) ; } } @@ -239,7 +239,7 @@ class GeometryDecompressorRetained extends GeometryDecompressor { */ void outputColor(Color4f color) { if (boundsOnly || positionsOnly) return ; - if (debug) System.out.println("outputColor: " + color.toString()) ; + if (debug) System.err.println("outputColor: " + color.toString()) ; if ((vlist.vertexFormat & GeometryArray.COLOR) == 0) { if (vlist.size() > 0) @@ -262,7 +262,7 @@ class GeometryDecompressorRetained extends GeometryDecompressor { */ void outputNormal(Vector3f normal) { if (boundsOnly || positionsOnly) return ; - if (debug) System.out.println("outputNormal: " + normal.toString()) ; + if (debug) System.err.println("outputNormal: " + normal.toString()) ; if ((vlist.vertexFormat & GeometryArray.NORMALS) == 0) { if (vlist.size() > 0) @@ -277,35 +277,35 @@ class GeometryDecompressorRetained extends GeometryDecompressor { } private void beginPrint() { - System.out.println("\nGeometryDecompressorRetained") ; + System.err.println("\nGeometryDecompressorRetained") ; switch(bufferDataType) { case TYPE_TRIANGLE: - System.out.println(" buffer TYPE_TRIANGLE") ; + System.err.println(" buffer TYPE_TRIANGLE") ; break ; case TYPE_LINE: - System.out.println(" buffer TYPE_LINE") ; + System.err.println(" buffer TYPE_LINE") ; break ; case TYPE_POINT: - System.out.println(" buffer TYPE_POINT") ; + System.err.println(" buffer TYPE_POINT") ; break ; default: throw new IllegalArgumentException (J3dI18N.getString("GeometryDecompressorRetained4")) ; } - System.out.print(" buffer data present: coords") ; + System.err.print(" buffer data present: coords") ; if ((dataPresent & CompressedGeometryHeader.NORMAL_IN_BUFFER) != 0) - System.out.print(" normals") ; + System.err.print(" normals") ; if ((dataPresent & CompressedGeometryHeader.COLOR_IN_BUFFER) != 0) - System.out.print(" colors") ; + System.err.print(" colors") ; if ((dataPresent & CompressedGeometryHeader.ALPHA_IN_BUFFER) != 0) - System.out.print(" alpha") ; + System.err.print(" alpha") ; - System.out.println() ; - if (boundsOnly) System.out.println(" computing bounds only") ; - if (positionsOnly) System.out.println(" computing positions only") ; + System.err.println() ; + if (boundsOnly) System.err.println(" computing bounds only") ; + if (positionsOnly) System.err.println(" computing positions only") ; startTime = J3dClock.currentTimeMillis() ; } @@ -324,28 +324,28 @@ class GeometryDecompressorRetained extends GeometryDecompressor { float t = (endTime - startTime) / 1000.0f ; if (boundsOnly) { - System.out.println(" decompression took " + t + " sec.\n") ; + System.err.println(" decompression took " + t + " sec.\n") ; return ; } - System.out.println + System.err.println (" decompression + strip conversion took " + t + " sec.") ; switch(bufferDataType) { case TYPE_POINT: - System.out.println + System.err.println (" decompressed " + (vlist.size()) + " points at " + (vlist.size()/t) + " points/sec.\n") ; break ; case TYPE_LINE: - System.out.println + System.err.println (" decompressed " + (vlist.vertexCount - vlist.stripCount) + " lines at " + ((vlist.vertexCount - vlist.stripCount)/t) + " lines/sec.\n") ; break ; case TYPE_TRIANGLE: - System.out.println + System.err.println (" decompressed " + (vlist.vertexCount - 2*vlist.stripCount) + " triangles at " + @@ -356,28 +356,28 @@ class GeometryDecompressorRetained extends GeometryDecompressor { } private void printStats() { - System.out.println(" bounding box:\n lower " + lbounds.toString() + + System.err.println(" bounding box:\n lower " + lbounds.toString() + "\n upper " + ubounds.toString()) ; if (boundsOnly) return ; - System.out.print + System.err.print (" number of vertices in GeometryArray output: " + vlist.vertexCount + "\n" + " GeometryArray vertex data present: coords") ; if ((vlist.vertexFormat & GeometryArray.NORMALS) != 0) - System.out.print(" normals") ; + System.err.print(" normals") ; if ((vlist.vertexFormat & GeometryArray.COLOR) != 0) - System.out.print(" colors") ; + System.err.print(" colors") ; if ((vlist.vertexFormat & GeometryArray.WITH_ALPHA) != 0) - System.out.print(" alpha") ; + System.err.print(" alpha") ; - System.out.println("\n number of strips: " + vlist.stripCount) ; + System.err.println("\n number of strips: " + vlist.stripCount) ; if (vlist.stripCount > 0) - System.out.println + System.err.println (" vertices/strip: " + ((float)vlist.vertexCount / (float)vlist.stripCount)) ; } diff --git a/src/classes/share/javax/media/j3d/GeometryDecompressorShape3D.java b/src/classes/share/javax/media/j3d/GeometryDecompressorShape3D.java index ad2e4f4..b9a8cd9 100644 --- a/src/classes/share/javax/media/j3d/GeometryDecompressorShape3D.java +++ b/src/classes/share/javax/media/j3d/GeometryDecompressorShape3D.java @@ -196,12 +196,12 @@ class GeometryDecompressorShape3D extends GeometryDecompressor { vlist.addVertex(position, normal, color, vertexReplaceCode) ; if (debug) { - System.out.println(" outputVertex: flag " + vertexReplaceCode) ; - System.out.println(" position " + position.toString()) ; + System.err.println(" outputVertex: flag " + vertexReplaceCode) ; + System.err.println(" position " + position.toString()) ; if (normal != null) - System.out.println(" normal " + normal.toString()) ; + System.err.println(" normal " + normal.toString()) ; if (color != null) - System.out.println(" color " + color.toString()) ; + System.err.println(" color " + color.toString()) ; } } @@ -212,7 +212,7 @@ class GeometryDecompressorShape3D extends GeometryDecompressor { * with each vertex in the compressed buffer. */ void outputColor(Color4f color) { - if (debug) System.out.println(" outputColor: " + color.toString()) ; + if (debug) System.err.println(" outputColor: " + color.toString()) ; if (vlist.size() > 0) { // Construct Shape3D using the current color. @@ -234,7 +234,7 @@ class GeometryDecompressorShape3D extends GeometryDecompressor { * buffer. */ void outputNormal(Vector3f normal) { - if (debug) System.out.println(" outputNormal: " + normal.toString()) ; + if (debug) System.err.println(" outputNormal: " + normal.toString()) ; if ((vlist.vertexFormat & GeometryArray.NORMALS) == 0) { if (vlist.size() > 0) @@ -335,33 +335,33 @@ class GeometryDecompressorShape3D extends GeometryDecompressor { } private void beginPrint() { - System.out.println("\nGeometryDecompressorShape3D") ; + System.err.println("\nGeometryDecompressorShape3D") ; switch(bufferDataType) { case TYPE_TRIANGLE: - System.out.println(" buffer TYPE_TRIANGLE") ; + System.err.println(" buffer TYPE_TRIANGLE") ; break ; case TYPE_LINE: - System.out.println(" buffer TYPE_LINE") ; + System.err.println(" buffer TYPE_LINE") ; break ; case TYPE_POINT: - System.out.println(" buffer TYPE_POINT") ; + System.err.println(" buffer TYPE_POINT") ; break ; default: throw new IllegalArgumentException (J3dI18N.getString("GeometryDecompressorShape3D1")) ; } - System.out.print(" buffer data present: coords") ; + System.err.print(" buffer data present: coords") ; if ((dataPresent & CompressedGeometryHeader.NORMAL_IN_BUFFER) != 0) - System.out.print(" normals") ; + System.err.print(" normals") ; if ((dataPresent & CompressedGeometryHeader.COLOR_IN_BUFFER) != 0) - System.out.print(" colors") ; + System.err.print(" colors") ; if ((dataPresent & CompressedGeometryHeader.ALPHA_IN_BUFFER) != 0) - System.out.print(" alpha") ; + System.err.print(" alpha") ; - System.out.println() ; + System.err.println() ; stripCount = 0 ; vertexCount = 0 ; @@ -383,24 +383,24 @@ class GeometryDecompressorShape3D extends GeometryDecompressor { private void printBench() { float t = (endTime - startTime) / 1000.0f ; - System.out.println + System.err.println (" decompression + strip conversion took " + t + " sec.") ; switch(bufferDataType) { case TYPE_POINT: - System.out.println + System.err.println (" points decompressed: " + vertexCount + "\n" + " net decompression rate: " + (vertexCount/t) + " points/sec.\n") ; break ; case TYPE_LINE: - System.out.println + System.err.println (" lines decompressed: " + (vertexCount - stripCount) + "\n" + " net decompression rate: " + ((vertexCount - stripCount)/t) + " lines/sec.\n") ; break ; case TYPE_TRIANGLE: - System.out.println + System.err.println (" triangles decompressed: " + (vertexCount - 2*stripCount) + "\n" + " net decompression rate: " + @@ -412,55 +412,55 @@ class GeometryDecompressorShape3D extends GeometryDecompressor { private void printStats() { switch(triOutputType) { case TRI_SET: - System.out.println(" using individual triangle output") ; + System.err.println(" using individual triangle output") ; break ; case TRI_STRIP_SET: - System.out.println(" using strip output") ; + System.err.println(" using strip output") ; break ; case TRI_STRIP_AND_FAN_SET: - System.out.println(" using strips and fans for output") ; + System.err.println(" using strips and fans for output") ; break ; case TRI_STRIP_AND_TRI_SET: - System.out.println(" using strips and triangles for output") ; + System.err.println(" using strips and triangles for output") ; break ; } - System.out.print + System.err.print (" number of Shape3D objects: " + shapes.size() + "\n number of Shape3D decompressed vertices: ") ; if (triOutputType == TRI_SET || bufferDataType == TYPE_POINT) { - System.out.println(vertexCount) ; + System.err.println(vertexCount) ; } else if (triOutputType == TRI_STRIP_AND_TRI_SET) { - System.out.println((vertexCount + triangleCount*3) + + System.err.println((vertexCount + triangleCount*3) + "\n number of strips: " + stripCount + "\n number of individual triangles: " + triangleCount) ; if (stripCount > 0) - System.out.println + System.err.println (" vertices/strip: " + (float)vertexCount/stripCount + "\n triangles represented in strips: " + (vertexCount - 2*stripCount)) ; } else { - System.out.println(vertexCount + + System.err.println(vertexCount + "\n number of strips: " + stripCount) ; if (stripCount > 0) - System.out.println + System.err.println (" vertices/strip: " + (float)vertexCount/stripCount) ; } - System.out.print(" vertex data present in last Shape3D: coords") ; + System.err.print(" vertex data present in last Shape3D: coords") ; if ((vlist.vertexFormat & GeometryArray.NORMALS) != 0) - System.out.print(" normals") ; + System.err.print(" normals") ; if ((vlist.vertexFormat & GeometryArray.COLOR) != 0) { - System.out.print(" colors") ; + System.err.print(" colors") ; if ((vlist.vertexFormat & GeometryArray.WITH_ALPHA) != 0) - System.out.print(" alpha") ; + System.err.print(" alpha") ; } - System.out.println() ; + System.err.println() ; } } diff --git a/src/classes/share/javax/media/j3d/GeometryStripArrayRetained.java b/src/classes/share/javax/media/j3d/GeometryStripArrayRetained.java index 40ba7f1..8b7b158 100644 --- a/src/classes/share/javax/media/j3d/GeometryStripArrayRetained.java +++ b/src/classes/share/javax/media/j3d/GeometryStripArrayRetained.java @@ -182,13 +182,13 @@ abstract class GeometryStripArrayRetained extends GeometryArrayRetained { if (colorStride == 4) { /* - System.out.println("vdata.length = "+vdata.length); - System.out.println("vertexData.length = "+vertexData.length); - System.out.println("src.stride = "+src.stride); - System.out.println("src.colorOffset = "+src.colorOffset); - System.out.println("index = "+index+" src.indexColor.length = "+src.indexColor.length); - System.out.println("src.indexColor[index] = "+src.indexColor[index]); - System.out.println("base = "+base); + System.err.println("vdata.length = "+vdata.length); + System.err.println("vertexData.length = "+vertexData.length); + System.err.println("src.stride = "+src.stride); + System.err.println("src.colorOffset = "+src.colorOffset); + System.err.println("index = "+index+" src.indexColor.length = "+src.indexColor.length); + System.err.println("src.indexColor[index] = "+src.indexColor[index]); + System.err.println("base = "+base); */ System.arraycopy(vdata, src.indexColor[index]*src.stride + src.colorOffset, diff --git a/src/classes/share/javax/media/j3d/GeometryStructure.java b/src/classes/share/javax/media/j3d/GeometryStructure.java index c68c141..5898f35 100644 --- a/src/classes/share/javax/media/j3d/GeometryStructure.java +++ b/src/classes/share/javax/media/j3d/GeometryStructure.java @@ -182,7 +182,7 @@ class GeometryStructure extends J3dStructure { processBoundsChanged((Object [])m.args[0], false); break; case J3dMessage.GEOMETRY_CHANGED: - // System.out.println("J3dMessage.GEOMETRY_CHANGED"); + // System.err.println("J3dMessage.GEOMETRY_CHANGED"); processBoundsChanged((Object []) m.args[0], false); break; case J3dMessage.RENDERINGATTRIBUTES_CHANGED: @@ -301,7 +301,7 @@ class GeometryStructure extends J3dStructure { clearBhNodeArr(); - // System.out.println("GS : nodes.length is " + nodes.length); + // System.err.println("GS : nodes.length is " + nodes.length); for (int i=0; i= 0) { if (elementData[idx] != o) { - System.out.println("Illegal use of UnorderIndexedList idx in add " + idx); + System.err.println("Illegal use of UnorderIndexedList idx in add " + idx); Thread.dumpStack(); } } @@ -423,7 +423,7 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable { if (debug) { if (elm.listIdx[univIdx][listType] != index) { - System.out.println("Inconsistent idx in remove, expect " + index + " actual " + elm.listIdx[univIdx][listType]); + System.err.println("Inconsistent idx in remove, expect " + index + " actual " + elm.listIdx[univIdx][listType]); Thread.dumpStack(); } } @@ -480,7 +480,7 @@ class IndexedUnorderSet implements Cloneable, java.io.Serializable { if (idx >= 0) { if (debug) { if (o != elementData[idx]) { - System.out.println(this + " Illegal use of UnorderIndexedList in remove expect " + o + " actual " + elementData[idx] + " idx = " + idx); + System.err.println(this + " Illegal use of UnorderIndexedList in remove expect " + o + " actual " + elementData[idx] + " idx = " + idx); Thread.dumpStack(); } } diff --git a/src/classes/share/javax/media/j3d/J3dDebug.java b/src/classes/share/javax/media/j3d/J3dDebug.java index 9215f18..1ea8594 100644 --- a/src/classes/share/javax/media/j3d/J3dDebug.java +++ b/src/classes/share/javax/media/j3d/J3dDebug.java @@ -375,7 +375,7 @@ class J3dDebug { static boolean doDebug(int j3dClassLevel, int level, String str) { if(j3dClassLevel >= level) { - System.out.print(str); + System.err.print(str); return true; } return false; @@ -403,33 +403,33 @@ class J3dDebug { Package p = Package.getPackage(pkgName); if (p == null) { - System.out.println("WARNING: Package.getPackage(" + + System.err.println("WARNING: Package.getPackage(" + pkgName + ") is null"); } else { if(devPhase && debug) { - System.out.println(p); - System.out.println("Specification Title = " + + System.err.println(p); + System.err.println("Specification Title = " + p.getSpecificationTitle()); - System.out.println("Specification Vendor = " + + System.err.println("Specification Vendor = " + p.getSpecificationVendor()); - System.out.println("Specification Version = " + + System.err.println("Specification Version = " + p.getSpecificationVersion()); - System.out.println("Implementation Vendor = " + + System.err.println("Implementation Vendor = " + p.getImplementationVendor()); - System.out.println("Implementation Version = " + + System.err.println("Implementation Version = " + p.getImplementationVersion()); } else if(devPhase) - System.out.println(", Java 3D " + p.getImplementationVersion() + "."); + System.err.println(", Java 3D " + p.getImplementationVersion() + "."); } } catch (ClassNotFoundException e) { - System.out.println("Unable to load " + pkgName); + System.err.println("Unable to load " + pkgName); } - // System.out.println(); + // System.err.println(); } diff --git a/src/classes/share/javax/media/j3d/J3dMessage.java b/src/classes/share/javax/media/j3d/J3dMessage.java index aa1da68..8729999 100644 --- a/src/classes/share/javax/media/j3d/J3dMessage.java +++ b/src/classes/share/javax/media/j3d/J3dMessage.java @@ -137,7 +137,7 @@ class J3dMessage extends Object { } final synchronized void clear() { - // System.out.println("J3dMessage : " + this ); + // System.err.println("J3dMessage : " + this ); view = null; universe = null; args[0] = null; diff --git a/src/classes/share/javax/media/j3d/LightRetained.java b/src/classes/share/javax/media/j3d/LightRetained.java index 404eea7..5584616 100644 --- a/src/classes/share/javax/media/j3d/LightRetained.java +++ b/src/classes/share/javax/media/j3d/LightRetained.java @@ -779,7 +779,7 @@ abstract class LightRetained extends LeafRetained { j = s.keys[i].equals(localToVworldKeys, 0, localToVworldKeys.length); if(j < 0) { - System.out.println("LightRetained : Can't find hashKey"); + System.err.println("LightRetained : Can't find hashKey"); } ml.localToVworld[0] = localToVworld[j]; @@ -818,7 +818,7 @@ abstract class LightRetained extends LeafRetained { // Initialization of the mirror object // If its view Scoped, then add this list // to be sent to Rendering Env - // System.out.println("lightSetLive, s.viewList = "+s.viewLists); + // System.err.println("lightSetLive, s.viewList = "+s.viewLists); if ((s.viewScopedNodeList != null) && (s.viewLists != null)) { s.viewScopedNodeList.add(ml); s.scopedNodesViewList.add(s.viewLists.get(0)); @@ -932,7 +932,7 @@ abstract class LightRetained extends LeafRetained { } if ((s.viewScopedNodeList != null) && (s.viewLists != null)) { s.viewScopedNodeList.add(ml); - //System.out.println("s.viewList is " + s.viewLists); + //System.err.println("s.viewList is " + s.viewLists); s.scopedNodesViewList.add(s.viewLists.get(0)); } else { s.nodeList.add(ml); diff --git a/src/classes/share/javax/media/j3d/LineAttributesRetained.java b/src/classes/share/javax/media/j3d/LineAttributesRetained.java index 3ddebe1..99b3702 100644 --- a/src/classes/share/javax/media/j3d/LineAttributesRetained.java +++ b/src/classes/share/javax/media/j3d/LineAttributesRetained.java @@ -294,7 +294,7 @@ class LineAttributesRetained extends NodeComponentRetained { VirtualUniverse.mc.processMessage(createMessage); - // System.out.println("univList.size is " + univList.size()); + // System.err.println("univList.size is " + univList.size()); for(int i=0; i0) readCount--; else - if(debug) System.out.println("ReadWriteLock.java : Problem! readCount is >= 0."); + if(debug) System.err.println("ReadWriteLock.java : Problem! readCount is >= 0."); if(lockRequested>0) notifyAll(); diff --git a/src/classes/share/javax/media/j3d/MemoryFreeList.java b/src/classes/share/javax/media/j3d/MemoryFreeList.java index 84e42d7..8a2409f 100644 --- a/src/classes/share/javax/media/j3d/MemoryFreeList.java +++ b/src/classes/share/javax/media/j3d/MemoryFreeList.java @@ -52,7 +52,7 @@ class MemoryFreeList { c = Class.forName(className); } catch (Exception e) { - System.out.println(e); + System.err.println(e); } initcap = initialCapacity; @@ -72,7 +72,7 @@ class MemoryFreeList { c = Class.forName(className); } catch (Exception e) { -// System.out.println(e); +// System.err.println(e); } size = collection.size(); @@ -111,7 +111,7 @@ class MemoryFreeList { // check to see if the whole block is used and if so, reset the // current block -// System.out.println("spaceUsed = " + spaceUsed + " currBlockSize = " + +// System.err.println("spaceUsed = " + spaceUsed + " currBlockSize = " + // currBlockSize + " currBlockIndex = " + // currBlockIndex + " currBlock = " + currBlock); if ((currBlockIndex == -1) || (spaceUsed >= currBlockSize)) { @@ -129,9 +129,9 @@ class MemoryFreeList { } protected synchronized Object removeLastElement() { -// System.out.println("removeLastElement: size = " + size); +// System.err.println("removeLastElement: size = " + size); int index = --spaceUsed; -// System.out.println("index = " + index); +// System.err.println("index = " + index); Object elm = currBlock[index]; currBlock[index] = null; size--; @@ -156,16 +156,16 @@ class MemoryFreeList { synchronized void shrink() { -// System.out.println("shrink size = " + size + " minSize = " + +// System.err.println("shrink size = " + size + " minSize = " + // minSize); if ((minSize > minBlockSize) && (numBlocks > 1)) { justShrunk = true; -// System.out.println("removing a block"); +// System.err.println("removing a block"); // Runtime r = Runtime.getRuntime(); // r.gc(); -// System.out.println("numBlocks = " + numBlocks + " size = " + size); -// System.out.println("free memory before shrink: " + r.freeMemory()); +// System.err.println("numBlocks = " + numBlocks + " size = " + size); +// System.err.println("free memory before shrink: " + r.freeMemory()); // remove the last block Object[] block = (Object[])elementData.remove(numBlocks-1); @@ -186,8 +186,8 @@ class MemoryFreeList { } // r.gc(); -// System.out.println("free memory after shrink: " + r.freeMemory()); -// System.out.println("numBlocks = " + numBlocks + " size = " + size); +// System.err.println("free memory after shrink: " + r.freeMemory()); +// System.err.println("numBlocks = " + numBlocks + " size = " + size); } else { justShrunk = false; @@ -196,13 +196,13 @@ class MemoryFreeList { } synchronized void ensureCapacity(int minCapacity) { -// System.out.println("ensureCapacity: size = " + size + " capacity: " + +// System.err.println("ensureCapacity: size = " + size + " capacity: " + // elementData.length); -// System.out.println("minCapacity = " + minCapacity + " capacity = " +// System.err.println("minCapacity = " + minCapacity + " capacity = " // + capacity); if (minCapacity > capacity) { -// System.out.println("adding a block: numBlocks = " + numBlocks); +// System.err.println("adding a block: numBlocks = " + numBlocks); int lastBlockSize = ((Object[])elementData.get(numBlocks-1)).length; int prevBlockSize = 0; @@ -229,7 +229,7 @@ class MemoryFreeList { } public synchronized void clear() { -// System.out.println("clear"); +// System.err.println("clear"); elementData.clear(); // put an empty block in @@ -254,7 +254,7 @@ class MemoryFreeList { return c.newInstance(); } catch (Exception e) { - System.out.println(e); + System.err.println(e); return null; } } diff --git a/src/classes/share/javax/media/j3d/MorphRetained.java b/src/classes/share/javax/media/j3d/MorphRetained.java index 62421b9..83ce95f 100644 --- a/src/classes/share/javax/media/j3d/MorphRetained.java +++ b/src/classes/share/javax/media/j3d/MorphRetained.java @@ -526,9 +526,9 @@ class MorphRetained extends LeafRetained implements GeometryUpdater { } pickInfo.setLocalToVWorldRef( localToVworld); - //System.out.println("MorphRetained.intersect() : "); + //System.err.println("MorphRetained.intersect() : "); if (dist == null) { - //System.out.println(" no dist request ...."); + //System.err.println(" no dist request ...."); return intersect(pickInfo, pickShape, 0); } @@ -1205,7 +1205,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater { if ((component & APPEARANCEOVERRIDE_CHANGED) != 0) { Object[] arg = (Object[])objs[3]; int val = ((Integer)arg[1]).intValue(); - System.out.println("ChangedFrequent = "+changedFrequent); + System.err.println("ChangedFrequent = "+changedFrequent); for ( i = msArr.length-1; i >=0; i--) { msArr[i].appearanceOverrideEnable = ((Boolean)arg[0]).booleanValue(); msArr[i].changedFrequent = val; @@ -1263,7 +1263,7 @@ class MorphRetained extends LeafRetained implements GeometryUpdater { j = s.keys[i].equals(localToVworldKeys, 0, localToVworldKeys.length); if(j < 0) { - System.out.println("MorphRetained : Can't find hashKey"); + System.err.println("MorphRetained : Can't find hashKey"); } shape.localToVworld[0] = localToVworld[j]; diff --git a/src/classes/share/javax/media/j3d/NnuIdManager.java b/src/classes/share/javax/media/j3d/NnuIdManager.java index 60dabef..1527883 100644 --- a/src/classes/share/javax/media/j3d/NnuIdManager.java +++ b/src/classes/share/javax/media/j3d/NnuIdManager.java @@ -325,7 +325,7 @@ class NnuIdManager { final static void printIds(NnuId nnuIdArr[]) { for(int i=0; i 0)) { - //System.out.println("PickInfo.pick() - In geometry case : pickInfoList.size() is " + pickInfoListSize); + //System.err.println("PickInfo.pick() - In geometry case : pickInfoList.size() is " + pickInfoListSize); PickInfo pickInfo = null; Node pickNode = null; @@ -872,7 +872,7 @@ public class PickInfo extends Object { } if (((Shape3DRetained)(pickNode.retained)).intersect(pickInfo, pickShape, flags) == false) { - // System.out.println(" ---- geom " + i + " not intersected"); + // System.err.println(" ---- geom " + i + " not intersected"); pickInfoList.remove(i); @@ -946,11 +946,11 @@ public class PickInfo extends Object { } } - // System.out.println("PickInfo : pickInfoList " + pickInfoList); + // System.err.println("PickInfo : pickInfoList " + pickInfoList); if ((pickInfoList != null) && (pickInfoList.size() > 0)) { - // System.out.println(" --- : pickInfoList.size() " + pickInfoList.size()); - // System.out.println(" --- : pickInfoList's sgp " + + // System.err.println(" --- : pickInfoList.size() " + pickInfoList.size()); + // System.err.println(" --- : pickInfoList's sgp " + // ((PickInfo)(pickInfoList.get(0))).getSceneGraphPath()); pickInfoArr = new PickInfo[pickInfoList.size()]; return (PickInfo []) pickInfoList.toArray(pickInfoArr); diff --git a/src/classes/share/javax/media/j3d/PointAttributesRetained.java b/src/classes/share/javax/media/j3d/PointAttributesRetained.java index 54947cc..4df6e98 100644 --- a/src/classes/share/javax/media/j3d/PointAttributesRetained.java +++ b/src/classes/share/javax/media/j3d/PointAttributesRetained.java @@ -173,7 +173,7 @@ class PointAttributesRetained extends NodeComponentRetained { VirtualUniverse.mc.processMessage(createMessage); - // System.out.println("univList.size is " + univList.size()); + // System.err.println("univList.size is " + univList.size()); for(int i=0; i"); + // System.err.println("dirtyRenderMoleculeList.size = "+dirtyRenderMoleculeList.size()); + // System.err.println("reEvaluateBg = "+reEvaluateBg); + // System.err.println("reEvaluateClip = "+reEvaluateClip); + // System.err.println("<========+End All Cached Values===========>"); // Add the new lightBins that have been created - // System.out.println("objUpdateList.size = "+objUpdateList.size()); - // System.out.println("addOpaqueBin = "+addOpaqueBin); - // System.out.println("opaqueBin = "+opaqueBin); + // System.err.println("objUpdateList.size = "+objUpdateList.size()); + // System.err.println("addOpaqueBin = "+addOpaqueBin); + // System.err.println("opaqueBin = "+opaqueBin); // List of renderMolecule from which renderAtoms have been removed size = removeRenderAtomInRMList.size(); @@ -614,7 +614,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate { } size = textureBinList.size(); -//System.out.println("textureBinList.size= " + size); +//System.err.println("textureBinList.size= " + size); if (size > 0) { Canvas3D canvasList[][] = view.getCanvasList(false); Canvas3D cv; @@ -679,7 +679,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate { size = newNodeComponentList.size(); if ( size > 0) { -//System.out.println("newNodeComponentlist.size= " + size); +//System.err.println("newNodeComponentlist.size= " + size); Canvas3D canvases[] = view.getCanvases(); for (i = 0; i < size; i++) { // Evaluate the nodeComponentList for all the canvases @@ -814,7 +814,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate { xform.transform(eyeInVworld); } if (transpSortMode == View.TRANSPARENCY_SORT_GEOMETRY && transparentInfo != null) { - // System.out.println("sortAll 1"); + // System.err.println("sortAll 1"); sortAll = true; } } @@ -842,7 +842,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate { if (size > 0 && 1.5f * numDirtyTinfo > nElements) { - // System.out.println("sortAll 3, size = "+size); + // System.err.println("sortAll 3, size = "+size); sortAll = true; } @@ -860,7 +860,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate { } if (dirtyList != null) { - // System.out.println("====> sort Some"); + // System.err.println("====> sort Some"); dirtyList = depthSortAll(dirtyList); // Now merge the newly sorted list with the old one transparentInfo = mergeDepthSort(transparentInfo, dirtyList); @@ -957,9 +957,9 @@ class RenderBin extends J3dStructure implements ObjectUpdate { clearAllUpdateObjectState(); /* if (opaqueBin != null) { - System.out.println(this + "***** Begin Dumping OpaqueBin *****"); + System.err.println(this + "***** Begin Dumping OpaqueBin *****"); dumpBin(opaqueBin); - System.out.println("***** End Dumping OpaqueBin *****"); + System.err.println("***** End Dumping OpaqueBin *****"); } */ @@ -1014,7 +1014,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate { GeometryArrayRetained geo = (GeometryArrayRetained)ra.geometry(); geo.removeDlistUser(this, ra); - // System.out.println("========> geo.refcount = "+geo.refCount); + // System.err.println("========> geo.refcount = "+geo.refCount); // add this geometry's dlist to be freed if (geo.isDlistUserSetEmpty(this)) { rdr.displayListResourceFreeList.add(geo.dlistObj); @@ -1776,7 +1776,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate { // computeViewFrustumBox in VisibilityStructure. computeViewFrustumBBox(viewFrustumBBox); - // System.out.println("viewFrustumBBox = " + this); + // System.err.println("viewFrustumBBox = " + this); ViewPlatform vp = view.getViewPlatform(); if (vp != null) { @@ -1997,7 +1997,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate { // If the bin is in soleUser case and one of the components // has been changed to frequent then remove the clone // and point to the mirror - // System.out.println("restructure = "+restructure+" ra.renderMolecule.soleUser ="+ra.renderMolecule.soleUser); + // System.err.println("restructure = "+restructure+" ra.renderMolecule.soleUser ="+ra.renderMolecule.soleUser); if (restructure && !ra.renderMolecule.soleUser) { TextureBin tb = ra.renderMolecule.textureBin; ra.renderMolecule.removeRenderAtom(ra); @@ -2382,7 +2382,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate { */ void processShaderComponentChanged(Object[] args) { - // System.out.println("RenderBin : processShaderComponentChanged"); + // System.err.println("RenderBin : processShaderComponentChanged"); int component = ((Integer)args[1]).intValue(); int i; @@ -2422,7 +2422,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate { //if (false && (sApp.mirror.changedFrequent & component) != 0) { if(false) { /* - System.out.println("RenderBin : Shader sole user (SHADER_PROGRAM)" + + System.err.println("RenderBin : Shader sole user (SHADER_PROGRAM)" + ra.renderMolecule.textureBin.shaderBin); */ @@ -2442,7 +2442,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate { } } else { /* - System.out.println("RenderBin : not soleUser (SHADER_PROGRAM)" + + System.err.println("RenderBin : not soleUser (SHADER_PROGRAM)" + ra.renderMolecule.textureBin.shaderBin); */ @@ -2461,7 +2461,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate { //if (false && (sApp.mirror.changedFrequent & component) != 0) { if(false) { /* - System.out.println("RenderBin : sole user (SHADER_ATTRIBUTE_SET)" + + System.err.println("RenderBin : sole user (SHADER_ATTRIBUTE_SET)" + ra.renderMolecule.textureBin.shaderBin); */ @@ -2482,7 +2482,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate { } } else { /* - System.out.println("RenderBin :not soleUser (SHADER_ATTRIBUTE_SET) " + + System.err.println("RenderBin :not soleUser (SHADER_ATTRIBUTE_SET) " + ra.renderMolecule.textureBin.shaderBin); */ @@ -2570,7 +2570,7 @@ class RenderBin extends J3dStructure implements ObjectUpdate { TextureBin.SOLE_USER) != 0)) { /* -System.out.println("renderbin. texture state changed tb sole user " + +System.err.println("renderbin. texture state changed tb sole user " + ra.renderMolecule.textureBin + " tb.tbFlag= " + ra.renderMolecule.textureBin.tbFlag); */ @@ -2596,11 +2596,11 @@ System.out.println("renderbin. texture state changed tb sole user " + } } else { /* -System.out.println("renderbin. texture state changed tb not sole user " + +System.err.println("renderbin. texture state changed tb not sole user " + ra.renderMolecule.textureBin + " tb.tbFlag= " + ra.renderMolecule.textureBin.tbFlag); -System.out.println("......tb.soleUser= " + +System.err.println("......tb.soleUser= " + ((ra.renderMolecule.textureBin.tbFlag & TextureBin.SOLE_USER) != 0) + " app.mirror.changedFrequent= " + ((app.mirror.changedFrequent & TEXTURE_STATE_CHANGED) != 0)); @@ -2666,9 +2666,9 @@ System.out.println("......tb.soleUser= " + AppearanceRetained.POLYGON | AppearanceRetained.LINE| AppearanceRetained.POINT)) != 0) { - // System.out.println("AppearanceRetained.POINT = "+AppearanceRetained.POINT); - // System.out.println("(app.mirror.changedFrequent & component) != 0 "+app.mirror.changedFrequent ); - // System.out.println("ra.renderMolecule.soleUser "+ra.renderMolecule.soleUser); + // System.err.println("AppearanceRetained.POINT = "+AppearanceRetained.POINT); + // System.err.println("(app.mirror.changedFrequent & component) != 0 "+app.mirror.changedFrequent ); + // System.err.println("ra.renderMolecule.soleUser "+ra.renderMolecule.soleUser); if ((app.mirror.changedFrequent & component) != 0 && ra.renderMolecule.soleUser) { for (i = start; i < gaArr.length; i++) { @@ -3369,7 +3369,7 @@ System.out.println("......tb.soleUser= " + continue; } /* - System.out.println("numShapes is " + numShapes + + System.err.println("numShapes is " + numShapes + " transforms.length is " + transforms.length); */ for (j=0; j adding to the dirty list .., transpSortMode = "+transpSortMode); + // System.err.println("========> adding to the dirty list .., transpSortMode = "+transpSortMode); if (dirtyDepthSortRenderAtom.add(ra)) { numDirtyTinfo += ra.rListInfo.length; } @@ -3851,7 +3851,7 @@ System.out.println("......tb.soleUser= " + RenderAtom renderAtom; RenderMolecule rm; - // System.out.println("+"); + // System.err.println("+"); GeometryRetained geo = null; @@ -3878,8 +3878,8 @@ System.out.println("......tb.soleUser= " + if (renderAtom.geometryAtom.source.viewList != null) { if (renderAtom.geometryAtom.source.viewList.contains(view)) { - // System.out.println("Inserting RenderAtom, ra = "+renderAtom); - // System.out.println("ga = "+renderAtom.geometryAtom+" renderAtom.geometryAtom.source.viewList = "+renderAtom.geometryAtom.source.viewList); + // System.err.println("Inserting RenderAtom, ra = "+renderAtom); + // System.err.println("ga = "+renderAtom.geometryAtom+" renderAtom.geometryAtom.source.viewList = "+renderAtom.geometryAtom.source.viewList); rm = insertRenderAtom(renderAtom); } } @@ -4294,7 +4294,7 @@ System.out.println("......tb.soleUser= " + private void reInsertShaderBin(AttributeBin ab, RenderAtom ra) { ShaderBin sb; - // System.out.println("RenderBin.reInsertShaderBin() ra= " + ra); + // System.err.println("RenderBin.reInsertShaderBin() ra= " + ra); sb = findShaderBin(ab, ra); reInsertTextureBin(sb, ra); } @@ -4368,7 +4368,7 @@ System.out.println("......tb.soleUser= " + Object[] retVal; GeometryAtom ga = ra.geometryAtom; - // System.out.println("insertRenderAtom ga " + ra.geometryAtom); + // System.err.println("insertRenderAtom ga " + ra.geometryAtom); // determine if a separate copy of localeVwcBounds is needed // based on the locale info @@ -4418,7 +4418,7 @@ System.out.println("......tb.soleUser= " + environmentSet = findEnvironmentSet(ra); attributeBin = findAttributeBin(environmentSet, ra); - // System.out.println("RenderBin : findShaderBin()"); + // System.err.println("RenderBin : findShaderBin()"); shaderBin = findShaderBin(attributeBin, ra); textureBin = findTextureBin(shaderBin, ra); @@ -4754,7 +4754,7 @@ System.out.println("......tb.soleUser= " + currentBin = shaderBin.textureBinList; while (currentBin != null) { if (currentBin.equals(texUnitState, ra)) { - //System.out.println("1: Equal"); + //System.err.println("1: Equal"); return(currentBin); } currentBin = currentBin.next; @@ -4764,7 +4764,7 @@ System.out.println("......tb.soleUser= " + for (i = 0; i < size; i++) { currentBin = (TextureBin)shaderBin.addTextureBins.get(i); if (currentBin.equals(texUnitState, ra)) { - //System.out.println("2: Equal"); + //System.err.println("2: Equal"); return(currentBin); } } @@ -5154,9 +5154,9 @@ System.out.println("......tb.soleUser= " + */ void renderOpaque(Canvas3D cv) { LightBin currentBin = opaqueBin; - //System.out.println("========> renderOpaque"); + //System.err.println("========> renderOpaque"); while (currentBin != null) { - //System.out.println("====> rendering Opaque Bin "); + //System.err.println("====> rendering Opaque Bin "); currentBin.render(cv); currentBin = currentBin.next; } @@ -5169,10 +5169,10 @@ System.out.println("......tb.soleUser= " + void renderTransparent(Canvas3D cv) { boolean savedDepthBufferWriteEnable = true; - //System.out.println("====> renderTransparent"); + //System.err.println("====> renderTransparent"); TransparentRenderingInfo tinfo = transparentInfo; if (tinfo != null) { - //System.out.println("====> rendering transparent Bin"); + //System.err.println("====> rendering transparent Bin"); if (cv.view.depthBufferFreezeTransparent) { cv.setDepthBufferWriteEnableOverride(true); @@ -5203,7 +5203,7 @@ System.out.println("......tb.soleUser= " + * This renders the ordered objects */ void renderOrdered(Canvas3D cv) { - // System.out.println("******renderOrdered, orderedBins.size() = "+orderedBins.size()+" RenderBin = "+this); + // System.err.println("******renderOrdered, orderedBins.size() = "+orderedBins.size()+" RenderBin = "+this); if (orderedBins.size() > 0) renderOrderedBins(cv, orderedBins, false); } @@ -5228,7 +5228,7 @@ System.out.println("......tb.soleUser= " + boolean isDecal = (og instanceof DecalGroupRetained) && cv.systemStencilAvailable; int size = orderedBin.orderedCollections.size(); - // System.out.println("RB : orderedBin.orderedCollections.size() " + size); + // System.err.println("RB : orderedBin.orderedCollections.size() " + size); for (i=0; i remove ga = "+ra.geometryAtom); + // System.err.println("===> remove ga = "+ra.geometryAtom); ra.setRenderBin(false); ra.renderMolecule.removeRenderAtom(ra); if (ra.inDirtyOrientedRAs()) { @@ -5962,27 +5962,27 @@ System.out.println("......tb.soleUser= " + void dumpBin(LightBin bin) { LightBin obin = bin; while (obin != null) { - System.out.println("LightBin = "+obin); + System.err.println("LightBin = "+obin); EnvironmentSet envSet = obin.environmentSetList; while (envSet != null) { - System.out.println(" EnvSet = "+envSet); + System.err.println(" EnvSet = "+envSet); AttributeBin abin = envSet.attributeBinList; while (abin != null) { - System.out.println(" ABin = "+abin); + System.err.println(" ABin = "+abin); ShaderBin sbin = abin.shaderBinList; while (sbin != null) { - System.out.println(" SBin = "+sbin); + System.err.println(" SBin = "+sbin); TextureBin tbin = sbin.textureBinList; while (tbin != null) { - System.out.println(" Tbin = "+tbin); + System.err.println(" Tbin = "+tbin); RenderMolecule rm = tbin.opaqueRMList; - System.out.println("===> Begin Dumping OpaqueBin"); + System.err.println("===> Begin Dumping OpaqueBin"); dumpRM(rm); - System.out.println("===> End Dumping OpaqueBin"); + System.err.println("===> End Dumping OpaqueBin"); rm = tbin.transparentRMList; - System.out.println("===> Begin Dumping transparentBin"); + System.err.println("===> Begin Dumping transparentBin"); dumpRM(rm); - System.out.println("===> End Dumping transparentBin"); + System.err.println("===> End Dumping transparentBin"); tbin = tbin.next; } sbin = sbin.next; @@ -5998,33 +5998,33 @@ System.out.println("......tb.soleUser= " + void dumpRM(RenderMolecule rm) { while (rm != null) { - System.out.println(" rm = "+rm+" numRAs = "+rm.numRenderAtoms); - System.out.println(" primaryRenderAtomList = "+ + System.err.println(" rm = "+rm+" numRAs = "+rm.numRenderAtoms); + System.err.println(" primaryRenderAtomList = "+ rm.primaryRenderAtomList); RenderAtomListInfo rinfo = rm.primaryRenderAtomList; while (rinfo != null) { - System.out.println(" rinfo = "+rinfo); - System.out.println(" rinfo.ra.localeVwcBounds = " + System.err.println(" rinfo = "+rinfo); + System.err.println(" rinfo.ra.localeVwcBounds = " + rinfo.renderAtom.localeVwcBounds); - System.out.println(" rinfo.ra.ga.so.vwcBounds = " + System.err.println(" rinfo.ra.ga.so.vwcBounds = " + rinfo.renderAtom.geometryAtom.source.vwcBounds); - System.out.println(" geometry = "+rinfo.geometry()); + System.err.println(" geometry = "+rinfo.geometry()); rinfo = rinfo.next; } - System.out.println(" separateDlistRenderAtomList = "+ + System.err.println(" separateDlistRenderAtomList = "+ rm.separateDlistRenderAtomList); rinfo = rm.separateDlistRenderAtomList; while (rinfo != null) { - System.out.println(" rinfo = "+rinfo); - System.out.println(" rinfo.ra.localeVwcBounds = " + System.err.println(" rinfo = "+rinfo); + System.err.println(" rinfo.ra.localeVwcBounds = " + rinfo.renderAtom.localeVwcBounds); - System.out.println(" rinfo.ra.ga.so.vwcBounds = " + System.err.println(" rinfo.ra.ga.so.vwcBounds = " + rinfo.renderAtom.geometryAtom.source.vwcBounds); - System.out.println(" geometry = "+rinfo.geometry()); + System.err.println(" geometry = "+rinfo.geometry()); rinfo = rinfo.next; } - System.out.println(" vertexArrayRenderAtomList = "+ + System.err.println(" vertexArrayRenderAtomList = "+ rm.vertexArrayRenderAtomList); if (rm.next == null) { rm= rm.nextMap; @@ -6036,7 +6036,7 @@ System.out.println("......tb.soleUser= " + } void removeTransparentObject (Object obj) { - // System.out.println("&&&&&&&&&&&&removeTransparentObject r = "+obj); + // System.err.println("&&&&&&&&&&&&removeTransparentObject r = "+obj); if (obj instanceof TextureBin) { TextureBin tb = (TextureBin) obj; if (tb.environmentSet.lightBin.geometryBackground != null) { @@ -6060,7 +6060,7 @@ System.out.println("......tb.soleUser= " + else { int index = allTransparentObjects.indexOf(obj); if (index == -1) { - // System.out.println("==> DEBUG1: Should never come here!"); + // System.err.println("==> DEBUG1: Should never come here!"); return; } allTransparentObjects.remove(index); @@ -6087,7 +6087,7 @@ System.out.println("......tb.soleUser= " + else { int index = allTransparentObjects.indexOf(obj); if (index == -1) { - // System.out.println("==> DEBUG2: Should never come here!"); + // System.err.println("==> DEBUG2: Should never come here!"); return; } @@ -6121,7 +6121,7 @@ System.out.println("......tb.soleUser= " + } void updateTransparentInfo(RenderAtom r) { - // System.out.println("===> update transparent Info"); + // System.err.println("===> update transparent Info"); for (int i = 0; i < r.parentTInfo.length; i++) { if (r.parentTInfo[i] == null) @@ -6136,7 +6136,7 @@ System.out.println("......tb.soleUser= " + } void addTransparentObject (Object obj) { - // System.out.println("&&&&&&&&&&&&addTransparentObject r = "+obj); + // System.err.println("&&&&&&&&&&&&addTransparentObject r = "+obj); if (obj instanceof TextureBin) { TextureBin tb = (TextureBin) obj; // Background geometry @@ -6155,7 +6155,7 @@ System.out.println("......tb.soleUser= " + r.parentTInfo = new TransparentRenderingInfo[r.rListInfo.length]; } computeDirtyAcrossTransparentBins(r); - // System.out.println("update Centroid 2, ga = "+r.geometryAtom); + // System.err.println("update Centroid 2, ga = "+r.geometryAtom); r.geometryAtom.updateCentroid(); if (dirtyDepthSortRenderAtom.add(r)) { numDirtyTinfo += r.rListInfo.length; @@ -6166,7 +6166,7 @@ System.out.println("......tb.soleUser= " + } */ r.dirtyMask |= RenderAtom.IN_SORTED_POS_DIRTY_TRANSP_LIST; - // System.out.println("transparentInfo ="+transparentInfo); + // System.err.println("transparentInfo ="+transparentInfo); } } @@ -6279,7 +6279,7 @@ System.out.println("......tb.soleUser= " + // If this was a dlist molecule, since we will be rendering // as separate dlist per rinfo, destroy the display list if ((r.primaryMoleculeType &RenderMolecule.DLIST_MOLECULE) != 0) { - // System.out.println("&&&&&&&&& changing from dlist to dlist_per_rinfo"); + // System.err.println("&&&&&&&&& changing from dlist to dlist_per_rinfo"); addDisplayListResourceFreeList(r); removeDirtyRenderMolecule(r); @@ -6320,7 +6320,7 @@ System.out.println("......tb.soleUser= " + allTransparentObjects = newList; } else if (oldMode == View.TRANSPARENCY_SORT_GEOMETRY && newMode == View.TRANSPARENCY_SORT_NONE) { - // System.out.println("oldMode = TRANSPARENCY_SORT_GEOMETRY, newMode = TRANSPARENCY_SORT_NONE"); + // System.err.println("oldMode = TRANSPARENCY_SORT_GEOMETRY, newMode = TRANSPARENCY_SORT_NONE"); size = allTransparentObjects.size(); for (i = 0; i < size; i++) { RenderAtom r= (RenderAtom)allTransparentObjects.get(i); @@ -6347,18 +6347,18 @@ System.out.println("......tb.soleUser= " + TransparentRenderingInfo input1 = oldList , input2 = newList, nextN; TransparentRenderingInfo lastInput1 = oldList; double zval1, zval2; - // System.out.println("&&&&&&&&mergeDepthSort"); + // System.err.println("&&&&&&&&mergeDepthSort"); /* TransparentRenderingInfo t = oldList; - System.out.println(""); + System.err.println(""); while (t != null) { - System.out.println("==> old t = "+t); + System.err.println("==> old t = "+t); t = t.next; } - System.out.println(""); + System.err.println(""); t = newList; while (t != null) { - System.out.println("==> new t = "+t); + System.err.println("==> new t = "+t); t = t.next; } */ @@ -6370,16 +6370,16 @@ System.out.println("......tb.soleUser= " + zval2 = input2.zVal; // Put the newList before the current one -// System.out.print("Code path 1 "); +// System.err.print("Code path 1 "); // if (transparencySortComparator!=null) // if (zval2 > zval1 && (transparencySortComparator.compare(input2, input1)>0)) -// System.out.println("PASS"); +// System.err.println("PASS"); // else -// System.out.println("FAIL"); +// System.err.println("FAIL"); if ((transparencySortComparator==null && zval2 > zval1) || (transparencySortComparator!=null && (transparencySortComparator.compare(input2, input1)>0))){ - // System.out.println("===> path1"); + // System.err.println("===> path1"); if (input1.prev == null) { input1.prev = input2; input2.prev = null; @@ -6387,7 +6387,7 @@ System.out.println("......tb.soleUser= " + oldList = input2; } else { - // System.out.println("===> path2"); + // System.err.println("===> path2"); input2.prev = input1.prev; input1.prev.next = input2; input2.next = input1; @@ -6396,7 +6396,7 @@ System.out.println("......tb.soleUser= " + input2 = nextN; } else { - // System.out.println("===> path3"); + // System.err.println("===> path3"); input1 = input1.next; } } @@ -6416,7 +6416,7 @@ System.out.println("......tb.soleUser= " + // void insertDepthSort(RenderAtom r) { // TransparentRenderingInfo tinfo = null; -// // System.out.println("&&&&&&&&insertDepthSort"); +// // System.err.println("&&&&&&&&insertDepthSort"); // for (int i = 0; i < r.rListInfo.length; i++) { // if (r.parentTInfo[i] == null) // continue; @@ -6435,11 +6435,11 @@ System.out.println("......tb.soleUser= " + // tinfo = tinfo.next; // } // else { -// System.out.println("Code Path 2 "); +// System.err.println("Code Path 2 "); // if (tinfo!=null && (transparencySortComparator.compare(r.parentTInfo[i], tinfo)<0)==r.parentTInfo[i].zVal < tinfo.zVal) -// System.out.println("PASS"); +// System.err.println("PASS"); // else -// System.out.println("FAIL"); +// System.err.println("FAIL"); // while (tinfo != null && transparencySortComparator.compare(r.parentTInfo[i], tinfo)<0) { // prevInfo = tinfo; // tinfo = tinfo.next; @@ -6505,18 +6505,18 @@ System.out.println("......tb.soleUser= " + transparencySortComparator = com.sun.j3d.utils.scenegraph.transparency.TransparencySortController.getComparator(view); TransparentRenderingInfo tinfo, previnfo, nextinfo; double curZ; - // System.out.println("&&&&&&&&&&&depthSortAll"); + // System.err.println("&&&&&&&&&&&depthSortAll"); // Do insertion sort /* tinfo = startinfo; while (tinfo != null) { - System.out.println("Soreted tinfo= "+tinfo+" tinfo.prev = "+tinfo.prev+" tinfo.next = "+tinfo.next); + System.err.println("Soreted tinfo= "+tinfo+" tinfo.prev = "+tinfo.prev+" tinfo.next = "+tinfo.next); tinfo = tinfo.next; } */ tinfo = startinfo.next; while (tinfo != null) { - // System.out.println("====> Doing tinfo = "+tinfo); + // System.err.println("====> Doing tinfo = "+tinfo); nextinfo = tinfo.next; curZ = tinfo.zVal; previnfo = tinfo.prev; @@ -6527,11 +6527,11 @@ System.out.println("......tb.soleUser= " + previnfo = previnfo.prev; } } else { -// System.out.println("Code Path 3 "); +// System.err.println("Code Path 3 "); // if (tinfo!=null && (transparencySortComparator.compare(previnfo, tinfo)<0)==previnfo.zVal < curZ) -// System.out.println("PASS"); +// System.err.println("PASS"); // else -// System.out.println("FAIL"); +// System.err.println("FAIL"); while (previnfo != null && transparencySortComparator.compare(previnfo,tinfo)<0) { previnfo = previnfo.prev; } @@ -6561,15 +6561,15 @@ System.out.println("......tb.soleUser= " + previnfo.next.prev = tinfo; tinfo.prev = previnfo; previnfo.next = tinfo; - // System.out.println("path2, tinfo.prev = "+tinfo.prev); - // System.out.println("path2, tinfo.next = "+tinfo.next); + // System.err.println("path2, tinfo.prev = "+tinfo.prev); + // System.err.println("path2, tinfo.next = "+tinfo.next); } } /* TransparentRenderingInfo tmp = startinfo; while (tmp != null) { - System.out.println("Soreted tmp= "+tmp+" tmp.prev = "+tmp.prev+" tmp.next = "+tmp.next); + System.err.println("Soreted tmp= "+tmp+" tmp.prev = "+tmp.prev+" tmp.next = "+tmp.next); tmp = tmp.next; } */ @@ -6601,20 +6601,20 @@ System.out.println("......tb.soleUser= " + } tinfo = startinfo; while (tinfo != null) { - System.out.println("z = "+((double[])distMap.get(tinfo.rInfo.renderAtom))[tinfo.rInfo.index]+" ga = "+tinfo.rInfo.renderAtom.geometryAtom); + System.err.println("z = "+((double[])distMap.get(tinfo.rInfo.renderAtom))[tinfo.rInfo.index]+" ga = "+tinfo.rInfo.renderAtom.geometryAtom); tinfo = tinfo.next; } - System.out.println("\n\n"); + System.err.println("\n\n"); tinfo = startinfo; while (tinfo != null) { if (tinfo.render) { - System.out.println("same z = "+((double[])distMap.get(tinfo.rInfo.renderAtom))[tinfo.rInfo.index]+" ga = "+tinfo.rInfo.renderAtom.geometryAtom); + System.err.println("same z = "+((double[])distMap.get(tinfo.rInfo.renderAtom))[tinfo.rInfo.index]+" ga = "+tinfo.rInfo.renderAtom.geometryAtom); GeometryAtom ga = tinfo.rInfo.renderAtom.geometryAtom; - System.out.println("ga.geometryArray.length = "+ga.geometryArray.length); + System.err.println("ga.geometryArray.length = "+ga.geometryArray.length); for (int k = 0; k < ga.geometryArray.length; k++) { - System.out.println("geometry "+k+" = "+ga.geometryArray[k]); + System.err.println("geometry "+k+" = "+ga.geometryArray[k]); if (ga.geometryArray[k] != null) { - System.out.println(" vcount = "+((GeometryArrayRetained)ga.geometryArray[k]).getVertexCount()); + System.err.println(" vcount = "+((GeometryArrayRetained)ga.geometryArray[k]).getVertexCount()); ((GeometryArrayRetained)ga.geometryArray[k]).printCoordinates(); } } diff --git a/src/classes/share/javax/media/j3d/RenderMolecule.java b/src/classes/share/javax/media/j3d/RenderMolecule.java index b3c26d7..8addcce 100644 --- a/src/classes/share/javax/media/j3d/RenderMolecule.java +++ b/src/classes/share/javax/media/j3d/RenderMolecule.java @@ -696,7 +696,7 @@ class RenderMolecule extends IndexedObject implements ObjectUpdate, NodeComponen evalAlphaUsage(renderAttrs, texUnits); isOpaqueOrInOG = isOpaque() || (ga.source.orderedPath != null); inOrderedGroup = (ga.source.orderedPath != null); - // System.out.println("isOpaque = "+isOpaque() +" OrInOG = "+isOpaqueOrInOG); + // System.err.println("isOpaque = "+isOpaque() +" OrInOG = "+isOpaqueOrInOG); if (mask != 0) { if ((soleUserCompDirty& ALL_DIRTY_BITS) == 0 ) { renderBin.rmUpdateList.add(this); @@ -808,7 +808,7 @@ class RenderMolecule extends IndexedObject implements ObjectUpdate, NodeComponen if(!(ra.geometryAtom.source instanceof OrientedShape3DRetained) && ((primaryMoleculeType & ORIENTEDSHAPE3D_MOLECULE) != 0)) { - //System.out.println("RA's NOT a OrientedShape3DRetained and RM is a ORIENTEDSHAPE3D_MOLECULE "); + //System.err.println("RA's NOT a OrientedShape3DRetained and RM is a ORIENTEDSHAPE3D_MOLECULE "); return (false); } @@ -1428,7 +1428,7 @@ class RenderMolecule extends IndexedObject implements ObjectUpdate, NodeComponen // If the molecule is already defined to be SEPARATE_DLIST_PER_RINFO_MOLECULE // continue adding in that mode even if it was switched back to // no depth sorted mode - // System.out.println("isOpaqueOrInOG ="+isOpaqueOrInOG+" primaryMoleculeType ="+primaryMoleculeType+" renderBin.transpSortMode ="+renderBin.transpSortMode); + // System.err.println("isOpaqueOrInOG ="+isOpaqueOrInOG+" primaryMoleculeType ="+primaryMoleculeType+" renderBin.transpSortMode ="+renderBin.transpSortMode); if (primaryMoleculeType == SEPARATE_DLIST_PER_RINFO_MOLECULE) { groupType = RenderAtom.SEPARATE_DLIST_PER_RINFO; } @@ -1824,10 +1824,10 @@ class RenderMolecule extends IndexedObject implements ObjectUpdate, NodeComponen } /* - System.out.println("texCoord " + texCoordSetMapLen + " " + + System.err.println("texCoord " + texCoordSetMapLen + " " + cv.maxTexCoordSets + " " + modeSupportDL); - System.out.println("primaryMoleculeType = "+primaryMoleculeType+" primaryRenderAtomList ="+primaryRenderAtomList+" separateDlistRenderAtomList ="+separateDlistRenderAtomList+" vertexArrayRenderAtomList ="+vertexArrayRenderAtomList); + System.err.println("primaryMoleculeType = "+primaryMoleculeType+" primaryRenderAtomList ="+primaryRenderAtomList+" separateDlistRenderAtomList ="+separateDlistRenderAtomList+" vertexArrayRenderAtomList ="+vertexArrayRenderAtomList); */ // Send down the model view only once, if its not of type text if ((primaryMoleculeType & (TEXT3D_MOLECULE| ORIENTEDSHAPE3D_MOLECULE)) == 0) { @@ -1901,7 +1901,7 @@ class RenderMolecule extends IndexedObject implements ObjectUpdate, NodeComponen // If this is a beginning of a frame OR diff. geometryType // then reload everything for the first rendermolecule - // System.out.println("updateAttributes"); + // System.err.println("updateAttributes"); int bitMask = geometryType | Canvas3D.MATERIAL_DIRTY| Canvas3D.COLORINGATTRS_DIRTY| Canvas3D.TRANSPARENCYATTRS_DIRTY; @@ -2075,13 +2075,13 @@ class RenderMolecule extends IndexedObject implements ObjectUpdate, NodeComponen } if ((primaryMoleculeType & (TEXT3D_MOLECULE| ORIENTEDSHAPE3D_MOLECULE)) == 0) { - /* System.out.println("updateAttributes setModelViewMatrix (1)"); */ + /* System.err.println("updateAttributes setModelViewMatrix (1)"); */ Transform3D modelMatrix = trans[localToVworldIndex[NodeRetained.LAST_LOCAL_TO_VWORLD]]; if (cv.modelMatrix != modelMatrix) { - /* System.out.println("updateAttributes setModelViewMatrix (2)"); */ + /* System.err.println("updateAttributes setModelViewMatrix (2)"); */ cv.setModelViewMatrix(cv.ctx, cv.vworldToEc.mat, modelMatrix); @@ -2131,7 +2131,7 @@ class RenderMolecule extends IndexedObject implements ObjectUpdate, NodeComponen modeSupportDL = false; } - // System.out.println("r.isOpaque = "+isOpaque+" rinfo = "+tinfo.rInfo+" groupType = "+tinfo.rInfo.groupType); + // System.err.println("r.isOpaque = "+isOpaque+" rinfo = "+tinfo.rInfo+" groupType = "+tinfo.rInfo.groupType); // Only support individual dlist or varray // If this rInfo is a part of a bigger dlist, render as VA // XXXX: What to do with Text3D, Raster, CG? @@ -2139,8 +2139,8 @@ class RenderMolecule extends IndexedObject implements ObjectUpdate, NodeComponen RenderAtomListInfo save= tinfo.rInfo.next; // Render only one geometry tinfo.rInfo.next = null; - // System.out.println("cachedVertexArrayRenderMethod = "+cachedVertexArrayRenderMethod); - // System.out.println("tinfo.rInfo = "+tinfo.rInfo); + // System.err.println("cachedVertexArrayRenderMethod = "+cachedVertexArrayRenderMethod); + // System.err.println("tinfo.rInfo = "+tinfo.rInfo); if (modeSupportDL) { renderBin.dlistRenderMethod.renderSeparateDlistPerRinfo(this, cv, tinfo.rInfo, @@ -2155,8 +2155,8 @@ class RenderMolecule extends IndexedObject implements ObjectUpdate, NodeComponen RenderAtomListInfo save= tinfo.rInfo.next; // Render only one geometry tinfo.rInfo.next = null; - // System.out.println("cachedVertexArrayRenderMethod = "+cachedVertexArrayRenderMethod); - // System.out.println("tinfo.rInfo = "+tinfo.rInfo); + // System.err.println("cachedVertexArrayRenderMethod = "+cachedVertexArrayRenderMethod); + // System.err.println("tinfo.rInfo = "+tinfo.rInfo); cachedVertexArrayRenderMethod.render(this, cv, tinfo.rInfo, ALL_DIRTY_BITS); tinfo.rInfo.next = save; @@ -2375,7 +2375,7 @@ class RenderMolecule extends IndexedObject implements ObjectUpdate, NodeComponen } } void translate() { - // System.out.println("onUpdateList = "+onUpdateList+" renderBin.localeChanged = "+renderBin.localeChanged+" rm = "+this); + // System.err.println("onUpdateList = "+onUpdateList+" renderBin.localeChanged = "+renderBin.localeChanged+" rm = "+this); int i = localToVworldIndex[NodeRetained.LAST_LOCAL_TO_VWORLD]; localeLocalToVworld[i].mat[0] = localToVworld[i].mat[0]; @@ -2394,7 +2394,7 @@ class RenderMolecule extends IndexedObject implements ObjectUpdate, NodeComponen localeLocalToVworld[i].mat[13] = localToVworld[i].mat[13]; localeLocalToVworld[i].mat[14] = localToVworld[i].mat[14]; localeLocalToVworld[i].mat[15] = localToVworld[i].mat[15]; - // System.out.println("rm = "+this+" localTovworld = "+localeLocalToVworld[i]+" localeTranslation = "+localeTranslation); + // System.err.println("rm = "+this+" localTovworld = "+localeLocalToVworld[i]+" localeTranslation = "+localeTranslation); } @@ -2440,7 +2440,7 @@ class RenderMolecule extends IndexedObject implements ObjectUpdate, NodeComponen boolean updateNodeComponent() { - // System.out.println("soleUser = "+soleUser+" rm = "+this); + // System.err.println("soleUser = "+soleUser+" rm = "+this); if ((soleUserCompDirty & MATERIAL_DIRTY) != 0) { // Note: this RM is a soleUser(only then this function is called) // and if definingMaterial == material, then the material is freq @@ -2451,10 +2451,10 @@ class RenderMolecule extends IndexedObject implements ObjectUpdate, NodeComponen // Evaluate before replacing the old Value if (soleUser) { boolean cloned = definingMaterial != null && definingMaterial != material; - // System.out.println("===>Rm = "+this); + // System.err.println("===>Rm = "+this); - // System.out.println("===> updating node component, cloned = "+cloned+" material.changedFrequent = "+material.changedFrequent); - // System.out.println("===> definingMaterial ="+definingMaterial+" material = "+material); + // System.err.println("===> updating node component, cloned = "+cloned+" material.changedFrequent = "+material.changedFrequent); + // System.err.println("===> definingMaterial ="+definingMaterial+" material = "+material); material = ((AppearanceRetained)appHandle).material; if (material == null) @@ -2611,15 +2611,15 @@ class RenderMolecule extends IndexedObject implements ObjectUpdate, NodeComponen boolean cloned = definingColoringAttributes != null && definingColoringAttributes != coloringAttributes; coloringAttributes = ((AppearanceRetained)appHandle).coloringAttributes; - // System.out.println("coloringAttributes and soleUser"); - // System.out.println("coloringAttributes ="+coloringAttributes); + // System.err.println("coloringAttributes and soleUser"); + // System.err.println("coloringAttributes ="+coloringAttributes); if (coloringAttributes == null) { definingColoringAttributes = null; red = 1.0f; green = 1.0f; blue = 1.0f; } else { - // System.out.println("coloringAttributes.changedFrequent = "+coloringAttributes.changedFrequent ); + // System.err.println("coloringAttributes.changedFrequent = "+coloringAttributes.changedFrequent ); if (coloringAttributes.changedFrequent != 0) { definingColoringAttributes = coloringAttributes; } @@ -2643,7 +2643,7 @@ class RenderMolecule extends IndexedObject implements ObjectUpdate, NodeComponen blue = definingColoringAttributes.color.z; } } - // System.out.println("rm = "+this+"red = "+red+" green = "+green+" blue = "+blue); + // System.err.println("rm = "+this+"red = "+red+" green = "+green+" blue = "+blue); boolean newVal = isOpaque() || inOrderedGroup; return (isOpaqueOrInOG != newVal); diff --git a/src/classes/share/javax/media/j3d/RenderingAttributesRetained.java b/src/classes/share/javax/media/j3d/RenderingAttributesRetained.java index f66a916..18fd794 100644 --- a/src/classes/share/javax/media/j3d/RenderingAttributesRetained.java +++ b/src/classes/share/javax/media/j3d/RenderingAttributesRetained.java @@ -650,11 +650,11 @@ class RenderingAttributesRetained extends NodeComponentRetained { createMessage.args[0] = this; createMessage.args[1]= new Integer(attrMask); createMessage.args[2] = attr; - // System.out.println("changedFreqent1 = "+changedFrequent); + // System.err.println("changedFreqent1 = "+changedFrequent); createMessage.args[3] = new Integer(changedFrequent); VirtualUniverse.mc.processMessage(createMessage); - // System.out.println("univList.size is " + univList.size()); + // System.err.println("univList.size is " + univList.size()); for(int i=0; i 0) { for (i=0; i 0) { for (i = 0; i < size; i++) { altApp = (AlternateAppearanceRetained) globalAltApps.get(i); - // System.out.println("altApp.region = "+altApp.region+" altApp.switchState.currentSwitchOn = "+altApp.switchState.currentSwitchOn+" intersect = "+altApp.region.intersect(ra.geometryAtom.vwcBounds)); - // System.out.println("altApp.isScoped = "+altApp.isScoped); + // System.err.println("altApp.region = "+altApp.region+" altApp.switchState.currentSwitchOn = "+altApp.switchState.currentSwitchOn+" intersect = "+altApp.region.intersect(ra.geometryAtom.vwcBounds)); + // System.err.println("altApp.isScoped = "+altApp.isScoped); // Note : There is no enable check for fog if (altApp.region != null && altApp.switchState.currentSwitchOn) { if (altApp.region.intersect(bounds) == true) { @@ -1416,17 +1416,17 @@ class RenderingEnvironmentStructure extends J3dStructure implements ObjectUpdate ArrayList vlists = (ArrayList)m.args[1]; ArrayList vsgs = (ArrayList)m.args[0]; if (vsgs != null) { - // System.out.println("===> non null Vsg"); + // System.err.println("===> non null Vsg"); int size = vsgs.size(); for (int i = 0; i < size; i++) { ViewSpecificGroupRetained v = (ViewSpecificGroupRetained)vsgs.get(i); ArrayList l = (ArrayList)vlists.get(i); int index = keys[i]; - // System.out.println("v = "+v+" index = "+index+" l = "+l); + // System.err.println("v = "+v+" index = "+index+" l = "+l); v.cachedViewList.add(index, l); /* for (int k = 0; k < v.cachedViewList.size(); k++) { - System.out.println("v = "+v+" k = "+k+" v.cachedViewList.get(k) = "+v.cachedViewList.get(k)); + System.err.println("v = "+v+" k = "+k+" v.cachedViewList.get(k) = "+v.cachedViewList.get(k)); } */ } diff --git a/src/classes/share/javax/media/j3d/SceneGraphObjectRetained.java b/src/classes/share/javax/media/j3d/SceneGraphObjectRetained.java index bfbd3b1..b3a9046 100644 --- a/src/classes/share/javax/media/j3d/SceneGraphObjectRetained.java +++ b/src/classes/share/javax/media/j3d/SceneGraphObjectRetained.java @@ -138,11 +138,11 @@ abstract class SceneGraphObjectRetained extends IndexedObject void traverse(boolean sameLevel, int level) { - System.out.println(); + System.err.println(); for (int i = 0; i < level; i++) { - System.out.print("."); + System.err.print("."); } - System.out.print(this); + System.err.print(this); } /** diff --git a/src/classes/share/javax/media/j3d/SceneGraphPath.java b/src/classes/share/javax/media/j3d/SceneGraphPath.java index 7c16d45..46bbf99 100644 --- a/src/classes/share/javax/media/j3d/SceneGraphPath.java +++ b/src/classes/share/javax/media/j3d/SceneGraphPath.java @@ -639,7 +639,7 @@ public class SceneGraphPath { } final void setIntersectPointDis( Point4d pickLocation ) { - // System.out.println( "setIntersectPointDis pickLocation= "+pickLocation); + // System.err.println( "setIntersectPointDis pickLocation= "+pickLocation); intersectPoint.x = pickLocation.x; intersectPoint.y = pickLocation.y; intersectPoint.z = pickLocation.z; diff --git a/src/classes/share/javax/media/j3d/Screen3D.java b/src/classes/share/javax/media/j3d/Screen3D.java index ba6d817..0167a8b 100644 --- a/src/classes/share/javax/media/j3d/Screen3D.java +++ b/src/classes/share/javax/media/j3d/Screen3D.java @@ -365,7 +365,7 @@ public class Screen3D extends Object { screen = Pipeline.getPipeline().getScreen(graphicsDevice); if (debug) - System.out.println("Screen3D: display " + display + + System.err.println("Screen3D: display " + display + " screen " + screen + " hashcode " + this.hashCode()); @@ -474,7 +474,7 @@ public class Screen3D extends Object { */ void updateViewCache() { if (false) - System.out.println("Screen3D.updateViewCache()"); + System.err.println("Screen3D.updateViewCache()"); synchronized(this) { screenViewCache.snapshot(); } diff --git a/src/classes/share/javax/media/j3d/ScreenViewCache.java b/src/classes/share/javax/media/j3d/ScreenViewCache.java index f887ca4..8f003e8 100644 --- a/src/classes/share/javax/media/j3d/ScreenViewCache.java +++ b/src/classes/share/javax/media/j3d/ScreenViewCache.java @@ -117,6 +117,6 @@ class ScreenViewCache extends Object { this.screen = screen; if (false) - System.out.println("Constructed a ScreenViewCache"); + System.err.println("Constructed a ScreenViewCache"); } } diff --git a/src/classes/share/javax/media/j3d/ShaderAppearanceRetained.java b/src/classes/share/javax/media/j3d/ShaderAppearanceRetained.java index 4e48c71..992a93c 100644 --- a/src/classes/share/javax/media/j3d/ShaderAppearanceRetained.java +++ b/src/classes/share/javax/media/j3d/ShaderAppearanceRetained.java @@ -40,7 +40,7 @@ class ShaderAppearanceRetained extends AppearanceRetained { void setShaderProgram(ShaderProgram sp) { synchronized(liveStateLock) { if (source.isLive()) { - // System.out.println("**** ShaderAppearceRetained.setShaderProgram()"); + // System.err.println("**** ShaderAppearceRetained.setShaderProgram()"); if (this.shaderProgram != null) { this.shaderProgram.clearLive(refCount); @@ -85,7 +85,7 @@ class ShaderAppearanceRetained extends AppearanceRetained { void setShaderAttributeSet(ShaderAttributeSet sas) { synchronized(liveStateLock) { if (source.isLive()) { - // System.out.println("**** ShaderAppearceRetained.setShaderAttributeSet()"); + // System.err.println("**** ShaderAppearceRetained.setShaderAttributeSet()"); if (this.shaderAttributeSet != null) { this.shaderAttributeSet.clearLive(refCount); @@ -98,7 +98,7 @@ class ShaderAppearanceRetained extends AppearanceRetained { ((ShaderAttributeSetRetained)sas.retained).copyMirrorUsers(this); } - // System.out.println(" -- testing needed!"); + // System.err.println(" -- testing needed!"); sendMessage(ShaderConstants.SHADER_ATTRIBUTE_SET, (sas != null ? ((ShaderAttributeSetRetained)sas.retained).mirror : null)); @@ -153,7 +153,7 @@ class ShaderAppearanceRetained extends AppearanceRetained { synchronized void createMirrorObject() { - // System.out.println("ShaderAppearanceRetained : createMirrorObject()"); + // System.err.println("ShaderAppearanceRetained : createMirrorObject()"); if (mirror == null) { // we can't check isStatic() since it sub-NodeComponent @@ -172,7 +172,7 @@ class ShaderAppearanceRetained extends AppearanceRetained { * is not null. */ synchronized void initMirrorObject() { - // System.out.println("ShaderAppearanceRetained : initMirrorObject()"); + // System.err.println("ShaderAppearanceRetained : initMirrorObject()"); super.initMirrorObject(); @@ -190,7 +190,7 @@ class ShaderAppearanceRetained extends AppearanceRetained { (ShaderAttributeSetRetained)shaderAttributeSet.mirror; } else { - // System.out.println("shaderAttributeSet is null"); + // System.err.println("shaderAttributeSet is null"); mirrorApp.shaderAttributeSet = null; } @@ -202,7 +202,7 @@ class ShaderAppearanceRetained extends AppearanceRetained { */ synchronized void updateMirrorObject(int component, Object value) { - // System.out.println("ShaderAppearanceRetained : updateMirrorObject() this " + this); + // System.err.println("ShaderAppearanceRetained : updateMirrorObject() this " + this); super.updateMirrorObject(component, value); ShaderAppearanceRetained mirrorApp = (ShaderAppearanceRetained)mirror; if ((component & ShaderConstants.SHADER_PROGRAM) != 0) { @@ -219,7 +219,7 @@ class ShaderAppearanceRetained extends AppearanceRetained { * objects. */ void doSetLive(boolean backgroundGroup, int refCount) { - // System.out.println("ShaderAppearceRetained.doSetLive()"); + // System.err.println("ShaderAppearceRetained.doSetLive()"); if (shaderProgram != null) { @@ -288,7 +288,7 @@ class ShaderAppearanceRetained extends AppearanceRetained { VirtualUniverse.mc.processMessage(createMessage); - //System.out.println("univList.size is " + univList.size()); + //System.err.println("univList.size is " + univList.size()); for(int i=0; i CAN NEVER BE TRUE"); + // System.err.println("===> CAN NEVER BE TRUE"); return; } else { @@ -2481,7 +2481,7 @@ class Shape3DRetained extends LeafRetained { } } - // System.out.println("Shape3DRetained - getCombineBounds"); + // System.err.println("Shape3DRetained - getCombineBounds"); // Enlarge boundingBox to the "minmium bounds" that encompasses all possible // orientation. if (this instanceof OrientedShape3DRetained) { @@ -2502,10 +2502,10 @@ class Shape3DRetained extends LeafRetained { if(tempVal > maxVal) maxVal = tempVal; - // System.out.println("Shape3DRetained - bounds (Before) " + bounds); + // System.err.println("Shape3DRetained - bounds (Before) " + bounds); bounds.setLower(-maxVal, -maxVal, -maxVal); bounds.setUpper(maxVal, maxVal, maxVal); - // System.out.println("Shape3DRetained - bounds (After) " + bounds); + // System.err.println("Shape3DRetained - bounds (After) " + bounds); } } @@ -2770,7 +2770,7 @@ class Shape3DRetained extends LeafRetained { } } } - // System.out.println("changedFrequent="+changedFrequent+" sourceNode = "+sourceNode+" isAlphaFrequentlyEditable, = "+alphaFrequentlyEditable); + // System.err.println("changedFrequent="+changedFrequent+" sourceNode = "+sourceNode+" isAlphaFrequentlyEditable, = "+alphaFrequentlyEditable); return alphaFrequentlyEditable; } diff --git a/src/classes/share/javax/media/j3d/SharedGroupRetained.java b/src/classes/share/javax/media/j3d/SharedGroupRetained.java index 42f0d1e..ac4036c 100644 --- a/src/classes/share/javax/media/j3d/SharedGroupRetained.java +++ b/src/classes/share/javax/media/j3d/SharedGroupRetained.java @@ -89,7 +89,7 @@ class SharedGroupRetained extends GroupRetained implements TargetsInterface { viewLists = new ArrayList(1); } // If there are some ViewSpecificGroups in the path above this SharedGroup - // System.out.println("====> hkIndex = "+hkIndex+" s.viewLists = "+s.viewLists); + // System.err.println("====> hkIndex = "+hkIndex+" s.viewLists = "+s.viewLists); if (s.viewLists != null) { viewLists.add(hkIndex, s.viewLists.get(index)); } @@ -220,7 +220,7 @@ class SharedGroupRetained extends GroupRetained implements TargetsInterface { localToVworldIndex[hkIndex[0]] = s.currentTransformsIndex[j]; } - // System.out.println("SG: j = "+j+" hkIndex[0] = "+hkIndex[0]+" s.keys[j] = "+s.keys[j]); + // System.err.println("SG: j = "+j+" hkIndex[0] = "+hkIndex[0]+" s.keys[j] = "+s.keys[j]); // For now (1.2.1beta2) only. We cleanup setLive, and clearLive in // next release. setAuxData(s, j, hkIndex[0]); @@ -550,7 +550,7 @@ class SharedGroupRetained extends GroupRetained implements TargetsInterface { j = currentKey.equals(ln.sharedGroup.localToVworldKeys,0, ln.sharedGroup.localToVworldKeys.length); if(j < 0) { - System.out.println("SharedGroupRetained : Can't find hashKey"); + System.err.println("SharedGroupRetained : Can't find hashKey"); } if (j < ln.sharedGroup.localToVworldKeys.length) { @@ -597,7 +597,7 @@ class SharedGroupRetained extends GroupRetained implements TargetsInterface { j = switchKey.equals(ln.sharedGroup.localToVworldKeys,0, ln.sharedGroup.localToVworldKeys.length); if(j < 0) { - System.out.println("SharedGroupRetained : Can't find hashKey"); + System.err.println("SharedGroupRetained : Can't find hashKey"); } if (j < ln.sharedGroup.localToVworldKeys.length) { @@ -655,7 +655,7 @@ class SharedGroupRetained extends GroupRetained implements TargetsInterface { } if (J3dDebug.doDebug(J3dDebug.compileState, J3dDebug.LEVEL_5)) { this.traverse(false, 1); - System.out.println(); + System.err.println(); } } @@ -709,7 +709,7 @@ class SharedGroupRetained extends GroupRetained implements TargetsInterface { if (type == TargetsInterface.TRANSFORM_TARGETS) { return targetThreads; } else { - System.out.println("getTargetThreads: wrong arguments"); + System.err.println("getTargetThreads: wrong arguments"); return -1; } } @@ -751,7 +751,7 @@ class SharedGroupRetained extends GroupRetained implements TargetsInterface { } } else { - System.out.println("computeTargetsThreads: wrong arguments"); + System.err.println("computeTargetsThreads: wrong arguments"); } } @@ -767,7 +767,7 @@ class SharedGroupRetained extends GroupRetained implements TargetsInterface { targetThreads); } } else { - System.out.println("updateTargetThreads: wrong arguments"); + System.err.println("updateTargetThreads: wrong arguments"); } } @@ -788,7 +788,7 @@ class SharedGroupRetained extends GroupRetained implements TargetsInterface { } } } else { - System.out.println("propagateTargetThreads: wrong arguments"); + System.err.println("propagateTargetThreads: wrong arguments"); } } @@ -796,7 +796,7 @@ class SharedGroupRetained extends GroupRetained implements TargetsInterface { if (type == TargetsInterface.TRANSFORM_TARGETS) { j3dCTs = newCt; } else { - System.out.println("updateCachedTargets: wrong arguments"); + System.err.println("updateCachedTargets: wrong arguments"); } } @@ -807,7 +807,7 @@ class SharedGroupRetained extends GroupRetained implements TargetsInterface { newCt[i] = cachedTargets[i]; } } else { - System.out.println("copyCachedTargets: wrong arguments"); + System.err.println("copyCachedTargets: wrong arguments"); } } @@ -832,9 +832,9 @@ class SharedGroupRetained extends GroupRetained implements TargetsInterface { // child info is not used, SG does not have per child states SwitchState switchState; if (newCtArr.length != switchStates.size()) { - System.out.println("resetCachedTargets: unmatched length!" + + System.err.println("resetCachedTargets: unmatched length!" + newCtArr.length + " " + switchStates.size()); - System.out.println(" resetCachedTargets: " + this); + System.err.println(" resetCachedTargets: " + this); } for (int i=0; i TB in zombie state " + this); + //System.err.println("===> TB in zombie state " + this); if (soleUserCompDirty == 0) { this.renderBin.tbUpdateList.add(this); @@ -520,7 +520,7 @@ class TextureBin extends Object implements ObjectUpdate { // TextureBin. See bug# 4503926 for details. public void updateNodeComponentCheck() { - //System.out.println("TextureBin.updateNodeComponentCheck()"); + //System.err.println("TextureBin.updateNodeComponentCheck()"); tbFlag &= ~TextureBin.ON_UPDATE_CHECK_LIST; @@ -773,7 +773,7 @@ class TextureBin extends Object implements ObjectUpdate { if (transparentRMList == null && (renderBin.transpSortMode == View.TRANSPARENCY_SORT_NONE || environmentSet.lightBin.geometryBackground != null)) { - // System.out.println("========> addTransparentTextureBin "+this); + // System.err.println("========> addTransparentTextureBin "+this); transparentRMList = addAll(transparentRenderMoleculeMap, addTransparentRMs, transparentRMList, false); // Eventhough we are adding to transparentList , if all the RMS @@ -1219,7 +1219,7 @@ class TextureBin extends Object implements ObjectUpdate { cv.texLinearMode = false; /* - System.out.println("TextureBin/render " + this + + System.err.println("TextureBin/render " + this + " numActiveTexUnit= " + numActiveTexUnit + " maxTextureUnits= " + cv.maxTextureUnits); */ @@ -1313,7 +1313,7 @@ class TextureBin extends Object implements ObjectUpdate { ArrayList list; int index; boolean newRM = false; - // System.out.println("changeLists r = "+r+" tBin = "+this); + // System.err.println("changeLists r = "+r+" tBin = "+this); // If its a new RM then do nothing, otherwise move lists if (r.isOpaqueOrInOG) { if (opaqueRMList == null && diff --git a/src/classes/share/javax/media/j3d/TextureRetained.java b/src/classes/share/javax/media/j3d/TextureRetained.java index ccdcd07..e23e8f9 100644 --- a/src/classes/share/javax/media/j3d/TextureRetained.java +++ b/src/classes/share/javax/media/j3d/TextureRetained.java @@ -1329,7 +1329,7 @@ abstract class TextureRetained extends NodeComponentRetained { // is a RenderedImage ( byRef and yUp), then imageData will be null if (imageData == null) { - // System.out.println("==========. subImage"); + // System.err.println("==========. subImage"); // Download all the tiles for this texture int xoffset = 0, yoffset = 0; int tmpw = image.width; @@ -1404,7 +1404,7 @@ abstract class TextureRetained extends NodeComponentRetained { //The x and y here specifies the subregion of the imageData of //the associated RenderedImage. - //System.out.println("\nupdateTextureSubImage: x= " + x + " y= " + y + + //System.err.println("\nupdateTextureSubImage: x= " + x + " y= " + y + // " width= " + width + " height= " + height + // " format= " + format); @@ -1428,7 +1428,7 @@ abstract class TextureRetained extends NodeComponentRetained { } else { - // System.out.println("RenderedImage subImage update"); + // System.err.println("RenderedImage subImage update"); // determine the first tile of the image float mt; @@ -1569,7 +1569,7 @@ abstract class TextureRetained extends NodeComponentRetained { int blevel, mlevel; - //System.out.println("reloadTexture: baseLevel= " + baseLevel + + //System.err.println("reloadTexture: baseLevel= " + baseLevel + // " maximumLevel= " + maximumLevel); if ((cv.textureExtendedFeatures & Canvas3D.TEXTURE_LOD_RANGE) == 0 ) { @@ -1611,7 +1611,7 @@ abstract class TextureRetained extends NodeComponentRetained { void updateTexture(Canvas3D cv, int resourceBit) { - //System.out.println("updateTexture\n"); + //System.err.println("updateTexture\n"); ImageComponentUpdateInfo info; @@ -1724,7 +1724,7 @@ abstract class TextureRetained extends NodeComponentRetained { boolean updateTexture = false; // true - update a portion of texture boolean updateTextureLod = false; // true - update texture Lod info - //System.out.println("Texture/updateNative: " + this + "object= " + objectId + " enable= " + enable); + //System.err.println("Texture/updateNative: " + this + "object= " + objectId + " enable= " + enable); bindTexture(cv); @@ -1784,11 +1784,11 @@ abstract class TextureRetained extends NodeComponentRetained { } -//System.out.println("......... reloadTexture= " + reloadTexture + +//System.err.println("......... reloadTexture= " + reloadTexture + // " updateTexture= " + updateTexture + // " updateTextureLod= " + updateTextureLod); -//System.out.println("......... resourceCreationMask= " + resourceCreationMask + +//System.err.println("......... resourceCreationMask= " + resourceCreationMask + // " resourceUpdatedMask= " + resourceUpdatedMask); if (reloadTexture) { @@ -2009,7 +2009,7 @@ abstract class TextureRetained extends NodeComponentRetained { void pruneImageUpdateInfo() { ImageComponentUpdateInfo info; - //System.out.println("Texture.pruneImageUpdateInfo"); + //System.err.println("Texture.pruneImageUpdateInfo"); for (int k = 0; k < numFaces; k++) { for (int i = baseLevel; i <= maximumLevel; i++) { @@ -2315,7 +2315,7 @@ abstract class TextureRetained extends NodeComponentRetained { void notifyImageComponentImageChanged(ImageComponentRetained image, ImageComponentUpdateInfo value) { - //System.out.println("Texture.notifyImageComponentImageChanged"); + //System.err.println("Texture.notifyImageComponentImageChanged"); // if this texture is to be reloaded, don't bother to keep @@ -2449,7 +2449,7 @@ abstract class TextureRetained extends NodeComponentRetained { createMessage.args[3] = new Integer(changedFrequent); VirtualUniverse.mc.processMessage(createMessage); - // System.out.println("univList.size is " + univList.size()); + // System.err.println("univList.size is " + univList.size()); for(int i=0; i 0 ) System.out.print(" ZERO"); - if ((type & IDENTITY) > 0 ) System.out.print(" IDENTITY"); - if ((type & SCALE) > 0 ) System.out.print(" SCALE"); - if ((type & TRANSLATION) > 0 ) System.out.print(" TRANSLATION"); - if ((type & ORTHOGONAL) > 0 ) System.out.print(" ORTHOGONAL"); - if ((type & RIGID) > 0 ) System.out.print(" RIGID"); - if ((type & CONGRUENT) > 0 ) System.out.print(" CONGRUENT"); - if ((type & AFFINE) > 0 ) System.out.print(" AFFINE"); - if ((type & NEGATIVE_DETERMINANT) > 0 ) System.out.print(" NEGATIVE_DETERMINANT"); + if ((type & ZERO) > 0 ) System.err.print(" ZERO"); + if ((type & IDENTITY) > 0 ) System.err.print(" IDENTITY"); + if ((type & SCALE) > 0 ) System.err.print(" SCALE"); + if ((type & TRANSLATION) > 0 ) System.err.print(" TRANSLATION"); + if ((type & ORTHOGONAL) > 0 ) System.err.print(" ORTHOGONAL"); + if ((type & RIGID) > 0 ) System.err.print(" RIGID"); + if ((type & CONGRUENT) > 0 ) System.err.print(" CONGRUENT"); + if ((type & AFFINE) > 0 ) System.err.print(" AFFINE"); + if ((type & NEGATIVE_DETERMINANT) > 0 ) System.err.print(" NEGATIVE_DETERMINANT"); } */ @@ -4963,7 +4963,7 @@ public class Transform3D { negCnt++; if((negCnt==0)||(negCnt==2)) { - //System.out.println("Optimize!!"); + //System.err.println("Optimize!!"); outScale[0] = outScale[1] = outScale[2] = 1.0; for(i=0;i<9;i++) outRot[i] = svdRot[i]; @@ -5094,11 +5094,12 @@ public class Transform3D { outScale[2] = scales[index]; index = svdOut[in0]; - if (outRot == null) - System.out.println("outRot == null"); - if ( rot == null) - System.out.println("rot == null"); - System.out.flush(); + if (outRot == null) { + MasterControl.getCoreLogger().severe("outRot == null"); + } + if (rot == null) { + MasterControl.getCoreLogger().severe("rot == null"); + } outRot[0] = rot[index]; @@ -5230,7 +5231,7 @@ public class Transform3D { v[7] = cosr[1]*vtemp + sinr[1]*v[8]; v[8] = -sinr[1]*vtemp + cosr[1]*v[8]; - // if(debug)System.out.println("\n*********************** iteration #"+k+" ***********************\n"); + // if(debug)System.err.println("\n*********************** iteration #"+k+" ***********************\n"); qr_m[0] = s[0]; qr_m[1] = e[0]; qr_m[2] = 0.0; qr_m[3] = 0.0; qr_m[4] = s[1]; qr_m[5] =e[1]; diff --git a/src/classes/share/javax/media/j3d/TransformGroupRetained.java b/src/classes/share/javax/media/j3d/TransformGroupRetained.java index 9dd24ed..f51a5fd 100644 --- a/src/classes/share/javax/media/j3d/TransformGroupRetained.java +++ b/src/classes/share/javax/media/j3d/TransformGroupRetained.java @@ -144,7 +144,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface tchangeMessage.args[2] = trans; tchangeMessage.universe = universe; - //System.out.println("TransformGroupRetained --- TRANSFORM_CHANGED " + this); + //System.err.println("TransformGroupRetained --- TRANSFORM_CHANGED " + this); VirtualUniverse.mc.processMessage(tchangeMessage); } } @@ -392,19 +392,19 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface void traverse(boolean sameLevel, int level) { - System.out.println(); + System.err.println(); for (int i = 0; i < level; i++) { - System.out.print("."); + System.err.print("."); } - System.out.print(this); + System.err.print(this); if (isStatic()) { - System.out.print(" (s)"); + System.err.print(" (s)"); } else { - System.out.print(" (w)"); + System.err.print(" (w)"); } - System.out.println(); - System.out.println(transform.toString()); + System.err.println(); + System.err.println(transform.toString()); super.traverse(true, level); } @@ -812,7 +812,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface keySet, targets, blUsers); } else { - //System.out.println("tg.procChild markedDiry skip"); + //System.err.println("tg.procChild markedDiry skip"); } } } @@ -821,7 +821,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface updateChildLocalToVworld(dirtyTransformGroups, keySet, targets, blUsers); } else { - //System.out.println("tg.procChild markedDiry skip"); + //System.err.println("tg.procChild markedDiry skip"); } } } @@ -863,7 +863,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface } } else { perPathData[index].switchDirty = true; - //System.out.println("tg.updateChild skip"); + //System.err.println("tg.updateChild skip"); } @@ -889,7 +889,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface j = currentKey.equals(ln.sharedGroup.localToVworldKeys,0, ln.sharedGroup.localToVworldKeys.length); if(j < 0) { - System.out. + System.err. println("TransformGroupRetained : Can't find hashKey"); } @@ -941,7 +941,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface } } else { perPathData[0].switchDirty = true; - //System.out.println("tg.updateChild skip"); + //System.err.println("tg.updateChild skip"); } @@ -967,7 +967,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface j = currentKey.equals(ln.sharedGroup.localToVworldKeys,0, ln.sharedGroup.localToVworldKeys.length); if(j < 0) { - System.out. + System.err. println("TransformGroupRetained : Can't find hashKey"); } @@ -1069,7 +1069,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface if (type == TargetsInterface.TRANSFORM_TARGETS) { return targetThreads; } else { - System.out.println("getTargetsThreads: wrong arguments"); + System.err.println("getTargetsThreads: wrong arguments"); return -1; } } @@ -1080,7 +1080,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface if (type == TargetsInterface.TRANSFORM_TARGETS) { return cachedTargets[index]; } else { - System.out.println("getCachedTargets: wrong arguments"); + System.err.println("getCachedTargets: wrong arguments"); return null; } } @@ -1125,7 +1125,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface } } } else { - System.out.println("computeTargetsThreads: wrong arguments"); + System.err.println("computeTargetsThreads: wrong arguments"); } } @@ -1143,7 +1143,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface targetThreads); } } else { - System.out.println("updateTargetThreads: wrong arguments"); + System.err.println("updateTargetThreads: wrong arguments"); } } @@ -1162,7 +1162,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface targetThreads); } } else { - System.out.println("propagateTargetThreads: wrong arguments"); + System.err.println("propagateTargetThreads: wrong arguments"); } } @@ -1171,7 +1171,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface if (type == TargetsInterface.TRANSFORM_TARGETS) { j3dCTs = newCt; } else { - System.out.println("updateCachedTargets: wrong arguments"); + System.err.println("updateCachedTargets: wrong arguments"); } } @@ -1183,7 +1183,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface newCt[i] = cachedTargets[i]; } } else { - System.out.println("copyCachedTargets: wrong arguments"); + System.err.println("copyCachedTargets: wrong arguments"); } } @@ -1194,7 +1194,7 @@ class TransformGroupRetained extends GroupRetained implements TargetsInterface if (type == TargetsInterface.TRANSFORM_TARGETS) { cachedTargets = newCtArr; } else { - System.out.println("resetCachedTargets: wrong arguments"); + System.err.println("resetCachedTargets: wrong arguments"); } } diff --git a/src/classes/share/javax/media/j3d/TransparencyAttributesRetained.java b/src/classes/share/javax/media/j3d/TransparencyAttributesRetained.java index d9096a3..b72119f 100644 --- a/src/classes/share/javax/media/j3d/TransparencyAttributesRetained.java +++ b/src/classes/share/javax/media/j3d/TransparencyAttributesRetained.java @@ -292,7 +292,7 @@ class TransparencyAttributesRetained extends NodeComponentRetained { VirtualUniverse.mc.processMessage(createMessage); - // System.out.println("univList.size is " + univList.size()); + // System.err.println("univList.size is " + univList.size()); for(int i=0; i allocating new array"); + // System.err.println("====> allocating new array"); newKeyList = new int[keyList.length+20]; System.arraycopy(keyList, 0, newKeyList, 0, keyList.length); keyList = newKeyList; @@ -331,7 +331,7 @@ class ViewSpecificGroupRetained extends GroupRetained { objAry[2] = addLeafList; /* for (int n = 0; n < addLeafList.size(); n++) { - System.out.println("Shared:n = "+n+" addLeafList = "+addLeafList.get(n)); + System.err.println("Shared:n = "+n+" addLeafList = "+addLeafList.get(n)); } */ objAry[3] = super.processViewSpecificInfo(ADD_VIEW, @@ -375,7 +375,7 @@ class ViewSpecificGroupRetained extends GroupRetained { /* for (int n = 0; n < addLeafList.size(); n++) { - System.out.println("n = "+n+" addLeafList = "+addLeafList.get(n)); + System.err.println("n = "+n+" addLeafList = "+addLeafList.get(n)); } */ @@ -465,7 +465,7 @@ class ViewSpecificGroupRetained extends GroupRetained { /* for (int n = 0; n < removeKeyList.size(); n++) { - System.out.println("n = "+n+" keyValue = "+removeKeyList.get(n)); + System.err.println("n = "+n+" keyValue = "+removeKeyList.get(n)); } */ J3dMessage message = new J3dMessage(); @@ -588,7 +588,7 @@ class ViewSpecificGroupRetained extends GroupRetained { int[] newKeyList = new int[s.keyList.length+20]; System.arraycopy(s.keyList, 0, newKeyList, 0, s.keyList.length); s.keyList = newKeyList; - // System.out.println("====> RemovedNodeData: Allocating Non-shared"); + // System.err.println("====> RemovedNodeData: Allocating Non-shared"); } s.keyList[size -1] = -1; parentLists.clear(); @@ -601,7 +601,7 @@ class ViewSpecificGroupRetained extends GroupRetained { int[] newKeyList = new int[s.keyList.length+s.keys.length+20]; System.arraycopy(s.keyList, 0, newKeyList, 0, s.keyList.length); s.keyList = newKeyList; - // System.out.println("====> RemovedNodeData: Allocating Shared"); + // System.err.println("====> RemovedNodeData: Allocating Shared"); } // Must be in reverse, to preserve right indexing. for (i = s.keys.length-1; i >= 0; i--) { @@ -621,9 +621,9 @@ class ViewSpecificGroupRetained extends GroupRetained { ArrayList list = (ArrayList) cachedViewList.get(index); /* - System.out.println("updateCachedInformation v = "+this+" index = "+index+" list = "+list+" cachedViewList.size() = "+cachedViewList.size()); + System.err.println("updateCachedInformation v = "+this+" index = "+index+" list = "+list+" cachedViewList.size() = "+cachedViewList.size()); for (int k = 0; k < cachedViewList.size(); k++) { - System.out.println("v = "+this+" k = "+k+" v.cachedViewList.get(k) = "+cachedViewList.get(k)); + System.err.println("v = "+this+" k = "+k+" v.cachedViewList.get(k) = "+cachedViewList.get(k)); } */ if ((component & ADD_VIEW) != 0) { @@ -633,9 +633,9 @@ class ViewSpecificGroupRetained extends GroupRetained { list.remove(view); } /* - System.out.println("After updateCachedInformation v = "+this+" index = "+index+" list = "+list+" cachedViewList.size() = "+cachedViewList.size()); + System.err.println("After updateCachedInformation v = "+this+" index = "+index+" list = "+list+" cachedViewList.size() = "+cachedViewList.size()); for (int k = 0; k < cachedViewList.size(); k++) { - System.out.println("v = "+this+" k = "+k+" v.cachedViewList.get(k) = "+cachedViewList.get(k)); + System.err.println("v = "+this+" k = "+k+" v.cachedViewList.get(k) = "+cachedViewList.get(k)); } */ @@ -649,7 +649,7 @@ class ViewSpecificGroupRetained extends GroupRetained { int[] newKeyList = new int[s.keyList.length+20]; System.arraycopy(s.keyList, 0, newKeyList, 0, s.keyList.length); s.keyList = newKeyList; - // System.out.println("====> setNodeData: Allocating Non-shared"); + // System.err.println("====> setNodeData: Allocating Non-shared"); } setAuxData(s, 0, 0); } else { @@ -661,7 +661,7 @@ class ViewSpecificGroupRetained extends GroupRetained { int[] newKeyList = new int[s.keyList.length+s.keys.length+20]; System.arraycopy(s.keyList, 0, newKeyList, 0, s.keyList.length); s.keyList = newKeyList; - // System.out.println("====> setNodeData: Allocating Shared"); + // System.err.println("====> setNodeData: Allocating Shared"); } for(j=0; j VSG: = "+this+" hkIndex = "+hkIndex+" s.viewLists = "+s.viewLists); + // System.err.println("=====> VSG: = "+this+" hkIndex = "+hkIndex+" s.viewLists = "+s.viewLists); parentList = (ArrayList) s.viewLists.get(hkIndex); if (parentList != null) { vl = new ArrayList(); diff --git a/src/classes/share/javax/media/j3d/WakeupIndexedList.java b/src/classes/share/javax/media/j3d/WakeupIndexedList.java index c1c0cb2..860b845 100644 --- a/src/classes/share/javax/media/j3d/WakeupIndexedList.java +++ b/src/classes/share/javax/media/j3d/WakeupIndexedList.java @@ -348,7 +348,7 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable { if (debug) { if (o.listIdx[univIdx][listType] != -1) { - System.out.println("Illegal use of UnorderIndexedList idx in set " + + System.err.println("Illegal use of UnorderIndexedList idx in set " + o.listIdx[univIdx][listType]); Thread.dumpStack(); } @@ -376,12 +376,12 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable { } int univIdx = o.behav.getIdxUsed(univ); - // System.out.println(this + " add " + o + " univ " + univIdx); + // System.err.println(this + " add " + o + " univ " + univIdx); if (debug) { int idx = o.listIdx[univIdx][listType]; if (idx >= 0) { if (elementData[idx] != o) { - System.out.println("Illegal use of UnorderIndexedList idx in add " + idx); + System.err.println("Illegal use of UnorderIndexedList idx in add " + idx); Thread.dumpStack(); } } @@ -408,7 +408,7 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable { if (debug) { if (elm.listIdx[univIdx][listType] != index) { - System.out.println("Inconsistent idx in remove, expect " + index + + System.err.println("Inconsistent idx in remove, expect " + index + " actual " + elm.listIdx[univIdx][listType]); Thread.dumpStack(); } @@ -463,13 +463,13 @@ class WakeupIndexedList implements Cloneable, java.io.Serializable { int univIdx = o.behav.getIdxUsed(univ); int idx = o.listIdx[univIdx][listType]; - // System.out.println(this + " remove " + o + " univ " + univIdx); + // System.err.println(this + " remove " + o + " univ " + univIdx); if (idx >= 0) { // Object in the container if (debug) { if (o != elementData[idx]) { - System.out.println(" Illegal use of UnorderIndexedList in remove expect " + o + " actual " + elementData[idx] + " idx = " + idx); + System.err.println(" Illegal use of UnorderIndexedList in remove expect " + o + " actual " + elementData[idx] + " idx = " + idx); Thread.dumpStack(); } } -- cgit v1.2.3