< Day Day Up > |
Chapter 6, "Transformations"2D Translation by Additionwhere dx = change in x and dy = change in y. 3D Translation by Additionwhere dx = change in x, dy = change in y, and dz = change in z. 2D Translation by Multiplicationwhere dx = change in x and dy = change in y. 3D Translation by Multiplicationwhere dx = change in x, dy = change in y, and dz = change in z. 2D Scalingwhere Sx = scale factor in the x direction and Sy = scale factor in the y direction. 3D Scalingwhere Sx = scale factor in the x direction, Sy = scale factor in the y direction, and Sz = scale factor in the z direction. 2D Rotationwhere q is the angle of rotation. 3D Rotation About the z-Axis (Roll)where q is the angle of rotation. 3D Rotation About the x-Axis (Pitch)where q is the angle of rotation. 3D Rotation About the y-Axis (Yaw)where q is the angle of rotation. 2D Combo MatrixFor every 2D combo matrix entries with an r store scaling and rotation information, and entries with a t store overall translation information. 3D Combo MatrixFor every 3D combo matrix entries with an r store scaling and rotation information, and entries with a t store overall translation information. Conversion Between OpenGL and DirectX FormatsAB = BTAT for matrices A and B: |
< Day Day Up > |