Original Post
Hi everyone I wonder if anyone has any insight into this.
Is rotating a Face Normal any different to rotating a Vertex? I don't seem to be getting the correct results when applying a matrix transform to a face normal. I've tried using D3DXVec3TransformNormal instead of D3DXVec3TransformCoord but the documentation is says:
Is rotating a Face Normal any different to rotating a Vertex? I don't seem to be getting the correct results when applying a matrix transform to a face normal. I've tried using D3DXVec3TransformNormal instead of D3DXVec3TransformCoord but the documentation is says:
If you transforming a normal by a non-affine matrix, the matrix you pass to this function should be the transpose of the inverse of the matrix you would use to transform a coord[/quote]
I'm not sure what that means exactly and if it will help with rotating a Face Normal.
Basically My Code is:
D3DXMATRIX matRotX, matRotY, matRotZ, matRotTotal;
D3DXMatrixRotationX( &matRotX, pMeshCoords->Rotation.x );
D3DXMatrixRotationY( &matRotY, pMeshCoords->Rotation.y );
D3DXMatrixRotationZ( &matRotZ, pMeshCoords->Rotation.z );
matRotAll = matRotX * matRotY * matRotZ;
D3DXVec3TransformNormal( &RotFaceNormal, &FaceNormal, &matRotAll );
Thanks in advance for any info anyone has!
David