The Scene object

A 3D scene is a collection of models and primitives. The scene can have some optional acceleration structure, similar to how our mesh implementation contains an optional BVH. This acceleration structure is commonly implemented as an Octree, the same way the BVH we implemented for the mesh is an Octree.

One common misconception is that the same scene graph should be used for rendering as the one used for physics. In practice, the two systems need to track different data for different purposes. It makes sense to have a Render Scene and a Physics Scene, both of which contain the same objects, but track the objects in different ways. In this chapter, we will implement a Scene object that is limited to containing Model objects, and ...

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.