V-Gears 0
Free Final Fantasy VII engine.
Particle Class Referenceabstract

A particle. More...

#include <Particle.h>

Inheritance diagram for Particle:
Collaboration diagram for Particle:

Public Types

enum  ParticleType { PT_VISUAL , PT_EMITTER }
 Types of particles. More...
 

Public Member Functions

 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...
 

Public Attributes

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...
 

Protected Attributes

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...
 

Detailed Description

A particle.

Particles are emitted by one {

See also
ParticleEmitter}.

Member Enumeration Documentation

◆ ParticleType

Types of particles.

Enumerator
PT_VISUAL 

A visual particle.

PT_EMITTER 
Todo:
Document.

Constructor & Destructor Documentation

◆ Particle()

Particle::Particle ( )

Constructor.

◆ ~Particle()

Particle::~Particle ( )
pure virtual

Destructor.

Member Function Documentation

◆ CopyAttributesTo()

void Particle::CopyAttributesTo ( Particle particle)
virtual

Copies the particle attributes to another particle.

Parameters
[out]particleThe particl to copy the atttributes to.

◆ GetParentEmitter()

ParticleEmitter * Particle::GetParentEmitter ( ) const
inline

Retrieves the particle emitter.

Returns
The emitter.

◆ GetParticleType()

ParticleType Particle::GetParticleType ( ) const
inline

Retrieves the particle type.

Returns
The particle type.

◆ InitForEmission()

virtual void Particle::InitForEmission ( )
inlinevirtual

Initializes the particle.

It makes it ready for emission.

Reimplemented in ParticleEmitter.

◆ InitForExpiration()

virtual void Particle::InitForExpiration ( )
inlinevirtual

Initializes the particle.

It makes it ready for expiration.

Todo:
: Document this properly.

Reimplemented in VisualParticle.

◆ IsEmittable()

bool Particle::IsEmittable ( ) const
inline

Checks if the particle can be emitted.

Returns
True if the particle can be emitted, false if it can't.

◆ IsEnabled()

bool Particle::IsEnabled ( ) const
inline

Checks if the particle is enabled.

Returns
True if the particle is enabled, false otherwise.

◆ SetEmittable()

void Particle::SetEmittable ( bool  emittable)
inline

Toggles the particle emitability.

Parameters
[in]emittableTrue to make the particle emittable, false to prevent it to be emitted.

◆ SetEnabled()

void Particle::SetEnabled ( bool  enabled)
inline

Enables or disables the particle.

Parameters
[in]enabledTrue to enable the particle, false to disable it.

◆ SetParentEmitter()

void Particle::SetParentEmitter ( ParticleEmitter parent_emitter)
inline

Sets the particle emitter.

Parameters
[in]parent_emitterThe emitter for the particle.
Todo:
Check if parent_emitter is an in or out parameter.

◆ Update()

void Particle::Update ( Ogre::Real  time_elapsed)
virtual

Updates the particle.

Updates it position based on the time lived by the particle.

Parameters
[in]time_elapsedTime lived by the particle.

Member Data Documentation

◆ additional_data

ParticleAdditionalData* Particle::additional_data

Additional data for the particle.

◆ direction

Ogre::Vector3 Particle::direction

The direction that the particle is or will be emitted to.

◆ emittable_

bool Particle::emittable_
protected

Indicates if the particl can be emitted.

◆ enabled_

bool Particle::enabled_
protected

Indicates if the particle is enabled.

◆ parent_emitter_

ParticleEmitter* Particle::parent_emitter_
protected

The particle emitter.

◆ particle_type_

ParticleType Particle::particle_type_
protected

The particle type.

◆ position

Ogre::Vector3 Particle::position

The particle position.

◆ time_to_live

float Particle::time_to_live

The particle duration.

Todo:

Seconds? Milliseconds? Frames?

Differenche with total_time_to_live?

◆ total_time_to_live

float Particle::total_time_to_live

The particle duration.

Todo:

Seconds? Milliseconds? Frames?

Differenche with time_to_live?


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