Graphics Reference
In-Depth Information
Y
Y
′
(0, 1, 1)
Z
′
X
′
1
10
Z
1
X
Fig. 7.22.
The secondary axial system is subject to a
yaw
of 180
◦
and an offset of
(10, 1, 1).
the virtual camera is located in world space using Euler angles, the transform
relating world coordinates to camera coordinates can be derived from the
inverse operations. The
yaw
,
pitch
,
roll
matrices described above are called
orthogonal matrices
, as the inverse matrix is the transpose of the original rows
and columns. Consequently, to rotate through angles -
roll
,-
pitch
and -
yaw
,
we use
•
rotate -
roll
about the
z
-axis:
⎡
⎣
⎤
⎦
cos(
roll
) in
roll
)00
−
sin(
roll
)
roll
)00
0
(7.78)
0
1
0
0
0
0
1
•
rotate -
pitch
about the
x
-axis:
⎡
⎣
⎤
⎦
1
0
0
0
0c s(
pitch
)
sin(
pitch
)0
(7.79)
0
−
sin(
pitch
)
pitch
)0
0
0
0
1
•
rotate -
yaw
about the
y
-axis:
⎡
⎤
cos(
yaw
)0
−
sin(
yaw
)0
⎣
⎦
0
1
0
0
(7.80)
sin(
yaw
)0
yaw
)0
0
0
0
1