Cloning Particle Systems

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
impulse3d
Posts: 17
Joined: Wed Jun 04, 2008 7:23 pm

Cloning Particle Systems

Post by impulse3d »

Hi,

I've tried searching but have been unable to locate any helpful threads.

I'm wondering if it's possible to clone a particle system that has been created and designed in IrrEdit. I could easily code up my own particle systems and trivially make more of them on a whim, but the ability to visually design your particle system and tweak parameters in real time is great. Therefore, I'm wondering if there's some sort of clone method that will duplicate ParticleSystemSceneNodes.

Any help is appreciated. Thanks!
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

The infrastructure is there, but nobody has implemented it for particle systems. The ISceneNode interface provides a clone() method that is to be overridden by all derived classes. It just isn't overridden for CParticleSystemSceneNode.

Once the clone() method was overloaded you'd just write

Code: Select all

scene:ISceneNode* newParticleSystem = particleSystem->clone();
To do it right, you would probably want to add a clone() to both IParticleEmitter and IParticleAffector so that you could create copies of the emitter and affectors for the particle systems, so that they could be edited independently for

Unfortunately, somebody decided that clone() should clone a node and it's children instead of just cloning the node itself. That and the cloneMembers() method should have been made virtual...

Travis
Post Reply