ParticleEmitter2D Class Reference

#include <Particle.h>

Description

Emits particles.

Once a particle is loaded, it can then be drawn from a ParticleEmitter. Particle emitters serve as the context by which emitted particles exist. Thus, the particles emitted are affected by the ParticleEmitter's Position, ordering, updating, etc.

Functions

void EnableFiltering (bool doIt)
 
void EnableTranslucency (bool doIt)
 
void EmitParticle (AssetID p, int n=1)
 
void OnDraw ()
 
- Functions inherited from Entity
const std::vector< Entity::ID > & GetChildren () const
 
std::vector< Entity::IDGetAllSubEntities () const
 
bool Contains (Entity::ID)
 
std::vector< Entity::IDFindChildByName (const std::string &)
 
void Step ()
 
void Draw ()
 
void Attach (Entity::ID)
 
void Detach (Entity::ID)
 
template<typename T >
T * CreateChild ()
 
int GetNumChildren ()
 
double StepDuration ()
 
double DrawDuration ()
 
void SetPriority (Priority p)
 
void SetPriorityLast ()
 
void SetPriorityFirst ()
 
Priority GetPriority ()
 
EntityGetParent ()
 
bool HasParent ()
 
void Remove ()
 
void SetName (const std::string &name)
 
ID GetID ()
 
std::string GetName ()
 
void Watch (Variable v)
 
Variable GetWatched (const std::string &name)
 
std::vector< VariableGetWatchedVars ()
 
void Unwatch (const std::string &varName)
 
template<typename T >
T * AddComponent (UpdateClass when=UpdateClass::Before)
 
template<typename T >
T * QueryComponent ()
 
const std::vector< Component * > & GetComponents () const
 
void RemoveComponent (const std::string &tag)
 
void RemoveComponent (const Component *)
 
bool IsStepping ()
 
bool IsDrawing ()
 

Additional Inherited Members

- Public Types inherited from Entity
enum  UpdateClass {
  Before,
  After
}
 
- Static Functions inherited from Entity
template<typename T >
static Entity::ID Create ()
 
static Entity::ID Create ()
 
template<typename T >
static T * CreateReference ()
 
static std::vector< Entity::IDGetAll ()
 
- Properties inherited from Entity
bool step
 
bool draw
 
- Protected Member Functions inherited from Entity
virtual void OnEnter ()
 
virtual void OnDepart ()
 
virtual void OnRemove ()
 
virtual void OnPreStep ()
 
virtual void OnStep ()
 
virtual void OnPreDraw ()
 

Member Function Documentation

void EnableFiltering ( bool  doIt)

Enable texture filtering for each particle emitted. It is enabled by default.

void EnableTranslucency ( bool  doIt)

Enable translucency for each each particle drawn. It is enabled by default.

void EmitParticle ( AssetID  p,
int  n = 1 
)

Instantiates a particle in 2D space based on a stored design.

The function returns a reference to the instantated particle. Changes made to the particle after emission are reflected on the emitted particle.

Parameters
posThe point of origin to emit the particle.
pThe name of the particle design to emit. If p does not refer to a stored particle, then no particle is emitted and the reference returned is invalid.
void OnDraw ( )
virtual

Called when Draw() is called.

Reimplemented from Entity.


The documentation for this class was generated from the following file:
  • /home/jc/git/Dynacoe/DynacoeSrc/includes/Dynacoe/Particle.h