1 /* 2 * $RCSfile: J3dDebug.java,v $ 3 * 4 * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. 5 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6 * 7 * This code is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU General Public License version 2 only, as 9 * published by the Free Software Foundation. Sun designates this 10 * particular file as subject to the "Classpath" exception as provided 11 * by Sun in the LICENSE file that accompanied this code. 12 * 13 * This code is distributed in the hope that it will be useful, but WITHOUT 14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16 * version 2 for more details (a copy is included in the LICENSE file that 17 * accompanied this code). 18 * 19 * You should have received a copy of the GNU General Public License version 20 * 2 along with this work; if not, write to the Free Software Foundation, 21 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 22 * 23 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 24 * CA 95054 USA or visit www.sun.com if you need additional information or 25 * have any questions. 26 * 27 * $Revision: 1.8 $ 28 * $Date: 2008/02/28 20:17:25 $ 29 * $State: Exp $ 30 */ 31 32 package javax.media.j3d; 33 34 class J3dDebug { 35 36 // For production release devPhase is set to false. 37 38 // Do no debugging. 39 static final int NO_DEBUG = 0; 40 41 // How much debugging information do we want ? 42 // (LEVEL_1 is very terse, LEVEL_5 is very verbose) 43 static final int LEVEL_1 = 1; 44 static final int LEVEL_2 = 2; 45 static final int LEVEL_3 = 3; 46 static final int LEVEL_4 = 4; 47 static final int LEVEL_5 = 5; 48 49 // This static final variable is used to turn on/off debugging, 50 // checking, and initializing codes that may be preferred in 51 // development phase but not necessarily required in the 52 // production release. 53 // 54 // Beside for debugging, use this variable to do initialization, 55 // checking objects existence, and other checks that may help in 56 // uncovering potential bugs during code development. This 57 // variable should be turned off during production release as it 58 // may cause performance hit. 59 static final boolean devPhase = VersionInfo.isDevPhase; 60 61 // This is a property variable. It allows a true/false be sent to 62 // J3d from command line, to on/off code segments. To avoid 63 // performance hit in production release, this variable MUST be 64 // used with devPhase when guarding code segments for execution. 65 // eg. if(J3dDebug.devPhase && J3dDebug.debug) 66 // do code_segment; 67 // Note: devPhase is a static final variable and debug isn't. If 68 // devPhase is put before debug, smart compiler will not include 69 // code_segment when devPhase is false. 70 static boolean debug; 71 72 // Class debug variable, there is one debug variable per class. 73 // Set one of the 5 debug levels to the class debug variable when 74 // debugging. 75 // For example, alpha = !devPhase?NO_DEBUG:LEVEL_2; will cause 76 // code segments guarded by LEVEL_1 and LEVEL_2 be executed. And 77 // alpha = !devPhase?NO_DEBUG:NO_DEBUG; means do no debug. 78 static final int alpha = !devPhase?NO_DEBUG:NO_DEBUG; 79 static final int alternateAppearance = !devPhase?NO_DEBUG:NO_DEBUG; 80 static final int ambientLight = !devPhase?NO_DEBUG:NO_DEBUG; 81 static final int ambientLightRetained = !devPhase?NO_DEBUG:NO_DEBUG; 82 static final int appearance = !devPhase?NO_DEBUG:NO_DEBUG; 83 static final int appearanceRetained = !devPhase?NO_DEBUG:NO_DEBUG; 84 static final int assertionFailureException = !devPhase?NO_DEBUG:NO_DEBUG; 85 static final int attributeBin = !devPhase?NO_DEBUG:NO_DEBUG; 86 static final int audioDevice = !devPhase?NO_DEBUG:NO_DEBUG; 87 static final int audioDevice3D = !devPhase?NO_DEBUG:NO_DEBUG; 88 static final int audioDeviceEnumerator = !devPhase?NO_DEBUG:NO_DEBUG; 89 static final int auralAttributes = !devPhase?NO_DEBUG:NO_DEBUG; 90 static final int auralAttributesRetained = !devPhase?NO_DEBUG:NO_DEBUG; 91 static final int bHInsertStructure = !devPhase?NO_DEBUG:NO_DEBUG; 92 static final int bHInternalNode = !devPhase?NO_DEBUG:NO_DEBUG; 93 static final int bHLeafInterface = !devPhase?NO_DEBUG:NO_DEBUG; 94 static final int bHLeafNode = !devPhase?NO_DEBUG:NO_DEBUG; 95 static final int bHNode = !devPhase?NO_DEBUG:NO_DEBUG; 96 static final int bHTree = !devPhase?NO_DEBUG:NO_DEBUG; 97 static final int background = !devPhase?NO_DEBUG:NO_DEBUG; 98 static final int backgroundRetained = !devPhase?NO_DEBUG:NO_DEBUG; 99 static final int backgroundSound = !devPhase?NO_DEBUG:NO_DEBUG; 100 static final int backgroundSoundRetained = !devPhase?NO_DEBUG:NO_DEBUG; 101 static final int badTransformException = !devPhase?NO_DEBUG:NO_DEBUG; 102 static final int behavior = !devPhase?NO_DEBUG:NO_DEBUG; 103 static final int behaviorRetained = !devPhase?NO_DEBUG:NO_DEBUG; 104 static final int behaviorScheduler = !devPhase?NO_DEBUG:NO_DEBUG; 105 static final int behaviorStructure = !devPhase?NO_DEBUG:NO_DEBUG; 106 static final int billboard = !devPhase?NO_DEBUG:NO_DEBUG; 107 static final int boundingBox = !devPhase?NO_DEBUG:NO_DEBUG; 108 static final int boundingLeaf = !devPhase?NO_DEBUG:NO_DEBUG; 109 static final int boundingLeafRetained = !devPhase?NO_DEBUG:NO_DEBUG; 110 static final int boundingPolytope = !devPhase?NO_DEBUG:NO_DEBUG; 111 static final int boundingSphere = !devPhase?NO_DEBUG:NO_DEBUG; 112 static final int bounds = !devPhase?NO_DEBUG:NO_DEBUG; 113 static final int branchGroup = !devPhase?NO_DEBUG:NO_DEBUG; 114 static final int branchGroupRetained = !devPhase?NO_DEBUG:NO_DEBUG; 115 static final int cachedFrustum = !devPhase?NO_DEBUG:NO_DEBUG; 116 static final int canvas3D = !devPhase?NO_DEBUG:NO_DEBUG; 117 static final int canvasViewCache = !devPhase?NO_DEBUG:NO_DEBUG; 118 static final int canvasViewEventCatcher = !devPhase?NO_DEBUG:NO_DEBUG; 119 static final int capabilityBits = !devPhase?NO_DEBUG:NO_DEBUG; 120 static final int capabilityNotSetException = !devPhase?NO_DEBUG:NO_DEBUG; 121 static final int clip = !devPhase?NO_DEBUG:NO_DEBUG; 122 static final int clipRetained = !devPhase?NO_DEBUG:NO_DEBUG; 123 static final int colorInterpolator = !devPhase?NO_DEBUG:NO_DEBUG; 124 static final int coloringAttributes = !devPhase?NO_DEBUG:NO_DEBUG; 125 static final int coloringAttributesRetained = !devPhase?NO_DEBUG:NO_DEBUG; 126 static final int compileState = !devPhase?NO_DEBUG:LEVEL_3; 127 static final int compressedGeometry = !devPhase?NO_DEBUG:NO_DEBUG; 128 static final int compressedGeometryHeader = !devPhase?NO_DEBUG:NO_DEBUG; 129 static final int compressedGeometryRenderMethod = !devPhase?NO_DEBUG:NO_DEBUG; 130 static final int compressedGeometryRetained = !devPhase?NO_DEBUG:NO_DEBUG; 131 static final int coneSound = !devPhase?NO_DEBUG:NO_DEBUG; 132 static final int coneSoundRetained = !devPhase?NO_DEBUG:NO_DEBUG; 133 static final int danglingReferenceException = !devPhase?NO_DEBUG:NO_DEBUG; 134 135 static final int decalGroup = !devPhase?NO_DEBUG:NO_DEBUG; 136 static final int decalGroupRetained = !devPhase?NO_DEBUG:NO_DEBUG; 137 static final int defaultRenderMethod = !devPhase?NO_DEBUG:NO_DEBUG; 138 static final int depthComponent = !devPhase?NO_DEBUG:NO_DEBUG; 139 static final int depthComponentFloat = !devPhase?NO_DEBUG:NO_DEBUG; 140 static final int depthComponentFloatRetained = !devPhase?NO_DEBUG:NO_DEBUG; 141 static final int depthComponentInt = !devPhase?NO_DEBUG:NO_DEBUG; 142 static final int depthComponentIntRetained = !devPhase?NO_DEBUG:NO_DEBUG; 143 static final int depthComponentNative = !devPhase?NO_DEBUG:NO_DEBUG; 144 static final int depthComponentNativeRetained = !devPhase?NO_DEBUG:NO_DEBUG; 145 static final int depthComponentRetained = !devPhase?NO_DEBUG:NO_DEBUG; 146 static final int directionalLight = !devPhase?NO_DEBUG:NO_DEBUG; 147 static final int directionalLightRetained = !devPhase?NO_DEBUG:NO_DEBUG; 148 static final int displayListRenderMethod = !devPhase?NO_DEBUG:NO_DEBUG; 149 static final int distanceLOD = !devPhase?NO_DEBUG:NO_DEBUG; 150 static final int environmentSet = !devPhase?NO_DEBUG:NO_DEBUG; 151 static final int eventCatcher = !devPhase?NO_DEBUG:NO_DEBUG; 152 static final int exponentialFog = !devPhase?NO_DEBUG:NO_DEBUG; 153 static final int exponentialFogRetained = !devPhase?NO_DEBUG:NO_DEBUG; 154 static final int fog = !devPhase?NO_DEBUG:NO_DEBUG; 155 static final int fogRetained = !devPhase?NO_DEBUG:NO_DEBUG; 156 static final int font3D = !devPhase?NO_DEBUG:NO_DEBUG; 157 static final int fontExtrusion = !devPhase?NO_DEBUG:NO_DEBUG; 158 static final int generalizedStrip = !devPhase?NO_DEBUG:NO_DEBUG; 159 static final int generalizedStripFlags = !devPhase?NO_DEBUG:NO_DEBUG; 160 static final int generalizedVertexList = !devPhase?NO_DEBUG:NO_DEBUG; 161 static final int geometry = !devPhase?NO_DEBUG:NO_DEBUG; 162 static final int geometryArray = !devPhase?NO_DEBUG:NO_DEBUG; 163 static final int geometryArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 164 static final int geometryAtom = !devPhase?NO_DEBUG:NO_DEBUG; 165 static final int geometryDecompressor = !devPhase?NO_DEBUG:NO_DEBUG; 166 static final int geometryDecompressorRetained = !devPhase?NO_DEBUG:NO_DEBUG; 167 static final int geometryDecompressorShape3D = !devPhase?NO_DEBUG:NO_DEBUG; 168 static final int geometryLock = !devPhase?NO_DEBUG:NO_DEBUG; 169 static final int geometryLockInterface = !devPhase?NO_DEBUG:NO_DEBUG; 170 static final int geometryRetained = !devPhase?NO_DEBUG:NO_DEBUG; 171 static final int geometryStripArray = !devPhase?NO_DEBUG:NO_DEBUG; 172 static final int geometryStripArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 173 static final int geometryStructure = !devPhase?NO_DEBUG:NO_DEBUG; 174 static final int geometryUpdater = !devPhase?NO_DEBUG:NO_DEBUG; 175 static final int graphicsConfigTemplate3D = !devPhase?NO_DEBUG:NO_DEBUG; 176 static final int graphicsContext3D = !devPhase?NO_DEBUG:NO_DEBUG; 177 static final int group = !devPhase?NO_DEBUG:NO_DEBUG; 178 static final int groupRetained = !devPhase?NO_DEBUG:NO_DEBUG; 179 static final int hashKey = !devPhase?NO_DEBUG:NO_DEBUG; 180 static final int hiResCoord = !devPhase?NO_DEBUG:NO_DEBUG; 181 static final int illegalRenderingStateException = !devPhase?NO_DEBUG:NO_DEBUG; 182 static final int illegalSharingException = !devPhase?NO_DEBUG:NO_DEBUG; 183 static final int imageComponent = !devPhase?NO_DEBUG:NO_DEBUG; 184 static final int imageComponent2D = !devPhase?NO_DEBUG:NO_DEBUG; 185 static final int imageComponent2DRetained = !devPhase?NO_DEBUG:NO_DEBUG; 186 static final int imageComponent3D = !devPhase?NO_DEBUG:NO_DEBUG; 187 static final int imageComponent3DRetained = !devPhase?NO_DEBUG:NO_DEBUG; 188 static final int imageComponentRetained = !devPhase?NO_DEBUG:NO_DEBUG; 189 static final int indexedGeometryArray = !devPhase?NO_DEBUG:NO_DEBUG; 190 static final int indexedGeometryArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 191 static final int indexedGeometryStripArray = !devPhase?NO_DEBUG:NO_DEBUG; 192 static final int indexedGeometryStripArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 193 static final int indexedLineArray = !devPhase?NO_DEBUG:NO_DEBUG; 194 static final int indexedLineArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 195 static final int indexedLineStripArray = !devPhase?NO_DEBUG:NO_DEBUG; 196 static final int indexedLineStripArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 197 static final int indexedPointArray = !devPhase?NO_DEBUG:NO_DEBUG; 198 static final int indexedPointArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 199 static final int indexedQuadArray = !devPhase?NO_DEBUG:NO_DEBUG; 200 static final int indexedQuadArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 201 static final int indexedTriangleArray = !devPhase?NO_DEBUG:NO_DEBUG; 202 static final int indexedTriangleArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 203 static final int indexedTriangleFanArray = !devPhase?NO_DEBUG:NO_DEBUG; 204 static final int indexedTriangleFanArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 205 static final int indexedTriangleStripArray = !devPhase?NO_DEBUG:NO_DEBUG; 206 static final int indexedTriangleStripArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 207 static final int inputDevice = !devPhase?NO_DEBUG:NO_DEBUG; 208 static final int inputDeviceBlockingThread = !devPhase?NO_DEBUG:NO_DEBUG; 209 static final int inputDeviceScheduler = !devPhase?NO_DEBUG:NO_DEBUG; 210 static final int interpolator = !devPhase?NO_DEBUG:NO_DEBUG; 211 static final int j3dDataInputStream = !devPhase?NO_DEBUG:NO_DEBUG; 212 static final int j3dDataOutputStream = !devPhase?NO_DEBUG:NO_DEBUG; 213 static final int j3dDebug = !devPhase?NO_DEBUG:NO_DEBUG; 214 static final int j3dI18N = !devPhase?NO_DEBUG:NO_DEBUG; 215 static final int j3dMessage = !devPhase?NO_DEBUG:NO_DEBUG; 216 static final int j3dNodeTable = !devPhase?NO_DEBUG:NO_DEBUG; 217 static final int j3dQueryProps = !devPhase?NO_DEBUG:NO_DEBUG; 218 static final int j3dStructure = !devPhase?NO_DEBUG:NO_DEBUG; 219 static final int j3dThread = !devPhase?NO_DEBUG:NO_DEBUG; 220 static final int j3dThreadData = !devPhase?NO_DEBUG:NO_DEBUG; 221 static final int lOD = !devPhase?NO_DEBUG:NO_DEBUG; 222 static final int leaf = !devPhase?NO_DEBUG:NO_DEBUG; 223 static final int leafRetained = !devPhase?NO_DEBUG:NO_DEBUG; 224 static final int light = !devPhase?NO_DEBUG:NO_DEBUG; 225 static final int lightBin = !devPhase?NO_DEBUG:NO_DEBUG; 226 static final int lightRetained = !devPhase?NO_DEBUG:NO_DEBUG; 227 static final int lightSet = !devPhase?NO_DEBUG:NO_DEBUG; 228 static final int lineArray = !devPhase?NO_DEBUG:NO_DEBUG; 229 static final int lineArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 230 static final int lineAttributes = !devPhase?NO_DEBUG:NO_DEBUG; 231 static final int lineAttributesRetained = !devPhase?NO_DEBUG:NO_DEBUG; 232 static final int lineStripArray = !devPhase?NO_DEBUG:NO_DEBUG; 233 static final int lineStripArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 234 static final int linearFog = !devPhase?NO_DEBUG:NO_DEBUG; 235 static final int linearFogRetained = !devPhase?NO_DEBUG:NO_DEBUG; 236 static final int link = !devPhase?NO_DEBUG:NO_DEBUG; 237 static final int linkRetained = !devPhase?NO_DEBUG:NO_DEBUG; 238 static final int locale = !devPhase?NO_DEBUG:NO_DEBUG; 239 static final int mRSWLock = !devPhase?NO_DEBUG:NO_DEBUG; 240 static final int masterControl = !devPhase?NO_DEBUG:NO_DEBUG; 241 static final int material = !devPhase?NO_DEBUG:NO_DEBUG; 242 static final int materialRetained = !devPhase?NO_DEBUG:NO_DEBUG; 243 static final int mediaContainer = !devPhase?NO_DEBUG:NO_DEBUG; 244 static final int mediaContainerRetained = !devPhase?NO_DEBUG:NO_DEBUG; 245 static final int modelClip = !devPhase?NO_DEBUG:NO_DEBUG; 246 static final int modelClipRetained = !devPhase?NO_DEBUG:NO_DEBUG; 247 static final int morph = !devPhase?NO_DEBUG:NO_DEBUG; 248 static final int morphRetained = !devPhase?NO_DEBUG:NO_DEBUG; 249 static final int multipleParentException = !devPhase?NO_DEBUG:NO_DEBUG; 250 static final int node = !devPhase?NO_DEBUG:NO_DEBUG; 251 static final int nodeComponent = !devPhase?NO_DEBUG:NO_DEBUG; 252 static final int nodeComponentRetained = !devPhase?NO_DEBUG:NO_DEBUG; 253 static final int nodeReferenceTable = !devPhase?NO_DEBUG:NO_DEBUG; 254 static final int nodeRetained = !devPhase?NO_DEBUG:NO_DEBUG; 255 static final int objectUpdate = !devPhase?NO_DEBUG:NO_DEBUG; 256 static final int orderedBin = !devPhase?NO_DEBUG:NO_DEBUG; 257 static final int orderedCollection = !devPhase?NO_DEBUG:NO_DEBUG; 258 static final int orderedGroup = !devPhase?NO_DEBUG:NO_DEBUG; 259 static final int orderedGroupRetained = !devPhase?NO_DEBUG:NO_DEBUG; 260 static final int pathInterpolator = !devPhase?NO_DEBUG:NO_DEBUG; 261 static final int physicalBody = !devPhase?NO_DEBUG:NO_DEBUG; 262 static final int physicalEnvironment = !devPhase?NO_DEBUG:NO_DEBUG; 263 static final int pickBounds = !devPhase?NO_DEBUG:NO_DEBUG; 264 static final int pickCone = !devPhase?NO_DEBUG:NO_DEBUG; 265 static final int pickCylinderRay = !devPhase?NO_DEBUG:NO_DEBUG; 266 static final int pickCylinderSegment = !devPhase?NO_DEBUG:NO_DEBUG; 267 static final int pickPoint = !devPhase?NO_DEBUG:NO_DEBUG; 268 static final int pickRay = !devPhase?NO_DEBUG:NO_DEBUG; 269 static final int pickSegment = !devPhase?NO_DEBUG:NO_DEBUG; 270 static final int pickShape = !devPhase?NO_DEBUG:NO_DEBUG; 271 static final int picking = !devPhase?NO_DEBUG:NO_DEBUG; 272 static final int pointArray = !devPhase?NO_DEBUG:NO_DEBUG; 273 static final int pointArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 274 static final int pointAttributes = !devPhase?NO_DEBUG:NO_DEBUG; 275 static final int pointAttributesRetained = !devPhase?NO_DEBUG:NO_DEBUG; 276 static final int pointLight = !devPhase?NO_DEBUG:NO_DEBUG; 277 static final int pointLightRetained = !devPhase?NO_DEBUG:NO_DEBUG; 278 static final int pointSound = !devPhase?NO_DEBUG:NO_DEBUG; 279 static final int pointSoundRetained = !devPhase?NO_DEBUG:NO_DEBUG; 280 static final int polygonAttributes = !devPhase?NO_DEBUG:NO_DEBUG; 281 static final int polygonAttributesRetained = !devPhase?NO_DEBUG:NO_DEBUG; 282 static final int positionInterpolator = !devPhase?NO_DEBUG:NO_DEBUG; 283 static final int positionPathInterpolator = !devPhase?NO_DEBUG:NO_DEBUG; 284 static final int quadArray = !devPhase?NO_DEBUG:NO_DEBUG; 285 static final int quadArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 286 static final int raster = !devPhase?NO_DEBUG:NO_DEBUG; 287 static final int rasterRetained = !devPhase?NO_DEBUG:NO_DEBUG; 288 static final int renderAtom = !devPhase?NO_DEBUG:NO_DEBUG; 289 static final int renderBin = !devPhase?NO_DEBUG:NO_DEBUG; 290 static final int renderBinLock = !devPhase?NO_DEBUG:NO_DEBUG; 291 static final int renderMethod = !devPhase?NO_DEBUG:NO_DEBUG; 292 static final int renderMolecule = !devPhase?NO_DEBUG:NO_DEBUG; 293 static final int renderer = !devPhase?NO_DEBUG:NO_DEBUG; 294 static final int rendererStructure = !devPhase?NO_DEBUG:NO_DEBUG; 295 static final int renderingAttributes = !devPhase?NO_DEBUG:NO_DEBUG; 296 static final int renderingAttributesRetained = !devPhase?NO_DEBUG:NO_DEBUG; 297 static final int renderingAttributesStructure = !devPhase?NO_DEBUG:NO_DEBUG; 298 static final int renderingEnvironmentStructure = !devPhase?NO_DEBUG:NO_DEBUG; 299 static final int restrictedAccessException = !devPhase?NO_DEBUG:NO_DEBUG; 300 static final int rotPosPathInterpolator = !devPhase?NO_DEBUG:NO_DEBUG; 301 static final int rotPosScalePathInterpolator = !devPhase?NO_DEBUG:NO_DEBUG; 302 static final int rotationInterpolator = !devPhase?NO_DEBUG:NO_DEBUG; 303 static final int rotationPathInterpolator = !devPhase?NO_DEBUG:NO_DEBUG; 304 static final int scaleInterpolator = !devPhase?NO_DEBUG:NO_DEBUG; 305 static final int sceneGraphCycleException = !devPhase?NO_DEBUG:NO_DEBUG; 306 static final int sceneGraphObject = !devPhase?NO_DEBUG:NO_DEBUG; 307 static final int sceneGraphObjectRetained = !devPhase?NO_DEBUG:NO_DEBUG; 308 static final int sceneGraphPath = !devPhase?NO_DEBUG:NO_DEBUG; 309 static final int screen3D = !devPhase?NO_DEBUG:NO_DEBUG; 310 static final int screenViewCache = !devPhase?NO_DEBUG:NO_DEBUG; 311 static final int sensor = !devPhase?NO_DEBUG:NO_DEBUG; 312 static final int sensorRead = !devPhase?NO_DEBUG:NO_DEBUG; 313 static final int setLiveState = !devPhase?NO_DEBUG:NO_DEBUG; 314 static final int shape3D = !devPhase?NO_DEBUG:NO_DEBUG; 315 static final int shape3DRetained = !devPhase?NO_DEBUG:NO_DEBUG; 316 static final int sharedGroup = !devPhase?NO_DEBUG:NO_DEBUG; 317 static final int sharedGroupRetained = !devPhase?NO_DEBUG:NO_DEBUG; 318 static final int sound = !devPhase?NO_DEBUG:NO_DEBUG; 319 static final int soundException = !devPhase?NO_DEBUG:NO_DEBUG; 320 static final int soundRenderer = !devPhase?NO_DEBUG:NO_DEBUG; 321 static final int soundRetained = !devPhase?NO_DEBUG:NO_DEBUG; 322 static final int soundScheduler = !devPhase?NO_DEBUG:NO_DEBUG; 323 static final int soundStructure = !devPhase?NO_DEBUG:NO_DEBUG; 324 static final int soundscape = !devPhase?NO_DEBUG:NO_DEBUG; 325 static final int soundscapeRetained = !devPhase?NO_DEBUG:NO_DEBUG; 326 static final int spotLight = !devPhase?NO_DEBUG:NO_DEBUG; 327 static final int spotLightRetained = !devPhase?NO_DEBUG:NO_DEBUG; 328 static final int structureUpdateThread = !devPhase?NO_DEBUG:NO_DEBUG; 329 330 // switch is a reserved word. 331 static final int Switch = !devPhase?NO_DEBUG:NO_DEBUG; 332 static final int switchRetained = !devPhase?NO_DEBUG:NO_DEBUG; 333 static final int switchValueInterpolator = !devPhase?NO_DEBUG:NO_DEBUG; 334 static final int table = !devPhase?NO_DEBUG:NO_DEBUG; 335 static final int texCoordGeneration = !devPhase?NO_DEBUG:NO_DEBUG; 336 static final int texCoordGenerationRetained = !devPhase?NO_DEBUG:NO_DEBUG; 337 static final int text3D = !devPhase?NO_DEBUG:NO_DEBUG; 338 static final int text3DRenderMethod = !devPhase?NO_DEBUG:NO_DEBUG; 339 static final int text3DRetained = !devPhase?NO_DEBUG:NO_DEBUG; 340 static final int texture = !devPhase?NO_DEBUG:NO_DEBUG; 341 static final int texture2D = !devPhase?NO_DEBUG:NO_DEBUG; 342 static final int texture2DRetained = !devPhase?NO_DEBUG:NO_DEBUG; 343 static final int texture3D = !devPhase?NO_DEBUG:NO_DEBUG; 344 static final int texture3DRetained = !devPhase?NO_DEBUG:NO_DEBUG; 345 static final int textureAttributes = !devPhase?NO_DEBUG:NO_DEBUG; 346 static final int textureAttributesRetained = !devPhase?NO_DEBUG:NO_DEBUG; 347 static final int textureBin = !devPhase?NO_DEBUG:NO_DEBUG; 348 static final int textureRetained = !devPhase?NO_DEBUG:NO_DEBUG; 349 static final int textureSetting = !devPhase?NO_DEBUG:NO_DEBUG; 350 static final int timerThread = !devPhase?NO_DEBUG:NO_DEBUG; 351 static final int transform3D = !devPhase?NO_DEBUG:NO_DEBUG; 352 static final int transformGroup = !devPhase?NO_DEBUG:NO_DEBUG; 353 static final int transformGroupRetained = !devPhase?NO_DEBUG:NO_DEBUG; 354 static final int transformStructure = !devPhase?NO_DEBUG:J3dDebug.LEVEL_3; 355 static final int transparencyAttributes = !devPhase?NO_DEBUG:NO_DEBUG; 356 static final int transparencyAttributesRetained = !devPhase?NO_DEBUG:NO_DEBUG; 357 static final int transparencyInterpolator = !devPhase?NO_DEBUG:NO_DEBUG; 358 static final int triangleArray = !devPhase?NO_DEBUG:NO_DEBUG; 359 static final int triangleArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 360 static final int triangleFanArray = !devPhase?NO_DEBUG:NO_DEBUG; 361 static final int triangleFanArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 362 static final int triangleStripArray = !devPhase?NO_DEBUG:NO_DEBUG; 363 static final int triangleStripArrayRetained = !devPhase?NO_DEBUG:NO_DEBUG; 364 static final int unorderList = !devPhase?NO_DEBUG:NO_DEBUG; 365 static final int vertexArrayRenderMethod = !devPhase?NO_DEBUG:NO_DEBUG; 366 static final int view = !devPhase?NO_DEBUG:NO_DEBUG; 367 static final int viewCache = !devPhase?NO_DEBUG:NO_DEBUG; 368 static final int viewPlatform = !devPhase?NO_DEBUG:NO_DEBUG; 369 static final int viewPlatformRetained = !devPhase?NO_DEBUG:NO_DEBUG; 370 static final int virtualUniverse = !devPhase?NO_DEBUG:NO_DEBUG; 371 static final int wakeupAnd = !devPhase?NO_DEBUG:NO_DEBUG; 372 static final int wakeupAndOfOrs = !devPhase?NO_DEBUG:NO_DEBUG; 373 static final int wakeupCondition = !devPhase?NO_DEBUG:NO_DEBUG; 374 static final int wakeupCriteriaEnumerator = !devPhase?NO_DEBUG:NO_DEBUG; 375 static final int wakeupCriterion = !devPhase?NO_DEBUG:NO_DEBUG; 376 static final int wakeupOnAWTEvent = !devPhase?NO_DEBUG:NO_DEBUG; 377 static final int wakeupOnActivation = !devPhase?NO_DEBUG:NO_DEBUG; 378 static final int wakeupOnBehaviorPost = !devPhase?NO_DEBUG:NO_DEBUG; 379 static final int wakeupOnCollisionEntry = !devPhase?NO_DEBUG:NO_DEBUG; 380 static final int wakeupOnCollisionExit = !devPhase?NO_DEBUG:NO_DEBUG; 381 static final int wakeupOnCollisionMovement = !devPhase?NO_DEBUG:NO_DEBUG; 382 static final int wakeupOnDeactivation = !devPhase?NO_DEBUG:NO_DEBUG; 383 static final int wakeupOnElapsedFrames = !devPhase?NO_DEBUG:NO_DEBUG; 384 static final int wakeupOnElapsedTime = !devPhase?NO_DEBUG:NO_DEBUG; 385 static final int wakeupOnElapsedTimeHeap = !devPhase?NO_DEBUG:NO_DEBUG; 386 static final int wakeupOnSensorEntry = !devPhase?NO_DEBUG:NO_DEBUG; 387 static final int wakeupOnSensorExit = !devPhase?NO_DEBUG:NO_DEBUG; 388 static final int wakeupOnTransformChange = !devPhase?NO_DEBUG:NO_DEBUG; 389 static final int wakeupOnViewPlatformEntry = !devPhase?NO_DEBUG:NO_DEBUG; 390 static final int wakeupOnViewPlatformExit = !devPhase?NO_DEBUG:NO_DEBUG; 391 static final int wakeupOr = !devPhase?NO_DEBUG:NO_DEBUG; 392 static final int wakeupOrOfAnds = !devPhase?NO_DEBUG:NO_DEBUG; 393 394 doDebug(int j3dClassLevel, int level, String str)395 static boolean doDebug(int j3dClassLevel, int level, String str) { 396 if(j3dClassLevel >= level) { 397 System.err.print(str); 398 return true; 399 } 400 return false; 401 } 402 doDebug(int j3dClassLevel, int level)403 static boolean doDebug(int j3dClassLevel, int level) { 404 if(j3dClassLevel >= level) { 405 return true; 406 } 407 return false; 408 } 409 doAssert(boolean expr, String str)410 static void doAssert(boolean expr, String str) { 411 if (! expr) { 412 throw new AssertionFailureException("(" + str + ")" + "is false"); 413 } 414 } 415 pkgInfo(ClassLoader classLoader, String pkgName, String className)416 static void pkgInfo(ClassLoader classLoader, 417 String pkgName, 418 String className) { 419 420 try { 421 classLoader.loadClass(pkgName + "." + className); 422 423 Package p = Package.getPackage(pkgName); 424 if (p == null) { 425 System.err.println("WARNING: Package.getPackage(" + 426 pkgName + 427 ") is null"); 428 } 429 else { 430 if(devPhase && debug) { 431 System.err.println(p); 432 System.err.println("Specification Title = " + 433 p.getSpecificationTitle()); 434 System.err.println("Specification Vendor = " + 435 p.getSpecificationVendor()); 436 System.err.println("Specification Version = " + 437 p.getSpecificationVersion()); 438 System.err.println("Implementation Vendor = " + 439 p.getImplementationVendor()); 440 System.err.println("Implementation Version = " + 441 p.getImplementationVersion()); 442 } 443 else if(devPhase) 444 System.err.println(", Java 3D " + p.getImplementationVersion() + "."); 445 } 446 } 447 catch (ClassNotFoundException e) { 448 System.err.println("Unable to load " + pkgName); 449 } 450 451 // System.err.println(); 452 } 453 454 455 static { 456 // initialize the debug flag 457 debug = false; 458 } 459 460 } 461 462