A particle network is a reusable asset that allows you defines how particles contained inside a ParticleSystem will behave.
One or more ParticleEmitter is declared and is responsible for a specific type of particle. As an example to describe what a ParticleNetwork is let take a fire. The fire is the ParticleNetwork, inside the network multiple ParticleEmitter are added. One that is responsible for emitting the smoke particles, another one the sparks and the last one the flames.
Once this fire ParticleNetwork is created it can be assigned to one or multiple ParticleSystem and run as an instance, a template or as a full copy.
See Also
Static Variables
Functions
Name | Description |
AddParticleEmitter | Create an append a new ParticleEmitter to the active ParticleSystem. |
Declaration ParticleEmitter *AddParticleEmitter( const char *name ) Parameters
Return Value
A new ParticleEmitter reference.
|
GetParticleEmitter | Retrieve an existing ParticleEmitter connected to the active ParticleNetwork by name. |
Declaration ParticleEmitter *GetParticleEmitter( const char *name ) Parameters
Return Value
On success return a valid ParticleEmitter; return nil if the name does not match any ParticleEmitter associated to the current ParticleNetwork.
|
GetParticleEmitterAt | Get an existing ParticleEmitter reference using its index as key. |
Declaration ParticleEmitter *GetParticleEmitterAt( unsigned char index ) Parameters
Return Value
A valid ParticleEmitter reference if the index is valid; else return nil .
|
GetParticleEmitterIndex | Retrieve the current index of an existing ParticleEmitter. |
Declaration int GetParticleEmitterIndex( const ParticleEmitter *particleemitter ) Parameters
Return Value
-1 if the reference received in parameter is invalid; else return the ParticleEmitter reference index.
|
SetParticleEmitterIndex | Change the current index of a ParticleEmitter. |
Declaration bool SetParticleEmitterIndex( ParticleEmitter *particleemitter, const unsigned char index ) Parameters
particleemitter : The source ParticleEmitter.
index : The target location index.
Return Value
true if the reference provided is valid as well as the target index. Else return false .
|
RemoveParticleEmitter | Remove a specific ParticleEmitter. |
Declaration bool RemoveParticleEmitter( ParticleEmitter *particleemitter ) Parameters
Return Value
true is the operation succeed; false if the reference received in parameter does not correspond to any ParticleEmitter attached to the active ParticleNetwork.
|
RemoveParticleEmitterAt | Remove an existing ParticleEmitter by index. |
Declaration bool RemoveParticleEmitterAt( int index ) Parameters
Return Value
true if removed successfully; false if the index is invalid.
|
SwapParticleEmitters | Exchange the location of two ParticleEmitter. |
Declaration bool SwapParticleEmitters( unsigned char index0, unsigned char index1 ) Parameters
index0 : The source index.
index1 : The destination index.
Return Value
true if both indexes are valid; else return false .
|