Got it, sorry. Probably messed it up, while changing pitch/yaw/roll to X/Y/Z rot.
Thanks again.
It all looks good now, I see a little difference for a specific rotation of a mesh instance compared to the earlier lot of multiplications with the d3dx functions. I'll get into that and see what causes the difference.
This is now the cleaned up function, to update the world matrix for dynamic mesh instances:
bool CD3dmeshInst::UpdateWorldMatrix()
{
if(!mDynamic) return false;
if(!mIsMoved && !mIsRotated && !mIsScaled) return false;
else
{
D3DXMatrixCompose(&mMatWorld, &D3DXVECTOR3(mScale, mScale, mScale), mRot.x, mRot.y, mRot.z, &mWorldPos);
}
D3DXMatrixInverse(&mMatWorldInv, NULL, &mMatWorld);
D3DXMatrixTranspose(&mMatWorldInvTransp, &mMatWorldInv);
return true;
}
Later on I might remove the inverse transpose part, after changing my pixelshader/ lighting shader.