Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

How to work out the rotation center?

This topic is 3932 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 D3DXQUATERNION *pRotation,
    CONST D3DXVECTOR3 *pTranslation
);

Thanks Jack

Share this post


Link to post
Share on other sites
Advertisement
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?

Jack

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!