sio2_emitter.cc File Reference

#include "sio2.h"

Include dependency graph for sio2_emitter.cc:


Functions

SIO2emittersio2EmitterInit (char *_name)
SIO2emittersio2EmitterFree (SIO2emitter *_SIO2emitter)
void sio2EmitterCreate (SIO2emitter *_SIO2emitter, SIO2material *_SIO2material, SIO2particlecreation *_SIO2particlecreation, SIO2particleupdate *_SIO2particleupdate, vec3 *_att, unsigned int _maxp, float _pps, float _rad)
void sio2EmitterSetupParticles (SIO2emitter *_SIO2emitter)
void sio2EmitterResetParticles (SIO2emitter *_SIO2emitter)
void sio2EmitterRender (SIO2emitter *_SIO2emitter, SIO2window *_SIO2window, unsigned char _matrixtype)
void sio2EmitterReset (void)
void sio2EmitterPlay (SIO2emitter *_SIO2emitter)
void sio2EmitterPause (SIO2emitter *_SIO2emitter)
void sio2EmitterStop (SIO2emitter *_SIO2emitter)

Function Documentation

void sio2EmitterCreate ( SIO2emitter _SIO2emitter,
SIO2material _SIO2material,
SIO2particlecreation *  _SIO2particlecreation,
SIO2particleupdate *  _SIO2particleupdate,
vec3 _att,
unsigned int  _maxp,
float  _pps,
float  _rad 
)

Helper function that automatically assign all the necessary values to an emitter. You can always set them manually as in the tutorial12 of the SIO2 SDK. However this function also comes in handy when generating SIO2emitter in a real game scenario.

_SIO2emitter: A valid SIO2emitter pointer.
_SIO2material: A valid SIO2material pointer.
_SIO2particlecreation: The particle creation callback function.
_SIO2particleupdate: The particle update callback function.
_att: The attenuation factor based on the distance of the sprite on screen.
_maxp: The maximum of alive particle that the SIO2emitter should maintain.
_pps: The number of particle that should be emitted per second.
_rad: The radius of the SIO2emitter.

References SIO2emitter::_SIO2material, SIO2emitter::_SIO2particlecreation, SIO2emitter::_SIO2particleupdate, SIO2emitter::att, SIO2emitter::maxp, SIO2emitter::pps, SIO2emitter::rad, and sio2EmitterSetupParticles().

Here is the call graph for this function:

SIO2emitter* sio2EmitterFree ( SIO2emitter _SIO2emitter  ) 

Free a previously initialized SIO2emitter structure from the memory. The SIO2emitter will be removed from the global sio2 SIO2resource handle.

_SIO2emitter: The SIO2emitter handle to remove.

return a NULL SIO2camera pointer.

References SIO2::_SIO2resource, sio2, SIO2_EMITTER, sio2EmitterResetParticles(), and sio2ResourceDel().

Referenced by sio2ResourceUnload().

Here is the call graph for this function:

SIO2emitter* sio2EmitterInit ( char _name  ) 

Initialize a new SIO2emitter structure. This new SIO2emitter will be added to the global sio2 SIO2resource handle.

_name: The name to use for the new SIO2emitter.

return a new SIO2emitter structure pointer.

References SIO2::_SIO2resource, SIO2emitter::_SIO2transform, SIO2emitter::dst, SIO2emitter::name, sio2, SIO2_EMITTER, sio2ResourceAdd(), sio2StringCpy(), and sio2TransformLoadIdentity().

Here is the call graph for this function:

void sio2EmitterPause ( SIO2emitter _SIO2emitter  ) 

Set the playback state of the SIO2emitter to SIO2_PAUSE.

_SIO2emitter: A valid SIO2emitter pointer.

References SIO2_PAUSE, and SIO2emitter::state.

void sio2EmitterPlay ( SIO2emitter _SIO2emitter  ) 

Set the playback state of the SIO2emitter to SIO2_PLAY.

_SIO2emitter: A valid SIO2emitter pointer.

References SIO2_PLAY, and SIO2emitter::state.

void sio2EmitterRender ( SIO2emitter _SIO2emitter,
SIO2window _SIO2window,
unsigned char  _matrixtype 
)

void sio2EmitterReset ( void   ) 

Reset the OpenGL ES machine state that have been used to render the SIO2emitter.

References SIO2::_SIO2state, sio2, SIO2_COLOR_ARRAY, SIO2_POINT_SIZE_ARRAY, SIO2_POINT_SPRITE, and sio2StateDisable().

Referenced by sio2ResourceRender().

Here is the call graph for this function:

void sio2EmitterResetParticles ( SIO2emitter _SIO2emitter  ) 

Free all the particles of the SIO2emitter. You can use this function to destroy all particles previously created. Please take note that after calling this function you will need to call again sio2EmitterSetupParticles in order to re-create them and re-use the SIO2emitter.

_SIO2emitter: A valid SIO2emitter pointer.

References SIO2emitter::_SIO2particle, SIO2emitter::maxp, and sio2ParticleFree().

Referenced by sio2EmitterFree().

Here is the call graph for this function:

void sio2EmitterSetupParticles ( SIO2emitter _SIO2emitter  ) 

Function that generate all the particles refered by the maxp parameter. As the SIO2emitter should never go up this limit we can already safely assign the memory for it and re-use the particle as they become inactive.

_SIO2emitter: A valid SIO2emitter pointer.

References SIO2emitter::_SIO2particle, SIO2emitter::maxp, and sio2ParticleInit().

Referenced by sio2EmitterCreate().

Here is the call graph for this function:

void sio2EmitterStop ( SIO2emitter _SIO2emitter  ) 

Set the playback state of the SIO2emitter to SIO2_STOP.

_SIO2emitter: A valid SIO2emitter pointer.

References SIO2_STOP, and SIO2emitter::state.


Generated on Thu Mar 4 15:41:43 2010 for SIO2 Engine by  doxygen 1.5.6