Hi,
I am working on a simple particle system, and am having a problem involving emitters.
The particle engine works roughly as follows:
Code:
class Emitter;
class ParticleEngine {
void update() {
for (each Emitter i) {
i->emit (this);
}
}
void addParticle () {
//...
}
}
class Emitter {
void emit (ParticleEngine* pe) {
pe->addParticle ();
}
}
The issue here is that both classes must be able to call methods on the other class. Is there any way to do a forward declaration of a class member? The alternative would be to have emit return a list of particles to add, but this seems simpler.