
9.4 Implementing the Mathematics 183
is shorthand for
⎡
⎢
⎢
⎢
⎣
abcd
ef gh
ijkl
0001
⎤
⎥
⎥
⎥
⎦
We can certainly multiply two 4 × 4 matrices together. If we multiply two 4 × 4
matriceswith[0001]astheirbottomline,weendupwithanothermatrixwhose
bottomlineis[0001].
So in our code, when we come to multiply together two 3×4matrices(tocombine
their transformations), we magically make the extra values appear, without storing
them, exactly as we did for transforming vectors. The code looks like this:
Excerpt from file include/cyclone/core.h
class Matrix4
{
// ... Other Matrix4 code as before ...
/**
* Returns a matrix, which is this one multiplied by the other given
* matrix.
*/ ...