Ball and Spring Toy
Chapter 4 of Ian Parberry's "Introduction to Game Physics with Box2D"
 All Classes Files Functions Variables Enumerations Pages
Public Member Functions | Friends | List of all members
CObjectWorld Class Reference

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
 

Detailed Description

The object world.

Member Function Documentation

void CObjectWorld::CreateBody ( BodyType  b)

Create a pair of bodies.

Create a body.

Parameters
bType 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.