public void prepareForFilling (RNG rng)
	{
		for (Enumeration<String> e = modifiers.keys(); e.hasMoreElements();)
		{
			Modifier mod = modifiers.get(e.nextElement());
			switch(mod.getType())
			{
			case PERLIN:
				((PerlinModifier) mod).setRNG(rng, maxScale);
				mod.setLocation(minX, minY, minZ, maxX, maxY, maxZ);
				break;
			case WEIGHTED_PERLIN:
				((WeightedPerlinModifier) mod).setRNG(rng, maxScale);
				mod.setLocation(minX, minY, minZ, maxX, maxY, maxZ);
				break;
			case METABALL:
				mod.setRNG(rng);
				((MetaballModifier) mod).setLocation(minX, minY, minZ, maxX, maxY, maxZ);
				break;
			case VORONOI:
				mod.setRNG(rng);
				((VoronoiModifier) mod).setLocation(minX, minY, minZ, maxX, maxY, maxZ);
				break;
			case WORLEY:
				mod.setRNG(rng);
				((WorleyModifier) mod).setLocation(minX, minY, minZ, maxX, maxY, maxZ);
				break;
			}
		}
		resolver = new VariableResolver();
		for (Enumeration<String> e = modifiers.keys(); e.hasMoreElements();)
		{
			String key = e.nextElement();
			resolver.addFunction(key, modifiers.get(key));
		}
		
		resolver.setVariable("minX", minX);
		resolver.setVariable("minY", minY);
		resolver.setVariable("minZ", minZ);
		resolver.setVariable("maxX", maxX);
		resolver.setVariable("maxY", maxY);
		resolver.setVariable("maxZ", maxZ);
	}