> From: Pasi Paasiala <[EMAIL PROTECTED]>
>
>
> I have a TransformGroup that I'd like to remove.
I think you know that only BranchGroups can be added or deleted from a live
scene graph, which is why you want the parent of the TG.
> The TransformGroup is a a
> child of a BranchGroup. I only have a pointer to the TransformGroup and I'd
> like to get its parent but I get the error message "Cannot get the parent
> of a live or compiled node". Does this mean that I have to maintain a
> separate mapping between my transform groups and branch groups?
How are you getting the reference to the TransformGroup?
If it is using picking, you can set the ENABLE_PICK_REPORTING capablity on
the BranchGroup so that it gets reported in the SceneGraphPath.
Otherwise, you are right that you'll need to have a mapping between your TG's
and their parent BG's. You might want to just subclass TransformGroup and
add a field which holds the parent.
J3D doesn't allow you get the parent of a live scene graph to allow J3D to
optimize the scene graph, but it seems like a ALLOW_PARENT_READ capability
might be useful.
Doug Gehringer
Sun Microsystems
===========================================================================
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".