>
>this was discussed on this list about two weeks ago. I promised to
>summarize my experiences, so here is what you probably shoul do.
>First of all, you should use Java 3D 1.2.1b1. Unfortunately this means
>you are restricted to Windows and Solaris platforms for now. Then you
>should use the removeAllLocales() method of VirtualUniverse and create
>a new Universe. Here is, what I do now.
>
>simpleUniverse.getViewer().getView().removeCanvas3D(canvas3D);
You may also add,
simpleuniverse.getViewer().setViewingPlatform(null);
to remove Viewer reference from the ViewingPlatform utility.
and invoke window.dispose() after window close to remove
any reference from AWT/Swing to Canvas3D.
>// or: canvas3D.getView().removeCanvas3D(canvas3D);
>simpleU.removeAllLocales(); // This should do a proper cleanup.
>System.gc(); // Do the best to reclaim the memory.
>simpleU = new SimpleUniverse(canvas3D); // Create a new SimpleUniverse.
>simpleU.addBranchGraph(createSceneGraph()); // Attach the new scene.
>/* creating a new universe reusing the old view branch
> (does not work, at least with 1.2FCS,
> throws an IllegalSharingException)
>Viewer viewer = simpleUniverse.getViewer();
>ViewingPlatform viewingPlatform = simpleUniverse.getViewingPlatform();
>simpleUniverse.removeAllLocales();
>viewingPlatform.detach();
>simpleUniverse = new SimpleUniverse(viewingPlatform, viewer);
>simpleUniverse.addBranchGraph(createSceneGraph());
>*/
>
>This works fairly well for the whole scene, but I am not sure what
>happens to BranchGroups that are attached and removed from the scene
>graph between a change of the whole content branch,
This should works well in next v.1.2.1 beta2 release
(see bug 4387385)
> as well scenes,
>that you put in their own JFrame (see a previous mail, that was sent
>to this list today).
>
>Hope it helps,
>
>Ingo
>
>===========================================================================
>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".
- Kelvin
===========================================================================
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".