At its core, a transformation matrix is a function that converts positions/directions from space I
to space O
: input to output. And therefore, transformations behave a lot like function composition. There is a difference between f(g(X))
and g(f(X))
.
So you start with is a matrix C
that, given a vertex Vi
which is in space I
, this will be true: Vo = C * Vi
, where Vo
is the vertex in the space O
.
So, let's go back to your original example: C = C * M
. To cut down on confusion (I need to talk about the original C
and the output), I'm going to give the new matrix a particular name: D = C * M
.
The space I
, the input space for C
was a particular model space. You're now adding a new transformation to this, which had its own input and output spaces. And by multiplying them together to form a single transformation, you are declaring something:
That Mo
, the output space of M
, is the same space as Ci
, C
's input space. Therefore, we are now dealing with three spaces: Mi
, Mo/Ci
, and Co
.
However, D
is a composition of those transforms. It goes from the space Mi
to the space Co
; we never see Mo/Ci
. The difference between C
and D
is their input spaces.
Here's the thing: the space Co
, C
's output space? It has a particular name: world space.
Therefore, D
goes to the exact same world space as C
did. So it should be no surprise that right-multiplying won't cause a rotation around world space.
So let's look at this: E = M * C
. Here, we have a different situation. E
has the same input space (model space) as C
, but it now has a different output space. That is, the world space that E
transforms into is different from the world space that C
transformed into.
And that's exactly what you want if you want to rotate something relative to world space. You are changing world space for that object.
If you change the model space for a transform, you are transforming relative to model space. If you change the world space for a transform, you are transforming relative to world space.