Hello!

I'm using two cylinders (A and B) with a high of 3.0 which are connected to
each other (I'm using the Cylinder-class). Now, I want to rotate the second
cylinder (B). Of course, without any translation the cylinder B will be
rotated in the center - which is not what I want to have. Instead, the
rotation point should be in + (see figure).

--------
|       |
|  A   |
---+----
|       |
|  B   |
---------

The following source doesn't help - do you know, why? In this source arm1
corresponds to cylinder A and arm2 to cylinder B.

              Transform3D transformArm = new Transform3D();
              Transform3D rotateArm = new Transform3D();
                 rotateArm.rotX(-Math.PI/2.0d);
                 Transform3D translate1Arm = new Transform3D();
                 translate1Arm.set(new Vector3f(0.0f, 1.5f, 0.0f));
                 Transform3D translate2Arm = new Transform3D();
                 translate2Arm.set(new Vector3f(0.0f, -1.5f, 0.0f));
                 transformArm.set(translate1Arm);
                 transformArm.mul(rotateArm);
                 transformArm.mul(translate2Arm);
                 TransformGroup transformArm2TG = new
TransformGroup(transformArm);

                 transformArm2TG.addChild(arm2);
                 translateArm2TG.addChild(transformArm2TG);
                 translateArm1TG.addChild(translateArm2TG);
                 translateArm1TG.addChild(arm1);
                 transGroupRobby.addChild(translateArm1TG);

Thanks,
Michael.

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