Game Development Reference
In-Depth Information
Each shear transformation is done on one axis at a time, displacing the pixels along the
scanline, essentially transforming by translation rather than by an actual rotation; this en-
sures that there will be no gaps in the transformed bitmap.
On the first shear the image is skewed vertically around the center point, each side relative
to one another. The second shear skews the image horizontally, always around the center.
And finally, the third shear is the same as the first shear, which brings the image into its
final rotation.
It is important to understand how rotation works, however given that we will be taking ad-
vantage of modern graphics hardware, it is unlikely we will need to implement these rota-
tion algorithms ourselves, most of the time we will use the GPU's interpolators by passing
in a rotation transform to the device.
Search WWH ::




Custom Search