28 #ifndef __ParticleEmitter_H__
29 #define __ParticleEmitter_H__
165 virtual void genEmissionDirection(
Vector3& destVector);
171 virtual void genEmissionVelocity(
Vector3& destVector);
174 virtual Real genEmissionTTL(
void);
177 virtual void genEmissionColour(
ColourValue& destColour);
180 virtual unsigned short genConstantEmissionCount(
Real timeElapsed);
190 void addBaseParameters(
void);
193 void initDurationRepeat(
void);
202 virtual void setPosition(
const Vector3& pos);
205 virtual const Vector3& getPosition(
void)
const;
218 virtual void setDirection(
const Vector3& direction);
221 virtual const Vector3& getDirection(
void)
const;
231 virtual void setUp(
const Vector3& up);
234 virtual const Vector3& getUp(
void)
const;
246 virtual void setAngle(
const Radian& angle);
249 virtual const Radian& getAngle(
void)
const;
258 virtual void setParticleVelocity(
Real speed);
270 virtual void setParticleVelocity(
Real min,
Real max);
272 virtual void setMinParticleVelocity(
Real min);
274 virtual void setMaxParticleVelocity(
Real max);
277 virtual Real getParticleVelocity(
void)
const;
280 virtual Real getMinParticleVelocity(
void)
const;
283 virtual Real getMaxParticleVelocity(
void)
const;
297 virtual void setEmissionRate(
Real particlesPerSecond);
300 virtual Real getEmissionRate(
void)
const;
312 virtual void setTimeToLive(
Real ttl);
326 virtual void setTimeToLive(
Real minTtl,
Real maxTtl);
329 virtual void setMinTimeToLive(
Real min);
331 virtual void setMaxTimeToLive(
Real max);
334 virtual Real getTimeToLive(
void)
const;
337 virtual Real getMinTimeToLive(
void)
const;
339 virtual Real getMaxTimeToLive(
void)
const;
360 virtual void setColourRangeStart(
const ColourValue& colour);
362 virtual void setColourRangeEnd(
const ColourValue& colour);
366 virtual const ColourValue& getColourRangeStart(
void)
const;
368 virtual const ColourValue& getColourRangeEnd(
void)
const;
382 virtual unsigned short _getEmissionCount(
Real timeElapsed) = 0;
410 virtual void setEnabled(
bool enabled);
413 virtual bool getEnabled(
void)
const;
422 virtual void setStartTime(
Real startTime);
424 virtual Real getStartTime(
void)
const;
437 virtual void setDuration(
Real duration);
440 virtual Real getDuration(
void)
const;
453 virtual void setDuration(
Real min,
Real max);
455 virtual void setMinDuration(
Real min);
457 virtual void setMaxDuration(
Real max);
459 virtual Real getMinDuration(
void)
const;
461 virtual Real getMaxDuration(
void)
const;
472 virtual void setRepeatDelay(
Real duration);
475 virtual Real getRepeatDelay(
void)
const;
488 virtual void setRepeatDelay(
Real min,
Real max);
490 virtual void setMinRepeatDelay(
Real min);
492 virtual void setMaxRepeatDelay(
Real max);
494 virtual Real getMinRepeatDelay(
void)
const;
496 virtual Real getMaxRepeatDelay(
void)
const;
499 const String &getName(
void)
const;
502 virtual void setName(
const String& newName);
505 const String &getEmittedEmitter(
void)
const;
508 virtual void setEmittedEmitter(
const String& emittedEmitter);
511 virtual bool isEmitted(
void)
const;
514 virtual void setEmitted(
bool emitted);
Command object for particle emitter - see ParamCommand.
virtual void _initParticle(Particle *pParticle)
Initialises a particle based on the emitter's approach and parameters.
Class defining particle system based special effects.
float Real
Software floating point type.
Real mDurationMin
Minimum length of time emitter will run for (0 = forever)
static EmitterCommands::CmdColourRangeEnd msColourRangeEndCmd
static EmitterCommands::CmdColourRangeStart msColourRangeStartCmd
Real mDurationRemain
Current duration remainder.
Real mDurationMax
Maximum length of time the emitter will run for (0 = forever)
Command object for particle emitter - see ParamCommand.
Real mMinSpeed
Min speed of particles.
Command object for particle emitter - see ParamCommand.
Class representing colour.
Command object for particle emitter - see ParamCommand.
static EmitterCommands::CmdDuration msDurationCmd
Command object for particle emitter - see ParamCommand.
static EmitterCommands::CmdTTL msTTLCmd
Real mMaxSpeed
Max speed of particles.
static EmitterCommands::CmdUp msUpCmd
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
static EmitterCommands::CmdColour msColourCmd
ColourValue mColourRangeEnd
Initial colour of particles (range end)
Command object for particle emitter - see ParamCommand.
Command object for ParticleEmitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
static EmitterCommands::CmdMaxVelocity msMaxVelocityCmd
Command object for particle emitter - see ParamCommand.
ParticleSystem * mParent
Parent particle system.
static EmitterCommands::CmdMinRepeatDelay msMinRepeatDelayCmd
Command object for particle emitter - see ParamCommand.
static EmitterCommands::CmdAngle msAngleCmd
static EmitterCommands::CmdRepeatDelay msRepeatDelayCmd
Radian mAngle
Angle around direction which particles may be emitted, internally radians but angleunits for interfac...
static EmitterCommands::CmdEmissionRate msEmissionRateCmd
static EmitterCommands::CmdMaxDuration msMaxDurationCmd
Command object for particle emitter - see ParamCommand.
String mEmittedEmitter
The name of the emitter to be emitted (optional)
Class defining the common interface which classes can use to present a reflection-style, self-defining parameter set to callers.
Command object for particle emitter - see ParamCommand.
static EmitterCommands::CmdMinTTL msMinTTLCmd
Real mRepeatDelayRemain
Repeat delay left.
static EmitterCommands::CmdVelocity msVelocityCmd
String mType
Name of the type of emitter, MUST be initialised by subclasses.
Real mMaxTTL
Initial time-to-live of particles (max)
Class representing a single particle instance.
void resetDimensions(void)
Utility method to reset this particle.
static EmitterCommands::CmdMinVelocity msMinVelocityCmd
bool mEnabled
Whether this emitter is currently enabled (defaults to true)
static EmitterCommands::CmdEmittedEmitter msEmittedEmitterCmd
String mName
The name of the emitter. The name is optional unless it is used as an emitter that is emitted itself...
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.
static EmitterCommands::CmdDirection msDirectionCmd
ColourValue mColourRangeStart
Initial colour of particles (range start)
Command object for particle emitter - see ParamCommand.
Abstract class defining the interface to be implemented by particle emitters.
Standard 3-dimensional vector.
Command object for particle emitter - see ParamCommand.
Real mEmissionRate
Rate in particles per second at which this emitter wishes to emit particles.
static EmitterCommands::CmdMinDuration msMinDurationCmd
Vector3 mPosition
Position relative to the center of the ParticleSystem.
static EmitterCommands::CmdMaxRepeatDelay msMaxRepeatDelayCmd
Command object for particle emitter - see ParamCommand.
Wrapper class which indicates a given angle value is in Radians.
static EmitterCommands::CmdMaxTTL msMaxTTLCmd
Command object for particle emitter - see ParamCommand.
static EmitterCommands::CmdName msNameCmd
Vector3 mDirection
Base direction of the emitter, may not be used by some emitters.
Real mRepeatDelayMin
Time between each repeat.
Real mStartTime
Start time (in seconds from start of first call to ParticleSystem to update)
const String & getType(void) const
Returns the name of the type of emitter.
Real mMinTTL
Initial time-to-live of particles (min)
static EmitterCommands::CmdPosition msPositionCmd