Original Post
code [1] result is equal to code [2] //temp2 == temp1
//////////
//code 1//
//////////
vAxis.x = 1.0f;
vAxis.y = 0.0f;
vAxis.z = 0.0f;
fAngle = 0.785398; //45 degree
D3DXQuaternionRotationAxis( &qCursor, &vAxis, fAngle );
D3DXMatrixRotationQuaternion( &matCursor, &qCursor );
D3DXMatrixMultiply( &temp2, &temp2, &matCursor );
vAxis.x = 0.0f;
vAxis.y = 1.0f;
vAxis.z = 0.0f;
fAngle = 0.785398; //45 degree
D3DXQuaternionRotationAxis( &qCursor, &vAxis, fAngle );
D3DXMatrixRotationQuaternion( &matCursor, &qCursor );
D3DXMatrixMultiply( &temp2, &temp2, &matCursor );
vAxis.x = 0.0f;
vAxis.y = 0.0f;
vAxis.z = 1.0f;
fAngle = 0.785398; //45 degree
D3DXQuaternionRotationAxis( &qCursor, &vAxis, fAngle );
D3DXMatrixRotationQuaternion( &matCursor, &qCursor );
D3DXMatrixMultiply( &temp2, &temp2, &matCursor );
//////////
//code 2//
//////////
m_RotX = 0.785398f; //45 degree
D3DXMatrixRotationX(&matRot,m_RotX);
D3DXMatrixMultiply( &temp1, &temp1, &matRot );
m_RotY = 0.785398f; //45 degree
D3DXMatrixRotationY(&matRot,m_RotY);
D3DXMatrixMultiply( &temp1, &temp1, &matRot );
m_RotZ = 0.785398f; //45 degree
D3DXMatrixRotationZ(&matRot,m_RotZ);
D3DXMatrixMultiply( &temp1, &temp1, &matRot );
So my problem is what are the use of Quaternion and different of rotation ?????
please !!!!
thanks a lots..