Game Development Reference
In-Depth Information
As mentioned previously in Chapter 3, the order of multiplication of matrices is key. Matrix
multiplication is not commutative, and the order of multiplication does matter. For example, let's say
we want to rotate the object first, then translate it along the x axis, as shown in Figure 4-6 .
y
y
z
z
1
2
Initial Position
Rotate Around Fixed
Coordinate System
X
X
z
z
y
z
3
Translate
X
z
Figure 4-6. Rotate then translate object
The model matrix for this would be of the form as in Figure 4-7 .
Figure 4-7. Model matrix form for rotating then translating an object
 
Search WWH ::




Custom Search