Ball and Spring Toy
Chapter 4 of Ian Parberry's "Introduction to Game Physics with Box2D"
|
The object world. More...
#include <ObjectWorld.h>
Public Member Functions | |
void | clear () |
Clear objects. | |
void | move () |
void | draw () |
void | DeliverImpulse () |
Apply impulse to the current bodies. | |
void | CreateBody (BodyType b) |
Create a pair of bodies. | |
Friends | |
class | CBody |
The object world.
void CObjectWorld::CreateBody | ( | BodyType | b | ) |
Create a pair of bodies.
Create a body.
b | Type of body to be created. |
void CObjectWorld::move | ( | ) |
Move the particles, perform Gauss-Seidel relaxation on the springs, and recompute the spring centers based on the position of the particles that they are connected to.