Particle Modifications

In this chapter, we will attach particles to springs to create a point mass system. A point mass system contains a number of points that have mass, but not volume. A particle fits this description perfectly. However, as it is, the Particle class does not expose all the functions that we need to achieve this. In order to develop the point mass system, we need to make a few modifications to the Particle class we developed in Chapter 14, Constraint Solving.

Getting ready

In this section, we will make several modifications to the public API of the Particle class. We will introduce setter functions for the mass and friction of particles. We will also introduce getter functions for the velocity and inverse mass of particles. Finally, ...

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.