Game Development Reference
In-Depth Information
Absolute perspective
Local perspective
Camera
upright
space
Camera
space
Figure 3.10
The same sequence of coordinate space transformations is viewed from two perspectives. On
the left, it appears as if the objects are moving, and the coordinate axes are stationary. On the
right, the objects appear to be stationary, and the coordinate space axes are transformed.
Figure 3.10 reviews the four-step sequence from the robot's object space
to the camera's object space from both perspectives. On the left, we repeat
the presentation just given, where the coordinate space is stationary and the
robot is moving around. On the right, we show the same process as a passive
transformation, from a perspective that remains fixed relative to the robot.
Notice how the coordinate space appears to move around. Also, notice that
when we perform a certain transformation to the vertices, it's equivalent
to performing the opposite transformation to the coordinate space. The
duality between active and passive transformations is a frequent a source
of confusion. Always make sure when you are turning some transformation
into math (or code), to be clear in your mind whether the object or the
coordinate space is being transformed. We consider a classic example of this
confusion from graphics in Section 8.7.1, when we discuss how to convert
Euler angles to the corresponding rotation matrix.
Note that for clarity, the first two rows in Figure 3.10 have the kitchen
and camera mostly transparent. In reality, each individual object—the
Search WWH ::




Custom Search