Summary
In this chapter, you learned how to implement a transformation as a discreet structure that contains a position, rotation, and scale. In many ways, the Transform
class holds the same data that you would normally store in a matrix.
You learned how to combine, invert, and mix between transforms, as well as how to use transforms to move points and rotate vectors. Transforms are going to be essential moving forward, as they are used to animate the armature or skeleton of game models.
The reason you need an explicit Transform
struct is that matrices don't interpolate well. Interpolating transforms is very important for animation. It's how you create in-between poses to display two given keyframes.
In the next chapter, you will learn how to write a light abstraction layer on top of OpenGL to make rendering in future chapters easier.