A translation matrix has the form:
In GLM, this is programmed with the command:
mModelMatrix = glm::translate(mModelMatrix, glm::vec3(tx, ty, tz));
Suppose we have a point p
[x, y, z]T. First, we homogenise p so
[x, y, z, 1]T.
Now, let’s determine the matrix product Tp