Dear j3D experts,
Ok . . . I create a TransformGroup object, and I want to remove any
children that it might acquire:
sceneTransform = new TransformGroup( );
sceneTransform.setCapability(
Group.ALLOW_CHILDREN_WRITE ); // want to remove children
ok, let's add a BranchGroup:
BranchGroup scene = new BranchGroup( );
scene.addChild(new ColorCube(0.4));
sceneTransform.addChild( scene ); // "scene is what I'd like to
remove
ok, later, I want to remove this BranchGroup object:
sceneTransform.removeChild(0);
Mysteries and enigmas arise -- I get this from the java compiler:
javax.media.j3d.CapabilityNotSetException: Group: no capability to
detach BranchGroup
at javax.media.j3d.Group.removeChild(Group.java:189)
If the j3D API specifications suggests another sequence of operations to
remove a BranchGroup, I can't find it. Help! And thanks.
- Cheers,
Christopher
--
Christopher Currie | EMAIL: [EMAIL PROTECTED]
http://kahuna.psych.uiuc.edu/~ccurrie/homePage.html
|
Laboratory for Computational Astrophysics (LCA)
at the NCSA and Beckman Institute at the University of Illinois
INTERNET INTERFACE TO NUMERICALY SIMULATED GALAXY CLUSTERS:
http://sca.ncsa.uiuc.edu/
and
Imaging Systems Laboratory INTERACTIVE 3-D FOREST ENVIRONMENT:
http://imlab9.landarch.uiuc.edu/smartforest/
----
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/