DPS905 Kaitlyn ParticleEffects

From CDOT Wiki
Revision as of 18:57, 11 April 2011 by Dacallow (talk | contribs) (Created page with ' ************************************************************************************************** ** Particles …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
**************************************************************************************************
**   Particles                                                                                   *
**************************************************************************************************
*    April 2011
*    By Kaitlyn Callow ( KaitlynCallow.com | dacallow@learn.senecac.on.ca )
*    For DPS905, Professor Chris Szalwinski
**************************************************************************************************


INSTALLATION

1)

Add the following files to your project:


2)

Append onto the bottom of your existing Effects.fx file the contents of the following file:


Modify your files making the following changes:

3)

Modify iObject.h:

  • Add to Class iObject...
 //added for particle effects / animations
 virtual void update(int now) = 0;
  • At the bottom of the file iObject.h add...
extern "C"
iObject* CreateParticleGenerator(float _generatorlifespan, float _particlelifespan, float _particlespawnrate, float _spawnpositiondispersion,
float _theta, float _startingspeed, Colour _startcolour, Colour _endcolour, float _frequencycolour, float _startsize,
float _endsize, float _frequencysize, Vector _startgravity, Vector _endgravity, float _frequencygravityvertical,
float _frequencygravityhorizontal, float _startalpha, float _endalpha, float _frequencyalpha, Colour* c, float* p);