Original Post
Yes, this may look to be in the wrong forum but it is math related, so please flame elsewhere or read on.
I'm basically doing some calculations that rely on a point/vector being multiplyed by a matrix. Well, my code for rotating a vector is standard fare simple stuff thats explained everywhere:
So anyhow, I switched to this implementation from D3DXVec3TransformCoord and even though the two functions should perform the same thing (transform a vector by a matrix), their values are NOT congruent. I've tried switching column-row order, plus adding the last row to the final values with no success. Basically I'm wondering if anyone knows what MS does different with their implementation of a common algorithm or is it just something I'm doing very wrong (which is weird since I see a lot of people doing it the same exact way).
Thanks a bunch!
"Love all, trust a few. Do wrong to none." - Shakespeare
www.CodeFortress.com
[edited by - Dirge on May 12, 2003 1:35:12 AM]
CVector3f vVec = CVector3f( pMat->m00 * pVec->m_X + pMat->m10 * pVec->m_Y + pMat->m20 * pVec->m_Z + pMat->m30, pMat->m01 * pVec->m_X + pMat->m11 * pVec->m_Y + pMat->m21 * pVec->m_Z + pMat->m31, pMat->m02 * pVec->m_X + pMat->m12 * pVec->m_Y + pMat->m22 * pVec->m_Z + pMat->m32 );