Chapter 13. Camera and Frustum

In this chapter, we will explore some rendering related functionality. We are going to explore creating a camera and controlling that camera to help us visualize the physics demos that we will create in the next chapter. This chapter will cover the following topics:

  • Camera object
  • Camera controls
  • Frustum object
  • Frustum from matrix
  • Sphere in frustum
  • Bounding Box in frustum
  • Octree culling
  • Picking

Introduction

In this chapter, we are going to build a camera. This camera should let us view the 3D scene we created in the last chapter. A camera might not seem relevant to physics, but we need a way to visualize everything which we are doing. As we build up the camera, you will find that most of the work revolves around matrix math ...

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.