![]() |
V-Gears 0
Free Final Fantasy VII engine.
|
A particle emitter. More...
#include <ParticleEmitter.h>
Public Member Functions | |
ParticleEmitter () | |
Constructor. More... | |
virtual | ~ParticleEmitter () |
Destructor. More... | |
virtual void | CopyAttributesTo (ParticleEmitter *emitter) |
Copies attributes to other particle emmiter. More... | |
virtual void | InitForEmission () |
virtual int | CalculateRequestedParticles (Ogre::Real time_elapsed) |
Calculates how many particles are to be emitted in a given time. More... | |
virtual void | InitParticleForEmission (Particle *particle) |
Initializes a article to be emmited. More... | |
void | SetParentTechnique (ParticleTechnique *tech) |
Sets the parent technique for emitter. More... | |
ParticleTechnique * | GetParentTechnique () const |
Retrieves the parent technique of the emitter. More... | |
void | SetName (const Ogre::String &name) |
Set a name for the emitter. More... | |
const Ogre::String & | GetName () const |
Retrieves the emitter name. More... | |
void | SetEmitterType (const Ogre::String &emitter_type) |
Sets the emitter type. More... | |
const Ogre::String & | GetEmitterType () const |
Retrieves the emitter type. More... | |
void | SetEmitsName (const Ogre::String &emits_name) |
Sets the name of the emits. More... | |
const Ogre::String & | GetEmitsName () const |
Retrieves the name of the emits. More... | |
void | SetEmitsType (ParticleType emits_type) |
Sets the type of the emits. More... | |
ParticleType | GetEmitsType () const |
Retrieves the type of the emits. More... | |
void | SetEmissionRate (int rate) |
Set the emission rate for the emitter. More... | |
int | GetEmissionRate () const |
Retrieves the emission rate of the emitter. More... | |
void | SetEmitDirection (const Ogre::Vector3 &dir) |
Sets the particle direction for the emitter. More... | |
void | SetEmitDirectionRange (const Ogre::Vector3 &dir_1, const Ogre::Vector3 &dir_2) |
Sets the particle direction for the emitter. More... | |
void | SetEmitTotalTimeToLive (float time) |
Sets the time the particles must be displayed between being emitted and disappearing. More... | |
![]() | |
Particle () | |
Constructor. More... | |
virtual | ~Particle ()=0 |
Destructor. More... | |
virtual void | InitForEmission () |
Initializes the particle. More... | |
virtual void | InitForExpiration () |
Initializes the particle. More... | |
virtual void | Update (Ogre::Real time_elapsed) |
Updates the particle. More... | |
virtual void | CopyAttributesTo (Particle *particle) |
Copies the particle attributes to another particle. More... | |
ParticleType | GetParticleType () const |
Retrieves the particle type. More... | |
void | SetParentEmitter (ParticleEmitter *parent_emitter) |
Sets the particle emitter. More... | |
ParticleEmitter * | GetParentEmitter () const |
Retrieves the particle emitter. More... | |
void | SetEnabled (bool enabled) |
Enables or disables the particle. More... | |
bool | IsEnabled () const |
Checks if the particle is enabled. More... | |
void | SetEmittable (bool emittable) |
Toggles the particle emitability. More... | |
bool | IsEmittable () const |
Checks if the particle can be emitted. More... | |
Protected Attributes | |
ParticleTechnique * | parent_technique_ |
The particle technique. More... | |
Ogre::String | name_ |
The emitter name. More... | |
Ogre::String | emitter_type_ |
The emitter type. More... | |
Ogre::String | emits_name_ |
The emits name. More... | |
ParticleType | emits_type_ |
The emits type. More... | |
int | emission_rate_ |
The emission rate. More... | |
Ogre::Real | emission_remainder_ |
The remaining particles to be emitted. More... | |
Ogre::Vector3 | emit_direction_1_ |
One of the limits for the range of directions. More... | |
Ogre::Vector3 | emit_direction_2_ |
One of the limits for the range of directions. More... | |
float | emit_total_time_to_live_ |
Particle duration. More... | |
![]() | |
ParticleEmitter * | parent_emitter_ |
The particle emitter. More... | |
ParticleType | particle_type_ |
The particle type. More... | |
bool | enabled_ |
Indicates if the particle is enabled. More... | |
bool | emittable_ |
Indicates if the particl can be emitted. More... | |
Static Protected Attributes | |
static ParticleEmitterDictionary::EmissionRate | emission_rate_dictionary_ |
Dictionary for emission rates. More... | |
static ParticleEmitterDictionary::Direction | direction_dictionary_ |
Dictionary for particle directions. More... | |
static ParticleEmitterDictionary::TotalTimeToLive | total_time_to_live_dictionary_ |
Disctionary for particle durations. More... | |
Additional Inherited Members | |
![]() | |
enum | ParticleType { PT_VISUAL , PT_EMITTER } |
Types of particles. More... | |
![]() | |
ParticleAdditionalData * | additional_data |
Additional data for the particle. More... | |
Ogre::Vector3 | position |
The particle position. More... | |
Ogre::Vector3 | direction |
The direction that the particle is or will be emitted to. More... | |
float | time_to_live |
The particle duration. More... | |
float | total_time_to_live |
The particle duration. More... | |
A particle emitter.
ParticleEmitter::ParticleEmitter | ( | void | ) |
Constructor.
|
virtual |
Destructor.
|
virtual |
Calculates how many particles are to be emitted in a given time.
[in] | time_elapsed | The elapsed time since the emitter has been emitting. |
|
virtual |
Copies attributes to other particle emmiter.
[out] | emitter | The particle emmite to copy the attributes to. |
Reimplemented in PointEmitter.
|
inline |
Retrieves the emission rate of the emitter.
|
inline |
|
inline |
|
inline |
Retrieves the emitter type.
|
inline |
Retrieves the emitter name.
|
inline |
|
virtual |
|
virtual |
Initializes a article to be emmited.
[out] | particle | The particle to be initialized. |
|
inline |
Set the emission rate for the emitter.
[in] | rate | Emission rate. |
|
inline |
Sets the particle direction for the emitter.
It sets a fixed direction. For a variable, ranged direction, use {
[in] | dir | Particle direction. |
|
inline |
Sets the particle direction for the emitter.
It sets a ranged direction. For each paticle, a random direction between DIR_1 and DIR_2 will be assigned. For a fixed direction, use {
[in] | dir_1 | One of the limits for the range of directions. |
[in] | dir_2 | One of the limits for the range of directions. |
void ParticleEmitter::SetEmitsName | ( | const Ogre::String & | emits_name | ) |
Sets the name of the emits.
When changed, notifies the technique of the change.
[in] | emits_name | Name for the emits. |
|
inline |
|
inline |
Sets the emitter type.
[in] | emitter_type | The emitter type. |
|
inline |
Sets the time the particles must be displayed between being emitted and disappearing.
[in] | time | Duration of the particles. |
|
inline |
Set a name for the emitter.
[in] | name | Name for the emitter. |
|
inline |
|
staticprotected |
Dictionary for particle directions.
|
protected |
The emission rate.
|
staticprotected |
Dictionary for emission rates.
|
protected |
The remaining particles to be emitted.
|
protected |
One of the limits for the range of directions.
|
protected |
One of the limits for the range of directions.
|
protected |
Particle duration.
|
protected |
The emits name.
|
protected |
The emits type.
|
protected |
The emitter type.
|
protected |
The emitter name.
|
protected |
The particle technique.
|
staticprotected |
Disctionary for particle durations.