November 2012
Beginner
432 pages
9h 3m
English
What You’ll Learn in This Hour
• Using matrix translation
• Using matrix rotation
• Using matrix scaling
• Combining all three transforms into one matrix
• Drawing animation frames with matrix transforms
This hour delves into the awesome subject of matrix transforms, giving us the capability to rotate, scale, and translate a sprite. Although we can already translate (move) and scale a sprite using the known drawBitmap() methods, an additional overload of the method takes a Matrix parameter instead. Because matrix math is much faster than trigonometry (that is, using sine and cosine), and because a matrix can handle all three transforms at once, this is clearly where we want to go with our ...
Read now
Unlock full access