Particle Universe  1.2
ParticleUniverse::ForceFieldAffector Class Reference

#include <ParticleUniverseForceFieldAffector.h>

Inheritance diagram for ParticleUniverse::ForceFieldAffector:

Public Member Functions

 ForceFieldAffector (void)
 
 ~ForceFieldAffector (void)
 
virtual void _prepare (ParticleTechnique *particleTechnique)
 
virtual void _preProcessParticles (ParticleTechnique *particleTechnique, Real timeElapsed)
 
virtual void _notifyStart (void)
 
virtual void _affect (ParticleTechnique *particleTechnique, Particle *particle, Real timeElapsed)
 
const ForceField::ForceFieldType getForceFieldType (void) const
 
void setForceFieldType (const ForceField::ForceFieldType forceFieldType)
 
Real getDelta (void) const
 
void setDelta (Real delta)
 
Real getScaleForce (void) const
 
void setScaleForce (Real scaleForce)
 
ushort getOctaves (void) const
 
void setOctaves (ushort octaves)
 
double getFrequency (void) const
 
void setFrequency (double frequency)
 
double getAmplitude (void) const
 
void setAmplitude (double amplitude)
 
double getPersistence (void) const
 
void setPersistence (double persistence)
 
unsigned int getForceFieldSize (void) const
 
void setForceFieldSize (unsigned int forceFieldSize)
 
Vector3 getWorldSize (void) const
 
void setWorldSize (const Vector3 &worldSize)
 
bool getIgnoreNegativeX (void) const
 
void setIgnoreNegativeX (bool ignoreNegativeX)
 
bool getIgnoreNegativeY (void) const
 
void setIgnoreNegativeY (bool ignoreNegativeY)
 
bool getIgnoreNegativeZ (void) const
 
void setIgnoreNegativeZ (bool ignoreNegativeZ)
 
const Vector3getMovement (void) const
 
void setMovement (const Vector3 &movement)
 
Real getMovementFrequency (void) const
 
void setMovementFrequency (Real movementFrequency)
 
void suppressGeneration (bool suppress)
 
virtual void copyAttributesTo (ParticleAffector *affector)
 
- Public Member Functions inherited from ParticleUniverse::ParticleAffector
 ParticleAffector (void)
 
virtual ~ParticleAffector (void)
 
const AffectSpecialisationgetAffectSpecialisation (void) const
 
void setAffectSpecialisation (const AffectSpecialisation &affectSpecialisation)
 
const StringgetAffectorType (void) const
 
void setAffectorType (const String &affectorType)
 
const StringgetName (void) const
 
void setName (const String &name)
 
ParticleTechniquegetParentTechnique (void) const
 
void setParentTechnique (ParticleTechnique *parentTechnique)
 
virtual void _unprepare (ParticleTechnique *particleTechnique)
 
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)
 
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 Vector3getDerivedPosition (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)
 
