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)...