Particle Universe  1.2
ParticleUniverse::DoAffectorEventHandler Class Reference

#include <ParticleUniverseDoAffectorEventHandler.h>

Inheritance diagram for ParticleUniverse::DoAffectorEventHandler:

Public Member Functions

 DoAffectorEventHandler (void)
 
virtual ~DoAffectorEventHandler (void)
 
const bool getPrePost (void) const
 
void setPrePost (const bool prePost)
 
const StringgetAffectorName (void) const
 
void setAffectorName (const String &affectorName)
 
virtual void _handle (ParticleTechnique *particleTechnique, Particle *particle, Real timeElapsed)
 
virtual void copyAttributesTo (ParticleEventHandler *eventHandler)
 
- Public Member Functions inherited from ParticleUniverse::ParticleEventHandler
 ParticleEventHandler (void)
 
virtual ~ParticleEventHandler (void)
 
const StringgetName (void) const
 
void setName (const String &name)
 
ParticleObservergetParentObserver (void) const
 
void setParentObserver (ParticleObserver *parentObserver)
 
const StringgetEventHandlerType (void) const
 
void setEventHandlerType (const String &eventHandlerType)
 
virtual void _notifyRescaled (const Vector3 &scale)
 
virtual void copyParentAttributesTo (ParticleEventHandler *eventHandler)
 
- 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 bool DEFAULT_PRE_POST
 

Protected Attributes

String mAffectorName
 
bool mPrePost
 
- Protected Attributes inherited from ParticleUniverse::ParticleEventHandler
ParticleObservermParentObserver
 
String mEventHandlerType
 
String mName
 
Vector3 _mEventHandlerScale
 
- Protected Attributes inherited from ParticleUniverse::IAlias
String mAliasName
 
AliasType mAliasType
 

Additional Inherited Members

- 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
}
 

Detailed Description

This class explicitly calls an affector to affect the particles. There are several reasons why this is appropriate. One reason is, that you only want to affect a particle if a certain event occurs. Disable an affector and call it using this event handler, is the method (calling the affector from the event handler doesn't take into consideration that the affector is disabled).

Constructor & Destructor Documentation

ParticleUniverse::DoAffectorEventHandler::DoAffectorEventHandler ( void  )
virtual ParticleUniverse::DoAffectorEventHandler::~DoAffectorEventHandler ( void  )
inlinevirtual

Member Function Documentation

virtual void ParticleUniverse::DoAffectorEventHandler::_handle ( ParticleTechnique particleTechnique,
Particle particle,
Real  timeElapsed 
)
virtual

If the _handle() function of this class is invoked (by an Observer), it searches the ParticleAffector defined by the its name. The ParticleAffector is either part of the ParticleTechnique in which the DoAffectorEventHandler is defined, or if the Affector is not found, other ParticleTechniques are searched.

Implements ParticleUniverse::ParticleEventHandler.

virtual void ParticleUniverse::DoAffectorEventHandler::copyAttributesTo ( ParticleEventHandler eventHandler)
virtual

Copy attributes to another event handler.

Reimplemented from ParticleUniverse::ParticleEventHandler.

const String& ParticleUniverse::DoAffectorEventHandler::getAffectorName ( void  ) const
inline

Get the name of the affector that must be enabled or disabled.

const bool ParticleUniverse::DoAffectorEventHandler::getPrePost ( void  ) const
inline

Get the indication whether pre- and postprocessing must be done.

void ParticleUniverse::DoAffectorEventHandler::setAffectorName ( const String affectorName)
inline

Set the name of the affector.

void ParticleUniverse::DoAffectorEventHandler::setPrePost ( const bool  prePost)
inline

Set the indication whether pre- and postprocessing must be done.

Member Data Documentation

const bool ParticleUniverse::DoAffectorEventHandler::DEFAULT_PRE_POST
static
String ParticleUniverse::DoAffectorEventHandler::mAffectorName
protected
bool ParticleUniverse::DoAffectorEventHandler::mPrePost
protected

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