class CParticleEmitter
{
public:
float * ParticlePositionsList;
float * ParticleColourList;
float * ParticleVelocityList;
void Initialize()
{
ParticlePositionsList = new float[ numParticles * (TrailLength+2) * 3 + 1 ];
ParticleColourList = new float[ numParticles * (TrailLength+2) * 4 + 1 ];
ParticleVelocityList = new float[ numParticles * 3 + 1 ];
if ( !ParticlePositionsList || !ParticleColourList || !ParticleVelocityList )
throw;
memset( ParticlePositionsList, 0, numParticles * (TrailLength+2) * 3 );
memset( ParticleColourList, 0, numParticles * (TrailLength+2) * 4 );
memset( ParticleVelocityList, 0, numParticles * 3 );
for ( int i = 0; i < numParticles; i++ )
ReSpawnParticle( i );
}
void Render()
{
int temp;
|