Hi,
you can get work step 2 in a very easy way. If you want to move each cylinder
separately, you have to put each
cylinder into its own transformgroup as you already did it. Next you have to assign
all 20 transformgroups to the
transformgroup of your plate as child objects. Then each time you move the plate all
cylinders will get moved in
the same way. If you want to detach all cylinders by clicking onto the plate, just
put the transformgroups into a
branchgroup and assign it to the transformgroup of the plate. You also need a behavior
that will detach (or
re-attach) this branchgroup when you klick onto the plate. You have to set the
according capabilities to avoid
exceptions like the one you got.
hope this helps
Gernot
On Wed, 19 Apr 2000 07:41:19 -0700, Harish Nachnani wrote:
>Good Morning,
>
>I have a set of cylinders on a plate. I want to achieve two senerios.
>1. I would like to move each cylinder (i.e., rotatation and translation). this part
>is working.
>2. On clicking on the plate, I would like to move all cylinders along with with the
>plate.
>
>What I am doing currently is creating cylinder objects and assigning them to a
>TransformGroup.
>So for 20 cylinders, I have 20 Transform Groups.
>All the TransformGroups are assigned to a BranchGroup A.
>
>I have a plate object assigned to a TransformGroup (TB) which has parent BranchGroup
>B.
>
>On clicking the plate I get a event and I would like to delete the 20 TransformGroup
>objects from BranchGroup A,
>and assign the 20 cylinders to TB. But I get a Access Exception, stating that only
>branch group can be deleted
and reassigned.
>
>Any suggestions are welcomed.
>
>===========================================================================
>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".
[EMAIL PROTECTED]
http://www.janet.de
===========================================================================
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".