You have to use the Transform3D.mul methods, to multiply the two rotations
together.
The following fragment makes a Text2D object face south west and look up,
like placing your righ hand, palm slightly up over the bottom left of the
screen. It took some experimentation to get right.:
Transform3D textTrans=new Transform3D();
Transform3D t0=new Transform3D(), t1=new Transform3D();
t0.rotX(Math.PI/4);
t1.set(new AxisAngle4d(0,0,1,-Math.PI/4));
textTrans.mul(t1, t0);
textTrans.setTranslation(new Vector3d(pWellTr.x, pWellTr.y,
pWellTr.z));
TransformGroup textTG=new TransformGroup();
textTG.setTransform(textTrans);
textTG.addChild(txt2D);
objTrans.addChild(textTG);
Regards
Mike
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+44 (0)20 8949 0353 (Work)
+44 (0)7956 359001 (Mobile)
+44 (0)20 8395 7587 (Home)
Mike Goldwater: [EMAIL PROTECTED]
Auric Hydrates Ltd
26,Sandal Road
New Malden
Surrey KT3 5AP
UK
-----Original Message-----
From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]]
On Behalf Of Eric Arnold
Sent: 06 January 2000 19:30
To: [EMAIL PROTECTED]
Subject: [JAVA3D] rotating objects in multiple directions
I have a (hopefully) simple question... how do you rotate an object in
multiple directions? I tried just using the rotY() and rotX() methods
separately, but then only one of them actually takes effect. Thanks for the
help
Eric
===========================================================================
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".
===========================================================================
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".