Graphics Reference
In-Depth Information
The same result is obtained simply by substituting - roll ,- pitch ,- yaw in the
original matrices. As described above, the virtual camera will normally be
translated from the origin by ( t x ,t y ,t z ), which implies that the transform
from the world space to the camera space must be evaluated as follows:
x
y
z
1
x
y
z
1
=[
roll ]
·
[
pitch ]
·
[
yaw ]
·
[
translate (
t x ,
t y ,
t z )
·
(7.81)
which can be represented by a single homogeneous matrix:
·
x
y
z
1
T 11
T 12
T 13
T 14
x
y
z
1
T 21
T 22
T 23
T 24
=
(7.82)
T 31
T 32
T 33
T 34
T 41
T 42
T 43
T 44
where
T 11 =cos( yaw )cos( roll ) + sin( yaw ) sin( pitch ) sin( roll )
T 12 =cos( pitch ) sin( roll )
T 13 =
sin( yaw )cos( roll )+cos( yaw ) sin( pitch ) sin( roll )
T 14 = ( t x T 11 + t y T 12 + t z T 13 )
T 21 =
cos( yaw ) sin( roll ) + sin( yaw ) sin( pitch )cos( roll )
T 22 =cos( pitch )cos( roll )
T 23 =sin( yaw ) sin( roll )+cos( yaw ) sin( pitch )cos( roll )
T 24 =
( t x T 21 + t y T 22 + t z T 23 )
T 31 =sin( yaw )cos( pitch )
T 32 =
sin( pitch )
T 33 =cos( yaw )cos( pitch )
T 34 =
( t x T 31 + t y T 32 + t z T 33 )
T 41 =0
T 42 =0
T 43 =0
T 44 = 1
(7.83)
This, too, can be verified by a simple example. For instance, consider the
situation shown in Figure 7.22 where the following conditions prevail:
roll =0
pitch =0
yaw = 180
t x =10
Search WWH ::




Custom Search