Tim,

Yes, the indices are recomputed after a remove (a Vector is used internally). I guess 
you could derived your own class from BranchGroup to do what you want. I agree however 
that it would have been extremely easy for the original developer to have added it in 
the first place. Maybe in the next release... ;-)

Sincerely,

Daniel Selman

[EMAIL PROTECTED]
http://www.tornadolabs.com

> -----Original Message-----
> From: Discussion list for Java 3D API
> [mailto:[EMAIL PROTECTED]]On Behalf Of Tim Bray
> Sent: 19 September 1999 22:37
> To: [EMAIL PROTECTED]
> Subject: removeChild(), should be obvious
>
>
> Dumb question: why can't you remove children just by passing in the Node
> object, rather than having to know the index?  I mean it's not hard to
> write utility code to remove a child by ID, or to carry around
> extra info about what indices the things you're interested in are at,
> but the fact that they don't provide this makes me wonder if I'm missing
> something obvious.
>
> And here's a horrible hole in the documentation.  If I do a removeChild()
> on a group, do the indices of all higher children decrease by 1?  If
> so, why?  If not, why not?  Is this in the FAQ and I didn't see it?
>
>  -Tim
>
> ==================================================================
> =========
> 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