D3DXMatrixMultiply

Started by
1 comment, last by DraganO 15 years, 3 months ago
hy. I would rotate and multiply two d3dxmatrix.

	for(unsigned int iRot = 0; iRot < nRotCount; iRot ++)
	{
		domFloat4* pV = &pRotArr.get(iRot)->getValue();
		
		D3DXVECTOR3 vectRotate((float) pV->get(0),(float) pV->get(0),(float) pV->get(0));
		float fAngle = (float)pV->get(3);
		D3DXMatrixRotationAxis(&mxRotateComp,&vectRotate,fAngle);
		D3DXMatrixMultiply(&mxRotate,&mxRotate,&mxRotateComp);
		
	}

the first (mxRotate) at begin is unitialized and the second have a defined value. But if i multiply the first that is null with the second i obtain strange values. How initialize a d3dxmatrix? Thanks
Advertisement
Quote:Original post by giugio
hy.
I would rotate and multiply two d3dxmatrix.
*** Source Snippet Removed ***

the first (mxRotate) at begin is unitialized and the second have a defined value.
But if i multiply the first that is null with the second i obtain strange values.
How initialize a d3dxmatrix?
Thanks


D3DXMatrixIdentity
Remember Codeka is my alternate account, just remember that!
Or you could initialize it manually.
D3DXMATRIX NewMatrix( 1.0f, 0.0f, 0.0f, 0.0f,0.0f, 1.0f, 0.0f, 0.0f,0.0f, 0.0f, 1.0f, 0.0f,0.0f, 0.0f, 0.0f, 1.0f);

This topic is closed to new replies.

Advertisement