Chapter 7. 3D Primitive Shapes

Having covered 2D intersections, we are not ready to jump into 3D! Before we get into the specifics of how 3D intersections work, we must define several 3D primitives that we will be using throughout the rest of this book. In this chapter, we are going to cover the following 3D primitive shapes:

  • Point
  • Line
  • Ray
  • Sphere
  • AABB (Axis Aligned Bounding Box)
  • OBB (Oriented Bounding Box )
  • Plane
  • Triangle

Introduction

The concepts in this chapter will look familiar. This is because most 3D primitives have 2D counterparts, which we have already covered in Chapter 4, 2D Primitive Shapes. Having a strong understanding of the primitives covered in this chapter will be essential in creating the final physics engine of this book.

Get Game Physics Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.