Well, I can't say anything about detach and remove, but I can say
something about compile and live.

Live means that the renderer is running. If you don't want your
scenegraph to be live while you change it (so that you don't have to set
innumerable capability bits and still get errors), just have two
branchgroups at the very top of your scenegraph: one at the root, and
one directly under the root. Attach everything else to the bottom one.

Then the only operation you do while the scengraph is live is remove the
bottom one from the top one, and then the bottom one is no longer live
(and your canvas will go black), so you can add, remove and change
anything you want without problems. When everything is done, reattach
the bottom bg to the top, and your scene will reappear in the new format.

If you don't do this, then you can only change things in your scenegraph
if you set all the necessary capability bits before the scenegraph
becomes live.  This is because the renderer has to be notified that
something it's drawing might change, I guess. You also won't be able to
add or remove anything (such as shapes, transformgroups, etc) while it
is live unless everything you add or remove has a branchgroup directly
above it in the scenegraph, and you add or remove those branchgroups
only. Otherwise you'll get "Only a branchgroup can be removed/added"
errors.

Compile means that you've asked Java3d to streamline your scenegraph
into something that's faster to render. For instance, a chain of
transformgroups will be combined into one transformgroup that does
everything at once. But once a scenegraph has been compiled, the
scenegraph as you originally coded it no longer exists, so you can't
change it. If you're intending to change something, you have to set the
capability bits for it before you call compile, so that the compiler
leaves that part available for changes. If you're intending to make lots
of different changes over the lifetime of your scenegraph, compiling may
not be a good idea at all.

A scenegraph (or a subtree of a scenegraph which is also a scenegraph)
may be live or compiled or both or neither. Once it's compiled it can't
be uncompiled.

Hope that helps.

Monica

tony Lincoln wrote:

Dear friends,
What is the difference between detach and remove? The
relationship between compile() and live?
thanks a lot
tony.

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

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

Reply via email to