//-----------------------------------------------------------------------
	void Extern::_processParticle(ParticleTechnique* particleTechnique, Particle* particle, Real timeElapsed, bool firstParticle)
	{
		// Call the _firstParticle() function if the first particle in the update loop is encountered.
		if (firstParticle)
		{
			// Perform a precalculation at the first particle
			_firstParticle(particleTechnique, particle, timeElapsed);
		}

		_interface(particleTechnique, particle, timeElapsed);
	}
	//-----------------------------------------------------------------------
	void ParticleObserver::_processParticle(ParticleTechnique* particleTechnique, Particle* particle, Real timeElapsed, bool firstParticle)
	{
		if (!mEnabled)
			return;

		// Call the _firstParticle() function if the first particle in the update loop is encountered.
		if (firstParticle)
		{
			_firstParticle(particleTechnique, particle, timeElapsed);
		}

		if (mParticleTypeToObserveSet && particle->particleType != mParticleTypeToObserve)
			return;

		// Observe
		_handleObserve(particleTechnique, particle, timeElapsed);
	}
Esempio n. 3
0
	//-----------------------------------------------------------------------
	void ParticleAffector::_processParticle(ParticleTechnique* particleTechnique, Particle* particle, Ogre::Real timeElapsed, bool firstParticle)
	{
		// Call the _firstParticle() function if the first particle in the update loop is encountered.
		if (firstParticle)
		{
			// Perform a precalculation at the first particle
			_firstParticle(particleTechnique, particle, timeElapsed);
		}

		if (!mExcludedEmitters.empty() && particle->parentEmitter)
		{
			// Return if the emitter which emits this particle is part of the list
			Ogre::String emitterName = particle->parentEmitter->getName();
			Ogre::list<Ogre::String>::type::iterator it;
			it = std::find(mExcludedEmitters.begin(), mExcludedEmitters.end(), emitterName);
			if (it != mExcludedEmitters.end())
			{
				return;
			}
		}

		_affect(particleTechnique, particle, timeElapsed);
	}