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
CParticle Class Reference

The particle. More...

#include <Particle.h>

Public Member Functions

 CParticle (SpriteType sprite, D3DXVECTOR2 position)
 Constructor.
 
 CParticle ()
 Constructor.
 
void move ()
 Change position depending on time and velocity.
 
void DeliverImpulse (float angle, float magnitude)
 Deliver an impulse.
 

Friends

class CParticleManager
 
class CSpring
 
class CSpringManager
 
class CObjectWorld
 
class CBody
 

Detailed Description

The particle.

Member Function Documentation

void CParticle::DeliverImpulse ( float  angle,
float  magnitude 
)

Deliver an impulse.

Deliver an impulse to the particle, given the angle and magnitude.

Parameters
angleAngle at which the impulse is to be applied.
magnitudeMagnitude of the impulse to apply.
void CParticle::move ( )

Change position depending on time and velocity.

Move the particle, apply collision and response.