I understand how to apply matrices in computer graphics, but I don't quite understand why this is done. For example in translation: to translate vector (x, y, z)
by vector (diffX, diffY, diffZ)
you could simply just add the vectors together instead of creating a translation matrix:
[1 0 0 diffX]
[0 1 0 diffY]
[0 0 1 diffZ]
[0 0 0 1 ]
and then multiplying the vector by the matrix to get (x+diffX, y+diffY, z+diffZ)
. Surely applying matrices like this would be wasteful of performance and memory?