>From doc to the Group class:
----------------------------
getAllChildren
public final java.util.Enumeration getAllChildren()
Returns an Enumeration object of all children.
numChildren
public final int numChildren()
Returns a count of this nodes' children.
Returns: the number of children descendant from this node.
If u have a Group object and wanna remove it from some other group,
then u can getAllChildren and then browse thru all the objects in the
Enumeration object the function returns, comparing them with your
Group. (Don't forget to cast the objects from the Enum to the type of
the object u wanna remove (Group, Node or whatever). Thus u'll find
the index of the child in its parent node. If u already know
the index, then u can remove if the same moment. If u use
getAllChildren, don't forget to set ALLOW_CHILDREN_READ capability
(see below).
ALLOW_CHILDREN_EXTEND
Specifies that this Group node allows adding new children.
// Not sure if this is necessary to remove children.
ALLOW_CHILDREN_READ
Specifies that this Group node allows reading its children.
ALLOW_CHILDREN_WRITE
Specifies that this Group node allows writing its children.
So, set whatever properties u need. Also read docs to
Group.addChild(node) and Group.removeChild(index). There u'll find a
brief description of when, which and where the nodes are allowed to be
removed or added. Also, do read through any of the tutorial available
in the INet (the one i prefer the most is of Dave, as i said thousands
of times here, at http://www.sdsc.edu/~nadeau/Courses/VR99/.
Good luck,
vladimir
PS: i never tried it myself, but in theory it should work.
-=V=-
>-------<=============>-------<
Join in Java community now!
http://JavaCafe.VirtualAve.net/
>-------<=============>-------<
In your previous letter u wrote:
--------------------------------
SJIp> sorry to distrub . i am a beignner of java3d.what appropriate capabilities is
SJIp> need to set in order to move a child of a BG to other?
SJIp> and also how to get the child index?
===========================================================================
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".