Hi Kelvin:

        Thank you very much for answering my question.  I am using
SimpleUniverse (not VirtualUniverse) but I presume it is the same thing.

Cheers,

Mona

> >Hi:
> >
> >        What are the steps that I need to follow when my java 3d program is
> done
> >with one canvas scene and needs to setup another?  Basically, when the user
> >wants the program to load a new file, the program needs to get rid of the
> >current canvas/scenegraph and create a new one from the new file.  If there
is
> >doc somewhere about this, I would appreciate a pointer.
> >
>
>
> See VirtualUniverse
>
>     /**
>      * Removes all Locales and their associates branch graphs from
>      * this universe.  All branch graphs within each Locale are
>      * detached, regardless of whether their ALLOW_DETACH capability
>      * bits are set.  Each Locale is then marked as being dead: no
>      * branch graphs may subsequently be attached.  This method
>      * should be called by applications and applets to allow
>      * Java 3D to cleanup its resources.
>      *
>      * @since Java 3D 1.2
>      */
>     public void removeAllLocales()
>
> You can use,
>
>   universe.getViewer().getView().removeCanvas3D(canvas3d)
>   universe.getViewer().setViewingPlatform(null);
>   universe.removeAllLocales();
>
> to cleanup resource when canvas remove.  Also make
> sure Java3D v1.2.1 or v1.2.1_01 is used. There are bugs
> in v1.2 which cause memory leak)
>
> - Kelvin
> --------
> Java 3D Team
> Sun Microsystems Inc.

==================================================================
Mona Wong
National Center for Microscopy and Imaging Research
University of California, San Diego
http://ncmir.ucsd.edu/

"The truth shall set you free, but first it will piss you off"
                                A Landmark instructor
==================================================================

===========================================================================
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".

Reply via email to