Particle Universe
1.2
|
#include <ParticleUniverseTextureAnimator.h>
Public Types | |
enum | TextureAnimationType { TAT_LOOP, TAT_UP_DOWN, TAT_RANDOM } |
Public Types inherited from ParticleUniverse::ParticleAffector | |
enum | AffectSpecialisation { AFSP_DEFAULT, AFSP_TTL_INCREASE, AFSP_TTL_DECREASE } |
Public Types inherited from ParticleUniverse::Particle | |
enum | ParticleType { PT_VISUAL, PT_TECHNIQUE, PT_EMITTER, PT_AFFECTOR, PT_SYSTEM } |
enum | ReservedParticleEventFlags { PEF_EXPIRED = 1<<0, PEF_EMITTED = 1<<1, PEF_COLLIDED = 1<<2 } |
typedef vector< ParticleBehaviour * > | ParticleBehaviourList |
typedef ParticleBehaviourList::const_iterator | ParticleBehaviourIterator |
Public Types inherited from ParticleUniverse::IAlias | |
enum | AliasType { AT_UNDEFINED, AT_TECHNIQUE, AT_RENDERER, AT_EMITTER, AT_AFFECTOR, AT_OBSERVER, AT_EXTERN, AT_HANDLER, AT_BEHAVIOUR } |
Public Member Functions | |
TextureAnimator (void) | |
virtual | ~TextureAnimator (void) |
Real | getAnimationTimeStep (void) const |
void | setAnimationTimeStep (Real animationTimeStep) |
TextureAnimationType | getTextureAnimationType (void) const |
void | setTextureAnimationType (TextureAnimationType textureAnimationType) |
uint16 | getTextureCoordsStart (void) const |
void | setTextureCoordsStart (uint16 textureCoordsStart) |
uint16 | getTextureCoordsEnd (void) const |
void | setTextureCoordsEnd (uint16 textureCoordsEnd) |
bool | isStartRandom (void) const |
void | setStartRandom (bool startRandom) |
virtual void | copyAttributesTo (ParticleAffector *affector) |
virtual void | _preProcessParticles (ParticleTechnique *particleTechnique, Real timeElapsed) |
virtual void | _initParticleForEmission (Particle *particle) |
virtual void | _affect (ParticleTechnique *particleTechnique, Particle *particle, Real timeElapsed) |
Public Member Functions inherited from ParticleUniverse::ParticleAffector | |
ParticleAffector (void) | |
virtual | ~ParticleAffector (void) |
const AffectSpecialisation & | getAffectSpecialisation (void) const |
void | setAffectSpecialisation (const AffectSpecialisation &affectSpecialisation) |
const String & | getAffectorType (void) const |
void | setAffectorType (const String &affectorType) |
const String & | getName (void) const |
void | setName (const String &name) |
ParticleTechnique * | getParentTechnique (void) const |
void | setParentTechnique (ParticleTechnique *parentTechnique) |
virtual void | _prepare (ParticleTechnique *particleTechnique) |
virtual void | _unprepare (ParticleTechnique *particleTechnique) |
virtual void | _notifyStart (void) |
virtual void | _notifyStop (void) |
virtual void | _notifyPause (void) |
virtual void | _notifyResume (void) |
virtual void | _notifyRescaled (const Vector3 &scale) |
virtual void | _firstParticle (ParticleTechnique *particleTechnique, Particle *particle, Real timeElapsed) |
virtual void | _initForEmission (void) |
virtual void | _initForExpiration (ParticleTechnique *technique, Real timeElapsed) |
void | _processParticle (ParticleTechnique *particleTechnique, Particle *particle, Real timeElapsed, bool firstParticle) |
virtual void | _postProcessParticles (ParticleTechnique *technique, Real timeElapsed) |
void | addEmitterToExclude (const String &emitterName) |
void | removeEmitterToExclude (const String &emitterName) |
void | removeAllEmittersToExclude (void) |
const list< String > & | getEmittersToExclude (void) const |
bool | hasEmitterToExclude (const String &emitterName) |
virtual void | copyParentAttributesTo (ParticleAffector *affector) |
const Vector3 & | getDerivedPosition (void) |
Real | _calculateAffectSpecialisationFactor (const Particle *particle) |
Public Member Functions inherited from ParticleUniverse::Particle | |
Particle (void) | |
virtual | ~Particle (void) |
bool | _isMarkedForEmission (void) const |
void | _setMarkedForEmission (bool markedForEmission) |
virtual bool | isEnabled (void) const |
virtual void | setEnabled (bool enabled) |
void | _setOriginalEnabled (bool originalEnabled) |
bool | _getOriginalEnabled (void) const |
bool | isFreezed (void) const |
void | setFreezed (bool freezed) |
void | setEventFlags (uint32 flags) |
void | addEventFlags (uint32 flags) |
void | removeEventFlags (uint32 flags) |
uint32 | getEventFlags (void) const |
bool | hasEventFlags (uint32 flags) const |
void | copyBehaviours (ParticleBehaviourList &behaviours) |
virtual void | _process (ParticleTechnique *technique, Real timeElapsed) |
ParticleBehaviour * | getBehaviour (const String &behaviourType) |
Real | calculateVelocity (void) const |
virtual void | copyAttributesTo (Particle *particle) |
Public Member Functions inherited from ParticleUniverse::IAlias | |
IAlias (void) | |
virtual | ~IAlias (void) |
const String & | getAliasName (void) const |
void | setAliasName (String aliasName) |
const AliasType | getAliasType (void) const |
void | setAliasType (AliasType aliasType) |
Public Member Functions inherited from ParticleUniverse::IElement | |
IElement (void) | |
virtual | ~IElement (void) |
Static Public Attributes | |
static const Real | DEFAULT_TIME_STEP |
static const uint16 | DEFAULT_TEXCOORDS_START |
static const uint16 | DEFAULT_TEXCOORDS_END |
static const TextureAnimationType | DEFAULT_ANIMATION_TYPE |
static const bool | DEFAULT_START_RANDOM |
Static Public Attributes inherited from ParticleUniverse::ParticleAffector | |
static const bool | DEFAULT_ENABLED |
static const Vector3 | DEFAULT_POSITION |
static const AffectSpecialisation | DEFAULT_SPECIALISATION |
Static Public Attributes inherited from ParticleUniverse::Particle | |
static Real | DEFAULT_TTL |
static Real | DEFAULT_MASS |
Protected Member Functions | |
void | _determineNextTextureCoords (VisualParticle *visualParticle) |
Protected Attributes | |
Real | mAnimationTimeStep |
Real | mAnimationTimeStepCount |
bool | mStartRandom |
bool | mAnimationTimeStepSet |
bool | mNextIndex |
TextureAnimationType | mTextureAnimationType |
uint16 | mTextureCoordsStart |
uint16 | mTextureCoordsEnd |
Protected Attributes inherited from ParticleUniverse::ParticleAffector | |
ParticleTechnique * | mParentTechnique |
String | mAffectorType |
String | mName |
AffectSpecialisation | mAffectSpecialisation |
list< String > | mExcludedEmitters |
Vector3 | _mAffectorScale |
Protected Attributes inherited from ParticleUniverse::Particle | |
uint32 | mEventFlags |
bool | mMarkedForEmission |
bool | mEnabled |
bool | mFreezed |
bool | mOriginalEnabled |
bool | mOriginalEnabledSet |
Vector3 | mDerivedPosition |
ParticleBehaviourList | mBehaviours |
Protected Attributes inherited from ParticleUniverse::IAlias | |
String | mAliasName |
AliasType | mAliasType |
Additional Inherited Members | |
Public Attributes inherited from ParticleUniverse::Particle | |
ParticleEmitter * | parentEmitter |
Vector3 | position |
Vector3 | direction |
Real | mass |
Real | timeToLive |
Real | totalTimeToLive |
Real | timeFraction |
ParticleType | particleType |
Any | mUserDefinedObject |
PhysicsActor * | physicsActor |
IVisualData * | visualData |
Vector3 | originalPosition |
Vector3 | originalDirection |
Real | originalVelocity |
Real | originalDirectionLength |
Real | originalScaledDirectionLength |
Vector3 | latestPosition |
The TextureAnimator makes it possible to have an animated texture for each individual particle. It relies on the uv coordinate settings in the ParticleRenderer.
ParticleUniverse::TextureAnimator::TextureAnimator | ( | void | ) |
|
virtual |
|
virtual |
Affect a particle.
particle | Pointer to a ParticleTechnique to which the particle belongs. |
particle | Pointer to a Particle. |
timeElapsed | The number of seconds which have elapsed since the last call. |
Implements ParticleUniverse::ParticleAffector.
|
protected |
Todo.
|
virtual |
Initialise a newly emitted particle.
particle | Pointer to a Particle to initialise. |
Reimplemented from ParticleUniverse::ParticleAffector.
|
virtual |
Perform activities before the individual particles are processed.
Reimplemented from ParticleUniverse::ParticleAffector.
|
virtual |
Copy attributes to another affector.
Reimplemented from ParticleUniverse::ParticleAffector.
Real ParticleUniverse::TextureAnimator::getAnimationTimeStep | ( | void | ) | const |
Returns the AnimationTimeStep. The AnimationTimeStep defines the time between each animation frame.
TextureAnimationType ParticleUniverse::TextureAnimator::getTextureAnimationType | ( | void | ) | const |
Returns the type of texture animation.
uint16 ParticleUniverse::TextureAnimator::getTextureCoordsEnd | ( | void | ) | const |
Todo
uint16 ParticleUniverse::TextureAnimator::getTextureCoordsStart | ( | void | ) | const |
Todo
bool ParticleUniverse::TextureAnimator::isStartRandom | ( | void | ) | const |
Todo
void ParticleUniverse::TextureAnimator::setAnimationTimeStep | ( | Real | animationTimeStep | ) |
Set the AnimationTimeStep
void ParticleUniverse::TextureAnimator::setStartRandom | ( | bool | startRandom | ) |
Todo
void ParticleUniverse::TextureAnimator::setTextureAnimationType | ( | TextureAnimationType | textureAnimationType | ) |
Set the type of texture animation.
void ParticleUniverse::TextureAnimator::setTextureCoordsEnd | ( | uint16 | textureCoordsEnd | ) |
Todo
void ParticleUniverse::TextureAnimator::setTextureCoordsStart | ( | uint16 | textureCoordsStart | ) |
Todo
|
static |
|
static |
|
static |
|
static |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |