SIO2emitter Struct Reference

#include <sio2_emitter.h>

Collaboration diagram for SIO2emitter:

Collaboration graph
[legend]

List of all members.

Public Attributes

char name [SIO2_MAX_CHAR]
 The name of the SIO2emitter.
float rad
 The radius of the SIO2emitter.
float dst
 The distance of the SIO2emitter in the frustum (if visible).
vec3 att
 The attenuation factor of the point sprite.
unsigned int maxp
 The maximum amount of particles currently alive.
float d_time
 The delta time used to emit the particles.
float pps
 The number of particles per second. Value that will be tested against the current d_time.
unsigned char state
 The playback state of the SIO2emitter.
unsigned int n_particle
 The number of particles currently active.
SIO2particle ** _SIO2particle
 For every particle in n_particle a new SIO2particle will be generated.
SIO2material_SIO2material
 The material to apply on all particles when rendering.
SIO2particlecreation * _SIO2particlecreation
 The particle creation function callback.
SIO2particleupdate * _SIO2particleupdate
 The particle update function callback.
SIO2ipo_SIO2ipo
 The IPO pointer attached to the SIO2emitter.
SIO2transform _SIO2transform
 The transformation matrix of the pivot point of the SIO2emitter.


Member Data Documentation

char SIO2emitter::name[SIO2_MAX_CHAR]

The name of the SIO2emitter.

Referenced by sio2EmitterInit(), and sio2ResourceGet().

The radius of the SIO2emitter.

The radius is also used internally to do the clipping with the camera frustum. Make sure that you set a respectable value depending on how far your particle system will emit particles.

Referenced by sio2EmitterCreate(), and sio2ResourceCull().

The distance of the SIO2emitter in the frustum (if visible).

The distance is also used internally by the engine to check if the SIO2emitter should be rendered or not. Any value greated than 0.0f will cause the SIO2emitter to be rendered by the sio2ResourceRender function if the mask SIO2_RENDER_EMITTER is passed to the function.

Referenced by sio2EmitterInit(), sio2EmitterRender(), and sio2ResourceCull().

The attenuation factor of the point sprite.

For more information about the calculations check how the GL_POINT_DISTANCE_ATTENUATION is used by OpenGL.

http://www.opengl.org/sdk/docs/man/xhtml/glPointParameter.xml

Referenced by sio2EmitterCreate().

unsigned int SIO2emitter::maxp

The maximum amount of particles currently alive.

Referenced by sio2EmitterCreate(), sio2EmitterRender(), sio2EmitterResetParticles(), and sio2EmitterSetupParticles().

The delta time used to emit the particles.

Referenced by sio2EmitterRender().

The number of particles per second. Value that will be tested against the current d_time.

This determine basically how fast the particles are emitted. Please take note that in any case whatever this value is the number of particles will be clamped to the maxp value.

This value should be set with something like 1.0f / 60.0f, which will represent that 60 particles will be generated every seconds. Their lifetime should be synchronized with the maxp values in order to avoid clamping, and make the SIO2emitter run appropriately.

Referenced by sio2EmitterCreate(), and sio2EmitterRender().

The playback state of the SIO2emitter.

This state will basically takes one of the following values:

SIO2_PLAY
SIO2_PAUSE
SIO2_STOP

You can change the state of the SIO2emitter manually or use one of the following function to do so:

sio2EmitterPlay
sio2EmitterPause
sio2EmitterStop

Referenced by sio2EmitterPause(), sio2EmitterPlay(), sio2EmitterRender(), and sio2EmitterStop().

The number of particles currently active.

Referenced by sio2EmitterRender().

For every particle in n_particle a new SIO2particle will be generated.

Referenced by sio2EmitterRender(), sio2EmitterResetParticles(), and sio2EmitterSetupParticles().

The material to apply on all particles when rendering.

Referenced by sio2EmitterCreate(), and sio2EmitterRender().

SIO2particlecreation* SIO2emitter::_SIO2particlecreation

The particle creation function callback.

When set, everytime a new particle is created this function is called after the memory creation of the particle. The particle pointer that is dispatched to this function is always set to the default values. It is the job of the programmer to setup the good value that he wants to use for the particle such as color, position etc... If you are looking for making something like an explosion, you could also disable this function callback after x number of particles generated and cause the emitter to stop emitting until the SIO2particlecreation callback is re-assigned.

Referenced by sio2EmitterCreate(), and sio2EmitterRender().

SIO2particleupdate* SIO2emitter::_SIO2particleupdate

The particle update function callback.

This function callback is called everytime a particle have to be updated and occurs on every frame after rendering. This is the appropriate location to update the position or any other variables that you would like to apply on your particle in order to update their current states.

Referenced by sio2EmitterCreate(), and sio2EmitterRender().

The IPO pointer attached to the SIO2emitter.

Referenced by sio2EmitterRender().

The transformation matrix of the pivot point of the SIO2emitter.

Referenced by sio2EmitterInit(), sio2EmitterRender(), and sio2ResourceCull().


The documentation for this struct was generated from the following file:

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