I think it will be extremely useful if Group.remove( Node node ) is added in
the future API. When I use removeChild(int index) to remove object, I always
hope to have a more convienient method to do it.

Qiuli

-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Paul Byrne
Sent: Wednesday, January 31, 2001 1:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] problem with removeChild()


Hi Gregory,

The Group.remove( Node node ) method has already been added to the proposed
Java3D 1.3 API specification.

Rgds

Paul

----------------------------------------------------------
Paul Byrne                      Email : [EMAIL PROTECTED]
Sun Microsystems                Phone : (650) 786 9926
Visualization Software Group    Fax   : (650) 786 5852
----------------------------------------------------------


>To All,
>
>I quickly looked at the Java 3D API documentation before writing this
>note, so my apologies if I missed something and my knowledge is
>incorrect.
>
>But, this small issue brings up something about the Java3D API that has
>always irritated me personally.  I believe there should be a removeChild
>( Object an_instance_of_some_object ) method in the Group class.
>
>For example, it just doesn't make sense to me that there is an addChild
>( Node child ) method in the Group class, but no parallel removeChild (
>Node child ) method.
>
>Instead, I have to get an Enumeration of all of the objects, loop
>through them one by one to determine the proper index, then call
>removeChild ( index ).  All of the above assumes I'm not retaining the
>order I placed them into the Group object (which can be tricky).
>
>In the case where I need to remove multiple objects (but not all
>objects, which Liming apparently wants to do) which are in random
>locations throughout the Enumeration things get even more tricky.
>Because, once I remove the first object some, or all, indexes are
>updated I have to retrieve the Enumeration once again.  Each time I
>remove an object I have to start all over.  I assume this is because
>there is a Vector or similar type collection behind the scenes.
>
>If my assumption that the Group class has a Vector which holds the
>children is true, I realize that there probably is no significant
>performance gains to be had by implementation of a removeChild method as
>I've described.  But it would save some coding effort for some of the
>API's users.  And possibly Liming would have never started this thread
>in the first place.
>
>Sorry to vent so much over something so trivial.  If I'm doing something
>wrong I would love to hear how to do it properly.  So, flame away!
>
>Regards,
>
>Gregory Bradford
>

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