Jump to content
  • Advertisement
Sign in to follow this  

How to work out the rotation center?

This topic is 4104 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!