//-----------------------------------------------------------------------
	void ParticleEmitter::copyParentAttributesTo(ParticleEmitter* emitter)
	{
		// Copy Parent attributes
		Particle::copyAttributesTo(emitter);

		emitter->setName(mName);
		emitter->setEmitsName(mEmitsName);
		emitter->setEmitsType(mEmitsType);
		emitter->mParticleDirection = mParticleDirection;
		emitter->mOriginalParticleDirection = mOriginalParticleDirection;
		emitter->mParticleOrientation = mParticleOrientation;
		emitter->mParticleOrientationRangeStart = mParticleOrientationRangeStart;
		emitter->mParticleOrientationRangeEnd = mParticleOrientationRangeEnd;
		emitter->mParticleOrientationRangeSet = mParticleOrientationRangeSet;
		emitter->mMarkedForEmission = mMarkedForEmission;
		emitter->mParentTechnique = mParentTechnique;
		emitter->setEmissionRateCameraDependency (mCameraDependencyFactory.clone(getEmissionRateCameraDependency()));
		emitter->mAutoDirection = mAutoDirection;
		emitter->mForceEmission = mForceEmission;
		emitter->mOriginalForceEmission = mOriginalForceEmission;
		emitter->mForceEmissionExecuted = mForceEmissionExecuted;
		emitter->mOriginalForceEmissionExecuted = mOriginalForceEmissionExecuted;
		emitter->mDynDurationSet = mDynDurationSet;
		emitter->mDynRepeatDelaySet = mDynRepeatDelaySet;
		emitter->mDynParticleAllDimensionsSet = mDynParticleAllDimensionsSet;
		emitter->mDynParticleWidthSet = mDynParticleWidthSet;
		emitter->mDynParticleHeightSet = mDynParticleHeightSet;
		emitter->mDynParticleDepthSet = mDynParticleDepthSet;
		emitter->_mEmitterScale = _mEmitterScale;
		emitter->mParticleColour = mParticleColour;
		emitter->mParticleColourRangeStart = mParticleColourRangeStart;
		emitter->mParticleColourRangeEnd = mParticleColourRangeEnd;
		emitter->mParticleColourRangeSet = mParticleColourRangeSet;
		emitter->mParticleTextureCoords = mParticleTextureCoords;
		emitter->mParticleTextureCoordsRangeStart = mParticleTextureCoordsRangeStart;
		emitter->mParticleTextureCoordsRangeEnd = mParticleTextureCoordsRangeEnd;
		emitter->mParticleTextureCoordsRangeSet = mParticleTextureCoordsRangeSet;
		emitter->mKeepLocal = mKeepLocal;

		// Copy Dyn. Emission rate if available
		emitter->setDynEmissionRate(mDynamicAttributeFactory.cloneDynamicAttribute(getDynEmissionRate()));

		// Copy Dyn. Total time to live if available
		emitter->setDynTotalTimeToLive(mDynamicAttributeFactory.cloneDynamicAttribute(getDynTotalTimeToLive()));

		// Copy Dyn. Velocity if available
		emitter->setDynVelocity(mDynamicAttributeFactory.cloneDynamicAttribute(getDynVelocity()));

		// Copy Dyn. Duration if available
		if (mDynDurationSet)
		{
			emitter->setDynDuration(mDynamicAttributeFactory.cloneDynamicAttribute(getDynDuration()));
		}

		// Copy Dyn. RepeatDelay if available
		if (mDynRepeatDelaySet)
		{
			emitter->setDynRepeatDelay(mDynamicAttributeFactory.cloneDynamicAttribute(getDynRepeatDelay()));
		}

		// Copy Dyn. Particle Mass if available
		emitter->setDynParticleMass(mDynamicAttributeFactory.cloneDynamicAttribute(getDynParticleMass()));

		// Copy Dyn. Angle if available
		emitter->setDynAngle(mDynamicAttributeFactory.cloneDynamicAttribute(getDynAngle()));

		// Copy Dyn. own width, height and depth if available
		if (mDynParticleAllDimensionsSet)
		{
			emitter->setDynParticleAllDimensions(mDynamicAttributeFactory.cloneDynamicAttribute(getDynParticleAllDimensions()));
		}
		if (mDynParticleWidthSet)
		{
			emitter->setDynParticleWidth(mDynamicAttributeFactory.cloneDynamicAttribute(getDynParticleWidth()));
		}
		if (mDynParticleHeightSet)
		{
			emitter->setDynParticleHeight(mDynamicAttributeFactory.cloneDynamicAttribute(getDynParticleHeight()));
		}
		if (mDynParticleDepthSet)
		{
			emitter->setDynParticleDepth(mDynamicAttributeFactory.cloneDynamicAttribute(getDynParticleDepth()));
		}
	}
