Jump to content
  • Advertisement
Sign in to follow this  
utkarshseth

defining a pure rotation

This topic is 3453 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

I have an object which I can grab and move. There is a gmtl 4 x 4 matrix associated with it. I wish to rotate the object in x y and z axis in such a way that the translation component always remain 0. Essentially I wish to restrict translation when I am rotating the object in the 3 axis so that it becomes a pure rotation. How can I do this ? Should I assign NULL values to the translation component in the matrix after the motion is defined so that it becomes a pure rotation ? Please help Thanks

Share this post


Link to post
Share on other sites
Advertisement
Not null values, but zero.
Have you checked to see whether the gmtl provides functions to create a rotation matrix from a more intuitive representation (like Euler angles)?

Share this post


Link to post
Share on other sites
2 questions

1st. When I assign 0 values to the translation component, it essentially means the top 3 values on the last column of the matrix right ?

2nd. I have not looked at other ways like Euler representations. But I would definitely look at functions which make a pure rotation matrix out of a general matrix. As far as I can remember there are functions which do that.

Thanks a lot

Share this post


Link to post
Share on other sites
1) That's right.

2) There may be functions that will create a rotation matrix from another representation, this would be handy as you can specify the rotation in an intuitive way and the translation component will be all zeroes. There may also exist a function that will extract the 3x3 rotation matrix from a 4x4 matrix. I've never used the GMTL so I don't know whether these functions are provided, if not you can always write them yourself.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!