Go to the documentation of this file.
28 #ifndef __ParticleEmitter_H__
29 #define __ParticleEmitter_H__
171 virtual void genEmissionDirection(
const Vector3 &particlePos,
Vector3& destVector );
177 virtual void genEmissionVelocity(
Vector3& destVector);
180 virtual Real genEmissionTTL(
void);
183 virtual void genEmissionColour(
ColourValue& destColour);
186 virtual unsigned short genConstantEmissionCount(
Real timeElapsed);
196 void addBaseParameters(
void);
199 void initDurationRepeat(
void);
208 virtual void setPosition(
const Vector3& pos);
211 virtual const Vector3& getPosition(
void)
const;
224 virtual void setDirection(
const Vector3& direction);
227 virtual const Vector3& getDirection(
void)
const;
237 virtual void setUp(
const Vector3& up);
240 virtual const Vector3& getUp(
void)
const;
255 virtual void setDirPositionReference(
const Vector3& position,
bool enable );
258 virtual const Vector3& getDirPositionReference()
const;
261 virtual bool getDirPositionReferenceEnabled()
const;
273 virtual void setAngle(
const Radian& angle);
276 virtual const Radian& getAngle(
void)
const;
285 virtual void setParticleVelocity(
Real speed);
297 virtual void setParticleVelocity(
Real min,
Real max);
299 virtual void setMinParticleVelocity(
Real min);
301 virtual void setMaxParticleVelocity(
Real max);
304 virtual Real getParticleVelocity(
void)
const;
307 virtual Real getMinParticleVelocity(
void)
const;
310 virtual Real getMaxParticleVelocity(
void)
const;
324 virtual void setEmissionRate(
Real particlesPerSecond);
327 virtual Real getEmissionRate(
void)
const;
339 virtual void setTimeToLive(
Real ttl);
353 virtual void setTimeToLive(
Real minTtl,
Real maxTtl);
356 virtual void setMinTimeToLive(
Real min);
358 virtual void setMaxTimeToLive(
Real max);
361 virtual Real getTimeToLive(
void)
const;
364 virtual Real getMinTimeToLive(
void)
const;
366 virtual Real getMaxTimeToLive(
void)
const;
387 virtual void setColourRangeStart(
const ColourValue& colour);
389 virtual void setColourRangeEnd(
const ColourValue& colour);
393 virtual const ColourValue& getColourRangeStart(
void)
const;
395 virtual const ColourValue& getColourRangeEnd(
void)
const;
409 virtual unsigned short _getEmissionCount(
Real timeElapsed) = 0;
437 virtual void setEnabled(
bool enabled);
440 virtual bool getEnabled(
void)
const;
449 virtual void setStartTime(
Real startTime);
451 virtual Real getStartTime(
void)
const;
464 virtual void setDuration(
Real duration);
467 virtual Real getDuration(
void)
const;
480 virtual void setDuration(
Real min,
Real max);
482 virtual void setMinDuration(
Real min);
484 virtual void setMaxDuration(
Real max);
486 virtual Real getMinDuration(
void)
const;
488 virtual Real getMaxDuration(
void)
const;
499 virtual void setRepeatDelay(
Real duration);
502 virtual Real getRepeatDelay(
void)
const;
515 virtual void setRepeatDelay(
Real min,
Real max);
517 virtual void setMinRepeatDelay(
Real min);
519 virtual void setMaxRepeatDelay(
Real max);
521 virtual Real getMinRepeatDelay(
void)
const;
523 virtual Real getMaxRepeatDelay(
void)
const;
526 const String &getName(
void)
const;
529 virtual void setName(
const String& newName);
532 const String &getEmittedEmitter(
void)
const;
535 virtual void setEmittedEmitter(
const String& emittedEmitter);
538 virtual bool isEmitted(
void)
const;
541 virtual void setEmitted(
bool emitted);
void resetDimensions(void)
Utility method to reset this particle.
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.
static EmitterCommands::CmdEmittedEmitter msEmittedEmitterCmd
Command object for particle emitter - see ParamCommand.
static EmitterCommands::CmdName msNameCmd
String mType
Name of the type of emitter, MUST be initialised by subclasses.
Real mMaxSpeed
Max speed of particles.
Real mMinTTL
Initial time-to-live of particles (min)
static EmitterCommands::CmdPosition msPositionCmd
Radian mAngle
Angle around direction which particles may be emitted, internally radians but angleunits for interfac...
static EmitterCommands::CmdRepeatDelay msRepeatDelayCmd
Command object for particle emitter - see ParamCommand.
Real mMinSpeed
Min speed of particles.
static EmitterCommands::CmdMaxVelocity msMaxVelocityCmd
static EmitterCommands::CmdMaxDuration msMaxDurationCmd
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
static EmitterCommands::CmdMinTTL msMinTTLCmd
bool mEnabled
Whether this emitter is currently enabled (defaults to true)
static EmitterCommands::CmdColour msColourCmd
static EmitterCommands::CmdMaxRepeatDelay msMaxRepeatDelayCmd
static EmitterCommands::CmdDirection msDirectionCmd
virtual void _initParticle(Particle *pParticle)
Initialises a particle based on the emitter's approach and parameters.
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.
const String & getType(void) const
Returns the name of the type of emitter.
Real mDurationRemain
Current duration remainder.
static EmitterCommands::CmdMaxTTL msMaxTTLCmd
Real mRepeatDelayMin
Time between each repeat.
static EmitterCommands::CmdUp msUpCmd
Command object for particle emitter - see ParamCommand.
bool mUseDirPositionRef
When true, mDirPositionRef is used instead of mDirection to generate particles.
static EmitterCommands::CmdMinDuration msMinDurationCmd
Command object for ParticleEmitter - see ParamCommand.
static EmitterCommands::CmdVelocity msVelocityCmd
Vector3 mPosition
Position relative to the center of the ParticleSystem.
Wrapper class which indicates a given angle value is in Radians.
Command object for particle emitter - see ParamCommand.
Real mDurationMax
Maximum length of time the emitter will run for (0 = forever)
Command object for particle emitter - see ParamCommand.
static EmitterCommands::CmdDirPositionRef msDirPositionRefCmd
static EmitterCommands::CmdColourRangeStart msColourRangeStartCmd
Command object for particle emitter - see ParamCommand.
Class representing a single particle instance.
Real mStartTime
Start time (in seconds from start of first call to ParticleSystem to update)
Abstract class defining the interface to be implemented by particle emitters.
Class defining the common interface which classes can use to present a reflection-style,...
Real mEmissionRate
Rate in particles per second at which this emitter wishes to emit particles.
static EmitterCommands::CmdMinVelocity msMinVelocityCmd
Command object for particle emitter - see ParamCommand.
Real mRepeatDelayRemain
Repeat delay left.
static EmitterCommands::CmdAngle msAngleCmd
Class representing colour.
static EmitterCommands::CmdColourRangeEnd msColourRangeEndCmd
Vector3 mUp
Notional up vector, used to speed up generation of variant directions, and also to orient some emitte...
Command object for particle emitter - see ParamCommand.
Real mDurationMin
Minimum length of time emitter will run for (0 = forever)
Command object for particle emitter - see ParamCommand.
static EmitterCommands::CmdEmissionRate msEmissionRateCmd
String mEmittedEmitter
The name of the emitter to be emitted (optional)
static EmitterCommands::CmdMinRepeatDelay msMinRepeatDelayCmd
static EmitterCommands::CmdDuration msDurationCmd
Class defining particle system based special effects.
Command object for particle emitter - see ParamCommand.
Command object for particle emitter - see ParamCommand.
float Real
Software floating point type.
static EmitterCommands::CmdTTL msTTLCmd
Command object for particle emitter - see ParamCommand.
Vector3 mDirection
Base direction of the emitter, may not be used by some emitters.
Command object for particle emitter - see ParamCommand.
Standard 3-dimensional vector.
ColourValue mColourRangeStart
Initial colour of particles (range start)
ParticleSystem * mParent
Parent particle system.
ColourValue mColourRangeEnd
Initial colour of particles (range end)
Command object for particle emitter - see ParamCommand.
Real mMaxTTL
Initial time-to-live of particles (max)
Command object for particle emitter - see ParamCommand.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15