Jump to content
  • Advertisement
Sign in to follow this  

Vertex transformation

This topic is 4038 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

Hello everyone, I'm just starting with Direct3D (more precisely, with transformations in Direct3D) and I'm wondering why a quad facing the viewport (thus untransformed) loses its natural form and transforms into rhombus, when applied a transformation matrix, which rotates the quad around its Z axis (around its geometrical center). Here is the code which creates the matrices: D3DXMATRIX mat, matrot; FLOAT fAngle = 0.5f * D3DX_PI; D3DXMatrixRotationZ( &mat, fAngle ); g_pd3dDevice->SetTransform( D3DTS_WORLD, &( mat ) ); When each one of the vertices rotates 45 degrees around the center, the figure looks like rhombus, and by angles between 0 and 45 it's even just a parallelogram(the sides are 2x2 equal, but the angles aren't 90)...

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!