Jump to content
  • Advertisement
Sign in to follow this  
anchelito

Are the columns of a rotation-matrix the same as the 3 axes???

This topic is 3889 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hey everyone, i found an algorithm about the separating axis theorem in the net. Link The author there splits the rotation matrix into three vectors and calls them the axes.
Matrix4 matB = b.m_matRot*a.m_matRotInverse;

Vector3 XAxis(matB._11,matB._21,matB._31);
Vector3 YAxis(matB._12,matB._22,matB._32);
Vector3 ZAxis(matB._13,matB._23,matB._33);


Is this correct??? do the three columns represent the rotation around the three axes??? because as far as i know the rotation-matrix of 3 euler-angles is calculated in a different way: thanks for the help! greetings, anchelito

Share this post


Link to post
Share on other sites
Advertisement
A rotation matrix contains the basis vectors of the new coordinate system.
The identity rotation of
1,0,0
0,1,0
0,0,1
gives you your X,Y,Z axis. A rotation of these axis give you 3 new ortho-normal vectors that then make up the associated
rotation matrix. So if the identity rotation is your "world X,Y,Z" the axis he is extracting there would be your object's "local X,Y,Z".
This is usually less confusing when expressed as the "at, up, left" vectors of a rotation matrix.

Share this post


Link to post
Share on other sites
That's right. This is the way I visualize the rotation matrix, and I find it the most comprehensive way to think of it. The coordinate is simply transformed by "projecting" it onto each of these axes by using three dot-product calculations.

The matrices described beneath your post can be thought of as each one of the matrices contains two vectors, or a frame describing the YZ-, XZ- and XY-plane respectively. The matrix multiplication to be performed in order to obtain the final 3-dimensional matrix, is in fact a series of calculations of the type described above (one frame's vectors are projected onto the other frame's vectors).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!