|
Untold Engine
Beta v0.0.16
docs
|
The U4DParticleEmitter class contains all the methods required for the computation of the position, colors and behaviors of the particles. More...
Inherits U4DEngine::U4DParticleEmitterInterface.
Inherited by U4DEngine::U4DParticleEmitterLinear, U4DEngine::U4DParticleEmitterSphere, and U4DEngine::U4DParticleEmitterTorus.
Public Member Functions | |
| U4DParticleEmitter () | |
| class constructor | |
| ~U4DParticleEmitter () | |
| class destructor | |
| void | emitParticles () |
| emit particles More... | |
| virtual void | computeVelocity (U4DParticle *uParticle) |
| Computes the velocity of the 3D particle. More... | |
| virtual void | computeRadialAcceleration (U4DParticle *uParticle) |
| computes the radial acceleration of the 3D particle More... | |
| virtual void | computeTangentialAcceleration (U4DParticle *uParticle) |
| computes the tangential acceleration of the 3D particle More... | |
| float | getRandomNumberBetween (float uMinValue, float uMaxValue) |
| compute random number More... | |
| void | computeVariance (U4DVector3n &uVector, U4DVector3n &uVectorVariance) |
| Computes the variance of vectors. More... | |
| void | computeVariance (U4DVector4n &uVector, U4DVector4n &uVectorVariance) |
| Computes the variance of vectors. More... | |
| void | computeVariance (float &uValue, float &uValueVariance) |
| Computes the variance of a particular value. More... | |
| void | computePosition (U4DParticle *uParticle) |
| computes the position of the 3D particle More... | |
| void | computeColors (U4DParticle *uParticle) |
| computes the color of the 3D particle More... | |
| void | computeScale (U4DParticle *uParticle) |
| computes the scale of the 3D particle More... | |
| void | decreaseNumberOfEmittedParticles () |
| decreases the number of particles emitted More... | |
| int | getNumberOfEmittedParticles () |
| Gets the current number of emitted particles. More... | |
| void | setNumberOfParticlesPerEmission (int uNumberOfParticles) |
| sets the number of particles to emit per emission More... | |
| void | setParticleEmissionRate (float uEmissionRate) |
| sets the emission rate. More... | |
| void | setParticleSystem (U4DParticleSystem *uParticleSystem) |
| sets the pointer to the Particle System More... | |
| void | setParticleData (U4DParticleData &uParticleData) |
| sets the pointer to the Particle Data More... | |
| void | setEmitContinuously (bool uValue) |
| sets if the particle should emit the particles continuously More... | |
| float | mix (float x, float y, float a) |
| linearly interpolates between two values More... | |
| void | play () |
| Starts the emission of particles. | |
| void | stop () |
| stops the emission of particles | |
| void | negateEmitterDurationFlag () |
| negate the emitterDurationFlag | |
| void | setEmitterDurationRate (float uEmitterDurationRate) |
| sets the emitter duration rate More... | |
| void | computeRotation (U4DParticle *uParticle) |
| computes the rotation of the 3D particle More... | |
Public Member Functions inherited from U4DEngine::U4DParticleEmitterInterface | |
| virtual | ~U4DParticleEmitterInterface () |
| interface destructor | |
Protected Attributes | |
| int | emittedNumberOfParticles |
| number of particles to emit | |
| int | numberOfParticlesPerEmission |
| numer of particles per emission | |
| float | emissionRate |
| emission rate of particles | |
| float | emitterDurationRate |
| duration of how long the emitter will emit | |
| U4DCallback< U4DParticleEmitter > * | emitterRateScheduler |
| pointer to Callback to schedule the emission rate | |
| U4DTimer * | emitterRateTimer |
| pointer to a timer used in the callback | |
| U4DCallback< U4DParticleEmitter > * | emitterDurationScheduler |
| pointer to Callback to schedule the emission duration | |
| U4DTimer * | emitterDurationTimer |
| pointer to a timer used in the callback | |
| U4DParticleSystem * | particleSystem |
| pointer to the Particle System object | |
| U4DParticleData | particleData |
| pointer to the Particle Data object | |
| bool | emitContinuously |
| variable to set whether to emit particles continuously | |
The U4DParticleEmitter class contains all the methods required for the computation of the position, colors and behaviors of the particles.
|
virtual |
computes the color of the 3D particle
| uParticle | pointer to the 3D particle |
Implements U4DEngine::U4DParticleEmitterInterface.
|
virtual |
computes the position of the 3D particle
| uParticle | pointer to the 3D particle |
Implements U4DEngine::U4DParticleEmitterInterface.
|
inlinevirtual |
computes the radial acceleration of the 3D particle
| uParticle | pointer to the 3D particle |
Implements U4DEngine::U4DParticleEmitterInterface.
Reimplemented in U4DEngine::U4DParticleEmitterLinear.
|
virtual |
computes the rotation of the 3D particle
| uParticle | pointer to the 3D particle |
Implements U4DEngine::U4DParticleEmitterInterface.
|
virtual |
computes the scale of the 3D particle
| uParticle | pointer to the 3D particle |
Implements U4DEngine::U4DParticleEmitterInterface.
|
inlinevirtual |
computes the tangential acceleration of the 3D particle
| uParticle | pointer to the 3D particle |
Implements U4DEngine::U4DParticleEmitterInterface.
Reimplemented in U4DEngine::U4DParticleEmitterLinear.
| void U4DEngine::U4DParticleEmitter::computeVariance | ( | float & | uValue, |
| float & | uValueVariance | ||
| ) |
Computes the variance of a particular value.
| uVector | vector representing main value |
| uVectorVariance | desired value variance range |
| void U4DEngine::U4DParticleEmitter::computeVariance | ( | U4DVector3n & | uVector, |
| U4DVector3n & | uVectorVariance | ||
| ) |
Computes the variance of vectors.
| uVector | vector representing main vector |
| uVectorVariance | desired vector variance range |
| void U4DEngine::U4DParticleEmitter::computeVariance | ( | U4DVector4n & | uVector, |
| U4DVector4n & | uVectorVariance | ||
| ) |
Computes the variance of vectors.
| uVector | vector representing main vector |
| uVectorVariance | desired vector variance range |
|
inlinevirtual |
Computes the velocity of the 3D particle.
| uParticle | pointer to the 3D particle |
Implements U4DEngine::U4DParticleEmitterInterface.
Reimplemented in U4DEngine::U4DParticleEmitterLinear, U4DEngine::U4DParticleEmitterSphere, and U4DEngine::U4DParticleEmitterTorus.
|
virtual |
decreases the number of particles emitted
If a particle's life is up, this method is called to update the current count of alive particles and the dead particle is removed from the scenegraph
Implements U4DEngine::U4DParticleEmitterInterface.
|
virtual |
emit particles
once the position, color and velocity of the particle has been computed, the particle is loaded into the particle's system scenegraph
Implements U4DEngine::U4DParticleEmitterInterface.
|
virtual |
Gets the current number of emitted particles.
Implements U4DEngine::U4DParticleEmitterInterface.
| float U4DEngine::U4DParticleEmitter::getRandomNumberBetween | ( | float | uMinValue, |
| float | uMaxValue | ||
| ) |
compute random number
used to give randomness to the computation of colors and position variance
| uMinValue | min value |
| uMaxValue | max value |
| float U4DEngine::U4DParticleEmitter::mix | ( | float | x, |
| float | y, | ||
| float | a | ||
| ) |
linearly interpolates between two values
| x | Specify the start of range in which to interpolate |
| y | Specify the end of range in which to interpolate |
| a | Specify the value to use to interpolate between x and y |
|
virtual |
sets if the particle should emit the particles continuously
| uValue | true for continuous emission, false for only one emission |
Implements U4DEngine::U4DParticleEmitterInterface.
|
virtual |
sets the emitter duration rate
| uEmitterDurationRate | emitter duration rate |
Implements U4DEngine::U4DParticleEmitterInterface.
|
virtual |
sets the number of particles to emit per emission
| uNumberOfParticles | number of particles |
Implements U4DEngine::U4DParticleEmitterInterface.
|
virtual |
sets the pointer to the Particle Data
| uParticleData | pointer to the Particle Data |
Implements U4DEngine::U4DParticleEmitterInterface.
|
virtual |
sets the emission rate.
This rate sets how often to emit particles. The lower the value, the more frequent the emision
| uEmissionRate | emission rate |
Implements U4DEngine::U4DParticleEmitterInterface.
|
virtual |
sets the pointer to the Particle System
| uParticleSystem | pointer to particle system |
Implements U4DEngine::U4DParticleEmitterInterface.