Graphics Reference
In-Depth Information
“side” vector
( V w )
Rotation of the camera
with respect to the
camera “side” vector
Axis of rotation:
same direction as V w
located at camera Look At
Current
Camera Position
θ x
“side” vector
( V w )
Figure 15.5.
Up/down camera rotation.
Current
Camera Position
“Up” direction
of the world
θ y
Rotation of the camera
with respect to the
“Up” direction
Figure 15.6.
Left/right camera rotation.
θ y and vertically by
θ x . We refer to horizontal rotation as sub-y because the rotation is defined with
respect to the up orientation, or the y -axis. Similarly, the x of
Let's assume that the camera is rotated horizontally by
θ x signifies the axis
of rotation. The camera orbiting rotations can be described as
R v w
R y
M or =
( θ x )
( θ y ) ,
(15.2)
where R is the rotation operator, and the superscripts v w and y represent the V w
and y axes of rotation. To properly support camera tumbling, for every
θ x and
θ y
user input, we need to compute the new camera position p new
e
:
p new
e
=
p e M or
(15.3)
p e R v w
R y
=
( θ x )
( θ y ) .
Search WWH ::




Custom Search