V-Gears 0
Free Final Fantasy VII engine.
ParticleEmitter Class Reference

A particle emitter. More...

#include <ParticleEmitter.h>

Inheritance diagram for ParticleEmitter:
Collaboration diagram for ParticleEmitter:

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...
 
ParticleTechniqueGetParentTechnique () 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...
 
- Public Member Functions inherited from Particle
 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...
 
ParticleEmitterGetParentEmitter () 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

ParticleTechniqueparent_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...
 
- Protected Attributes inherited from Particle
ParticleEmitterparent_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

- Public Types inherited from Particle
enum  ParticleType { PT_VISUAL , PT_EMITTER }
 Types of particles. More...
 
- Public Attributes inherited from Particle
ParticleAdditionalDataadditional_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...
 

Detailed Description

A particle emitter.

Constructor & Destructor Documentation

◆ ParticleEmitter()

ParticleEmitter::ParticleEmitter ( void  )

Constructor.

◆ ~ParticleEmitter()

ParticleEmitter::~ParticleEmitter ( )
virtual

Destructor.

Member Function Documentation

◆ CalculateRequestedParticles()

int ParticleEmitter::CalculateRequestedParticles ( Ogre::Real  time_elapsed)
virtual

Calculates how many particles are to be emitted in a given time.

Parameters
[in]time_elapsedThe elapsed time since the emitter has been emitting.
Todo:
Understand and document.

◆ CopyAttributesTo()

void ParticleEmitter::CopyAttributesTo ( ParticleEmitter emitter)
virtual

Copies attributes to other particle emmiter.

Parameters
[out]emitterThe particle emmite to copy the attributes to.

Reimplemented in PointEmitter.

◆ GetEmissionRate()

int ParticleEmitter::GetEmissionRate ( ) const
inline

Retrieves the emission rate of the emitter.

Returns
Emission rate.

◆ GetEmitsName()

const Ogre::String & ParticleEmitter::GetEmitsName ( ) const
inline

Retrieves the name of the emits.

Returns
Name of the emits
Todo:
What are the emits?

◆ GetEmitsType()

ParticleType ParticleEmitter::GetEmitsType ( ) const
inline

Retrieves the type of the emits.

Returns
Type of the emits.
Todo:
What are the emits?

◆ GetEmitterType()

const Ogre::String & ParticleEmitter::GetEmitterType ( ) const
inline

Retrieves the emitter type.

Returns
The emitter type.

◆ GetName()

const Ogre::String & ParticleEmitter::GetName ( ) const
inline

Retrieves the emitter name.

Returns
Emitter name.

◆ GetParentTechnique()

ParticleTechnique * ParticleEmitter::GetParentTechnique ( ) const
inline

Retrieves the parent technique of the emitter.

Returns
Technique.
Todo:
Understand and document.

◆ InitForEmission()

void ParticleEmitter::InitForEmission ( )
virtual
Todo:
Understand and document.

Reimplemented from Particle.

◆ InitParticleForEmission()

void ParticleEmitter::InitParticleForEmission ( Particle particle)
virtual

Initializes a article to be emmited.

Parameters
[out]particleThe particle to be initialized.

◆ SetEmissionRate()

void ParticleEmitter::SetEmissionRate ( int  rate)
inline

Set the emission rate for the emitter.

Parameters
[in]rateEmission rate.

◆ SetEmitDirection()

void ParticleEmitter::SetEmitDirection ( const Ogre::Vector3 &  dir)
inline

Sets the particle direction for the emitter.

It sets a fixed direction. For a variable, ranged direction, use {

See also
setEmitDirectionRange}.
Parameters
[in]dirParticle direction.

◆ SetEmitDirectionRange()

void ParticleEmitter::SetEmitDirectionRange ( const Ogre::Vector3 &  dir_1,
const Ogre::Vector3 &  dir_2 
)
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 {

See also
setEmitDirection}.
Parameters
[in]dir_1One of the limits for the range of directions.
[in]dir_2One of the limits for the range of directions.

◆ SetEmitsName()

void ParticleEmitter::SetEmitsName ( const Ogre::String &  emits_name)

Sets the name of the emits.

When changed, notifies the technique of the change.

Parameters
[in]emits_nameName for the emits.
Todo:
What are the emits?

◆ SetEmitsType()

void ParticleEmitter::SetEmitsType ( ParticleType  emits_type)
inline

Sets the type of the emits.

Parameters
[in]emits_typeType for the emits.
Todo:
What are the emits?

◆ SetEmitterType()

void ParticleEmitter::SetEmitterType ( const Ogre::String &  emitter_type)
inline

Sets the emitter type.

Parameters
[in]emitter_typeThe emitter type.

◆ SetEmitTotalTimeToLive()

void ParticleEmitter::SetEmitTotalTimeToLive ( float  time)
inline

Sets the time the particles must be displayed between being emitted and disappearing.

Parameters
[in]timeDuration of the particles.
Todo:
Time is in secons? milliseconds? frames?

◆ SetName()

void ParticleEmitter::SetName ( const Ogre::String &  name)
inline

Set a name for the emitter.

Parameters
[in]nameName for the emitter.

◆ SetParentTechnique()

void ParticleEmitter::SetParentTechnique ( ParticleTechnique tech)
inline

Sets the parent technique for emitter.

Parameters
[in]techTechnique.
Todo:
Understand and document.

Member Data Documentation

◆ direction_dictionary_

ParticleEmitterDictionary::Direction ParticleEmitter::direction_dictionary_
staticprotected

Dictionary for particle directions.

◆ emission_rate_

int ParticleEmitter::emission_rate_
protected

The emission rate.

◆ emission_rate_dictionary_

ParticleEmitterDictionary::EmissionRate ParticleEmitter::emission_rate_dictionary_
staticprotected

Dictionary for emission rates.

◆ emission_remainder_

Ogre::Real ParticleEmitter::emission_remainder_
protected

The remaining particles to be emitted.

◆ emit_direction_1_

Ogre::Vector3 ParticleEmitter::emit_direction_1_
protected

One of the limits for the range of directions.

◆ emit_direction_2_

Ogre::Vector3 ParticleEmitter::emit_direction_2_
protected

One of the limits for the range of directions.

◆ emit_total_time_to_live_

float ParticleEmitter::emit_total_time_to_live_
protected

Particle duration.

◆ emits_name_

Ogre::String ParticleEmitter::emits_name_
protected

The emits name.

◆ emits_type_

ParticleType ParticleEmitter::emits_type_
protected

The emits type.

◆ emitter_type_

Ogre::String ParticleEmitter::emitter_type_
protected

The emitter type.

◆ name_

Ogre::String ParticleEmitter::name_
protected

The emitter name.

◆ parent_technique_

ParticleTechnique* ParticleEmitter::parent_technique_
protected

The particle technique.

◆ total_time_to_live_dictionary_

ParticleEmitterDictionary::TotalTimeToLive ParticleEmitter::total_time_to_live_dictionary_
staticprotected

Disctionary for particle durations.


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