-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I just spent a good 2-3 hours trying to figure out why it would be two equivalant rotation expressions, one using quaternions notation, one using csYRotMatrix3(), would yield different results. Finally, having exhausted any possibility for bugs in the relevant quaternion code, I turned to look at the matrix code...
It seems that rotations around the Y axis using csYRotMatrix3() are counterclockwise, while rotations around the X and Z axes using csXRotMatrix3() and csZRotMatrix3() are clockwise. Since Crystal Space uses a left-handed coordinate system (yes?) the rotation according to the left-hand rule would be to rotate clockwise. However, the direction it goes isn't so important, what is troublesome is the fact that the definitions of the rotation matrices are inconsistant. This is *insane*. - From talking to thebolt a bit on IRC, I understand this has been a known problem for a long time, and I suppose that fixing it might be somewhat disruptive. On the other hand, the current behavior is *incredibly* confusing, directly contradicts the API documentation for the class, and has probably caused dozens of programmers at least a small bit of confusion... When things don't do what you would reasonably expect, you leave the relm of "let's figure out the math to do this" and enter the relm of "well, let's try this and see if it works" voodoo programming. If simply fixing it in place isn't acceptable, then I propose adding a new interface that is consistant, and deprecating/phasing out csRotMatrix3(). Perhaps static methods csMatrix3::XRotation(), csMatrix3::YRotation(), csMatrix3::ZRotation() which take the angle and return an initialized csMatrix3(). [ Peter Amstutz ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED] ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFErJ7eaeHUyhjCHfcRAi+xAKCMNdco7FBBIrnn7CErsmkVOq0x5gCfbzZW jMe+QhYo8OaWzwX9q5Xng9w= =4Mo4 -----END PGP SIGNATURE----- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Crystal-main mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/crystal-main Unsubscribe: mailto:[EMAIL PROTECTED]
