Sign in to follow this  

Vertex transformation

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

This topic is 3734 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this