Chapter 11. Triangles and Meshes

In this chapter, we are going to cover intersection tests for a triangle. We defined the triangle in Chapter 7, 3D Primitive Shapes. Once the collision cases for a triangle are covered, we will create a more complicated mesh shape out of many triangles. This chapter will cover the following topics:

  • Point in triangle
  • Closest point triangle
  • Triangle to sphere
  • Triangle to Axis Aligned Bounding Box (AABB)
  • Triangle to Oriented Bounding Box (OBB)
  • Triangle to plane
  • Triangle to triangle
  • Robustness of the Separating Axis Theorem
  • Raycast triangle
  • Linetest triangle
  • Mesh object
  • Mesh optimization
  • Mesh operations

Introduction

Triangles are unique as they are represented by three coplanar points. This means that a triangle will always be on ...

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.