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 () |
![]() | |
const std::vector< Entity::ID > & | GetChildren () const |
std::vector< Entity::ID > | GetAllSubEntities () const |
bool | Contains (Entity::ID) |
std::vector< Entity::ID > | FindChildByName (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 () |
Entity & | GetParent () |
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< Variable > | GetWatchedVars () |
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 | |
![]() | |
enum | UpdateClass { Before, After } |
![]() | |
template<typename T > | |
static Entity::ID | Create () |
static Entity::ID | Create () |
template<typename T > | |
static T * | CreateReference () |
static std::vector< Entity::ID > | GetAll () |
![]() | |
bool | step |
bool | draw |
![]() | |
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
-
pos The point of origin to emit the particle. p The 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.
The documentation for this class was generated from the following file:
- /home/jc/git/Dynacoe/DynacoeSrc/includes/Dynacoe/Particle.h