# D3DXMatrixMultiply

This topic is 3586 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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

##### Share on other sites
Quote:
 Original post by giugiohy.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

##### Share on other sites
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);

1. 1
Rutin
44
2. 2
3. 3
4. 4
5. 5

• 11
• 9
• 12
• 10
• 13
• ### Forum Statistics

• Total Topics
632984
• Total Posts
3009715
• ### Who's Online (See full list)

There are no registered users currently online

×