Game Development Reference
In-Depth Information
Note that the order of multiplication in which the rotation matrix is applied first to the object's
vertices then the translation matrix is applied.
Take another example where you want to translate then rotate the object around an axis (see Figure 4-8 ).
y
y
z
z
1
2
Initial Position
Translate
X
X
z
z
y
z
3
Rotate Around Fixed
Coordiante System
X
z
Figure 4-8. Object is translated and then rotated around the rotation axis
The general format for the model matrix for this situation is shown in Figure 4-9 .
Figure 4-9. Model matrix for object that is translated then rotated
 
Search WWH ::




Custom Search