示例#2
0
void PUEmitter::copyAttributesTo( PUEmitter* emitter )
{
    emitter->setName(_name);
    emitter->setEmitterType(_emitterType);
    emitter->setEmitsName(_emitsName);
    emitter->setEmitsType(_emitsType);
    emitter->_position = _position;
    emitter->_isEnabled = _isEnabled;
    emitter->_originEnabled = _originEnabled;
    emitter->_originEnabledSet = _originEnabledSet;
    emitter->_particleDirection = _particleDirection;
    emitter->_originalParticleDirection = _originalParticleDirection;
    emitter->_particleOrientation = _particleOrientation;
    emitter->_particleOrientationRangeStart = _particleOrientationRangeStart;
    emitter->_particleOrientationRangeEnd = _particleOrientationRangeEnd;
    emitter->_particleOrientationRangeSet = _particleOrientationRangeSet;
    emitter->_isMarkedForEmission = _isMarkedForEmission;
    emitter->_particleSystem = _particleSystem;
    emitter->_autoDirection = _autoDirection;
    emitter->setForceEmission(_forceEmission);
    emitter->_dynDurationSet = _dynDurationSet;
    emitter->_dynRepeatDelaySet = _dynRepeatDelaySet;
    emitter->_dynParticleAllDimensionsSet = _dynParticleAllDimensionsSet;
    emitter->_dynParticleWidthSet = _dynParticleWidthSet;
    emitter->_dynParticleHeightSet = _dynParticleHeightSet;
    emitter->_dynParticleDepthSet = _dynParticleDepthSet;
    emitter->_emitterScale = _emitterScale;
    emitter->_particleColor = _particleColor;
    emitter->_particleColorRangeStart = _particleColorRangeStart;
    emitter->_particleColorRangeEnd = _particleColorRangeEnd;
    emitter->_particleColorRangeSet = _particleColorRangeSet;
    emitter->_particleTextureCoords = _particleTextureCoords;
    emitter->_particleTextureCoordsRangeStart = _particleTextureCoordsRangeStart;
    emitter->_particleTextureCoordsRangeEnd = _particleTextureCoordsRangeEnd;
    emitter->_particleTextureCoordsRangeSet = _particleTextureCoordsRangeSet;
    emitter->_keepLocal = _keepLocal;

    // Copy Dyn. Emission rate if available
    emitter->setDynEmissionRate(getDynEmissionRate()->clone());

    // Copy Dyn. Total time to live if available
    emitter->setDynTotalTimeToLive(getDynTotalTimeToLive()->clone());

    // Copy Dyn. Velocity if available
    emitter->setDynVelocity(getDynVelocity()->clone());

    // Copy Dyn. Duration if available
    if (_dynDurationSet)
    {
        emitter->setDynDuration(getDynDuration()->clone());
    }

    // Copy Dyn. RepeatDelay if available
    if (_dynRepeatDelaySet)
    {
        emitter->setDynRepeatDelay(getDynRepeatDelay()->clone());
    }

    // Copy Dyn. Particle Mass if available
    emitter->setDynParticleMass(getDynParticleMass()->clone());

    // Copy Dyn. Angle if available
    emitter->setDynAngle(getDynAngle()->clone());

    // Copy Dyn. own width, height and depth if available
    if (_dynParticleAllDimensionsSet)
    {
        emitter->setDynParticleAllDimensions(getDynParticleAllDimensions()->clone());
    }
    if (_dynParticleWidthSet)
    {
        emitter->setDynParticleWidth(getDynParticleWidth()->clone());
    }
    if (_dynParticleHeightSet)
    {
        emitter->setDynParticleHeight(getDynParticleHeight()->clone());
    }
    if (_dynParticleDepthSet)
    {
        emitter->setDynParticleDepth(getDynParticleDepth()->clone());
    }
}