When you call the rotX and rotY functions, all other components of the
transform are set to the identity. So that's why only your second rotation
is working. You either want to create a couple of transforms, each with
one rotation, and multiply the transforms, or you can set up a rotational
matrix and set the transform's rotational matrix to be that.
Hopefully that makes some sense.
Nick
|---------+------------------------------>
| | ahmet balci |
| | <[EMAIL PROTECTED]|
| | COM> |
| | Sent by: Discussion|
| | list for Java 3D |
| | API |
| | <[EMAIL PROTECTED]|
| | VA.SUN.COM> |
| | |
| | |
| | 07/22/2003 08:32 AM|
| | Please respond to |
| | Discussion list for|
| | Java 3D API |
| | |
|---------+------------------------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
| To: [EMAIL PROTECTED]
|
| cc:
|
| Subject: [JAVA3D] Rotation pairs
|
>--------------------------------------------------------------------------------------------------------------------------------------------------|
Hi,
I am trying to make a rotation around x axis which is following the
rotation around y axis (of a plane object).
I wrote the following code piece for this purpose;
trans.rotY(0.5);
trans.rotX(1.2);
trans.setScale(0.007);
worldTrans.setTransform(trans);
"trans" is the Transform3D variable and "worldTrans" is the
TransformGroup variable.When I run it only the second rotation is executed
but not the first. I try to change rotation arguments' places, try to use a
second Transform3D variable and etc. Always compiler pay attention to one
rotation argument and it is always the second.
Is there anyway to get more than one rotation arguments executed in
Java3D?
Thanks for your suggestions in advance........................
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
===========================================================================
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".