Game Development Reference
In-Depth Information
Positive rotation
Negative rotation
When looking towards
the origin from. . .
Left-handed: Clockwise
Left-handed: Counterclockwise
Right-handed: Counterclockwise
Right-handed: Clockwise
+x
+y → +z → −y → −z → +y
+y → −z → −y → +z → +y
+y
+z → +x → −z → −x → +z
+z → −x → −z → +x → +z
+z
+x → +y → −x → −y → +x
+x → −y → −x → +y → +x
Table 1.1. Rotation about the cardinal axes in left- and right-handed coordinate systems
flip two axes, it is the same as rotating the coordinate space 180 o about
the third axis, which does not change the handedness of the coordinate
space. Another way to toggle the handedness of a coordinate system is to
exchange two axes.
Both left-handed and right-handed coordinate systems are perfectly
valid, and despite what you might read in other topics, neither is “better”
than the other. People in various fields of study certainly have preferences
for one or the other, depending on their backgrounds. For example, some
newer computer graphics literature uses left-handed coordinate systems,
whereas traditional graphics texts and more math-oriented linear algebra
people tend to prefer right-handed coordinate systems. Of course, these
are gross generalizations, so always check to see what coordinate system
is being used. The bottom line, however, is that in many cases it's just
a matter of a negative sign in the z-coordinate. So, appealing to the first
law of computer graphics in Section 1.1, if you apply a tool, technique, or
resource from another book, web page, or article and it doesn't look right,
try flipping the sign on the z-axis.
1.3.4 Some Important Conventions Used in This Topic
When designing a 3D virtual world, several design decisions have to be
made beforehand, such as left-handed or right-handed coordinate system,
which direction is +y, and so forth. The map makers from Dyslexia had
to choose from among eight different ways to assign the axes in 2D (see
Figure 1.7). In 3D, we have a total of 48 different combinations to choose
from; 24 of these combinations are left-handed, and 24 are right-handed.
(Exercise 3 asks you to list all of them.)
Different situations can call for different conventions, in the sense that
certain tasks can be easier if you adopt the right conventions. Usually,
however, it is not a major deal as long as you establish the conventions
early in your design process and stick to them. (In fact, the choice is most
likely thrust upon you by the engine or framework you are using, because
very few people start from scratch these days.) All of the basic principles
discussed in this topic are applicable regardless of the conventions used.
For the most part, all of the equations and techniques given are applicable
 
Search WWH ::




Custom Search