Preliminary, post-functions are used for pre- and post-multiplication, respectively.
For example, call the following functions:
reset(); //reset to identity matrix
setRotate(90); //set the matrix to be a 90 degree rotation
preScale(2.0f,2.0f); //scale uniformly with factor 2
or
reset(); //reset to identity matrix
setRotate(90); //set the matrix to be a 90 degree rotation
postScale(2.0f,2.0f); //scale uniformly with factor 2
Now what's the difference?
In the first version, the final matrix is first scaled and then rotated. In the second - on the contrary.
Preliminary functions build a matrix and multiply it on the right by existing columnar functions multiplied on the left.
source
share