01-06-2004, 11:42 PM
Transform matrices are a complex subject, and require an understanding of higher mathematics that I do not possess. Nonetheless, there are some things I understand about them, and how to apply them. In short, the transform matrix contains all the information needed to express the orientation (rotation), scale, and position of an object in 3D space. Transformations occur when a matrix is multiplied by another matrix. In the 4x3 matrix used in Maxscript, the fourth row represents the translation.
Since a matrix3 represents all of rotation, scale, and position, the statement $obj.rotation = tm (where tm is a matrix3 value) is actually casting tm to a quat for assignment to the rotation property of obj. In other words, it's pulling just the rotation part out of the matrix and then assigning that to $obj.rotation. You can manually extract the rotation by using rot = tm as quat or rot = tm as eulerAngles, or get it as a quat by simply stating rot = tm.rotation
If you really want to get into the hardcore details of transform matrices, there's plenty of information out there on the web and in math books at your local library. But in order to successfully apply them you really don't need to know much about how they work "under the hood." I'm afraid that's all the more helpful I can be on this subject:hmm:
01-17-2006, 03:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.