Hi,
 
I also noted this.  In order to avoid the shifting, instead
of removing the child node I insert a phony empty BranchGroup node
and maintain a parallel list of the available (deleted) switches.
 
regards
---
Luis
 
----- Original Message -----
From: JP Lee
Sent: Thursday, March 07, 2002 10:35 AM
Subject: [JAVA3D] Switch Node behavior with removals...

Hi:
 
I've just discovered that when a child node is removed from a Switch node, the successor elements are shifted one place, to remove any nulls that may exist within the element range (Switch uses a Vector to hold it's children). This causes problems with selection - child indices are now changed but not published to clients! Is there a way to deal with this other than forcing me to maintain a parallel structure to keep track of the actual index of Switch children in light of this feature of deletions?
 
thanks,

jp

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

John Peter Lee, Sc.D.                   (781) 839-4575 (office)

Discovery Information Systems      (781) 839-4580 (fax)

AstraZeneca R&D Boston              [EMAIL PROTECTED]

Waltham, MA 02451                     www.astrazeneca-boston.com/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

Reply via email to