Jump to content
  • Advertisement
Sign in to follow this  
giugio

D3DXMatrixMultiply

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
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

Share this post


Link to post
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
);

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!