What this book covers
Chapter 1, Vectors, covers vector math using 2D and 3D vectors. Vectors will be heavily used throughout the book, so having a solid understanding of the math behind vectors is essential.
Chapter 2, Matrices, covers the basics of 2D, 3D, and 4D matrices. Operations such as matrix multiplication and inversion are covered. This chapter is an introduction to the implementation matrices in C++.
Chapter 3, Matrix Transformations, covers applying matrices to games. This chapter builds upon the understanding of vectors and matrices built up in the previous chapters to explain how matrices and vectors can be used to represent transformations in 3D space.
Chapter 4, 2D Primitive Shapes, covers common 2D shapes games may need. This chapter provides practical definitions and implementations of common 2D primitives.
Chapter 5, 2D Collisions, covers testing the 2D shapes defined in the last chapter for intersection. This chapter covers the fundamental concepts of intersection testing in 2D, which later chapters will expand into 3D.
Chapter 6, 2D Optimizations, covers speeding up the intersection tests written in the last chapter. Once hundreds or even thousands of objects are colliding, brute force collision detection will no longer work in real time. The topics covered in this chapter are vital for keeping collision detection running in real time, even with a large number of objects.
Chapter 7, 3D Primitive Shapes, covers the common 3D shapes games may need. This chapter provides the definition of the geometric primitives we will later build upon to create a working 3D physics engine.
Chapter 8, 3D Point Tests, covers nearest point and containment tests in a 3D environment. This chapter covers finding the closest point on the surface of a 3D primitive to a given point and provides containment tests for the 3D primitives previously covered.
Chapter 9, 3D Shape Intersections, covers testing all of the 3D primitive shapes for intersection. This chapter expands many of the 2D intersection tests covered previously in the book into 3D space. The chapter also provides additional insight into optimizing intersection tests in 3D space.
Chapter 10, 3D Line Intersections, covers testing the intersection of a line and any 3D primitive, as well as raycasting against any 3D primitive. Ray casting is perhaps one of the most versatile intersection tests. We will use ray casting in later chapters to avoid the common problem of tunneling.
Chapter 11, Triangles and Meshes, covers a new primitive, the triangle, and how to use triangles to represent a mesh. In a 3D game world, objects are often represented by complex meshes rather than primitive 3D shapes. This chapter presents the most straightforward way of representing these complex meshes in the context of a physics engine.
Chapter 12, Models and Scenes, covers adding a transformation to a mesh, as well as using a hierarchy of meshes to represent a scene. Games often reuse the same mesh transformed into a different space. This chapter defines a model, which is a mesh with some transformation. The chapter also covers multiple models in a scene.
Chapter 13, Camera and Frustum, covers the frustum primitive and building a camera out of matrices. The focus of this chapter is to build an easy to use camera which can be used to view any 3D scene. Each camera will have a frustum primitive attached. The attached frustum primitive can optimize render times by culling unseen objects.
Chapter 14, Constraint Solving, covers a basic introduction to physics. This chapter introduces particle physics and world space constraints for particles. In this chapter, the word constraint refers to an immovable object in the physics simulation.
Chapter 15, Manifolds and Impulses, extends the particle physics engine built in the last chapter by defining a rigid body object, which unlike a particle has some volume. Impulse-based collision resolution is also covered in this chapter.
Chapter 16, Springs and Joints, creates springs and simple joint constraints for springs. Using springs and particles, this chapter covers the basic concept of soft body physics. The chapter focuses on implementing 3D cloth using springs and particles.
Appendix, Advanced Topics, covers issues this book did not have the scope to address. Building a physics engine is a huge undertaking. While this book built a basic physics engine, there are many topics that fell outside the scope of this book. This chapter provides guidance, references, and resources to help the reader explore these advanced topics further.