O'Reilly logo

Beginning 3D Game Programming by Tom Miller

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

Manipulating 3D Objects

You probably remember earlier when I briefly described transformations, or moving from one coordinate system to another, and how I would discuss it more in depth later. Well, it is later now, so it seems like the perfect time to get into it. There are three basic transformations you want to accomplish:

  • Translation— You can think of translation as actually moving the object. It's essentially adding a new point in 3D space to every vertex in your model to move it to a new location. For example, if you had a single vertex at point (1,2,3) and translated it (-2,3,1), you would calculate the new vertex position by simply adding each of the axis coordinates. In this case, the new vertex would be located at (-1,5,4) after the ...

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