Particle Universe
1.2
|
#include <ParticleUniverseAlignAffector.h>
Public Member Functions | |
AlignAffector (void) | |
virtual | ~AlignAffector (void) |
virtual void | copyAttributesTo (ParticleAffector *affector) |
bool | isResize (void) const |
void | setResize (bool resize) |
virtual void | _firstParticle (ParticleTechnique *particleTechnique, Particle *particle, Real timeElapsed) |
virtual void | _affect (ParticleTechnique *particleTechnique, Particle *particle, Real timeElapsed) |
![]() | |
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 | _preProcessParticles (ParticleTechnique *particleTechnique, Real timeElapsed) |
virtual void | _initForEmission (void) |
virtual void | _initForExpiration (ParticleTechnique *technique, Real timeElapsed) |
virtual void | _initParticleForEmission (Particle *particle) |
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) |
![]() | |
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) |
![]() | |
IAlias (void) | |
virtual | ~IAlias (void) |
const String & | getAliasName (void) const |
void | setAliasName (String aliasName) |
const AliasType | getAliasType (void) const |
void | setAliasType (AliasType aliasType) |
![]() | |
IElement (void) | |
virtual | ~IElement (void) |
Static Public Attributes | |
static const bool | DEFAULT_RESIZE |
![]() | |
static const bool | DEFAULT_ENABLED |
static const Vector3 | DEFAULT_POSITION |
static const AffectSpecialisation | DEFAULT_SPECIALISATION |
![]() | |
static Real | DEFAULT_TTL |
static Real | DEFAULT_MASS |
Protected Attributes | |
Particle * | mPreviousParticle |
bool | mResize |
![]() | |
ParticleTechnique * | mParentTechnique |
String | mAffectorType |
String | mName |
AffectSpecialisation | mAffectSpecialisation |
list< String > | mExcludedEmitters |
Vector3 | _mAffectorScale |
![]() | |
uint32 | mEventFlags |
bool | mMarkedForEmission |
bool | mEnabled |
bool | mFreezed |
bool | mOriginalEnabled |
bool | mOriginalEnabledSet |
Vector3 | mDerivedPosition |
ParticleBehaviourList | mBehaviours |
![]() | |
String | mAliasName |
AliasType | mAliasType |
Aligns the orientation of a particle towards the previous particle and adjusts the height of the particle, which becomes the length between the two particles. And how do we benefit from this? Well, with the right renderer settings you could get a chain of particles, each connected to the previous, making use of the particle orientation.
We get good results with a billboard renderer (which - btw - doesn't take the particle orientation into account by default). Use the billboard type 'oriented shape', which is a type that isn't a standard billboard type of Ogre. It has been added to allow the billboard renderer take advantage of the particles' orientation. Also use for instance 'bottom center' as the billboard origin, which neatly connects the billboards.
Using the AlignAffector is a step in the direction to generate electric beams.
ParticleUniverse::AlignAffector::AlignAffector | ( | void | ) |
|
inlinevirtual |
|
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.
|
virtual |
Perform precalculations if the first Particle in the update-loop is processed.
Reimplemented from ParticleUniverse::ParticleAffector.
|
virtual |
Copy attributes to another affector.
Reimplemented from ParticleUniverse::ParticleAffector.
bool ParticleUniverse::AlignAffector::isResize | ( | void | ) | const |
See setResize().
void ParticleUniverse::AlignAffector::setResize | ( | bool | resize | ) |
Set resize. This attribute determines whether the size of the particle must be changed according to its alignment with the previous particle.
|
static |
|
protected |
|
protected |