Box2D Cannon Game with Stars
Chapter 8 of Ian Parberry's "Introduction to Game Physics with Box2D"
 All Classes Files Functions Variables Enumerations Friends Pages
Public Member Functions | Protected Attributes | Friends | List of all members
CParticle Class Reference

The particle object. More...

#include <Particle.h>

Inheritance diagram for CParticle:
CGameObject

Public Member Functions

 CParticle (GameObjectType t)
 Constructor.
 
void Set (D3DXVECTOR2 p, int lifetime, float magnify)
 Set particle parameters.
 
- Public Member Functions inherited from CGameObject
 CGameObject (GameObjectType objecttype)
 Constructor.
 
 ~CGameObject ()
 Destructor.
 
void SetPhysicsBody (b2Body *b)
 Set pointer to physics world body.
 

Protected Attributes

D3DXVECTOR2 m_vLocation
 Current location.
 
float m_fAngle
 Current orientation.
 
int m_nBirthTime
 Time of creation.
 
int m_nLifeSpan
 Time it will live for.
 
float m_fMagnification
 Maximum size multiplier.
 
- Protected Attributes inherited from CGameObject
GameObjectType m_nObjectType
 Object type.
 
b2Body * m_pBody
 Physics World body.
 

Friends

class CObjectManager
 
class CParticleEngine
 
class CRenderWorld
 

Detailed Description

The particle object.

Constructor & Destructor Documentation

CParticle::CParticle ( GameObjectType  t)

Constructor.

Constructor.

Parameters
tObject type.

Member Function Documentation

void CParticle::Set ( D3DXVECTOR2  p,
int  lifetime,
float  magnify 
)

Set particle parameters.

Set particle-related parameter values.

Parameters
pLocation in Render World.
lifetimeExpected lifetime.
magnifyMaximum size multiplier.