Particle Universe  1.2
ParticleUniverse::Extern Class Referenceabstract

#include <ParticleUniverseExtern.h>

Inheritance diagram for ParticleUniverse::Extern:

Public Member Functions

 Extern (void)
 
virtual ~Extern (void)
 
const StringgetName (void) const
 
void setName (const String &name)
 
const StringgetExternType (void) const
 
void setExternType (const String &externType)
 
ParticleTechniquegetParentTechnique (void) const
 
void setParentTechnique (ParticleTechnique *parentTechnique)
 
virtual void _notifyRescaled (const Vector3 &scale)
 
virtual void copyAttributesTo (Extern *externObject)
 
virtual void copyParentAttributesTo (Extern *externObject)
 
virtual void _prepare (ParticleTechnique *technique)=0
 
virtual void _unprepare (ParticleTechnique *particleTechnique)
 
virtual void _notifyStart (void)
 
virtual void _notifyPause (void)
 
virtual void _notifyResume (void)
 
virtual void _notifyStop (void)
 
virtual void _preProcessParticles (ParticleTechnique *technique, Real timeElapsed)
 
virtual void _initParticleForEmission (Particle *particle)
 
virtual void _initParticleForExpiration (Particle *particle)
 
virtual void _firstParticle (ParticleTechnique *particleTechnique, Particle *particle, Real timeElapsed)
 
virtual void _processParticle (ParticleTechnique *technique, Particle *particle, Real timeElapsed, bool firstParticle)
 
virtual void _interface (ParticleTechnique *technique, Particle *particle, Real timeElapsed)=0
 
virtual void _postProcessParticles (ParticleTechnique *technique, Real timeElapsed)
 
- 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)
 

Protected Attributes

String mExternType
 
String mName
 
ParticleTechniquemParentTechnique
 
Vector3 _mExternScale
 
- 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

The Extern class is the abstract class for all extern components. Each subclass of Extern wraps a particular external component and forms a bridge between the external component and the ParticleUniverse (or to be more specific, the ParticleTechnique).

Remarks
External components can be used to add functionality to the ParticleUniverse plugin. An example is the addition of a physics library. Settings up the library is typically done within a dedicated subclass of Extern.

Constructor & Destructor Documentation

ParticleUniverse::Extern::Extern ( void  )
inline
virtual ParticleUniverse::Extern::~Extern ( void  )
inlinevirtual

Member Function Documentation

virtual void ParticleUniverse::Extern::_firstParticle ( ParticleTechnique particleTechnique,
Particle particle,
Real  timeElapsed 
)
inlinevirtual

Perform precalculations if the first Particle in the update-loop is processed.

virtual void ParticleUniverse::Extern::_initParticleForEmission ( Particle particle)
inlinevirtual

Initialise a newly emitted particle.

Parameters
particlePointer to a Particle to initialise.

Reimplemented in ParticleUniverse::PhysicsExtern.

virtual void ParticleUniverse::Extern::_initParticleForExpiration ( Particle particle)
inlinevirtual

Perform actions if a particle gets expired.

Reimplemented in ParticleUniverse::PhysicsExtern.

virtual void ParticleUniverse::Extern::_interface ( ParticleTechnique technique,
Particle particle,
Real  timeElapsed 
)
pure virtual
virtual void ParticleUniverse::Extern::_notifyPause ( void  )
inlinevirtual

Perform activities when an Extern is paused.

virtual void ParticleUniverse::Extern::_notifyRescaled ( const Vector3 scale)
virtual

Notify that the Particle System is rescaled.

virtual void ParticleUniverse::Extern::_notifyResume ( void  )
inlinevirtual

Perform activities when an Extern is resumed.

virtual void ParticleUniverse::Extern::_notifyStart ( void  )
inlinevirtual

Perform activities when an Extern is started.

Reimplemented in ParticleUniverse::SceneDecoratorExtern.

virtual void ParticleUniverse::Extern::_notifyStop ( void  )
inlinevirtual

Perform activities when an Extern is stopped.

Reimplemented in ParticleUniverse::SceneDecoratorExtern.

virtual void ParticleUniverse::Extern::_postProcessParticles ( ParticleTechnique technique,
Real  timeElapsed 
)
inlinevirtual

Perform activities after the individual particles are processed.

Remarks
This function is called after the ParticleTechnique update-loop where all particles are traversed.
virtual void ParticleUniverse::Extern::_prepare ( ParticleTechnique technique)
pure virtual

Perform initialisation actions.

Remarks
The _prepare() function is automatically called during initialisation activities of a ParticleTechnique. Each subclass should implement this function to perform initialisation actions needed for the external component.
This is a pure virtual function, to be sure that developers of an extern component don't forget to override this functions and perform setup/initialisation of the component. This is to prevent that unexplainable errors occur because initialisation tasks where forgotten.

Implemented in ParticleUniverse::Attachable, and ParticleUniverse::SceneDecoratorExtern.

virtual void ParticleUniverse::Extern::_preProcessParticles ( ParticleTechnique technique,
Real  timeElapsed 
)
inlinevirtual

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 in ParticleUniverse::GravityExtern, ParticleUniverse::VortexExtern, ParticleUniverse::BoxColliderExtern, and ParticleUniverse::SphereColliderExtern.

virtual void ParticleUniverse::Extern::_processParticle ( ParticleTechnique technique,
Particle particle,
Real  timeElapsed,
bool  firstParticle 
)
virtual

Processes a particle.

Remarks
Some processing on a particle can be performed. This function is automatically called in the ParticleTechnique update-loop where all particles are traversed.
virtual void ParticleUniverse::Extern::_unprepare ( ParticleTechnique particleTechnique)
inlinevirtual

Reverse the actions from the _prepare.

Reimplemented in ParticleUniverse::Attachable, and ParticleUniverse::SceneDecoratorExtern.

virtual void ParticleUniverse::Extern::copyAttributesTo ( Extern externObject)
virtual
virtual void ParticleUniverse::Extern::copyParentAttributesTo ( Extern externObject)
virtual

Copy parent attributes to another extern object.

const String& ParticleUniverse::Extern::getExternType ( void  ) const
inline

Todo

const String& ParticleUniverse::Extern::getName ( void  ) const
inline

Todo

ParticleTechnique* ParticleUniverse::Extern::getParentTechnique ( void  ) const
inline

Todo

void ParticleUniverse::Extern::setExternType ( const String externType)
inline
void ParticleUniverse::Extern::setName ( const String name)
inline
void ParticleUniverse::Extern::setParentTechnique ( ParticleTechnique parentTechnique)
inline

Member Data Documentation

Vector3 ParticleUniverse::Extern::_mExternScale
protected

Although the scale is on a Particle System level, the extern can also be scaled.

String ParticleUniverse::Extern::mExternType
protected
String ParticleUniverse::Extern::mName
protected
ParticleTechnique* ParticleUniverse::Extern::mParentTechnique
protected

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