Jump to content
  • Advertisement
Sign in to follow this  
giugio

Reset matrix

This topic is 3450 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 have a list of meshes with a field that is the translation matrix. how I reset the world matrix to the origin before drawing the next mesh. is correct reset the world matrix? thanks.

Share this post


Link to post
Share on other sites
Advertisement
The world matrix is used to convert from model space to view space. So, yes it is correct. You don't have to "reset it to the origin", simply call IDirect3DDevice9::SetTransform to set a new tranformation.
If you still need to "reset" it, the correct term is setting it to the identity matrix.

Hope this helps.

Share this post


Link to post
Share on other sites
Or remember the matrix via a call to GetTransform(), and then after drawing, reset it to what you remembered (usefull if you have a hierarchy of transforms).

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!