public float[] boundingBox()
	{
		if (entities.size() == 0) return null;
		float minX = entities.get(0).position.x, maxX = entities.get(0).position.x;
		float minY = entities.get(0).position.y, maxY = entities.get(0).position.y;
		float minZ = entities.get(0).position.z, maxZ = entities.get(0).position.z;
		if (entities.size() == 1) return new float[]{minX, minY, minZ, maxX-minX, maxY-minY, maxZ-minZ};
		for (int i = 1; i < entities.size(); i++)
		{
			float x = entities.get(i).position.x;
			float y = entities.get(i).position.y;
			float z = entities.get(i).position.z;
			if (x < minX) minX = x; else if (x > maxX) maxX = x; 
			if (y < minY) minY = y; else if (y > maxY) maxY = y; 
			if (z < minZ) minZ = z; else if (z > maxZ) maxZ = z; 
		}
		return new float[]{minX, minY, minZ, maxX-minX, maxY-minY, maxZ-minZ};
	}