D3DXMATRIX *D3DXMatrixAffineTransformation(
D3DXMATRIX *pOut,
FLOAT scaling,
CONST D3DXVECTOR3 *pRotationCenter, <<<<< this one in doubt with
CONST D3DXQUATERNION *pRotation,
CONST D3DXVECTOR3 *pTranslation
);
How to work out the rotation center?
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement