I'm managing the pointer to the TransformGroup externally. The
TransformGroup maps to an object that contains information to recreate the
geometry in the group. If this external object is removed, I need to remove
the TransformGroup also. And the only way to do this is to find the parent
and find its child that equals to the TransformGroup. (This is also quite
time consuming...)
ALLOW_PARENT_READ capability might really be useful.
Right now I solved this by adding the BranchGroup as the user object of the
TransformGroup.
Pasi
-----Original Message-----
From: Doug Gehringer <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Friday, February 04, 2000 1:57 PM
Subject: Re: [JAVA3D] Cannot get the parent of a live or compiled node?
>> 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".
===========================================================================
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".