O'Reilly logo

Foundation ActionScript 3.0 Animation: Making Things Move! by Keith Peters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required