NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
I'm trying to add another light source . However, for the following code, I got error message "javax.media.j3d.RestrictedAccessException: Cannot modify capability bits on a live or compiled object" for during executing "root.setCapability(Group.ALLOW_CHILDREN_EXTEND)" It seems that the root scenegraph of DisplayRendererJ3D is live. Any suggestion to solve this problem. Thanks. Jianting DisplayRendererJ3D dr =(DisplayRendererJ3D) display.getDisplayRenderer(); BranchGroup root = dr.getRoot(); System.out.println("is compiled?"+root.isCompiled()); System.out.println("is live?"+root.isLive()); root.setCapability(Group.ALLOW_CHILDREN_EXTEND); BoundingSphere bounds =new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0); Color3f alColor = new Color3f(0.2f, 0.2f, 0.2f); AmbientLight aLgt = new AmbientLight(alColor); aLgt.setInfluencingBounds(bounds); root.addChild(aLgt);
visad
archives: