Game Development Reference
In-Depth Information
FLOAT Angle
// Angle of rotation measured in radians.
);
cos
0
sin
0
0
1
0
0
Y
sin
0
cos
0
0
0
0
1
The D3DX function to build a y-axis rotation matrix is:
D3DXMATRIX *D3DXMatrixRotationY(
D3DXMATRIX* pOut,
// Result.
FLOAT Angle
// Angle of rotation measured in radians.
);
cos
sin
0
0
sin
cos
0
0
Z
0
0
1
0
0
0
0
1
The D3DX function to build a z-axis rotation matrix is:
D3DXMATRIX *D3DXMatrixRotationZ(
D3DXMATRIX* pOut,
// Result.
FLOAT Angle
// Angle of rotation measured in radians.
);
The inverse of a rotation matrix R is its transpose R T = R -1 . Such a
matrix is said to be orthogonal.
The Scaling Matrix
Figure 10: Scaling
by one-half units
on the x-axis and
two units on the
y-axis
We can scale a vector q x units on the x-axis, q y units on the y-axis, and q z
units on the z-axis by multiplying a vector with the following matrix:
Search WWH ::




Custom Search