28#ifndef __ParticleEmitter_H__
29#define __ParticleEmitter_H__
Class representing colour.
Command object for ParticleEmitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
Abstract class defining the interface to be implemented by particle emitters.
virtual const ColourValue & getColour(void) const
Gets the colour of particles to be emitted.
Real mMinTTL
Initial time-to-live of particles (min)
virtual void setTimeToLive(Real minTtl, Real maxTtl)
Sets the range of lifetime for particles emitted.
Vector3 mPosition
Position relative to the center of the ParticleSystem.
static EmitterCommands::CmdMaxTTL msMaxTTLCmd
String mType
Name of the type of emitter, MUST be initialised by subclasses.
static EmitterCommands::CmdEmissionRate msEmissionRateCmd
virtual void setEmitted(bool emitted)
Set the indication (true/false) to indicate that the emitter is emitted by another emitter.
static EmitterCommands::CmdMinTTL msMinTTLCmd
static EmitterCommands::CmdMinVelocity msMinVelocityCmd
virtual Real getStartTime(void) const
Gets the start time of the emitter.
virtual void setColourRangeStart(const ColourValue &colour)
Sets the minimum colour of particles to be emitted.
static EmitterCommands::CmdDirPositionRef msDirPositionRefCmd
virtual Real getDuration(void) const
Gets the duration of the emitter from when it is created or re-enabled.
virtual Real getMaxTimeToLive(void) const
Gets the maximum time each particle will live for.
Real mRepeatDelayRemain
Repeat delay left.
virtual void setMaxRepeatDelay(Real max)
Sets the maximum duration of this emitter in seconds (see setRepeatDelay for more details)
virtual Real getRepeatDelay(void) const
Gets the duration of the emitter from when it is created or re-enabled.
bool mEnabled
Whether this emitter is currently enabled (defaults to true)
virtual void genEmissionDirection(const Vector3 &particlePos, Vector3 &destVector)
Internal utility method for generating particle exit direction.
virtual void setDuration(Real min, Real max)
Sets the range of random duration for this emitter.
virtual Real getMinRepeatDelay(void) const
Gets the minimum duration of this emitter in seconds (see setRepeatDelay for more details)
Real mMaxTTL
Initial time-to-live of particles (max)
virtual const ColourValue & getColourRangeStart(void) const
Gets the minimum colour of particles to be emitted.
virtual bool getDirPositionReferenceEnabled() const
Returns whether direction or position reference is used.
virtual unsigned short genConstantEmissionCount(Real timeElapsed)
Internal utility method for generating an emission count based on a constant emission rate.
static EmitterCommands::CmdDirection msDirectionCmd
Real mRepeatDelayMin
Time between each repeat.
virtual void _initParticle(Particle *pParticle)
Initialises a particle based on the emitter's approach and parameters.
Vector3 mUp
Notional up vector, used to speed up generation of variant directions, and also to orient some emitte...
Real mDurationMax
Maximum length of time the emitter will run for (0 = forever)
static EmitterCommands::CmdName msNameCmd
Radian mAngle
Angle around direction which particles may be emitted, internally radians but angleunits for interfac...
virtual void setRepeatDelay(Real min, Real max)
Sets the range of random duration for this emitter.
static EmitterCommands::CmdMinRepeatDelay msMinRepeatDelayCmd
virtual Real getTimeToLive(void) const
Gets the time each particle will live for.
static EmitterCommands::CmdColour msColourCmd
virtual Real getMaxDuration(void) const
Gets the maximum duration of this emitter in seconds (see setDuration for more details)
ColourValue mColourRangeStart
Initial colour of particles (range start)
virtual void setUp(const Vector3 &up)
Sets the notional up vector of the emitter.
String mEmittedEmitter
The name of the emitter to be emitted (optional)
virtual Real getEmissionRate(void) const
Returns the emission rate set for this emitter.
Real mMinSpeed
Min speed of particles.
Real mStartTime
Start time (in seconds from start of first call to ParticleSystem to update)
virtual const Vector3 & getDirPositionReference() const
Returns the position reference to generate direction of emitted particles.
virtual bool isEmitted(void) const
Return true if the emitter is emitted by another emitter.
virtual void setParticleVelocity(Real speed)
Sets the initial velocity of particles emitted.
virtual Real getMinTimeToLive(void) const
Gets the minimum time each particle will live for.
virtual void setColourRangeEnd(const ColourValue &colour)
Sets the maximum colour of particles to be emitted.
static EmitterCommands::CmdUp msUpCmd
virtual const Vector3 & getPosition(void) const
Returns the position of this emitter relative to the center of the particle system.
virtual void setMinTimeToLive(Real min)
Sets the minimum time each particle will live for.
virtual void setDirPositionReference(const Vector3 &position, bool enable)
Sets the direction of the emitter.
virtual void setMinParticleVelocity(Real min)
Returns the minimum particle velocity.
virtual Real getMinDuration(void) const
Gets the minimum duration of this emitter in seconds (see setDuration for more details)
virtual void setMinDuration(Real min)
Sets the minimum duration of this emitter in seconds (see setDuration for more details)
ParticleSystem * mParent
Parent particle system.
ParticleEmitter(ParticleSystem *psys)
virtual unsigned short _getEmissionCount(Real timeElapsed)=0
Gets the number of particles which this emitter would like to emit based on the time elapsed.
static EmitterCommands::CmdMaxVelocity msMaxVelocityCmd
Real mMaxSpeed
Max speed of particles.
virtual void setDuration(Real duration)
Sets the duration of the emitter.
static EmitterCommands::CmdRepeatDelay msRepeatDelayCmd
virtual const Radian & getAngle(void) const
Returns the maximum angle which the initial particle direction can deviate from the emitters base dir...
virtual void setColour(const ColourValue &colourStart, const ColourValue &colourEnd)
Sets the range of colours for emitted particles.
const String & getType(void) const
Returns the name of the type of emitter.
virtual void setColour(const ColourValue &colour)
Sets the initial colour of particles emitted.
virtual const Vector3 & getUp(void) const
Returns the up vector of the emitter.
static EmitterCommands::CmdAngle msAngleCmd
Real mEmissionRate
Rate in particles per second at which this emitter wishes to emit particles.
void initDurationRepeat(void)
Internal method for initialising the duration & repeat of an emitter.
virtual ~ParticleEmitter()
Virtual destructor essential.
static EmitterCommands::CmdMinDuration msMinDurationCmd
virtual void setParticleVelocity(Real min, Real max)
Sets the initial velocity range of particles emitted.
virtual void setStartTime(Real startTime)
Sets the 'start time' of this emitter.
virtual void setMaxDuration(Real max)
Sets the maximum duration of this emitter in seconds (see setDuration for more details)
virtual void setRepeatDelay(Real duration)
Sets the time between repeats of the emitter.
virtual bool getEnabled(void) const
Gets the flag indicating if this emitter is enabled or not.
virtual Real getMaxParticleVelocity(void) const
Returns the maximum particle velocity.
virtual void setEnabled(bool enabled)
Sets whether or not the emitter is enabled.
Vector3 mDirection
Base direction of the emitter, may not be used by some emitters.
virtual void setTimeToLive(Real ttl)
Sets the lifetime of all particles emitted.
virtual void setName(const String &newName)
Sets the name of the emitter.
virtual const Vector3 & getDirection(void) const
Returns the base direction of the emitter.
static EmitterCommands::CmdColourRangeEnd msColourRangeEndCmd
virtual void setPosition(const Vector3 &pos)
Sets the position of this emitter relative to the particle system center.
virtual void genEmissionVelocity(Vector3 &destVector)
Internal utility method to apply velocity to a particle direction.
String mName
The name of the emitter. The name is optional unless it is used as an emitter that is emitted itself.
static EmitterCommands::CmdColourRangeStart msColourRangeStartCmd
static EmitterCommands::CmdMaxDuration msMaxDurationCmd
virtual Real getParticleVelocity(void) const
Returns the initial velocity of particles emitted.
virtual Real getMinParticleVelocity(void) const
Returns the minimum particle velocity.
virtual const ColourValue & getColourRangeEnd(void) const
Gets the maximum colour of particles to be emitted.
static EmitterCommands::CmdVelocity msVelocityCmd
static EmitterCommands::CmdPosition msPositionCmd
void addBaseParameters(void)
Internal method for setting up the basic parameter definitions for a subclass.
virtual void setMaxTimeToLive(Real max)
Sets the maximum time each particle will live for.
virtual void setEmissionRate(Real particlesPerSecond)
Sets the emission rate for this emitter.
ColourValue mColourRangeEnd
Initial colour of particles (range end)
static EmitterCommands::CmdEmittedEmitter msEmittedEmitterCmd
virtual void genEmissionColour(ColourValue &destColour)
Internal utility method for generating a colour for a particle.
bool mUseDirPositionRef
When true, mDirPositionRef is used instead of mDirection to generate particles.
Real mDurationRemain
Current duration remainder.
virtual Real getMaxRepeatDelay(void) const
Gets the maximum duration of this emitter in seconds (see setRepeatDelay for more details)
static EmitterCommands::CmdTTL msTTLCmd
virtual void setMaxParticleVelocity(Real max)
Returns the maximum particle velocity.
virtual void setAngle(const Radian &angle)
Sets the maximum angle away from the emitter direction which particle will be emitted.
virtual Real genEmissionTTL(void)
Internal utility method for generating a time-to-live for a particle.
static EmitterCommands::CmdDuration msDurationCmd
virtual void setMinRepeatDelay(Real min)
Sets the minimum duration of this emitter in seconds (see setRepeatDelay for more details)
virtual void setEmittedEmitter(const String &emittedEmitter)
Sets the name of the emitter to be emitted.
static EmitterCommands::CmdMaxRepeatDelay msMaxRepeatDelayCmd
virtual void setDirection(const Vector3 &direction)
Sets the direction of the emitter.
const String & getEmittedEmitter(void) const
Returns the name of the emitter to be emitted.
const String & getName(void) const
Returns the name of the emitter.
Real mDurationMin
Minimum length of time emitter will run for (0 = forever)
Class defining particle system based special effects.
Class representing a single particle instance.
Wrapper class which indicates a given angle value is in Radians.
Reference-counted shared pointer, used for objects where implicit destruction is required.
Class defining the common interface which classes can use to present a reflection-style,...
Standard 3-dimensional vector.