The viewingplatform is already added to the 'live' part.
You can solve this by creating your own ViewingPlatform, setting the
capabilities, and then creating the simple universe (which is a bit less
'simple' then.
Canvas3D canvas3D = new Canvas3D();
Viewer viewer = new Viewer(canvas3D);
ViewingPlatform viewingPlatform = new ViewingPlatform();
viewingPlatform.getViewPlatformTransform().setCapability(TransformGroup.ALLO
W_CHILDREN_READ);
// simple universe
simpleU = new SimpleUniverse(viewingPlatform, viewer);
----- Original Message -----
From: Alejandro Bugacov <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: vrijdag, november 05, 1999 12:45
Subject: [JAVA3D] Removing child from ViewPlatformTransform
> Hi,
> I have a problem when trying to remove a child or
> gettting the number of children under the viewPlatform
> TransformGroup. For example if I do:
>
> simpleU.getViewingPlatform().getViewPlatformTransform().
> setCapability(TransformGroup.ALLOW_CHILDREN_READ);
>
> I get the following exception:
>
> Exception in thread "main" javax.media.j3d.RestrictedAccessException:
> Cannot mod
> ify capability bits on a live or compiled object
> at
> javax.media.j3d.SceneGraphObject.setCapability(SceneGraphObject.java:79)
> at TestFormsFrame.initialize(TestFormsFrame.java:113)
> at TestFormsFrame.<init>(TestFormsFrame.java:198)
> at TestFormsFrame.main(TestFormsFrame.java:211)
>
>
> but at this point in the code I didn't do the "scene.compile()"
> line yet. Alejandro.
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff JAVA3D-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".