Shear is the transformation of the coordinate system, non-uniform stretching. When shearing, the angle changes, but the area or volume does not change. It can also be understood as the angle change between axes, resulting in distortions.
For example, this is the x-coordinate of the y-coordinate of the shear, the robot's Y coordinate does not change, only the x-coordinate changes, the changed coordinates x ' can be understood as the y-coordinate multiplied by the shear factor s and the original coordinate x's and: X ' = x + sy. If 3D, increase the z-coordinate of the shear factor t:x ' = x + sy,y ' = y + tz
The shear factor is calculated from the shear angle.
Then the code to shear the x-coordinate according to the y-coordinate is:
floats = Tan (D3dxtoradian ( -));D 3DXMATRIX matshear (1.0f,0.0f,0.0f,0.0f, S,1.0f,0.0f,0.0f,0.0f,0.0f,1.0f,0.0f,0.0f,0.0f,0.0f,1.0f); G_device->settransform (d3dts_world,&matshear);
construct shear matrices by angle