0001: /*
0002: *
0003: * Copyright (c) 2000-2001 Silvere Martin-Michiellot All Rights Reserved.
0004: *
0005: * Silvere Martin-Michiellot grants you ("Licensee") a non-exclusive,
0006: * royalty free, license to use, modify but not to redistribute this
0007: * software in source and binary code form,
0008: * provided that i) this copyright notice and license appear on all copies of
0009: * the software; and ii) Licensee does not utilize the software in a manner
0010: * which is disparaging to Silvere Martin-Michiellot.
0011: *
0012: * This software is provided "AS IS," without a warranty of any kind. ALL
0013: * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
0014: * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
0015: * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. Silvere Martin-Michiellot
0016: * AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES
0017: * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
0018: * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
0019: * Silvere Martin-Michiellot OR ITS LICENSORS BE LIABLE
0020: * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
0021: * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
0022: * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
0023: * OR INABILITY TO USE SOFTWARE, EVEN IF Silvere Martin-Michiellot HAS BEEN
0024: * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
0025: *
0026: * This software is not designed or intended for use in on-line control of
0027: * aircraft, air traffic, aircraft navigation or aircraft communications; or in
0028: * the design, construction, operation or maintenance of any nuclear
0029: * facility. Licensee represents and warrants that it will not use or
0030: * redistribute the Software for such purposes.
0031: *
0032: * @Author: Silvere Martin-Michiellot
0033: *
0034: */
0035:
0036: package com.db.utils.tree;
0037:
0038: import javax.media.j3d.*;
0039: import com.sun.j3d.utils.geometry.Primitive;
0040: import java.util.Enumeration;
0041: import java.util.Iterator;
0042:
0043: public class TreeReader extends Object {
0044:
0045: public TreeReader() {
0046:
0047: super ();
0048:
0049: }
0050:
0051: //Clears full ALLOW_XXX capabilities for the locale
0052: //and its sub-nodes
0053: public static void clearAllowsCapabilitiesTree(Locale locale) {
0054:
0055: Enumeration enumeration = locale.getAllBranchGraphs();
0056: while (enumeration.hasMoreElements()) {
0057: Object object = enumeration.nextElement();
0058: if (object instanceof javax.media.j3d.SceneGraphObject)
0059: clearAllowsCapabilitiesTree((SceneGraphObject) object);
0060: else
0061: System.out
0062: .println(object
0063: + " Unexpected error while retrieving object from Locale");
0064: }
0065:
0066: }
0067:
0068: //Set full ALLOW_XXX capabilities for the locale
0069: //and its sub-nodes
0070: public static void setAllowsCapabilitiesTree(Locale locale) {
0071:
0072: Enumeration enumeration = locale.getAllBranchGraphs();
0073: while (enumeration.hasMoreElements()) {
0074: Object object = enumeration.nextElement();
0075: if (object instanceof javax.media.j3d.SceneGraphObject)
0076: setAllowsCapabilitiesTree((SceneGraphObject) object);
0077: else
0078: System.out
0079: .println(object
0080: + " Unexpected error while retrieving object from Locale");
0081: }
0082:
0083: }
0084:
0085: //Clears full ALLOW_XXX capabilities for the locale
0086: //and its sub-nodes
0087: public static void clearAllowsCapabilitiesTree(
0088: SceneGraphObject sceneGraphObject) {
0089:
0090: if (sceneGraphObject instanceof javax.media.j3d.Group) {
0091: Enumeration enumeration = ((Group) sceneGraphObject)
0092: .getAllChildren();
0093: while (enumeration.hasMoreElements()) {
0094: clearAllowsCapabilitiesTree((Node) enumeration
0095: .nextElement());
0096: }
0097: } else
0098: clearAllowsCapabilities(sceneGraphObject);
0099:
0100: }
0101:
0102: //Set full ALLOW_XXX capabilities for the locale
0103: //and its sub-nodes
0104: public static void setAllowsCapabilitiesTree(
0105: SceneGraphObject sceneGraphObject) {
0106:
0107: if (sceneGraphObject instanceof javax.media.j3d.Group) {
0108: Enumeration enumeration = ((Group) sceneGraphObject)
0109: .getAllChildren();
0110: while (enumeration.hasMoreElements()) {
0111: setAllowsCapabilitiesTree((Node) enumeration
0112: .nextElement());
0113: }
0114: } else
0115: setAllowsCapabilities(sceneGraphObject);
0116:
0117: }
0118:
0119: //Clears full ALLOW_XXX capabilities for the sceneGraphObject
0120: //but not its sub-nodes
0121: //Use only on fresh new graph (that is not live or compiled)
0122: //else there will be a RestrictedAccessException
0123: public static void clearAllowsCapabilities(
0124: SceneGraphObject sceneGraphObject) {
0125:
0126: // if (sceneGraphObject.isCompiled()||sceneGraphObject.isLive()) {
0127: // throw new RestrictedAccessException("Can't read a live or compiled scene graph");
0128: // }
0129: if (sceneGraphObject instanceof javax.media.j3d.Node) {
0130: Node node = (Node) sceneGraphObject;
0131: node
0132: .clearCapability(javax.media.j3d.Node.ALLOW_AUTO_COMPUTE_BOUNDS_READ);
0133: node
0134: .clearCapability(javax.media.j3d.Node.ALLOW_AUTO_COMPUTE_BOUNDS_WRITE);
0135: node
0136: .clearCapability(javax.media.j3d.Node.ALLOW_BOUNDS_READ);
0137: node
0138: .clearCapability(javax.media.j3d.Node.ALLOW_BOUNDS_WRITE);
0139: node
0140: .clearCapability(javax.media.j3d.Node.ALLOW_COLLIDABLE_READ);
0141: node
0142: .clearCapability(javax.media.j3d.Node.ALLOW_COLLIDABLE_WRITE);
0143: node
0144: .clearCapability(javax.media.j3d.Node.ALLOW_LOCAL_TO_VWORLD_READ);
0145: node
0146: .clearCapability(javax.media.j3d.Node.ALLOW_PICKABLE_READ);
0147: node
0148: .clearCapability(javax.media.j3d.Node.ALLOW_PICKABLE_WRITE);
0149: node
0150: .clearCapability(javax.media.j3d.Node.ENABLE_COLLISION_REPORTING);
0151: node
0152: .clearCapability(javax.media.j3d.Node.ENABLE_PICK_REPORTING);
0153: if (sceneGraphObject instanceof javax.media.j3d.Group) {
0154: Group group = (Group) sceneGraphObject;
0155: group
0156: .clearCapability(javax.media.j3d.Group.ALLOW_CHILDREN_EXTEND);
0157: group
0158: .clearCapability(javax.media.j3d.Group.ALLOW_CHILDREN_READ);
0159: group
0160: .clearCapability(javax.media.j3d.Group.ALLOW_CHILDREN_WRITE);
0161: group
0162: .clearCapability(javax.media.j3d.Group.ALLOW_COLLISION_BOUNDS_READ);
0163: group
0164: .clearCapability(javax.media.j3d.Group.ALLOW_COLLISION_BOUNDS_WRITE);
0165: if (sceneGraphObject instanceof javax.media.j3d.BranchGroup) {
0166: BranchGroup branchGroup = (BranchGroup) sceneGraphObject;
0167: branchGroup
0168: .clearCapability(javax.media.j3d.BranchGroup.ALLOW_DETACH);
0169: } else if (sceneGraphObject instanceof com.sun.j3d.utils.geometry.Primitive) {
0170: Primitive primitive = (Primitive) sceneGraphObject;
0171: primitive
0172: .clearCapability(com.sun.j3d.utils.geometry.Primitive.ENABLE_APPEARANCE_MODIFY);
0173: primitive
0174: .clearCapability(com.sun.j3d.utils.geometry.Primitive.ENABLE_GEOMETRY_PICKING);
0175: } else if (sceneGraphObject instanceof javax.media.j3d.Switch) {
0176: Switch aswitch = (Switch) sceneGraphObject;
0177: aswitch
0178: .clearCapability(javax.media.j3d.Switch.ALLOW_SWITCH_READ);
0179: aswitch
0180: .clearCapability(javax.media.j3d.Switch.ALLOW_SWITCH_WRITE);
0181: } else if (sceneGraphObject instanceof javax.media.j3d.TransformGroup) {
0182: TransformGroup transformGroup = (TransformGroup) sceneGraphObject;
0183: transformGroup
0184: .clearCapability(javax.media.j3d.TransformGroup.ALLOW_TRANSFORM_WRITE);
0185: transformGroup
0186: .clearCapability(javax.media.j3d.TransformGroup.ALLOW_TRANSFORM_READ);
0187: }
0188: }
0189: if (sceneGraphObject instanceof javax.media.j3d.Leaf) {
0190: Leaf leaf = (Leaf) sceneGraphObject;
0191: if (sceneGraphObject instanceof javax.media.j3d.AlternateAppearance) {
0192: AlternateAppearance alternateAppearance = (AlternateAppearance) sceneGraphObject;
0193: alternateAppearance
0194: .clearCapability(javax.media.j3d.AlternateAppearance.ALLOW_APPEARANCE_READ);
0195: alternateAppearance
0196: .clearCapability(javax.media.j3d.AlternateAppearance.ALLOW_APPEARANCE_WRITE);
0197: alternateAppearance
0198: .clearCapability(javax.media.j3d.AlternateAppearance.ALLOW_INFLUENCING_BOUNDS_READ);
0199: alternateAppearance
0200: .clearCapability(javax.media.j3d.AlternateAppearance.ALLOW_INFLUENCING_BOUNDS_WRITE);
0201: alternateAppearance
0202: .clearCapability(javax.media.j3d.AlternateAppearance.ALLOW_SCOPE_READ);
0203: alternateAppearance
0204: .clearCapability(javax.media.j3d.AlternateAppearance.ALLOW_SCOPE_WRITE);
0205: } else if (sceneGraphObject instanceof javax.media.j3d.Background) {
0206: Background background = (Background) sceneGraphObject;
0207: background
0208: .clearCapability(javax.media.j3d.Background.ALLOW_APPLICATION_BOUNDS_READ);
0209: background
0210: .clearCapability(javax.media.j3d.Background.ALLOW_APPLICATION_BOUNDS_WRITE);
0211: background
0212: .clearCapability(javax.media.j3d.Background.ALLOW_COLOR_READ);
0213: background
0214: .clearCapability(javax.media.j3d.Background.ALLOW_COLOR_WRITE);
0215: background
0216: .clearCapability(javax.media.j3d.Background.ALLOW_GEOMETRY_READ);
0217: background
0218: .clearCapability(javax.media.j3d.Background.ALLOW_GEOMETRY_WRITE);
0219: background
0220: .clearCapability(javax.media.j3d.Background.ALLOW_IMAGE_READ);
0221: background
0222: .clearCapability(javax.media.j3d.Background.ALLOW_IMAGE_WRITE);
0223: } else if (sceneGraphObject instanceof javax.media.j3d.BoundingLeaf) {
0224: BoundingLeaf boundingLeaf = (BoundingLeaf) sceneGraphObject;
0225: boundingLeaf
0226: .clearCapability(javax.media.j3d.BoundingLeaf.ALLOW_REGION_READ);
0227: boundingLeaf
0228: .clearCapability(javax.media.j3d.BoundingLeaf.ALLOW_REGION_WRITE);
0229: } else if (sceneGraphObject instanceof javax.media.j3d.Clip) {
0230: Clip clip = (Clip) sceneGraphObject;
0231: clip
0232: .clearCapability(javax.media.j3d.Clip.ALLOW_APPLICATION_BOUNDS_READ);
0233: clip
0234: .clearCapability(javax.media.j3d.Clip.ALLOW_APPLICATION_BOUNDS_WRITE);
0235: clip
0236: .clearCapability(javax.media.j3d.Clip.ALLOW_BACK_DISTANCE_READ);
0237: clip
0238: .clearCapability(javax.media.j3d.Clip.ALLOW_BACK_DISTANCE_WRITE);
0239: } else if (sceneGraphObject instanceof javax.media.j3d.Fog) {
0240: Fog fog = (Fog) sceneGraphObject;
0241: fog
0242: .clearCapability(javax.media.j3d.Fog.ALLOW_COLOR_READ);
0243: fog
0244: .clearCapability(javax.media.j3d.Fog.ALLOW_COLOR_WRITE);
0245: fog
0246: .clearCapability(javax.media.j3d.Fog.ALLOW_INFLUENCING_BOUNDS_READ);
0247: fog
0248: .clearCapability(javax.media.j3d.Fog.ALLOW_INFLUENCING_BOUNDS_WRITE);
0249: fog
0250: .clearCapability(javax.media.j3d.Fog.ALLOW_SCOPE_READ);
0251: fog
0252: .clearCapability(javax.media.j3d.Fog.ALLOW_SCOPE_WRITE);
0253: if (sceneGraphObject instanceof javax.media.j3d.ExponentialFog) {
0254: ExponentialFog exponentialFog = (ExponentialFog) sceneGraphObject;
0255: exponentialFog
0256: .clearCapability(javax.media.j3d.ExponentialFog.ALLOW_DENSITY_READ);
0257: exponentialFog
0258: .clearCapability(javax.media.j3d.ExponentialFog.ALLOW_DENSITY_WRITE);
0259: } else if (sceneGraphObject instanceof javax.media.j3d.LinearFog) {
0260: LinearFog linearFog = (LinearFog) sceneGraphObject;
0261: linearFog
0262: .clearCapability(javax.media.j3d.LinearFog.ALLOW_DISTANCE_READ);
0263: linearFog
0264: .clearCapability(javax.media.j3d.LinearFog.ALLOW_DISTANCE_WRITE);
0265: }
0266: } else if (sceneGraphObject instanceof javax.media.j3d.Light) {
0267: Light light = (Light) sceneGraphObject;
0268: light
0269: .clearCapability(javax.media.j3d.Light.ALLOW_COLOR_READ);
0270: light
0271: .clearCapability(javax.media.j3d.Light.ALLOW_COLOR_WRITE);
0272: light
0273: .clearCapability(javax.media.j3d.Light.ALLOW_INFLUENCING_BOUNDS_READ);
0274: light
0275: .clearCapability(javax.media.j3d.Light.ALLOW_INFLUENCING_BOUNDS_WRITE);
0276: light
0277: .clearCapability(javax.media.j3d.Light.ALLOW_SCOPE_READ);
0278: light
0279: .clearCapability(javax.media.j3d.Light.ALLOW_SCOPE_WRITE);
0280: light
0281: .clearCapability(javax.media.j3d.Light.ALLOW_STATE_READ);
0282: if (sceneGraphObject instanceof javax.media.j3d.DirectionalLight) {
0283: DirectionalLight directionalLight = (DirectionalLight) sceneGraphObject;
0284: directionalLight
0285: .clearCapability(javax.media.j3d.DirectionalLight.ALLOW_DIRECTION_READ);
0286: directionalLight
0287: .clearCapability(javax.media.j3d.DirectionalLight.ALLOW_DIRECTION_WRITE);
0288: } else if (sceneGraphObject instanceof javax.media.j3d.PointLight) {
0289: PointLight pointLight = (PointLight) sceneGraphObject;
0290: pointLight
0291: .clearCapability(javax.media.j3d.PointLight.ALLOW_ATTENUATION_READ);
0292: pointLight
0293: .clearCapability(javax.media.j3d.PointLight.ALLOW_ATTENUATION_WRITE);
0294: pointLight
0295: .clearCapability(javax.media.j3d.PointLight.ALLOW_POSITION_READ);
0296: pointLight
0297: .clearCapability(javax.media.j3d.PointLight.ALLOW_POSITION_WRITE);
0298: if (sceneGraphObject instanceof javax.media.j3d.SpotLight) {
0299: SpotLight spotLight = (SpotLight) sceneGraphObject;
0300: spotLight
0301: .clearCapability(javax.media.j3d.SpotLight.ALLOW_CONCENTRATION_READ);
0302: spotLight
0303: .clearCapability(javax.media.j3d.SpotLight.ALLOW_CONCENTRATION_WRITE);
0304: spotLight
0305: .clearCapability(javax.media.j3d.SpotLight.ALLOW_DIRECTION_READ);
0306: spotLight
0307: .clearCapability(javax.media.j3d.SpotLight.ALLOW_DIRECTION_WRITE);
0308: spotLight
0309: .clearCapability(javax.media.j3d.SpotLight.ALLOW_SPREAD_ANGLE_READ);
0310: spotLight
0311: .clearCapability(javax.media.j3d.SpotLight.ALLOW_SPREAD_ANGLE_WRITE);
0312: }
0313: }
0314: } else if (sceneGraphObject instanceof javax.media.j3d.Link) {
0315: Link link = (Link) sceneGraphObject;
0316: link
0317: .clearCapability(javax.media.j3d.Link.ALLOW_SHARED_GROUP_READ);
0318: link
0319: .clearCapability(javax.media.j3d.Link.ALLOW_SHARED_GROUP_WRITE);
0320: } else if (sceneGraphObject instanceof javax.media.j3d.ModelClip) {
0321: ModelClip modelClip = (ModelClip) sceneGraphObject;
0322: modelClip
0323: .clearCapability(javax.media.j3d.ModelClip.ALLOW_ENABLE_READ);
0324: modelClip
0325: .clearCapability(javax.media.j3d.ModelClip.ALLOW_ENABLE_WRITE);
0326: modelClip
0327: .clearCapability(javax.media.j3d.ModelClip.ALLOW_INFLUENCING_BOUNDS_READ);
0328: modelClip
0329: .clearCapability(javax.media.j3d.ModelClip.ALLOW_INFLUENCING_BOUNDS_WRITE);
0330: modelClip
0331: .clearCapability(javax.media.j3d.ModelClip.ALLOW_PLANE_READ);
0332: modelClip
0333: .clearCapability(javax.media.j3d.ModelClip.ALLOW_PLANE_WRITE);
0334: modelClip
0335: .clearCapability(javax.media.j3d.ModelClip.ALLOW_SCOPE_READ);
0336: modelClip
0337: .clearCapability(javax.media.j3d.ModelClip.ALLOW_SCOPE_WRITE);
0338: } else if (sceneGraphObject instanceof javax.media.j3d.Morph) {
0339: Morph morph = (Morph) sceneGraphObject;
0340: morph
0341: .clearCapability(javax.media.j3d.Morph.ALLOW_APPEARANCE_OVERRIDE_READ);
0342: morph
0343: .clearCapability(javax.media.j3d.Morph.ALLOW_APPEARANCE_OVERRIDE_WRITE);
0344: morph
0345: .clearCapability(javax.media.j3d.Morph.ALLOW_APPEARANCE_READ);
0346: morph
0347: .clearCapability(javax.media.j3d.Morph.ALLOW_APPEARANCE_WRITE);
0348: morph
0349: .clearCapability(javax.media.j3d.Morph.ALLOW_COLLISION_BOUNDS_READ);
0350: morph
0351: .clearCapability(javax.media.j3d.Morph.ALLOW_COLLISION_BOUNDS_WRITE);
0352: morph
0353: .clearCapability(javax.media.j3d.Morph.ALLOW_GEOMETRY_ARRAY_READ);
0354: morph
0355: .clearCapability(javax.media.j3d.Morph.ALLOW_GEOMETRY_ARRAY_WRITE);
0356: morph
0357: .clearCapability(javax.media.j3d.Morph.ALLOW_WEIGHTS_READ);
0358: morph
0359: .clearCapability(javax.media.j3d.Morph.ALLOW_WEIGHTS_WRITE);
0360: } else if (sceneGraphObject instanceof javax.media.j3d.Shape3D) {
0361: Shape3D shape3D = (Shape3D) sceneGraphObject;
0362: shape3D
0363: .clearCapability(javax.media.j3d.Shape3D.ALLOW_APPEARANCE_OVERRIDE_READ);
0364: shape3D
0365: .clearCapability(javax.media.j3d.Shape3D.ALLOW_APPEARANCE_OVERRIDE_WRITE);
0366: shape3D
0367: .clearCapability(javax.media.j3d.Shape3D.ALLOW_APPEARANCE_READ);
0368: shape3D
0369: .clearCapability(javax.media.j3d.Shape3D.ALLOW_APPEARANCE_WRITE);
0370: shape3D
0371: .clearCapability(javax.media.j3d.Shape3D.ALLOW_COLLISION_BOUNDS_READ);
0372: shape3D
0373: .clearCapability(javax.media.j3d.Shape3D.ALLOW_COLLISION_BOUNDS_WRITE);
0374: shape3D
0375: .clearCapability(javax.media.j3d.Shape3D.ALLOW_GEOMETRY_READ);
0376: shape3D
0377: .clearCapability(javax.media.j3d.Shape3D.ALLOW_GEOMETRY_WRITE);
0378: if (sceneGraphObject instanceof javax.media.j3d.OrientedShape3D) {
0379: OrientedShape3D orientedShape3D = (OrientedShape3D) sceneGraphObject;
0380: orientedShape3D
0381: .clearCapability(javax.media.j3d.OrientedShape3D.ALLOW_AXIS_READ);
0382: orientedShape3D
0383: .clearCapability(javax.media.j3d.OrientedShape3D.ALLOW_AXIS_WRITE);
0384: orientedShape3D
0385: .clearCapability(javax.media.j3d.OrientedShape3D.ALLOW_MODE_READ);
0386: orientedShape3D
0387: .clearCapability(javax.media.j3d.OrientedShape3D.ALLOW_MODE_WRITE);
0388: orientedShape3D
0389: .clearCapability(javax.media.j3d.OrientedShape3D.ALLOW_POINT_READ);
0390: orientedShape3D
0391: .clearCapability(javax.media.j3d.OrientedShape3D.ALLOW_POINT_WRITE);
0392: orientedShape3D
0393: .clearCapability(javax.media.j3d.OrientedShape3D.ROTATE_ABOUT_AXIS);
0394: orientedShape3D
0395: .clearCapability(javax.media.j3d.OrientedShape3D.ROTATE_ABOUT_POINT);
0396: }
0397: } else if (sceneGraphObject instanceof javax.media.j3d.Sound) {
0398: Sound sound = (Sound) sceneGraphObject;
0399: sound
0400: .clearCapability(javax.media.j3d.Sound.ALLOW_CHANNELS_USED_READ);
0401: sound
0402: .clearCapability(javax.media.j3d.Sound.ALLOW_CONT_PLAY_READ);
0403: sound
0404: .clearCapability(javax.media.j3d.Sound.ALLOW_CONT_PLAY_WRITE);
0405: sound
0406: .clearCapability(javax.media.j3d.Sound.ALLOW_DURATION_READ);
0407: sound
0408: .clearCapability(javax.media.j3d.Sound.ALLOW_ENABLE_READ);
0409: sound
0410: .clearCapability(javax.media.j3d.Sound.ALLOW_ENABLE_WRITE);
0411: sound
0412: .clearCapability(javax.media.j3d.Sound.ALLOW_INITIAL_GAIN_READ);
0413: sound
0414: .clearCapability(javax.media.j3d.Sound.ALLOW_INITIAL_GAIN_WRITE);
0415: sound
0416: .clearCapability(javax.media.j3d.Sound.ALLOW_IS_PLAYING_READ);
0417: sound
0418: .clearCapability(javax.media.j3d.Sound.ALLOW_IS_READY_READ);
0419: sound
0420: .clearCapability(javax.media.j3d.Sound.ALLOW_LOOP_READ);
0421: sound
0422: .clearCapability(javax.media.j3d.Sound.ALLOW_LOOP_WRITE);
0423: sound
0424: .clearCapability(javax.media.j3d.Sound.ALLOW_PRIORITY_READ);
0425: sound
0426: .clearCapability(javax.media.j3d.Sound.ALLOW_PRIORITY_WRITE);
0427: sound
0428: .clearCapability(javax.media.j3d.Sound.ALLOW_RELEASE_READ);
0429: sound
0430: .clearCapability(javax.media.j3d.Sound.ALLOW_RELEASE_WRITE);
0431: sound
0432: .clearCapability(javax.media.j3d.Sound.ALLOW_SCHEDULING_BOUNDS_READ);
0433: sound
0434: .clearCapability(javax.media.j3d.Sound.ALLOW_SCHEDULING_BOUNDS_WRITE);
0435: sound
0436: .clearCapability(javax.media.j3d.Sound.ALLOW_SOUND_DATA_READ);
0437: sound
0438: .clearCapability(javax.media.j3d.Sound.ALLOW_SOUND_DATA_WRITE);
0439: if (sceneGraphObject instanceof javax.media.j3d.PointSound) {
0440: PointSound pointSound = (PointSound) sceneGraphObject;
0441: pointSound
0442: .clearCapability(javax.media.j3d.PointSound.ALLOW_DISTANCE_GAIN_READ);
0443: pointSound
0444: .clearCapability(javax.media.j3d.PointSound.ALLOW_DISTANCE_GAIN_WRITE);
0445: pointSound
0446: .clearCapability(javax.media.j3d.PointSound.ALLOW_POSITION_READ);
0447: pointSound
0448: .clearCapability(javax.media.j3d.PointSound.ALLOW_POSITION_WRITE);
0449: if (sceneGraphObject instanceof javax.media.j3d.ConeSound) {
0450: ConeSound coneSound = (ConeSound) sceneGraphObject;
0451: coneSound
0452: .clearCapability(javax.media.j3d.ConeSound.ALLOW_ANGULAR_ATTENUATION_READ);
0453: coneSound
0454: .clearCapability(javax.media.j3d.ConeSound.ALLOW_ANGULAR_ATTENUATION_WRITE);
0455: coneSound
0456: .clearCapability(javax.media.j3d.ConeSound.ALLOW_DIRECTION_READ);
0457: coneSound
0458: .clearCapability(javax.media.j3d.ConeSound.ALLOW_DIRECTION_WRITE);
0459: }
0460: }
0461: } else if (sceneGraphObject instanceof javax.media.j3d.Soundscape) {
0462: Soundscape soundscape = (Soundscape) sceneGraphObject;
0463: soundscape
0464: .clearCapability(javax.media.j3d.Soundscape.ALLOW_APPLICATION_BOUNDS_READ);
0465: soundscape
0466: .clearCapability(javax.media.j3d.Soundscape.ALLOW_APPLICATION_BOUNDS_WRITE);
0467: soundscape
0468: .clearCapability(javax.media.j3d.Soundscape.ALLOW_ATTRIBUTES_READ);
0469: soundscape
0470: .clearCapability(javax.media.j3d.Soundscape.ALLOW_ATTRIBUTES_WRITE);
0471: } else if (sceneGraphObject instanceof javax.media.j3d.ViewPlatform) {
0472: ViewPlatform viewPlatform = (ViewPlatform) sceneGraphObject;
0473: viewPlatform
0474: .clearCapability(javax.media.j3d.ViewPlatform.ALLOW_POLICY_READ);
0475: viewPlatform
0476: .clearCapability(javax.media.j3d.ViewPlatform.ALLOW_POLICY_WRITE);
0477: }
0478: } else if (sceneGraphObject instanceof javax.media.j3d.NodeComponent) {
0479: NodeComponent nodeComponent = (NodeComponent) sceneGraphObject;
0480: if (sceneGraphObject instanceof javax.media.j3d.Appearance) {
0481: Appearance appearance = (Appearance) sceneGraphObject;
0482: appearance
0483: .clearCapability(javax.media.j3d.Appearance.ALLOW_COLORING_ATTRIBUTES_READ);
0484: appearance
0485: .clearCapability(javax.media.j3d.Appearance.ALLOW_COLORING_ATTRIBUTES_WRITE);
0486: appearance
0487: .clearCapability(javax.media.j3d.Appearance.ALLOW_LINE_ATTRIBUTES_READ);
0488: appearance
0489: .clearCapability(javax.media.j3d.Appearance.ALLOW_LINE_ATTRIBUTES_WRITE);
0490: appearance
0491: .clearCapability(javax.media.j3d.Appearance.ALLOW_MATERIAL_READ);
0492: appearance
0493: .clearCapability(javax.media.j3d.Appearance.ALLOW_MATERIAL_WRITE);
0494: appearance
0495: .clearCapability(javax.media.j3d.Appearance.ALLOW_POINT_ATTRIBUTES_READ);
0496: appearance
0497: .clearCapability(javax.media.j3d.Appearance.ALLOW_POINT_ATTRIBUTES_WRITE);
0498: appearance
0499: .clearCapability(javax.media.j3d.Appearance.ALLOW_POLYGON_ATTRIBUTES_READ);
0500: appearance
0501: .clearCapability(javax.media.j3d.Appearance.ALLOW_POLYGON_ATTRIBUTES_WRITE);
0502: appearance
0503: .clearCapability(javax.media.j3d.Appearance.ALLOW_RENDERING_ATTRIBUTES_READ);
0504: appearance
0505: .clearCapability(javax.media.j3d.Appearance.ALLOW_RENDERING_ATTRIBUTES_WRITE);
0506: appearance
0507: .clearCapability(javax.media.j3d.Appearance.ALLOW_TEXGEN_READ);
0508: appearance
0509: .clearCapability(javax.media.j3d.Appearance.ALLOW_TEXGEN_WRITE);
0510: appearance
0511: .clearCapability(javax.media.j3d.Appearance.ALLOW_TEXTURE_ATTRIBUTES_READ);
0512: appearance
0513: .clearCapability(javax.media.j3d.Appearance.ALLOW_TEXTURE_ATTRIBUTES_WRITE);
0514: appearance
0515: .clearCapability(javax.media.j3d.Appearance.ALLOW_TEXTURE_READ);
0516: appearance
0517: .clearCapability(javax.media.j3d.Appearance.ALLOW_TEXTURE_UNIT_STATE_READ);
0518: appearance
0519: .clearCapability(javax.media.j3d.Appearance.ALLOW_TEXTURE_UNIT_STATE_WRITE);
0520: appearance
0521: .clearCapability(javax.media.j3d.Appearance.ALLOW_TEXTURE_WRITE);
0522: appearance
0523: .clearCapability(javax.media.j3d.Appearance.ALLOW_TRANSPARENCY_ATTRIBUTES_READ);
0524: appearance
0525: .clearCapability(javax.media.j3d.Appearance.ALLOW_TRANSPARENCY_ATTRIBUTES_WRITE);
0526: } else if (sceneGraphObject instanceof javax.media.j3d.AuralAttributes) {
0527: AuralAttributes auralAttributes = (AuralAttributes) sceneGraphObject;
0528: auralAttributes
0529: .clearCapability(javax.media.j3d.AuralAttributes.ALLOW_ATTRIBUTE_GAIN_READ);
0530: auralAttributes
0531: .clearCapability(javax.media.j3d.AuralAttributes.ALLOW_ATTRIBUTE_GAIN_WRITE);
0532: auralAttributes
0533: .clearCapability(javax.media.j3d.AuralAttributes.ALLOW_DISTANCE_FILTER_READ);
0534: auralAttributes
0535: .clearCapability(javax.media.j3d.AuralAttributes.ALLOW_DISTANCE_FILTER_WRITE);
0536: auralAttributes
0537: .clearCapability(javax.media.j3d.AuralAttributes.ALLOW_FREQUENCY_SCALE_FACTOR_READ);
0538: auralAttributes
0539: .clearCapability(javax.media.j3d.AuralAttributes.ALLOW_FREQUENCY_SCALE_FACTOR_WRITE);
0540: auralAttributes
0541: .clearCapability(javax.media.j3d.AuralAttributes.ALLOW_REFLECTION_COEFFICIENT_READ);
0542: auralAttributes
0543: .clearCapability(javax.media.j3d.AuralAttributes.ALLOW_REFLECTION_COEFFICIENT_WRITE);
0544: auralAttributes
0545: .clearCapability(javax.media.j3d.AuralAttributes.ALLOW_REVERB_DELAY_READ);
0546: auralAttributes
0547: .clearCapability(javax.media.j3d.AuralAttributes.ALLOW_REVERB_DELAY_WRITE);
0548: auralAttributes
0549: .clearCapability(javax.media.j3d.AuralAttributes.ALLOW_REVERB_ORDER_READ);
0550: auralAttributes
0551: .clearCapability(javax.media.j3d.AuralAttributes.ALLOW_REVERB_ORDER_WRITE);
0552: auralAttributes
0553: .clearCapability(javax.media.j3d.AuralAttributes.ALLOW_ROLLOFF_READ);
0554: auralAttributes
0555: .clearCapability(javax.media.j3d.AuralAttributes.ALLOW_ROLLOFF_WRITE);
0556: auralAttributes
0557: .clearCapability(javax.media.j3d.AuralAttributes.ALLOW_VELOCITY_SCALE_FACTOR_READ);
0558: auralAttributes
0559: .clearCapability(javax.media.j3d.AuralAttributes.ALLOW_VELOCITY_SCALE_FACTOR_WRITE);
0560: } else if (sceneGraphObject instanceof javax.media.j3d.ColoringAttributes) {
0561: ColoringAttributes coloringAttributes = (ColoringAttributes) sceneGraphObject;
0562: coloringAttributes
0563: .clearCapability(javax.media.j3d.ColoringAttributes.ALLOW_COLOR_READ);
0564: coloringAttributes
0565: .clearCapability(javax.media.j3d.ColoringAttributes.ALLOW_COLOR_WRITE);
0566: coloringAttributes
0567: .clearCapability(javax.media.j3d.ColoringAttributes.ALLOW_SHADE_MODEL_READ);
0568: coloringAttributes
0569: .clearCapability(javax.media.j3d.ColoringAttributes.ALLOW_SHADE_MODEL_WRITE);
0570: } else if (sceneGraphObject instanceof javax.media.j3d.DepthComponent) {
0571: DepthComponent depthComponent = (DepthComponent) sceneGraphObject;
0572: depthComponent
0573: .clearCapability(javax.media.j3d.DepthComponent.ALLOW_DATA_READ);
0574: depthComponent
0575: .clearCapability(javax.media.j3d.DepthComponent.ALLOW_SIZE_READ);
0576: } else if (sceneGraphObject instanceof javax.media.j3d.Geometry) {
0577: Geometry geometry = (Geometry) sceneGraphObject;
0578: geometry
0579: .clearCapability(javax.media.j3d.Geometry.ALLOW_INTERSECT);
0580: if (sceneGraphObject instanceof javax.media.j3d.CompressedGeometry) {
0581: CompressedGeometry compressedGeometry = (CompressedGeometry) sceneGraphObject;
0582: compressedGeometry
0583: .clearCapability(javax.media.j3d.CompressedGeometry.ALLOW_COUNT_READ);
0584: compressedGeometry
0585: .clearCapability(javax.media.j3d.CompressedGeometry.ALLOW_GEOMETRY_READ);
0586: compressedGeometry
0587: .clearCapability(javax.media.j3d.CompressedGeometry.ALLOW_HEADER_READ);
0588: compressedGeometry
0589: .clearCapability(javax.media.j3d.CompressedGeometry.ALLOW_REF_DATA_READ);
0590: } else if (sceneGraphObject instanceof javax.media.j3d.GeometryArray) {
0591: GeometryArray geometryArray = (GeometryArray) sceneGraphObject;
0592: geometryArray
0593: .clearCapability(javax.media.j3d.GeometryArray.ALLOW_COLOR_READ);
0594: geometryArray
0595: .clearCapability(javax.media.j3d.GeometryArray.ALLOW_COLOR_WRITE);
0596: geometryArray
0597: .clearCapability(javax.media.j3d.GeometryArray.ALLOW_COORDINATE_READ);
0598: geometryArray
0599: .clearCapability(javax.media.j3d.GeometryArray.ALLOW_COORDINATE_WRITE);
0600: geometryArray
0601: .clearCapability(javax.media.j3d.GeometryArray.ALLOW_COUNT_READ);
0602: geometryArray
0603: .clearCapability(javax.media.j3d.GeometryArray.ALLOW_COUNT_WRITE);
0604: geometryArray
0605: .clearCapability(javax.media.j3d.GeometryArray.ALLOW_FORMAT_READ);
0606: geometryArray
0607: .clearCapability(javax.media.j3d.GeometryArray.ALLOW_NORMAL_READ);
0608: geometryArray
0609: .clearCapability(javax.media.j3d.GeometryArray.ALLOW_NORMAL_WRITE);
0610: geometryArray
0611: .clearCapability(javax.media.j3d.GeometryArray.ALLOW_REF_DATA_READ);
0612: geometryArray
0613: .clearCapability(javax.media.j3d.GeometryArray.ALLOW_REF_DATA_WRITE);
0614: geometryArray
0615: .clearCapability(javax.media.j3d.GeometryArray.ALLOW_TEXCOORD_READ);
0616: geometryArray
0617: .clearCapability(javax.media.j3d.GeometryArray.ALLOW_TEXCOORD_WRITE);
0618: if (sceneGraphObject instanceof javax.media.j3d.IndexedGeometryArray) {
0619: IndexedGeometryArray indexedGeometryArray = (IndexedGeometryArray) sceneGraphObject;
0620: indexedGeometryArray
0621: .clearCapability(javax.media.j3d.IndexedGeometryArray.ALLOW_COLOR_INDEX_READ);
0622: indexedGeometryArray
0623: .clearCapability(javax.media.j3d.IndexedGeometryArray.ALLOW_COLOR_INDEX_WRITE);
0624: indexedGeometryArray
0625: .clearCapability(javax.media.j3d.IndexedGeometryArray.ALLOW_COORDINATE_INDEX_READ);
0626: indexedGeometryArray
0627: .clearCapability(javax.media.j3d.IndexedGeometryArray.ALLOW_COORDINATE_INDEX_WRITE);
0628: indexedGeometryArray
0629: .clearCapability(javax.media.j3d.IndexedGeometryArray.ALLOW_NORMAL_INDEX_READ);
0630: indexedGeometryArray
0631: .clearCapability(javax.media.j3d.IndexedGeometryArray.ALLOW_NORMAL_INDEX_WRITE);
0632: indexedGeometryArray
0633: .clearCapability(javax.media.j3d.IndexedGeometryArray.ALLOW_TEXCOORD_INDEX_READ);
0634: indexedGeometryArray
0635: .clearCapability(javax.media.j3d.IndexedGeometryArray.ALLOW_TEXCOORD_INDEX_WRITE);
0636: }
0637: } else if (sceneGraphObject instanceof javax.media.j3d.Raster) {
0638: Raster raster = (Raster) sceneGraphObject;
0639: raster
0640: .clearCapability(javax.media.j3d.Raster.ALLOW_DEPTH_COMPONENT_READ);
0641: raster
0642: .clearCapability(javax.media.j3d.Raster.ALLOW_DEPTH_COMPONENT_WRITE);
0643: raster
0644: .clearCapability(javax.media.j3d.Raster.ALLOW_IMAGE_READ);
0645: raster
0646: .clearCapability(javax.media.j3d.Raster.ALLOW_IMAGE_WRITE);
0647: raster
0648: .clearCapability(javax.media.j3d.Raster.ALLOW_OFFSET_READ);
0649: raster
0650: .clearCapability(javax.media.j3d.Raster.ALLOW_OFFSET_WRITE);
0651: raster
0652: .clearCapability(javax.media.j3d.Raster.ALLOW_POSITION_READ);
0653: raster
0654: .clearCapability(javax.media.j3d.Raster.ALLOW_POSITION_WRITE);
0655: raster
0656: .clearCapability(javax.media.j3d.Raster.ALLOW_SIZE_READ);
0657: raster
0658: .clearCapability(javax.media.j3d.Raster.ALLOW_SIZE_WRITE);
0659: raster
0660: .clearCapability(javax.media.j3d.Raster.ALLOW_TYPE_READ);
0661: } else if (sceneGraphObject instanceof javax.media.j3d.Text3D) {
0662: Text3D text3D = (Text3D) sceneGraphObject;
0663: text3D
0664: .clearCapability(javax.media.j3d.Text3D.ALLOW_ALIGNMENT_READ);
0665: text3D
0666: .clearCapability(javax.media.j3d.Text3D.ALLOW_ALIGNMENT_WRITE);
0667: text3D
0668: .clearCapability(javax.media.j3d.Text3D.ALLOW_BOUNDING_BOX_READ);
0669: text3D
0670: .clearCapability(javax.media.j3d.Text3D.ALLOW_CHARACTER_SPACING_READ);
0671: text3D
0672: .clearCapability(javax.media.j3d.Text3D.ALLOW_CHARACTER_SPACING_WRITE);
0673: text3D
0674: .clearCapability(javax.media.j3d.Text3D.ALLOW_FONT3D_READ);
0675: text3D
0676: .clearCapability(javax.media.j3d.Text3D.ALLOW_FONT3D_WRITE);
0677: text3D
0678: .clearCapability(javax.media.j3d.Text3D.ALLOW_PATH_READ);
0679: text3D
0680: .clearCapability(javax.media.j3d.Text3D.ALLOW_PATH_WRITE);
0681: text3D
0682: .clearCapability(javax.media.j3d.Text3D.ALLOW_POSITION_READ);
0683: text3D
0684: .clearCapability(javax.media.j3d.Text3D.ALLOW_POSITION_WRITE);
0685: text3D
0686: .clearCapability(javax.media.j3d.Text3D.ALLOW_STRING_READ);
0687: text3D
0688: .clearCapability(javax.media.j3d.Text3D.ALLOW_STRING_WRITE);
0689: }
0690: } else if (sceneGraphObject instanceof javax.media.j3d.ImageComponent) {
0691: ImageComponent imageComponent = (ImageComponent) sceneGraphObject;
0692: imageComponent
0693: .clearCapability(javax.media.j3d.ImageComponent.ALLOW_FORMAT_READ);
0694: imageComponent
0695: .clearCapability(javax.media.j3d.ImageComponent.ALLOW_IMAGE_READ);
0696: imageComponent
0697: .clearCapability(javax.media.j3d.ImageComponent.ALLOW_SIZE_READ);
0698: } else if (sceneGraphObject instanceof javax.media.j3d.LineAttributes) {
0699: LineAttributes lineAttributes = (LineAttributes) sceneGraphObject;
0700: lineAttributes
0701: .clearCapability(javax.media.j3d.LineAttributes.ALLOW_ANTIALIASING_READ);
0702: lineAttributes
0703: .clearCapability(javax.media.j3d.LineAttributes.ALLOW_ANTIALIASING_WRITE);
0704: lineAttributes
0705: .clearCapability(javax.media.j3d.LineAttributes.ALLOW_PATTERN_READ);
0706: lineAttributes
0707: .clearCapability(javax.media.j3d.LineAttributes.ALLOW_PATTERN_WRITE);
0708: lineAttributes
0709: .clearCapability(javax.media.j3d.LineAttributes.ALLOW_WIDTH_READ);
0710: lineAttributes
0711: .clearCapability(javax.media.j3d.LineAttributes.ALLOW_WIDTH_WRITE);
0712: } else if (sceneGraphObject instanceof javax.media.j3d.Material) {
0713: Material material = (Material) sceneGraphObject;
0714: material
0715: .clearCapability(javax.media.j3d.Material.ALLOW_COMPONENT_READ);
0716: material
0717: .clearCapability(javax.media.j3d.Material.ALLOW_COMPONENT_WRITE);
0718: } else if (sceneGraphObject instanceof javax.media.j3d.MediaContainer) {
0719: MediaContainer mediaContainer = (MediaContainer) sceneGraphObject;
0720: mediaContainer
0721: .clearCapability(javax.media.j3d.MediaContainer.ALLOW_URL_READ);
0722: mediaContainer
0723: .clearCapability(javax.media.j3d.MediaContainer.ALLOW_URL_WRITE);
0724: mediaContainer
0725: .clearCapability(javax.media.j3d.MediaContainer.ALLOW_CACHE_READ);
0726: mediaContainer
0727: .clearCapability(javax.media.j3d.MediaContainer.ALLOW_CACHE_WRITE);
0728: } else if (sceneGraphObject instanceof javax.media.j3d.PointAttributes) {
0729: PointAttributes pointAttributes = (PointAttributes) sceneGraphObject;
0730: pointAttributes
0731: .clearCapability(javax.media.j3d.PointAttributes.ALLOW_ANTIALIASING_READ);
0732: pointAttributes
0733: .clearCapability(javax.media.j3d.PointAttributes.ALLOW_ANTIALIASING_WRITE);
0734: pointAttributes
0735: .clearCapability(javax.media.j3d.PointAttributes.ALLOW_SIZE_READ);
0736: pointAttributes
0737: .clearCapability(javax.media.j3d.PointAttributes.ALLOW_SIZE_WRITE);
0738: } else if (sceneGraphObject instanceof javax.media.j3d.PolygonAttributes) {
0739: PolygonAttributes polygonAttributes = (PolygonAttributes) sceneGraphObject;
0740: polygonAttributes
0741: .clearCapability(javax.media.j3d.PolygonAttributes.ALLOW_CULL_FACE_READ);
0742: polygonAttributes
0743: .clearCapability(javax.media.j3d.PolygonAttributes.ALLOW_CULL_FACE_WRITE);
0744: polygonAttributes
0745: .clearCapability(javax.media.j3d.PolygonAttributes.ALLOW_MODE_READ);
0746: polygonAttributes
0747: .clearCapability(javax.media.j3d.PolygonAttributes.ALLOW_MODE_WRITE);
0748: polygonAttributes
0749: .clearCapability(javax.media.j3d.PolygonAttributes.ALLOW_NORMAL_FLIP_READ);
0750: polygonAttributes
0751: .clearCapability(javax.media.j3d.PolygonAttributes.ALLOW_NORMAL_FLIP_WRITE);
0752: polygonAttributes
0753: .clearCapability(javax.media.j3d.PolygonAttributes.ALLOW_OFFSET_READ);
0754: polygonAttributes
0755: .clearCapability(javax.media.j3d.PolygonAttributes.ALLOW_OFFSET_WRITE);
0756: } else if (sceneGraphObject instanceof javax.media.j3d.RenderingAttributes) {
0757: RenderingAttributes renderingAttributes = (RenderingAttributes) sceneGraphObject;
0758: renderingAttributes
0759: .clearCapability(javax.media.j3d.RenderingAttributes.ALLOW_ALPHA_TEST_FUNCTION_READ);
0760: renderingAttributes
0761: .clearCapability(javax.media.j3d.RenderingAttributes.ALLOW_ALPHA_TEST_FUNCTION_WRITE);
0762: renderingAttributes
0763: .clearCapability(javax.media.j3d.RenderingAttributes.ALLOW_ALPHA_TEST_VALUE_READ);
0764: renderingAttributes
0765: .clearCapability(javax.media.j3d.RenderingAttributes.ALLOW_ALPHA_TEST_VALUE_WRITE);
0766: renderingAttributes
0767: .clearCapability(javax.media.j3d.RenderingAttributes.ALLOW_DEPTH_ENABLE_READ);
0768: renderingAttributes
0769: .clearCapability(javax.media.j3d.RenderingAttributes.ALLOW_IGNORE_VERTEX_COLORS_READ);
0770: renderingAttributes
0771: .clearCapability(javax.media.j3d.RenderingAttributes.ALLOW_IGNORE_VERTEX_COLORS_WRITE);
0772: renderingAttributes
0773: .clearCapability(javax.media.j3d.RenderingAttributes.ALLOW_RASTER_OP_READ);
0774: renderingAttributes
0775: .clearCapability(javax.media.j3d.RenderingAttributes.ALLOW_RASTER_OP_WRITE);
0776: renderingAttributes
0777: .clearCapability(javax.media.j3d.RenderingAttributes.ALLOW_VISIBLE_READ);
0778: renderingAttributes
0779: .clearCapability(javax.media.j3d.RenderingAttributes.ALLOW_VISIBLE_WRITE);
0780: } else if (sceneGraphObject instanceof javax.media.j3d.TexCoordGeneration) {
0781: TexCoordGeneration texCoordGeneration = (TexCoordGeneration) sceneGraphObject;
0782: texCoordGeneration
0783: .clearCapability(javax.media.j3d.TexCoordGeneration.ALLOW_ENABLE_READ);
0784: texCoordGeneration
0785: .clearCapability(javax.media.j3d.TexCoordGeneration.ALLOW_ENABLE_WRITE);
0786: texCoordGeneration
0787: .clearCapability(javax.media.j3d.TexCoordGeneration.ALLOW_FORMAT_READ);
0788: texCoordGeneration
0789: .clearCapability(javax.media.j3d.TexCoordGeneration.ALLOW_MODE_READ);
0790: texCoordGeneration
0791: .clearCapability(javax.media.j3d.TexCoordGeneration.ALLOW_PLANE_READ);
0792: } else if (sceneGraphObject instanceof javax.media.j3d.Texture) {
0793: Texture texture = (Texture) sceneGraphObject;
0794: texture
0795: .clearCapability(javax.media.j3d.Texture.ALLOW_BOUNDARY_COLOR_READ);
0796: texture
0797: .clearCapability(javax.media.j3d.Texture.ALLOW_BOUNDARY_MODE_READ);
0798: texture
0799: .clearCapability(javax.media.j3d.Texture.ALLOW_ENABLE_READ);
0800: texture
0801: .clearCapability(javax.media.j3d.Texture.ALLOW_ENABLE_WRITE);
0802: texture
0803: .clearCapability(javax.media.j3d.Texture.ALLOW_FILTER_READ);
0804: texture
0805: .clearCapability(javax.media.j3d.Texture.ALLOW_FORMAT_READ);
0806: texture
0807: .clearCapability(javax.media.j3d.Texture.ALLOW_IMAGE_READ);
0808: texture
0809: .clearCapability(javax.media.j3d.Texture.ALLOW_IMAGE_WRITE);
0810: texture
0811: .clearCapability(javax.media.j3d.Texture.ALLOW_MIPMAP_MODE_READ);
0812: texture
0813: .clearCapability(javax.media.j3d.Texture.ALLOW_SIZE_READ);
0814: } else if (sceneGraphObject instanceof javax.media.j3d.TextureAttributes) {
0815: TextureAttributes textureAttributes = (TextureAttributes) sceneGraphObject;
0816: textureAttributes
0817: .clearCapability(javax.media.j3d.TextureAttributes.ALLOW_BLEND_COLOR_READ);
0818: textureAttributes
0819: .clearCapability(javax.media.j3d.TextureAttributes.ALLOW_BLEND_COLOR_WRITE);
0820: textureAttributes
0821: .clearCapability(javax.media.j3d.TextureAttributes.ALLOW_COLOR_TABLE_READ);
0822: textureAttributes
0823: .clearCapability(javax.media.j3d.TextureAttributes.ALLOW_COLOR_TABLE_WRITE);
0824: textureAttributes
0825: .clearCapability(javax.media.j3d.TextureAttributes.ALLOW_MODE_READ);
0826: textureAttributes
0827: .clearCapability(javax.media.j3d.TextureAttributes.ALLOW_MODE_WRITE);
0828: textureAttributes
0829: .clearCapability(javax.media.j3d.TextureAttributes.ALLOW_TRANSFORM_READ);
0830: textureAttributes
0831: .clearCapability(javax.media.j3d.TextureAttributes.ALLOW_TRANSFORM_WRITE);
0832: } else if (sceneGraphObject instanceof javax.media.j3d.TextureUnitState) {
0833: TextureUnitState textureUnitState = (TextureUnitState) sceneGraphObject;
0834: textureUnitState
0835: .clearCapability(javax.media.j3d.TextureUnitState.ALLOW_STATE_READ);
0836: textureUnitState
0837: .clearCapability(javax.media.j3d.TextureUnitState.ALLOW_STATE_WRITE);
0838: } else if (sceneGraphObject instanceof javax.media.j3d.TransparencyAttributes) {
0839: TransparencyAttributes transparencyAttributes = (TransparencyAttributes) sceneGraphObject;
0840: transparencyAttributes
0841: .clearCapability(javax.media.j3d.TransparencyAttributes.ALLOW_BLEND_FUNCTION_READ);
0842: transparencyAttributes
0843: .clearCapability(javax.media.j3d.TransparencyAttributes.ALLOW_BLEND_FUNCTION_WRITE);
0844: transparencyAttributes
0845: .clearCapability(javax.media.j3d.TransparencyAttributes.ALLOW_MODE_READ);
0846: transparencyAttributes
0847: .clearCapability(javax.media.j3d.TransparencyAttributes.ALLOW_MODE_WRITE);
0848: transparencyAttributes
0849: .clearCapability(javax.media.j3d.TransparencyAttributes.ALLOW_VALUE_WRITE);
0850: transparencyAttributes
0851: .clearCapability(javax.media.j3d.TransparencyAttributes.ALLOW_VALUE_READ);
0852: }
0853: }
0854: }
0855:
0856: }
0857:
0858: //Set full ALLOW_XXX capabilities for the sceneGraphObject
0859: //but not its sub-nodes
0860: //Use only on fresh new graph (that is not live or compiled)
0861: //else there will be a RestrictedAccessException
0862: public static void setAllowsCapabilities(
0863: SceneGraphObject sceneGraphObject) {
0864:
0865: // if (sceneGraphObject.isCompiled()||sceneGraphObject.isLive()) {
0866: // throw new RestrictedAccessException("Can't read a live or compiled scene graph");
0867: // }
0868: if (sceneGraphObject instanceof javax.media.j3d.Node) {
0869: Node node = (Node) sceneGraphObject;
0870: node
0871: .setCapability(javax.media.j3d.Node.ALLOW_AUTO_COMPUTE_BOUNDS_READ);
0872: node
0873: .setCapability(javax.media.j3d.Node.ALLOW_AUTO_COMPUTE_BOUNDS_WRITE);
0874: node.setCapability(javax.media.j3d.Node.ALLOW_BOUNDS_READ);
0875: node.setCapability(javax.media.j3d.Node.ALLOW_BOUNDS_WRITE);
0876: node
0877: .setCapability(javax.media.j3d.Node.ALLOW_COLLIDABLE_READ);
0878: node
0879: .setCapability(javax.media.j3d.Node.ALLOW_COLLIDABLE_WRITE);
0880: node
0881: .setCapability(javax.media.j3d.Node.ALLOW_LOCAL_TO_VWORLD_READ);
0882: node
0883: .setCapability(javax.media.j3d.Node.ALLOW_PICKABLE_READ);
0884: node
0885: .setCapability(javax.media.j3d.Node.ALLOW_PICKABLE_WRITE);
0886: node
0887: .setCapability(javax.media.j3d.Node.ENABLE_COLLISION_REPORTING);
0888: node
0889: .setCapability(javax.media.j3d.Node.ENABLE_PICK_REPORTING);
0890: if (sceneGraphObject instanceof javax.media.j3d.Group) {
0891: Group group = (Group) sceneGraphObject;
0892: group
0893: .setCapability(javax.media.j3d.Group.ALLOW_CHILDREN_EXTEND);
0894: group
0895: .setCapability(javax.media.j3d.Group.ALLOW_CHILDREN_READ);
0896: group
0897: .setCapability(javax.media.j3d.Group.ALLOW_CHILDREN_WRITE);
0898: group
0899: .setCapability(javax.media.j3d.Group.ALLOW_COLLISION_BOUNDS_READ);
0900: group
0901: .setCapability(javax.media.j3d.Group.ALLOW_COLLISION_BOUNDS_WRITE);
0902: if (sceneGraphObject instanceof javax.media.j3d.BranchGroup) {
0903: BranchGroup branchGroup = (BranchGroup) sceneGraphObject;
0904: branchGroup
0905: .setCapability(javax.media.j3d.BranchGroup.ALLOW_DETACH);
0906: } else if (sceneGraphObject instanceof com.sun.j3d.utils.geometry.Primitive) {
0907: Primitive primitive = (Primitive) sceneGraphObject;
0908: primitive
0909: .setCapability(com.sun.j3d.utils.geometry.Primitive.ENABLE_APPEARANCE_MODIFY);
0910: primitive
0911: .setCapability(com.sun.j3d.utils.geometry.Primitive.ENABLE_GEOMETRY_PICKING);
0912: } else if (sceneGraphObject instanceof javax.media.j3d.Switch) {
0913: Switch aswitch = (Switch) sceneGraphObject;
0914: aswitch
0915: .setCapability(javax.media.j3d.Switch.ALLOW_SWITCH_READ);
0916: aswitch
0917: .setCapability(javax.media.j3d.Switch.ALLOW_SWITCH_WRITE);
0918: } else if (sceneGraphObject instanceof javax.media.j3d.TransformGroup) {
0919: TransformGroup transformGroup = (TransformGroup) sceneGraphObject;
0920: transformGroup
0921: .setCapability(javax.media.j3d.TransformGroup.ALLOW_TRANSFORM_WRITE);
0922: transformGroup
0923: .setCapability(javax.media.j3d.TransformGroup.ALLOW_TRANSFORM_READ);
0924: }
0925: }
0926: if (sceneGraphObject instanceof javax.media.j3d.Leaf) {
0927: Leaf leaf = (Leaf) sceneGraphObject;
0928: if (sceneGraphObject instanceof javax.media.j3d.AlternateAppearance) {
0929: AlternateAppearance alternateAppearance = (AlternateAppearance) sceneGraphObject;
0930: alternateAppearance
0931: .setCapability(javax.media.j3d.AlternateAppearance.ALLOW_APPEARANCE_READ);
0932: alternateAppearance
0933: .setCapability(javax.media.j3d.AlternateAppearance.ALLOW_APPEARANCE_WRITE);
0934: alternateAppearance
0935: .setCapability(javax.media.j3d.AlternateAppearance.ALLOW_INFLUENCING_BOUNDS_READ);
0936: alternateAppearance
0937: .setCapability(javax.media.j3d.AlternateAppearance.ALLOW_INFLUENCING_BOUNDS_WRITE);
0938: alternateAppearance
0939: .setCapability(javax.media.j3d.AlternateAppearance.ALLOW_SCOPE_READ);
0940: alternateAppearance
0941: .setCapability(javax.media.j3d.AlternateAppearance.ALLOW_SCOPE_WRITE);
0942: } else if (sceneGraphObject instanceof javax.media.j3d.Background) {
0943: Background background = (Background) sceneGraphObject;
0944: background
0945: .setCapability(javax.media.j3d.Background.ALLOW_APPLICATION_BOUNDS_READ);
0946: background
0947: .setCapability(javax.media.j3d.Background.ALLOW_APPLICATION_BOUNDS_WRITE);
0948: background
0949: .setCapability(javax.media.j3d.Background.ALLOW_COLOR_READ);
0950: background
0951: .setCapability(javax.media.j3d.Background.ALLOW_COLOR_WRITE);
0952: background
0953: .setCapability(javax.media.j3d.Background.ALLOW_GEOMETRY_READ);
0954: background
0955: .setCapability(javax.media.j3d.Background.ALLOW_GEOMETRY_WRITE);
0956: background
0957: .setCapability(javax.media.j3d.Background.ALLOW_IMAGE_READ);
0958: background
0959: .setCapability(javax.media.j3d.Background.ALLOW_IMAGE_WRITE);
0960: } else if (sceneGraphObject instanceof javax.media.j3d.BoundingLeaf) {
0961: BoundingLeaf boundingLeaf = (BoundingLeaf) sceneGraphObject;
0962: boundingLeaf
0963: .setCapability(javax.media.j3d.BoundingLeaf.ALLOW_REGION_READ);
0964: boundingLeaf
0965: .setCapability(javax.media.j3d.BoundingLeaf.ALLOW_REGION_WRITE);
0966: } else if (sceneGraphObject instanceof javax.media.j3d.Clip) {
0967: Clip clip = (Clip) sceneGraphObject;
0968: clip
0969: .setCapability(javax.media.j3d.Clip.ALLOW_APPLICATION_BOUNDS_READ);
0970: clip
0971: .setCapability(javax.media.j3d.Clip.ALLOW_APPLICATION_BOUNDS_WRITE);
0972: clip
0973: .setCapability(javax.media.j3d.Clip.ALLOW_BACK_DISTANCE_READ);
0974: clip
0975: .setCapability(javax.media.j3d.Clip.ALLOW_BACK_DISTANCE_WRITE);
0976: } else if (sceneGraphObject instanceof javax.media.j3d.Fog) {
0977: Fog fog = (Fog) sceneGraphObject;
0978: fog
0979: .setCapability(javax.media.j3d.Fog.ALLOW_COLOR_READ);
0980: fog
0981: .setCapability(javax.media.j3d.Fog.ALLOW_COLOR_WRITE);
0982: fog
0983: .setCapability(javax.media.j3d.Fog.ALLOW_INFLUENCING_BOUNDS_READ);
0984: fog
0985: .setCapability(javax.media.j3d.Fog.ALLOW_INFLUENCING_BOUNDS_WRITE);
0986: fog
0987: .setCapability(javax.media.j3d.Fog.ALLOW_SCOPE_READ);
0988: fog
0989: .setCapability(javax.media.j3d.Fog.ALLOW_SCOPE_WRITE);
0990: if (sceneGraphObject instanceof javax.media.j3d.ExponentialFog) {
0991: ExponentialFog exponentialFog = (ExponentialFog) sceneGraphObject;
0992: exponentialFog
0993: .setCapability(javax.media.j3d.ExponentialFog.ALLOW_DENSITY_READ);
0994: exponentialFog
0995: .setCapability(javax.media.j3d.ExponentialFog.ALLOW_DENSITY_WRITE);
0996: } else if (sceneGraphObject instanceof javax.media.j3d.LinearFog) {
0997: LinearFog linearFog = (LinearFog) sceneGraphObject;
0998: linearFog
0999: .setCapability(javax.media.j3d.LinearFog.ALLOW_DISTANCE_READ);
1000: linearFog
1001: .setCapability(javax.media.j3d.LinearFog.ALLOW_DISTANCE_WRITE);
1002: }
1003: } else if (sceneGraphObject instanceof javax.media.j3d.Light) {
1004: Light light = (Light) sceneGraphObject;
1005: light
1006: .setCapability(javax.media.j3d.Light.ALLOW_COLOR_READ);
1007: light
1008: .setCapability(javax.media.j3d.Light.ALLOW_COLOR_WRITE);
1009: light
1010: .setCapability(javax.media.j3d.Light.ALLOW_INFLUENCING_BOUNDS_READ);
1011: light
1012: .setCapability(javax.media.j3d.Light.ALLOW_INFLUENCING_BOUNDS_WRITE);
1013: light
1014: .setCapability(javax.media.j3d.Light.ALLOW_SCOPE_READ);
1015: light
1016: .setCapability(javax.media.j3d.Light.ALLOW_SCOPE_WRITE);
1017: light
1018: .setCapability(javax.media.j3d.Light.ALLOW_STATE_READ);
1019: if (sceneGraphObject instanceof javax.media.j3d.DirectionalLight) {
1020: DirectionalLight directionalLight = (DirectionalLight) sceneGraphObject;
1021: directionalLight
1022: .setCapability(javax.media.j3d.DirectionalLight.ALLOW_DIRECTION_READ);
1023: directionalLight
1024: .setCapability(javax.media.j3d.DirectionalLight.ALLOW_DIRECTION_WRITE);
1025: } else if (sceneGraphObject instanceof javax.media.j3d.PointLight) {
1026: PointLight pointLight = (PointLight) sceneGraphObject;
1027: pointLight
1028: .setCapability(javax.media.j3d.PointLight.ALLOW_ATTENUATION_READ);
1029: pointLight
1030: .setCapability(javax.media.j3d.PointLight.ALLOW_ATTENUATION_WRITE);
1031: pointLight
1032: .setCapability(javax.media.j3d.PointLight.ALLOW_POSITION_READ);
1033: pointLight
1034: .setCapability(javax.media.j3d.PointLight.ALLOW_POSITION_WRITE);
1035: if (sceneGraphObject instanceof javax.media.j3d.SpotLight) {
1036: SpotLight spotLight = (SpotLight) sceneGraphObject;
1037: spotLight
1038: .setCapability(javax.media.j3d.SpotLight.ALLOW_CONCENTRATION_READ);
1039: spotLight
1040: .setCapability(javax.media.j3d.SpotLight.ALLOW_CONCENTRATION_WRITE);
1041: spotLight
1042: .setCapability(javax.media.j3d.SpotLight.ALLOW_DIRECTION_READ);
1043: spotLight
1044: .setCapability(javax.media.j3d.SpotLight.ALLOW_DIRECTION_WRITE);
1045: spotLight
1046: .setCapability(javax.media.j3d.SpotLight.ALLOW_SPREAD_ANGLE_READ);
1047: spotLight
1048: .setCapability(javax.media.j3d.SpotLight.ALLOW_SPREAD_ANGLE_WRITE);
1049: }
1050: }
1051: } else if (sceneGraphObject instanceof javax.media.j3d.Link) {
1052: Link link = (Link) sceneGraphObject;
1053: link
1054: .setCapability(javax.media.j3d.Link.ALLOW_SHARED_GROUP_READ);
1055: link
1056: .setCapability(javax.media.j3d.Link.ALLOW_SHARED_GROUP_WRITE);
1057: } else if (sceneGraphObject instanceof javax.media.j3d.ModelClip) {
1058: ModelClip modelClip = (ModelClip) sceneGraphObject;
1059: modelClip
1060: .setCapability(javax.media.j3d.ModelClip.ALLOW_ENABLE_READ);
1061: modelClip
1062: .setCapability(javax.media.j3d.ModelClip.ALLOW_ENABLE_WRITE);
1063: modelClip
1064: .setCapability(javax.media.j3d.ModelClip.ALLOW_INFLUENCING_BOUNDS_READ);
1065: modelClip
1066: .setCapability(javax.media.j3d.ModelClip.ALLOW_INFLUENCING_BOUNDS_WRITE);
1067: modelClip
1068: .setCapability(javax.media.j3d.ModelClip.ALLOW_PLANE_READ);
1069: modelClip
1070: .setCapability(javax.media.j3d.ModelClip.ALLOW_PLANE_WRITE);
1071: modelClip
1072: .setCapability(javax.media.j3d.ModelClip.ALLOW_SCOPE_READ);
1073: modelClip
1074: .setCapability(javax.media.j3d.ModelClip.ALLOW_SCOPE_WRITE);
1075: } else if (sceneGraphObject instanceof javax.media.j3d.Morph) {
1076: Morph morph = (Morph) sceneGraphObject;
1077: morph
1078: .setCapability(javax.media.j3d.Morph.ALLOW_APPEARANCE_OVERRIDE_READ);
1079: morph
1080: .setCapability(javax.media.j3d.Morph.ALLOW_APPEARANCE_OVERRIDE_WRITE);
1081: morph
1082: .setCapability(javax.media.j3d.Morph.ALLOW_APPEARANCE_READ);
1083: morph
1084: .setCapability(javax.media.j3d.Morph.ALLOW_APPEARANCE_WRITE);
1085: morph
1086: .setCapability(javax.media.j3d.Morph.ALLOW_COLLISION_BOUNDS_READ);
1087: morph
1088: .setCapability(javax.media.j3d.Morph.ALLOW_COLLISION_BOUNDS_WRITE);
1089: morph
1090: .setCapability(javax.media.j3d.Morph.ALLOW_GEOMETRY_ARRAY_READ);
1091: morph
1092: .setCapability(javax.media.j3d.Morph.ALLOW_GEOMETRY_ARRAY_WRITE);
1093: morph
1094: .setCapability(javax.media.j3d.Morph.ALLOW_WEIGHTS_READ);
1095: morph
1096: .setCapability(javax.media.j3d.Morph.ALLOW_WEIGHTS_WRITE);
1097: } else if (sceneGraphObject instanceof javax.media.j3d.Shape3D) {
1098: Shape3D shape3D = (Shape3D) sceneGraphObject;
1099: shape3D
1100: .setCapability(javax.media.j3d.Shape3D.ALLOW_APPEARANCE_OVERRIDE_READ);
1101: shape3D
1102: .setCapability(javax.media.j3d.Shape3D.ALLOW_APPEARANCE_OVERRIDE_WRITE);
1103: shape3D
1104: .setCapability(javax.media.j3d.Shape3D.ALLOW_APPEARANCE_READ);
1105: shape3D
1106: .setCapability(javax.media.j3d.Shape3D.ALLOW_APPEARANCE_WRITE);
1107: shape3D
1108: .setCapability(javax.media.j3d.Shape3D.ALLOW_COLLISION_BOUNDS_READ);
1109: shape3D
1110: .setCapability(javax.media.j3d.Shape3D.ALLOW_COLLISION_BOUNDS_WRITE);
1111: shape3D
1112: .setCapability(javax.media.j3d.Shape3D.ALLOW_GEOMETRY_READ);
1113: shape3D
1114: .setCapability(javax.media.j3d.Shape3D.ALLOW_GEOMETRY_WRITE);
1115: if (sceneGraphObject instanceof javax.media.j3d.OrientedShape3D) {
1116: OrientedShape3D orientedShape3D = (OrientedShape3D) sceneGraphObject;
1117: orientedShape3D
1118: .setCapability(javax.media.j3d.OrientedShape3D.ALLOW_AXIS_READ);
1119: orientedShape3D
1120: .setCapability(javax.media.j3d.OrientedShape3D.ALLOW_AXIS_WRITE);
1121: orientedShape3D
1122: .setCapability(javax.media.j3d.OrientedShape3D.ALLOW_MODE_READ);
1123: orientedShape3D
1124: .setCapability(javax.media.j3d.OrientedShape3D.ALLOW_MODE_WRITE);
1125: orientedShape3D
1126: .setCapability(javax.media.j3d.OrientedShape3D.ALLOW_POINT_READ);
1127: orientedShape3D
1128: .setCapability(javax.media.j3d.OrientedShape3D.ALLOW_POINT_WRITE);
1129: orientedShape3D
1130: .setCapability(javax.media.j3d.OrientedShape3D.ROTATE_ABOUT_AXIS);
1131: orientedShape3D
1132: .setCapability(javax.media.j3d.OrientedShape3D.ROTATE_ABOUT_POINT);
1133: }
1134: } else if (sceneGraphObject instanceof javax.media.j3d.Sound) {
1135: Sound sound = (Sound) sceneGraphObject;
1136: sound
1137: .setCapability(javax.media.j3d.Sound.ALLOW_CHANNELS_USED_READ);
1138: sound
1139: .setCapability(javax.media.j3d.Sound.ALLOW_CONT_PLAY_READ);
1140: sound
1141: .setCapability(javax.media.j3d.Sound.ALLOW_CONT_PLAY_WRITE);
1142: sound
1143: .setCapability(javax.media.j3d.Sound.ALLOW_DURATION_READ);
1144: sound
1145: .setCapability(javax.media.j3d.Sound.ALLOW_ENABLE_READ);
1146: sound
1147: .setCapability(javax.media.j3d.Sound.ALLOW_ENABLE_WRITE);
1148: sound
1149: .setCapability(javax.media.j3d.Sound.ALLOW_INITIAL_GAIN_READ);
1150: sound
1151: .setCapability(javax.media.j3d.Sound.ALLOW_INITIAL_GAIN_WRITE);
1152: sound
1153: .setCapability(javax.media.j3d.Sound.ALLOW_IS_PLAYING_READ);
1154: sound
1155: .setCapability(javax.media.j3d.Sound.ALLOW_IS_READY_READ);
1156: sound
1157: .setCapability(javax.media.j3d.Sound.ALLOW_LOOP_READ);
1158: sound
1159: .setCapability(javax.media.j3d.Sound.ALLOW_LOOP_WRITE);
1160: sound
1161: .setCapability(javax.media.j3d.Sound.ALLOW_PRIORITY_READ);
1162: sound
1163: .setCapability(javax.media.j3d.Sound.ALLOW_PRIORITY_WRITE);
1164: sound
1165: .setCapability(javax.media.j3d.Sound.ALLOW_RELEASE_READ);
1166: sound
1167: .setCapability(javax.media.j3d.Sound.ALLOW_RELEASE_WRITE);
1168: sound
1169: .setCapability(javax.media.j3d.Sound.ALLOW_SCHEDULING_BOUNDS_READ);
1170: sound
1171: .setCapability(javax.media.j3d.Sound.ALLOW_SCHEDULING_BOUNDS_WRITE);
1172: sound
1173: .setCapability(javax.media.j3d.Sound.ALLOW_SOUND_DATA_READ);
1174: sound
1175: .setCapability(javax.media.j3d.Sound.ALLOW_SOUND_DATA_WRITE);
1176: if (sceneGraphObject instanceof javax.media.j3d.PointSound) {
1177: PointSound pointSound = (PointSound) sceneGraphObject;
1178: pointSound
1179: .setCapability(javax.media.j3d.PointSound.ALLOW_DISTANCE_GAIN_READ);
1180: pointSound
1181: .setCapability(javax.media.j3d.PointSound.ALLOW_DISTANCE_GAIN_WRITE);
1182: pointSound
1183: .setCapability(javax.media.j3d.PointSound.ALLOW_POSITION_READ);
1184: pointSound
1185: .setCapability(javax.media.j3d.PointSound.ALLOW_POSITION_WRITE);
1186: if (sceneGraphObject instanceof javax.media.j3d.ConeSound) {
1187: ConeSound coneSound = (ConeSound) sceneGraphObject;
1188: coneSound
1189: .setCapability(javax.media.j3d.ConeSound.ALLOW_ANGULAR_ATTENUATION_READ);
1190: coneSound
1191: .setCapability(javax.media.j3d.ConeSound.ALLOW_ANGULAR_ATTENUATION_WRITE);
1192: coneSound
1193: .setCapability(javax.media.j3d.ConeSound.ALLOW_DIRECTION_READ);
1194: coneSound
1195: .setCapability(javax.media.j3d.ConeSound.ALLOW_DIRECTION_WRITE);
1196: }
1197: }
1198: } else if (sceneGraphObject instanceof javax.media.j3d.Soundscape) {
1199: Soundscape soundscape = (Soundscape) sceneGraphObject;
1200: soundscape
1201: .setCapability(javax.media.j3d.Soundscape.ALLOW_APPLICATION_BOUNDS_READ);
1202: soundscape
1203: .setCapability(javax.media.j3d.Soundscape.ALLOW_APPLICATION_BOUNDS_WRITE);
1204: soundscape
1205: .setCapability(javax.media.j3d.Soundscape.ALLOW_ATTRIBUTES_READ);
1206: soundscape
1207: .setCapability(javax.media.j3d.Soundscape.ALLOW_ATTRIBUTES_WRITE);
1208: } else if (sceneGraphObject instanceof javax.media.j3d.ViewPlatform) {
1209: ViewPlatform viewPlatform = (ViewPlatform) sceneGraphObject;
1210: viewPlatform
1211: .setCapability(javax.media.j3d.ViewPlatform.ALLOW_POLICY_READ);
1212: viewPlatform
1213: .setCapability(javax.media.j3d.ViewPlatform.ALLOW_POLICY_WRITE);
1214: }
1215: } else if (sceneGraphObject instanceof javax.media.j3d.NodeComponent) {
1216: NodeComponent nodeComponent = (NodeComponent) sceneGraphObject;
1217: if (sceneGraphObject instanceof javax.media.j3d.Appearance) {
1218: Appearance appearance = (Appearance) sceneGraphObject;
1219: appearance
1220: .setCapability(javax.media.j3d.Appearance.ALLOW_COLORING_ATTRIBUTES_READ);
1221: appearance
1222: .setCapability(javax.media.j3d.Appearance.ALLOW_COLORING_ATTRIBUTES_WRITE);
1223: appearance
1224: .setCapability(javax.media.j3d.Appearance.ALLOW_LINE_ATTRIBUTES_READ);
1225: appearance
1226: .setCapability(javax.media.j3d.Appearance.ALLOW_LINE_ATTRIBUTES_WRITE);
1227: appearance
1228: .setCapability(javax.media.j3d.Appearance.ALLOW_MATERIAL_READ);
1229: appearance
1230: .setCapability(javax.media.j3d.Appearance.ALLOW_MATERIAL_WRITE);
1231: appearance
1232: .setCapability(javax.media.j3d.Appearance.ALLOW_POINT_ATTRIBUTES_READ);
1233: appearance
1234: .setCapability(javax.media.j3d.Appearance.ALLOW_POINT_ATTRIBUTES_WRITE);
1235: appearance
1236: .setCapability(javax.media.j3d.Appearance.ALLOW_POLYGON_ATTRIBUTES_READ);
1237: appearance
1238: .setCapability(javax.media.j3d.Appearance.ALLOW_POLYGON_ATTRIBUTES_WRITE);
1239: appearance
1240: .setCapability(javax.media.j3d.Appearance.ALLOW_RENDERING_ATTRIBUTES_READ);
1241: appearance
1242: .setCapability(javax.media.j3d.Appearance.ALLOW_RENDERING_ATTRIBUTES_WRITE);
1243: appearance
1244: .setCapability(javax.media.j3d.Appearance.ALLOW_TEXGEN_READ);
1245: appearance
1246: .setCapability(javax.media.j3d.Appearance.ALLOW_TEXGEN_WRITE);
1247: appearance
1248: .setCapability(javax.media.j3d.Appearance.ALLOW_TEXTURE_ATTRIBUTES_READ);
1249: appearance
1250: .setCapability(javax.media.j3d.Appearance.ALLOW_TEXTURE_ATTRIBUTES_WRITE);
1251: appearance
1252: .setCapability(javax.media.j3d.Appearance.ALLOW_TEXTURE_READ);
1253: appearance
1254: .setCapability(javax.media.j3d.Appearance.ALLOW_TEXTURE_UNIT_STATE_READ);
1255: appearance
1256: .setCapability(javax.media.j3d.Appearance.ALLOW_TEXTURE_UNIT_STATE_WRITE);
1257: appearance
1258: .setCapability(javax.media.j3d.Appearance.ALLOW_TEXTURE_WRITE);
1259: appearance
1260: .setCapability(javax.media.j3d.Appearance.ALLOW_TRANSPARENCY_ATTRIBUTES_READ);
1261: appearance
1262: .setCapability(javax.media.j3d.Appearance.ALLOW_TRANSPARENCY_ATTRIBUTES_WRITE);
1263: } else if (sceneGraphObject instanceof javax.media.j3d.AuralAttributes) {
1264: AuralAttributes auralAttributes = (AuralAttributes) sceneGraphObject;
1265: auralAttributes
1266: .setCapability(javax.media.j3d.AuralAttributes.ALLOW_ATTRIBUTE_GAIN_READ);
1267: auralAttributes
1268: .setCapability(javax.media.j3d.AuralAttributes.ALLOW_ATTRIBUTE_GAIN_WRITE);
1269: auralAttributes
1270: .setCapability(javax.media.j3d.AuralAttributes.ALLOW_DISTANCE_FILTER_READ);
1271: auralAttributes
1272: .setCapability(javax.media.j3d.AuralAttributes.ALLOW_DISTANCE_FILTER_WRITE);
1273: auralAttributes
1274: .setCapability(javax.media.j3d.AuralAttributes.ALLOW_FREQUENCY_SCALE_FACTOR_READ);
1275: auralAttributes
1276: .setCapability(javax.media.j3d.AuralAttributes.ALLOW_FREQUENCY_SCALE_FACTOR_WRITE);
1277: auralAttributes
1278: .setCapability(javax.media.j3d.AuralAttributes.ALLOW_REFLECTION_COEFFICIENT_READ);
1279: auralAttributes
1280: .setCapability(javax.media.j3d.AuralAttributes.ALLOW_REFLECTION_COEFFICIENT_WRITE);
1281: auralAttributes
1282: .setCapability(javax.media.j3d.AuralAttributes.ALLOW_REVERB_DELAY_READ);
1283: auralAttributes
1284: .setCapability(javax.media.j3d.AuralAttributes.ALLOW_REVERB_DELAY_WRITE);
1285: auralAttributes
1286: .setCapability(javax.media.j3d.AuralAttributes.ALLOW_REVERB_ORDER_READ);
1287: auralAttributes
1288: .setCapability(javax.media.j3d.AuralAttributes.ALLOW_REVERB_ORDER_WRITE);
1289: auralAttributes
1290: .setCapability(javax.media.j3d.AuralAttributes.ALLOW_ROLLOFF_READ);
1291: auralAttributes
1292: .setCapability(javax.media.j3d.AuralAttributes.ALLOW_ROLLOFF_WRITE);
1293: auralAttributes
1294: .setCapability(javax.media.j3d.AuralAttributes.ALLOW_VELOCITY_SCALE_FACTOR_READ);
1295: auralAttributes
1296: .setCapability(javax.media.j3d.AuralAttributes.ALLOW_VELOCITY_SCALE_FACTOR_WRITE);
1297: } else if (sceneGraphObject instanceof javax.media.j3d.ColoringAttributes) {
1298: ColoringAttributes coloringAttributes = (ColoringAttributes) sceneGraphObject;
1299: coloringAttributes
1300: .setCapability(javax.media.j3d.ColoringAttributes.ALLOW_COLOR_READ);
1301: coloringAttributes
1302: .setCapability(javax.media.j3d.ColoringAttributes.ALLOW_COLOR_WRITE);
1303: coloringAttributes
1304: .setCapability(javax.media.j3d.ColoringAttributes.ALLOW_SHADE_MODEL_READ);
1305: coloringAttributes
1306: .setCapability(javax.media.j3d.ColoringAttributes.ALLOW_SHADE_MODEL_WRITE);
1307: } else if (sceneGraphObject instanceof javax.media.j3d.DepthComponent) {
1308: DepthComponent depthComponent = (DepthComponent) sceneGraphObject;
1309: depthComponent
1310: .setCapability(javax.media.j3d.DepthComponent.ALLOW_DATA_READ);
1311: depthComponent
1312: .setCapability(javax.media.j3d.DepthComponent.ALLOW_SIZE_READ);
1313: } else if (sceneGraphObject instanceof javax.media.j3d.Geometry) {
1314: Geometry geometry = (Geometry) sceneGraphObject;
1315: geometry
1316: .setCapability(javax.media.j3d.Geometry.ALLOW_INTERSECT);
1317: if (sceneGraphObject instanceof javax.media.j3d.CompressedGeometry) {
1318: CompressedGeometry compressedGeometry = (CompressedGeometry) sceneGraphObject;
1319: compressedGeometry
1320: .setCapability(javax.media.j3d.CompressedGeometry.ALLOW_COUNT_READ);
1321: compressedGeometry
1322: .setCapability(javax.media.j3d.CompressedGeometry.ALLOW_GEOMETRY_READ);
1323: compressedGeometry
1324: .setCapability(javax.media.j3d.CompressedGeometry.ALLOW_HEADER_READ);
1325: compressedGeometry
1326: .setCapability(javax.media.j3d.CompressedGeometry.ALLOW_REF_DATA_READ);
1327: } else if (sceneGraphObject instanceof javax.media.j3d.GeometryArray) {
1328: GeometryArray geometryArray = (GeometryArray) sceneGraphObject;
1329: geometryArray
1330: .setCapability(javax.media.j3d.GeometryArray.ALLOW_COLOR_READ);
1331: geometryArray
1332: .setCapability(javax.media.j3d.GeometryArray.ALLOW_COLOR_WRITE);
1333: geometryArray
1334: .setCapability(javax.media.j3d.GeometryArray.ALLOW_COORDINATE_READ);
1335: geometryArray
1336: .setCapability(javax.media.j3d.GeometryArray.ALLOW_COORDINATE_WRITE);
1337: geometryArray
1338: .setCapability(javax.media.j3d.GeometryArray.ALLOW_COUNT_READ);
1339: geometryArray
1340: .setCapability(javax.media.j3d.GeometryArray.ALLOW_COUNT_WRITE);
1341: geometryArray
1342: .setCapability(javax.media.j3d.GeometryArray.ALLOW_FORMAT_READ);
1343: geometryArray
1344: .setCapability(javax.media.j3d.GeometryArray.ALLOW_NORMAL_READ);
1345: geometryArray
1346: .setCapability(javax.media.j3d.GeometryArray.ALLOW_NORMAL_WRITE);
1347: geometryArray
1348: .setCapability(javax.media.j3d.GeometryArray.ALLOW_REF_DATA_READ);
1349: geometryArray
1350: .setCapability(javax.media.j3d.GeometryArray.ALLOW_REF_DATA_WRITE);
1351: geometryArray
1352: .setCapability(javax.media.j3d.GeometryArray.ALLOW_TEXCOORD_READ);
1353: geometryArray
1354: .setCapability(javax.media.j3d.GeometryArray.ALLOW_TEXCOORD_WRITE);
1355: if (sceneGraphObject instanceof javax.media.j3d.IndexedGeometryArray) {
1356: IndexedGeometryArray indexedGeometryArray = (IndexedGeometryArray) sceneGraphObject;
1357: indexedGeometryArray
1358: .setCapability(javax.media.j3d.IndexedGeometryArray.ALLOW_COLOR_INDEX_READ);
1359: indexedGeometryArray
1360: .setCapability(javax.media.j3d.IndexedGeometryArray.ALLOW_COLOR_INDEX_WRITE);
1361: indexedGeometryArray
1362: .setCapability(javax.media.j3d.IndexedGeometryArray.ALLOW_COORDINATE_INDEX_READ);
1363: indexedGeometryArray
1364: .setCapability(javax.media.j3d.IndexedGeometryArray.ALLOW_COORDINATE_INDEX_WRITE);
1365: indexedGeometryArray
1366: .setCapability(javax.media.j3d.IndexedGeometryArray.ALLOW_NORMAL_INDEX_READ);
1367: indexedGeometryArray
1368: .setCapability(javax.media.j3d.IndexedGeometryArray.ALLOW_NORMAL_INDEX_WRITE);
1369: indexedGeometryArray
1370: .setCapability(javax.media.j3d.IndexedGeometryArray.ALLOW_TEXCOORD_INDEX_READ);
1371: indexedGeometryArray
1372: .setCapability(javax.media.j3d.IndexedGeometryArray.ALLOW_TEXCOORD_INDEX_WRITE);
1373: }
1374: } else if (sceneGraphObject instanceof javax.media.j3d.Raster) {
1375: Raster raster = (Raster) sceneGraphObject;
1376: raster
1377: .setCapability(javax.media.j3d.Raster.ALLOW_DEPTH_COMPONENT_READ);
1378: raster
1379: .setCapability(javax.media.j3d.Raster.ALLOW_DEPTH_COMPONENT_WRITE);
1380: raster
1381: .setCapability(javax.media.j3d.Raster.ALLOW_IMAGE_READ);
1382: raster
1383: .setCapability(javax.media.j3d.Raster.ALLOW_IMAGE_WRITE);
1384: raster
1385: .setCapability(javax.media.j3d.Raster.ALLOW_OFFSET_READ);
1386: raster
1387: .setCapability(javax.media.j3d.Raster.ALLOW_OFFSET_WRITE);
1388: raster
1389: .setCapability(javax.media.j3d.Raster.ALLOW_POSITION_READ);
1390: raster
1391: .setCapability(javax.media.j3d.Raster.ALLOW_POSITION_WRITE);
1392: raster
1393: .setCapability(javax.media.j3d.Raster.ALLOW_SIZE_READ);
1394: raster
1395: .setCapability(javax.media.j3d.Raster.ALLOW_SIZE_WRITE);
1396: raster
1397: .setCapability(javax.media.j3d.Raster.ALLOW_TYPE_READ);
1398: } else if (sceneGraphObject instanceof javax.media.j3d.Text3D) {
1399: Text3D text3D = (Text3D) sceneGraphObject;
1400: text3D
1401: .setCapability(javax.media.j3d.Text3D.ALLOW_ALIGNMENT_READ);
1402: text3D
1403: .setCapability(javax.media.j3d.Text3D.ALLOW_ALIGNMENT_WRITE);
1404: text3D
1405: .setCapability(javax.media.j3d.Text3D.ALLOW_BOUNDING_BOX_READ);
1406: text3D
1407: .setCapability(javax.media.j3d.Text3D.ALLOW_CHARACTER_SPACING_READ);
1408: text3D
1409: .setCapability(javax.media.j3d.Text3D.ALLOW_CHARACTER_SPACING_WRITE);
1410: text3D
1411: .setCapability(javax.media.j3d.Text3D.ALLOW_FONT3D_READ);
1412: text3D
1413: .setCapability(javax.media.j3d.Text3D.ALLOW_FONT3D_WRITE);
1414: text3D
1415: .setCapability(javax.media.j3d.Text3D.ALLOW_PATH_READ);
1416: text3D
1417: .setCapability(javax.media.j3d.Text3D.ALLOW_PATH_WRITE);
1418: text3D
1419: .setCapability(javax.media.j3d.Text3D.ALLOW_POSITION_READ);
1420: text3D
1421: .setCapability(javax.media.j3d.Text3D.ALLOW_POSITION_WRITE);
1422: text3D
1423: .setCapability(javax.media.j3d.Text3D.ALLOW_STRING_READ);
1424: text3D
1425: .setCapability(javax.media.j3d.Text3D.ALLOW_STRING_WRITE);
1426: }
1427: } else if (sceneGraphObject instanceof javax.media.j3d.ImageComponent) {
1428: ImageComponent imageComponent = (ImageComponent) sceneGraphObject;
1429: imageComponent
1430: .setCapability(javax.media.j3d.ImageComponent.ALLOW_FORMAT_READ);
1431: imageComponent
1432: .setCapability(javax.media.j3d.ImageComponent.ALLOW_IMAGE_READ);
1433: imageComponent
1434: .setCapability(javax.media.j3d.ImageComponent.ALLOW_SIZE_READ);
1435: } else if (sceneGraphObject instanceof javax.media.j3d.LineAttributes) {
1436: LineAttributes lineAttributes = (LineAttributes) sceneGraphObject;
1437: lineAttributes
1438: .setCapability(javax.media.j3d.LineAttributes.ALLOW_ANTIALIASING_READ);
1439: lineAttributes
1440: .setCapability(javax.media.j3d.LineAttributes.ALLOW_ANTIALIASING_WRITE);
1441: lineAttributes
1442: .setCapability(javax.media.j3d.LineAttributes.ALLOW_PATTERN_READ);
1443: lineAttributes
1444: .setCapability(javax.media.j3d.LineAttributes.ALLOW_PATTERN_WRITE);
1445: lineAttributes
1446: .setCapability(javax.media.j3d.LineAttributes.ALLOW_WIDTH_READ);
1447: lineAttributes
1448: .setCapability(javax.media.j3d.LineAttributes.ALLOW_WIDTH_WRITE);
1449: } else if (sceneGraphObject instanceof javax.media.j3d.Material) {
1450: Material material = (Material) sceneGraphObject;
1451: material
1452: .setCapability(javax.media.j3d.Material.ALLOW_COMPONENT_READ);
1453: material
1454: .setCapability(javax.media.j3d.Material.ALLOW_COMPONENT_WRITE);
1455: } else if (sceneGraphObject instanceof javax.media.j3d.MediaContainer) {
1456: MediaContainer mediaContainer = (MediaContainer) sceneGraphObject;
1457: mediaContainer
1458: .setCapability(javax.media.j3d.MediaContainer.ALLOW_URL_READ);
1459: mediaContainer
1460: .setCapability(javax.media.j3d.MediaContainer.ALLOW_URL_WRITE);
1461: mediaContainer
1462: .setCapability(javax.media.j3d.MediaContainer.ALLOW_CACHE_READ);
1463: mediaContainer
1464: .setCapability(javax.media.j3d.MediaContainer.ALLOW_CACHE_WRITE);
1465: } else if (sceneGraphObject instanceof javax.media.j3d.PointAttributes) {
1466: PointAttributes pointAttributes = (PointAttributes) sceneGraphObject;
1467: pointAttributes
1468: .setCapability(javax.media.j3d.PointAttributes.ALLOW_ANTIALIASING_READ);
1469: pointAttributes
1470: .setCapability(javax.media.j3d.PointAttributes.ALLOW_ANTIALIASING_WRITE);
1471: pointAttributes
1472: .setCapability(javax.media.j3d.PointAttributes.ALLOW_SIZE_READ);
1473: pointAttributes
1474: .setCapability(javax.media.j3d.PointAttributes.ALLOW_SIZE_WRITE);
1475: } else if (sceneGraphObject instanceof javax.media.j3d.PolygonAttributes) {
1476: PolygonAttributes polygonAttributes = (PolygonAttributes) sceneGraphObject;
1477: polygonAttributes
1478: .setCapability(javax.media.j3d.PolygonAttributes.ALLOW_CULL_FACE_READ);
1479: polygonAttributes
1480: .setCapability(javax.media.j3d.PolygonAttributes.ALLOW_CULL_FACE_WRITE);
1481: polygonAttributes
1482: .setCapability(javax.media.j3d.PolygonAttributes.ALLOW_MODE_READ);
1483: polygonAttributes
1484: .setCapability(javax.media.j3d.PolygonAttributes.ALLOW_MODE_WRITE);
1485: polygonAttributes
1486: .setCapability(javax.media.j3d.PolygonAttributes.ALLOW_NORMAL_FLIP_READ);
1487: polygonAttributes
1488: .setCapability(javax.media.j3d.PolygonAttributes.ALLOW_NORMAL_FLIP_WRITE);
1489: polygonAttributes
1490: .setCapability(javax.media.j3d.PolygonAttributes.ALLOW_OFFSET_READ);
1491: polygonAttributes
1492: .setCapability(javax.media.j3d.PolygonAttributes.ALLOW_OFFSET_WRITE);
1493: } else if (sceneGraphObject instanceof javax.media.j3d.RenderingAttributes) {
1494: RenderingAttributes renderingAttributes = (RenderingAttributes) sceneGraphObject;
1495: renderingAttributes
1496: .setCapability(javax.media.j3d.RenderingAttributes.ALLOW_ALPHA_TEST_FUNCTION_READ);
1497: renderingAttributes
1498: .setCapability(javax.media.j3d.RenderingAttributes.ALLOW_ALPHA_TEST_FUNCTION_WRITE);
1499: renderingAttributes
1500: .setCapability(javax.media.j3d.RenderingAttributes.ALLOW_ALPHA_TEST_VALUE_READ);
1501: renderingAttributes
1502: .setCapability(javax.media.j3d.RenderingAttributes.ALLOW_ALPHA_TEST_VALUE_WRITE);
1503: renderingAttributes
1504: .setCapability(javax.media.j3d.RenderingAttributes.ALLOW_DEPTH_ENABLE_READ);
1505: renderingAttributes
1506: .setCapability(javax.media.j3d.RenderingAttributes.ALLOW_IGNORE_VERTEX_COLORS_READ);
1507: renderingAttributes
1508: .setCapability(javax.media.j3d.RenderingAttributes.ALLOW_IGNORE_VERTEX_COLORS_WRITE);
1509: renderingAttributes
1510: .setCapability(javax.media.j3d.RenderingAttributes.ALLOW_RASTER_OP_READ);
1511: renderingAttributes
1512: .setCapability(javax.media.j3d.RenderingAttributes.ALLOW_RASTER_OP_WRITE);
1513: renderingAttributes
1514: .setCapability(javax.media.j3d.RenderingAttributes.ALLOW_VISIBLE_READ);
1515: renderingAttributes
1516: .setCapability(javax.media.j3d.RenderingAttributes.ALLOW_VISIBLE_WRITE);
1517: } else if (sceneGraphObject instanceof javax.media.j3d.TexCoordGeneration) {
1518: TexCoordGeneration texCoordGeneration = (TexCoordGeneration) sceneGraphObject;
1519: texCoordGeneration
1520: .setCapability(javax.media.j3d.TexCoordGeneration.ALLOW_ENABLE_READ);
1521: texCoordGeneration
1522: .setCapability(javax.media.j3d.TexCoordGeneration.ALLOW_ENABLE_WRITE);
1523: texCoordGeneration
1524: .setCapability(javax.media.j3d.TexCoordGeneration.ALLOW_FORMAT_READ);
1525: texCoordGeneration
1526: .setCapability(javax.media.j3d.TexCoordGeneration.ALLOW_MODE_READ);
1527: texCoordGeneration
1528: .setCapability(javax.media.j3d.TexCoordGeneration.ALLOW_PLANE_READ);
1529: } else if (sceneGraphObject instanceof javax.media.j3d.Texture) {
1530: Texture texture = (Texture) sceneGraphObject;
1531: texture
1532: .setCapability(javax.media.j3d.Texture.ALLOW_BOUNDARY_COLOR_READ);
1533: texture
1534: .setCapability(javax.media.j3d.Texture.ALLOW_BOUNDARY_MODE_READ);
1535: texture
1536: .setCapability(javax.media.j3d.Texture.ALLOW_ENABLE_READ);
1537: texture
1538: .setCapability(javax.media.j3d.Texture.ALLOW_ENABLE_WRITE);
1539: texture
1540: .setCapability(javax.media.j3d.Texture.ALLOW_FILTER_READ);
1541: texture
1542: .setCapability(javax.media.j3d.Texture.ALLOW_FORMAT_READ);
1543: texture
1544: .setCapability(javax.media.j3d.Texture.ALLOW_IMAGE_READ);
1545: texture
1546: .setCapability(javax.media.j3d.Texture.ALLOW_IMAGE_WRITE);
1547: texture
1548: .setCapability(javax.media.j3d.Texture.ALLOW_MIPMAP_MODE_READ);
1549: texture
1550: .setCapability(javax.media.j3d.Texture.ALLOW_SIZE_READ);
1551: } else if (sceneGraphObject instanceof javax.media.j3d.TextureAttributes) {
1552: TextureAttributes textureAttributes = (TextureAttributes) sceneGraphObject;
1553: textureAttributes
1554: .setCapability(javax.media.j3d.TextureAttributes.ALLOW_BLEND_COLOR_READ);
1555: textureAttributes
1556: .setCapability(javax.media.j3d.TextureAttributes.ALLOW_BLEND_COLOR_WRITE);
1557: textureAttributes
1558: .setCapability(javax.media.j3d.TextureAttributes.ALLOW_COLOR_TABLE_READ);
1559: textureAttributes
1560: .setCapability(javax.media.j3d.TextureAttributes.ALLOW_COLOR_TABLE_WRITE);
1561: textureAttributes
1562: .setCapability(javax.media.j3d.TextureAttributes.ALLOW_MODE_READ);
1563: textureAttributes
1564: .setCapability(javax.media.j3d.TextureAttributes.ALLOW_MODE_WRITE);
1565: textureAttributes
1566: .setCapability(javax.media.j3d.TextureAttributes.ALLOW_TRANSFORM_READ);
1567: textureAttributes
1568: .setCapability(javax.media.j3d.TextureAttributes.ALLOW_TRANSFORM_WRITE);
1569: } else if (sceneGraphObject instanceof javax.media.j3d.TextureUnitState) {
1570: TextureUnitState textureUnitState = (TextureUnitState) sceneGraphObject;
1571: textureUnitState
1572: .setCapability(javax.media.j3d.TextureUnitState.ALLOW_STATE_READ);
1573: textureUnitState
1574: .setCapability(javax.media.j3d.TextureUnitState.ALLOW_STATE_WRITE);
1575: } else if (sceneGraphObject instanceof javax.media.j3d.TransparencyAttributes) {
1576: TransparencyAttributes transparencyAttributes = (TransparencyAttributes) sceneGraphObject;
1577: transparencyAttributes
1578: .setCapability(javax.media.j3d.TransparencyAttributes.ALLOW_BLEND_FUNCTION_READ);
1579: transparencyAttributes
1580: .setCapability(javax.media.j3d.TransparencyAttributes.ALLOW_BLEND_FUNCTION_WRITE);
1581: transparencyAttributes
1582: .setCapability(javax.media.j3d.TransparencyAttributes.ALLOW_MODE_READ);
1583: transparencyAttributes
1584: .setCapability(javax.media.j3d.TransparencyAttributes.ALLOW_MODE_WRITE);
1585: transparencyAttributes
1586: .setCapability(javax.media.j3d.TransparencyAttributes.ALLOW_VALUE_WRITE);
1587: transparencyAttributes
1588: .setCapability(javax.media.j3d.TransparencyAttributes.ALLOW_VALUE_READ);
1589: }
1590: }
1591: }
1592:
1593: }
1594:
1595: }
|