Chapter 18. MATRIX MATH

What we'll cover in this chapter:

  • Matrix basics

  • Matrix operations

  • The Matrix class

In this chapter, I'm not necessarily going to introduce any new types of motion or physics or methods of rendering graphics. What I am going to do is give you an introduction to matrices, which provide an alternative way of doing a lot of the things you've already been doing.

Matrices are used quite often in 3D systems for rotating, scaling, and translating (moving) 3D points. They are also used quite a bit in various 2D graphics transformations. You might recall that the beginGradientFill method uses a matrix to position, size, and rotate the gradient.

In this chapter, you'll see how to create a system of 3D matrices to manipulate sprites in 3D ...

Get Foundation ActionScript 3.0 Animation: Making Things Move! now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.