public void expandToWorldTree(RNG rng, float parentHeight, float parentWidth, float parentDepth, float parentXPos, float parentYPos, float parentZPos, int index, int subCount)
	{
		ExceptionLogger.log("Expanding Area \""+identifier+"\"", LoggerLevel.FINEST);
		VariableResolver resolver = new VariableResolver();
		resolver.setVariable("$i", index);
		resolver.setVariable("$n", subCount);
		if (assignments != null)
		{
			for (Assignment assignment : assignments)
			{
				assignment.evaluate(rng, resolver);
			}
			xPos = (resolver.getVariable("xPos").floatValue())*parentWidth+parentXPos;
			yPos = (resolver.getVariable("yPos").floatValue())*parentHeight+parentYPos;
			if (resolver.isDefined("zPos"))
				zPos = (resolver.getVariable("zPos").floatValue())*parentDepth+parentZPos;
			else
				zPos = 0.0f;
			width = (resolver.getVariable("width").floatValue())*parentWidth;
			height = (resolver.getVariable("height").floatValue())*parentHeight;
			if (resolver.isDefined("depth"))
				depth = (resolver.getVariable("depth").floatValue())*parentDepth;
			else
				depth = 1.0f;
		}
		ArrayList<TreeNodeArea> realSubAreas = new ArrayList<TreeNodeArea>();
		
		for (TreeNodeArea tna: subAreas)
		{
			int newSubCount = tna.calculateCount(rng);
			for (int i = 0; i < newSubCount; i++)
			{
				TreeNodeArea newArea = tna.clone();
				newArea.expandToWorldTree(rng, height, width, depth, xPos, yPos, zPos, i, newSubCount);
				realSubAreas.add(newArea);
			}
		}
		subAreas = realSubAreas;
	}