
Go to the source code of this file.
Classes | |
| struct | SIO2emitter |
Functions | |
| SIO2emitter * | sio2EmitterInit (char *) |
| SIO2emitter * | sio2EmitterFree (SIO2emitter *) |
| void | sio2EmitterCreate (SIO2emitter *, SIO2material *, SIO2particlecreation *, SIO2particleupdate *, vec3 *, unsigned int, float, float) |
| void | sio2EmitterSetupParticles (SIO2emitter *) |
| void | sio2EmitterResetParticles (SIO2emitter *) |
| void | sio2EmitterRender (SIO2emitter *, SIO2window *, unsigned char) |
| void | sio2EmitterReset (void) |
| void | sio2EmitterPlay (SIO2emitter *) |
| void | sio2EmitterPause (SIO2emitter *) |
| void | sio2EmitterStop (SIO2emitter *) |
| 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().

| 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().

| 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().

| 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 | |||
| ) |
Render an SIO2emitter.
_SIO2emitter: A valid SIO2emitter pointer.
_SIO2window: A valid SIO2window pointer. The SIO2window is used for the current delta time value.
_matrixtype: The type of SIO2transform that should be called. This value should be one of the following matrix type that should be used:
SIO2_TRANSFORM_MATRIX_BIND
SIO2_TRANSFORM_MATRIX_APPLY
References SIO2emitter::_SIO2ipo, SIO2emitter::_SIO2material, SIO2emitter::_SIO2particle, SIO2emitter::_SIO2particlecreation, SIO2emitter::_SIO2particleupdate, SIO2::_SIO2state, SIO2ipo::_SIO2transform, SIO2emitter::_SIO2transform, SIO2particle::col, SIO2window::d_time, SIO2emitter::d_time, SIO2emitter::dst, SIO2particle::lifetime, SIO2particle::loc, SIO2transform::loc, SIO2transform::mat, SIO2emitter::maxp, SIO2emitter::n_particle, SIO2emitter::pps, SIO2transform::rot, SIO2transform::scl, sio2, SIO2_COLOR_ARRAY, SIO2_PLAY, SIO2_POINT_SIZE_ARRAY, SIO2_POINT_SPRITE, SIO2_TRANSFORM_MATRIX_APPLY, SIO2_TRANSFORM_MATRIX_BIND, SIO2_VERTEX_ARRAY, sio2MaterialRender(), sio2MaterialReset(), sio2StateEnable(), sio2TransformApply(), sio2TransformRender(), sio2TransformSetLoc(), sio2TransformSetMatrix(), sio2TransformSetRot(), sio2TransformSetScl(), SIO2particle::size, SIO2ipo::state, and SIO2emitter::state.
Referenced by sio2ResourceRender().

| 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().

| 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().

| 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().

| 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.
1.5.6