In Chapter 3, Cardboard Box, we introduced 3D geometry and matrix math calculations. We will wrap these up into even more useful functions.
Much of this math code that we've put together is from existing open source projects (attributions are given in comments in the source code). After all, we might as well take advantage of the math geniuses who like this stuff and have open sourced excellent true and tested code. The code list is included with the file downloads for this book.
The following list documents our math API. The actual code is included with the file downloads for this book and the GitHub repository.
Generally speaking, the mathematics falls within the subject of linear algebra, but most of it is specific to graphics ...