ParticleBehaviourgetBehaviour (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 StringgetAliasName (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 ForceField::ForceFieldType DEFAULT_FORCEFIELD_TYPE
 
static const Real DEFAULT_DELTA
 
static const Real DEFAULT_FORCE
 
static const ushort DEFAULT_OCTAVES
 
static const double DEFAULT_FREQUENCY
 
static const double DEFAULT_AMPLITUDE
 
static const double DEFAULT_PERSISTENCE
 
static const unsigned int DEFAULT_FORCEFIELDSIZE
 
static const Vector3 DEFAULT_WORLDSIZE
 
static const Vector3 DEFAULT_MOVEMENT
 
static const Real DEFAULT_MOVEMENT_FREQUENCY
 
- 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 Attributes

ForceField mForceField
 
ForceField::ForceFieldType mForceFieldType
 
Real mDelta
 
Vector3 mForce
 
Real mScaleForce
 
ushort mOctaves
 
double mFrequency
 
double mAmplitude
 
double mPersistence
 
unsigned int mForceFieldSize
 
Vector3 mWorldSize
 
bool mPrepared
 
bool mIgnoreNegativeX
 
bool mIgnoreNegativeY
 
bool mIgnoreNegativeZ
 
Vector3 mMovement
 
bool mMovementSet
 
Real mMovementFrequency
 
Real mMovementFrequencyCount
 
Vector3 mDisplacement
 
Vector3 mBasePosition
 
bool mSuppressGeneration
 
- Protected Attributes inherited from ParticleUniverse::ParticleAffector
ParticleTechniquemParentTechnique
 
String mAffectorType
 
String mName
 
AffectSpecialisation mAffectSpecialisation
 
list< StringmExcludedEmitters
 
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 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 Attributes inherited from ParticleUniverse::Particle
ParticleEmitterparentEmitter
 
Vector3 position
 
Vector3 direction
 
Real mass
 
Real timeToLive
 
Real totalTimeToLive
 
Real timeFraction
 
ParticleType particleType
 
Any mUserDefinedObject
 
PhysicsActorphysicsActor
 
IVisualDatavisualData
 
Vector3 originalPosition
 
Vector3 originalDirection
 
Real originalVelocity
 
Real originalDirectionLength
 
Real originalScaledDirectionLength
 
Vector3 latestPosition
 

Detailed Description

Force Field Affector Class: This Affector Class uses a force field to affect the particle direction.

Constructor & Destructor Documentation

ParticleUniverse::ForceFieldAffector::ForceFieldAffector ( void  )
ParticleUniverse::ForceFieldAffector::~ForceFieldAffector ( void  )

Member Function Documentation

virtual void ParticleUniverse::ForceFieldAffector::_affect ( ParticleTechnique particleTechnique,
Particle particle,
Real  timeElapsed 
)
virtual

Affect a particle.

Parameters
particlePointer to a ParticleTechnique to which the particle belongs.
particlePointer to a Particle.
timeElapsedThe number of seconds which have elapsed since the last call.

Implements ParticleUniverse::ParticleAffector.

virtual void ParticleUniverse::ForceFieldAffector::_notifyStart ( void  )
virtual

Perform activities when a ParticleAffector is started.

Reimplemented from ParticleUniverse::ParticleAffector.

virtual void ParticleUniverse::ForceFieldAffector::_prepare ( ParticleTechnique particleTechnique)
virtual

Perform initialisation actions.

Remarks
The _prepare() function is automatically called during initialisation (prepare) activities of a ParticleTechnique. A subclass could implement this function to perform initialisation actions.

Reimplemented from ParticleUniverse::ParticleAffector.

virtual void ParticleUniverse::ForceFieldAffector::_preProcessParticles ( ParticleTechnique particleTechnique,
Real  timeElapsed 
)
virtual

Perform activities before the individual particles are processed.

Remarks
This function is called before the ParticleTechnique update-loop where all particles are traversed. the preProcess is typically used to perform calculations where the result must be used in processing each individual particle.

Reimplemented from ParticleUniverse::ParticleAffector.

virtual void ParticleUniverse::ForceFieldAffector::copyAttributesTo ( ParticleAffector affector)
virtual

Copy attributes to another affector.

Reimplemented from ParticleUniverse::ParticleAffector.

double ParticleUniverse::ForceFieldAffector::getAmplitude ( void  ) const

Get/Set scale Amplitude

Real ParticleUniverse::ForceFieldAffector::getDelta ( void  ) const

Get/Set Delta

unsigned int ParticleUniverse::ForceFieldAffector::getForceFieldSize ( void  ) const

Get/Set scale ForceFieldSize

const ForceField::ForceFieldType ParticleUniverse::ForceFieldAffector::getForceFieldType ( void  ) const

Get/Set Forcefield type

double ParticleUniverse::ForceFieldAffector::getFrequency ( void  ) const

Get/Set scale Frequency

bool ParticleUniverse::ForceFieldAffector::getIgnoreNegativeX ( void  ) const

Get/Set scale flip attributes

bool ParticleUniverse::ForceFieldAffector::getIgnoreNegativeY ( void  ) const
bool ParticleUniverse::ForceFieldAffector::getIgnoreNegativeZ ( void  ) const
const Vector3& ParticleUniverse::ForceFieldAffector::getMovement ( void  ) const

Get/Set Movement

Remarks
The movement vector determines the position of the movement. This movement is a displacement of the particle position mapped to the forcefield.
Real ParticleUniverse::ForceFieldAffector::getMovementFrequency ( void  ) const

Get/Set Movement frequency

ushort ParticleUniverse::ForceFieldAffector::getOctaves ( void  ) const

Get/Set scale Octaves

double ParticleUniverse::ForceFieldAffector::getPersistence ( void  ) const

Get/Set scale Persistence

Real ParticleUniverse::ForceFieldAffector::getScaleForce ( void  ) const

Get/Set scale Force

Vector3 ParticleUniverse::ForceFieldAffector::getWorldSize ( void  ) const

Get/Set scale worldSize

void ParticleUniverse::ForceFieldAffector::setAmplitude ( double  amplitude)
void ParticleUniverse::ForceFieldAffector::setDelta ( Real  delta)
void ParticleUniverse::ForceFieldAffector::setForceFieldSize ( unsigned int  forceFieldSize)
void ParticleUniverse::ForceFieldAffector::setForceFieldType ( const ForceField::ForceFieldType  forceFieldType)
void ParticleUniverse::ForceFieldAffector::setFrequency ( double  frequency)
void ParticleUniverse::ForceFieldAffector::setIgnoreNegativeX ( bool  ignoreNegativeX)
void ParticleUniverse::ForceFieldAffector::setIgnoreNegativeY ( bool  ignoreNegativeY)
void ParticleUniverse::ForceFieldAffector::setIgnoreNegativeZ ( bool  ignoreNegativeZ)
void ParticleUniverse::ForceFieldAffector::setMovement ( const Vector3 movement)
void ParticleUniverse::ForceFieldAffector::setMovementFrequency ( Real  movementFrequency)
void ParticleUniverse::ForceFieldAffector::setOctaves ( ushort  octaves)
void ParticleUniverse::ForceFieldAffector::setPersistence ( double  persistence)
void ParticleUniverse::ForceFieldAffector::setScaleForce ( Real  scaleForce)
void ParticleUniverse::ForceFieldAffector::setWorldSize ( const Vector3 worldSize)
void ParticleUniverse::ForceFieldAffector::suppressGeneration ( bool  suppress)

Suppress (re)generation of the forcefield everytime an attribute is changed.

Member Data Documentation

const double ParticleUniverse::ForceFieldAffector::DEFAULT_AMPLITUDE
static
const Real ParticleUniverse::ForceFieldAffector::DEFAULT_DELTA
static
const Real ParticleUniverse::ForceFieldAffector::DEFAULT_FORCE
static
const ForceField::ForceFieldType ParticleUniverse::ForceFieldAffector::DEFAULT_FORCEFIELD_TYPE
static
const unsigned int ParticleUniverse::ForceFieldAffector::DEFAULT_FORCEFIELDSIZE
static
const double ParticleUniverse::ForceFieldAffector::DEFAULT_FREQUENCY
static
const Vector3 ParticleUniverse::ForceFieldAffector::DEFAULT_MOVEMENT
static
const Real ParticleUniverse::ForceFieldAffector::DEFAULT_MOVEMENT_FREQUENCY
static
const ushort ParticleUniverse::ForceFieldAffector::DEFAULT_OCTAVES
static
const double ParticleUniverse::ForceFieldAffector::DEFAULT_PERSISTENCE
static
const Vector3 ParticleUniverse::ForceFieldAffector::DEFAULT_WORLDSIZE
static
double ParticleUniverse::ForceFieldAffector::mAmplitude
protected
Vector3 ParticleUniverse::ForceFieldAffector::mBasePosition
protected
Real ParticleUniverse::ForceFieldAffector::mDelta
protected
Vector3 ParticleUniverse::ForceFieldAffector::mDisplacement
protected
Vector3 ParticleUniverse::ForceFieldAffector::mForce
protected
ForceField ParticleUniverse::ForceFieldAffector::mForceField
protected
unsigned int ParticleUniverse::ForceFieldAffector::mForceFieldSize
protected
ForceField::ForceFieldType ParticleUniverse::ForceFieldAffector::mForceFieldType
protected
double ParticleUniverse::ForceFieldAffector::mFrequency
protected
bool ParticleUniverse::ForceFieldAffector::mIgnoreNegativeX
protected
bool ParticleUniverse::ForceFieldAffector::mIgnoreNegativeY
protected
bool ParticleUniverse::ForceFieldAffector::mIgnoreNegativeZ
protected
Vector3 ParticleUniverse::ForceFieldAffector::mMovement
protected
Real ParticleUniverse::ForceFieldAffector::mMovementFrequency
protected
Real ParticleUniverse::ForceFieldAffector::mMovementFrequencyCount
protected
bool ParticleUniverse::ForceFieldAffector::mMovementSet
protected
ushort ParticleUniverse::ForceFieldAffector::mOctaves
protected
double ParticleUniverse::ForceFieldAffector::mPersistence
protected
bool ParticleUniverse::ForceFieldAffector::mPrepared
protected
Real ParticleUniverse::ForceFieldAffector::mScaleForce
protected
bool ParticleUniverse::ForceFieldAffector::mSuppressGeneration
protected
Vector3 ParticleUniverse::ForceFieldAffector::mWorldSize
protected

The documentation for this class was generated from the following file: