Hi,
I have a query which maybe one of the Sun people on this list could comment
on.
I have a TransformGroup which is parent to a variable number of BranchGroups.
I have a requirement to remove BranchGroups from the TransformGroup when
the scene is live, and this I can do successfully by ensuring the relevant capabilities
are set, and by calling the removeChild(int) method of the TransformGroup.
However the removeChild(int index) method is a little tedious since it takes
the index of the BranchGroup child concerned. I already have
a reference to the child, and the only way I can would out how to do this is
as follows:
1) Enumerate children of TransformGroup
2) Test each child to see if it the one to remove
3) If it is, call removeChild(index).
Is there a reason why a 'removeChild(Node)' method could not be
supplied (to be symmetric with addChild(Node) ?
I realize this is an enhancement request, but it would make life a little easier.
Note that storing the index of the child when it is added to the parent does not
help, since the index subsequently changes as other children are added and
removed (randomly) to/from the parent.
Rob
--
Rob Nugent
Development Manager
PeerLogic
[EMAIL PROTECTED]
http://www.peerlogic.com
http://www.unikix.com
Tel: +44 (0) 1489 585503
Fax: +44 (0) 1489 881363
===========================================================================
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".