## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required ## Book Description

3D Math Primer for Graphics and Game Development covers fundamental 3D math concepts that are especially useful for computer game developers and programmers. The authors discuss the mathematical theory in detail and then provide the geometric interpretation necessary to make 3D math intuitive. Working C++ classes illustrate how to put the techniques into practice, and exercises at the end of each chapter help reinforce the concepts. This book explains basic concepts such as vectors, coordinate spaces, matrices, transformations, Euler angles, homogenous coordinates, geometric primitives, intersection tests, and triangle meshes. It discusses orientation in 3D, including thorough coverage of quaternions and a comparison of the advantages and disadvantages of different representation techniques. The text describes working C++ classes for mathematical and geometric entities and several different matrix classes, each tailored to specific geometric tasks. Also included are complete derivations for all the primitive transformation matrices.

1. Cover
2. Title Page
4. Contents
5. Acknowledgements
6. Chapter 1 Introduction
7. Chapter 2 The Cartesian Coordinate System
1. 2.1 1D Mathematics
2. 2.2 2D Cartesian Mathematics
3. 2.3 From 2D to 3D
4. 2.4 Exercises
8. Chapter 3 Multiple Coordinate Spaces
1. 3.1 Why Multiple Coordinate Spaces?
2. 3.2 Some Useful Coordinate Spaces
3. 3.3 Nested Coordinate Spaces
4. 3.4 Specifying Coordinate Spaces
5. 3.5 Coordinate Space Transformations
6. 3.6 Exercises
9. Chapter 4 Vectors
1. 4.1 Vector — A Mathematical Definition
2. 4.2 Vector — A Geometric Definition
3. 4.3 Vectors vs. Points
4. 4.4 Exercises
10. Chapter 5 Operations on Vectors
1. 5.1 Linear Algebra vs. What We Need
2. 5.2 Typeface Conventions
3. 5.3 The Zero Vector
4. 5.4 Negating a Vector
5. 5.5 Vector Magnitude (Length)
6. 5.6 Vector Multiplication by a Scalar
7. 5.7 Normalized Vectors
8. 5.8 Vector Addition and Subtraction
9. 5.9 The Distance Formula
10. 5.10 Vector Dot Product
11. 5.11 Vector Cross Product
12. 5.12 Linear Algebra Identities
13. 5.13 Exercises
11. Chapter 6 A Simple 3D Vector Class
1. 6.1 Class Interface
2. 6.2 Class Vector3 Definition
3. 6.3 Design Decisions
12. Chapter 7 Introduction to Matrices
1. 7.1 Matrix — A Mathematical Definition
2. 7.2 Matrix — A Geometric Interpretation
3. 7.3 Exercises
13. Chapter 8 Matrices and Linear Transformations
1. 8.1 Transforming an Object vs. Transforming the Coordinate Space
2. 8.2 Rotation
3. 8.3 Scale
4. 8.4 Orthographic Projection
5. 8.5 Reflection
6. 8.6 Shearing
7. 8.7 Combining Transformations
8. 8.8 Classes of Transformations
9. 8.9 Exercises
14. Chapter 9 More on Matrices
1. 9.1 Determinant of a Matrix
2. 9.2 Inverse of a Matrix
3. 9.3 Orthogonal Matrices
4. 9.4 4×4 Homogenous Matrices
5. 9.5 Exercises
15. Chapter 10 Orientation and Angular Displacement in 3D
1. 10.1 What is Orientation?
2. 10.2 Matrix Form
3. 10.3 Euler Angles
4. 10.4 Quaternions
5. 10.5 Comparison of Methods
6. 10.6 Converting between Representations
7. 10.7 Exercises
16. Chapter 11 Transformations in C++
17. Chapter 12 Geometric Primitives
1. 12.1 Representation Techniques
2. 12.2 Lines and Rays
3. 12.3 Spheres and Circles
4. 12.4 Bounding Boxes
5. 12.5 Planes
6. 12.6 Triangles
7. 12.7 Polygons
8. 12.8 Exercises
18. Chapter 13 Geometric Tests
19. Chapter 14 Triangle Meshes
1. 14.1 Representing Meshes
2. 14.2 Additional Mesh Information
3. 14.3 Topology and Consistency
4. 14.4 Triangle Mesh Operations
5. 14.5 A C++ Triangle Mesh Class
20. Chapter 15 3D Math for Graphics
1. 15.1 Graphics Pipeline Overview
2. 15.2 Setting the View Parameters
3. 15.3 Coordinate Spaces
4. 15.4 Lighting and Fog
5. 15.5 Buffers
6. 15.6 Texture Mapping
7. 15.7 Geometry Generation/Delivery
8. 15.8 Transformation and Lighting
9. 15.9 Backface Culling and Clipping
10. 15.10 Rasterization
21. Chapter 16 Visibility Determination
1. 16.1 Bounding Volume Tests
2. 16.2 Space Partitioning Techniques
3. 16.3 Grid Systems
4. 16.4 Quadtrees and Octrees
5. 16.5 BSP Trees
6. 16.6 Occlusion Culling Techniques
22. Chapter 17 Afterword
23. Appendix A Math Review
24. Appendix B References
25. Index