//-----------------------------------------------------------------------
	void ForceFieldCalculationFactory::setWorldSize(const Ogre::Vector3& worldSize)
	{
		// The worldsize cannot be zero
		if (worldSize == Ogre::Vector3::ZERO)
			return;

		mWorldSize = worldSize;
		generate(getForceFieldSize(), mOctaves, mFrequency, mAmplitude, mPersistence, mWorldSize);
	}
//-----------------------------------------------------------------------
void PUForceFieldCalculationFactory::setWorldSize(const Vec3& worldSize)
{
    // The worldsize cannot be zero
    if (worldSize == Vec3::ZERO)
        return;

    _worldSize = worldSize;
    generate(getForceFieldSize(), _octaves, _frequency, _amplitude, _persistence, _worldSize);
}
	//-----------------------------------------------------------------------
	void ForceField::setForceFieldType(const ForceField::ForceFieldType forceFieldType)
	{
		if (mForceFieldCalculationFactory)
		{
			Ogre::ushort octaves = getOctaves();
			double frequency = getFrequency();
			double amplitude = getAmplitude();
			double persistence = getPersistence();
			unsigned int forceFieldSize = getForceFieldSize();
			Ogre::Vector3 worldSize = getWorldSize();
			
			initialise(forceFieldType, forceFieldSize, octaves, frequency, amplitude, persistence, worldSize);
		}
	}
//-----------------------------------------------------------------------
void PUForceFieldCalculationFactory::setPersistence(double persistence)
{
    _persistence = persistence;
    generate(getForceFieldSize(), _octaves, _frequency, _amplitude, _persistence, _worldSize);
}
//-----------------------------------------------------------------------
void PUForceFieldCalculationFactory::setFrequency(double frequency)
{
    _frequency = frequency;
    generate(getForceFieldSize(), _octaves, _frequency, _amplitude, _persistence, _worldSize);
}
//-----------------------------------------------------------------------
void PUForceFieldCalculationFactory::setOctaves(unsigned short octaves)
{
    _octaves = octaves;
    generate(getForceFieldSize(), _octaves, _frequency, _amplitude, _persistence, _worldSize);
}
	//-----------------------------------------------------------------------
	void ForceFieldCalculationFactory::setPersistence(double persistence)
	{
		mPersistence = persistence;
		generate(getForceFieldSize(), mOctaves, mFrequency, mAmplitude, mPersistence, mWorldSize);
	}
	//-----------------------------------------------------------------------
	void ForceFieldCalculationFactory::setFrequency(double frequency)
	{
		mFrequency = frequency;
		generate(getForceFieldSize(), mOctaves, mFrequency, mAmplitude, mPersistence, mWorldSize);
	}
	//-----------------------------------------------------------------------
	void ForceFieldCalculationFactory::setOctaves(Ogre::ushort octaves)
	{
		mOctaves = octaves;
		generate(getForceFieldSize(), mOctaves, mFrequency, mAmplitude, mPersistence, mWorldSize);
	}