March 2017
Intermediate to advanced
480 pages
11h 3m
English
In the last section of this chapter, we will build a stable Cloth class. This class contains a set of particles and three spring systems. For the cloth to actually work, we have to call its physics simulation functions every frame. In this section, we will add cloth support to the PhysicsSystem.
In this section, we will make several modifications to the PhysicsSystem class to add support for cloth simulation.
Perform the following steps to add cloth support to our physics system:
Cloth.h header file in PhysicsSystem.h. Add a vector of Cloth pointers to the PhysicsSystem class. Add a function to register a new cloth into the vector and a function to clear the vector:// Start of file ...
Read now
Unlock full access