There
is obviously no difference since you're still using quaternions like euler
angles. In other words, as long as you use pitch/yaw/roll you're always have
gimbal locks, regardless of what intermediate transformations you use. If you
don't want gimbal locks, just stop using them.
Cheers,
Florin
=========================================================================== 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".-----Ursprüngliche Nachricht-----
Von: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]Im Auftrag von Cavill, SA (Stuart)
Gesendet: Mittwoch, 25. August 2004 15:19
An: [EMAIL PROTECTED]
Betreff: [JAVA3D] Gimbal lockHi,I'm having problems with Gimbal Lock in my JAVA 3D code ( all I need to do is rotate a simple cube in 3 dimensions).I initially usedtransx.rotX(anglex);transy.rotX(angley);transz.rotX(anglez);trans4m.set(transx);
trans4m.mul(transy);
trans4m.mul(transz);
transformGroup.setTransform(trans4m);which caused gimbal lockI then tried to usepublic Quat4f setQ(float pitch, float yaw, float roll)
{
Quat4f qx =new Quat4f((float) Math.cos(pitch/2f),(float)Math.sin(pitch/2f),0,0);
Quat4f qy =new Quat4f((float) Math.cos(yaw/2f),0,(float)Math.sin(yaw/2f),0);
Quat4f qz =new Quat4f((float) Math.cos(roll/2f),0,0,(float)Math.sin(roll/2f));
Quat4f qt =new Quat4f();
qt.set(qx);
qt.mul(qy);
qt.mul(qz);
return(qt);
}trans4m.set(q2);transformGroup.setTransform(trans4m);but again gimbal lock occurred.I would appreciate any comments on what I am doing wrong or seeing an example of the correct way to go about this problem without gimbal lock occurring.Any help would be greatly appreciated.regardsStuart Cavillemail: S[EMAIL PROTECTED]
=========================================================================== 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".