I have finally implemented range ordering of transparent objects, but I
wanted to know the most efficient way to change the order of the
children in an OrderedGroup.

I started with Group.setChild(Node, index), but you get a "child already
has a parent" exception because the node is also still at the old index.

Next I tried removing all the children and then re-adding them in the
correct order.  Wasteful, but it works.

Finally I tried using the Group.moveTo(BranchGroup) which will move the
branch to the end of the group's list.  But you still have to set the
capability to allow "APPEND" of the group, and the branch to
ALLOW_DETACH.

Is there a way to reorder children in a group without having APPEND and
ALLOW_DETACH (of the child) capability bits?

J. Lee Dixon
SAIC - Celebration, FL
321-939-7917
[EMAIL PROTECTED]    AOL: LeeOrlando

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