Game Engine Architecture
4.3. Matrices 159 or in partitioned shorthand: Here are some observations about this kind of matrix: z To invert a scaling matri ...
160 4. 3D Math for Games “A” axes, while the vector PB gives the position of that same point relative to a diff erent set of axe ...
4.3. Matrices 161 coordinates. The unit basis vector along this axis will be denoted L or R, as appropriate. The mapping between ...
162 4. 3D Math for Games of the engines I’ve encountered use either a y-up or a z-up convention. The y-up convention was probabl ...
4.3. Matrices 163 increasing in the direction the camera is facing (left -handed) is typical because it allows z coordinates to ...
164 4. 3D Math for Games In this equation, z iC is the unit basis vector along the child space x-axis, expressed in par- ent spa ...
4.3. Matrices 165 factor of two, then the basis vectors iC , jC , and kC will be of length 2 instead of unit length. 4.3.10.3. E ...
166 4. 3D Math for Games Of course, this is just another point of potential confusion. If you’re think- ing in terms of coordina ...
167 In general, if a point or (non-normal) vector can be rotated from space A to space B via the 3 × 3 marix MAB→ , then a norma ...
168 4. 3D Math for Games abled (SIMD) microprocessor, as we’ll see later in this chapter. In most game engines I’ve personally e ...
4.4. Quaternions 169 4.4 Quaternions We’ve seen that a 3 × 3 matrix can be used to represent an arbitrary rotation in three dime ...
170 4. 3D Math for Games by the sine of the half-angle of the rotation. The scalar part qS is the cosine of the half-angle. So t ...
4.4. Quaternions 171 Notice how the Grassman product is defi ned in terms of a vector part, which ends up in the x, y, and z com ...
172 4. 3D Math for Games This is analogous to the reversal that occurs when transposing or inverting matrix products. 4.4.3. Rot ...
4.4. Quaternions 173 Likewise, the composite rotation quaternion qnet can be found and applied to vector v (in its quaternion fo ...
174 4. 3D Math for Games // check the diagonal if (trace > 0.0f) { float s = sqrt(trace + 1.0f); q[3] = s * 0.5f; float t = 0 ...
175 Notice that the resultant interpolated quaternion had to be renormalized. This is necessary because the LERP operation does ...
176 4. 3D Math for Games To solve this problem, we can use a variant of the LERP operation known as spherical linear interpolati ...
177 4.4.5.2. To SLERP or Not to SLERP (That’s Still the Question) The jury is still out on whether or not to use SLERP in a game ...
178 4. 3D Math for Games any further rotations about the original y-axis, because rotations about y and z have eff ectively beco ...
«
5
6
7
8
9
10
11
12
13
14
»
Free download pdf