Jump to content
  • Advertisement
Sign in to follow this  

How to work out the rotation center?

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

D3DXMATRIX *D3DXMatrixAffineTransformation(     
    D3DXMATRIX *pOut,
    FLOAT scaling,
    CONST D3DXVECTOR3 *pRotationCenter, <<<<< this one in doubt with
    CONST D3DXVECTOR3 *pTranslation

Thanks Jack

Share this post

Link to post
Share on other sites
You don't really work it out... you're using that function as a simple way of generating a matrix according to the equation in the docs:

Mout = Ms * (Mrc)-1 * Mr * Mrc * Mt

Rotation matrices are always defined about the origin, but there are plenty of situations where you want to rotate it about some other arbitrary point in 3D space. Thats all that the pRotationCenter parameter is exposing to you.

Can you explain your problem in more detail?


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!