public boolean inSphere(int px, int py, int pz)
	{
		px = px - x;
		py = py - y;
		pz = pz - z;

		boolean res = false;
		if (filled)
		{
			if (px * px + py * py + pz * pz < r * r)
				res = true;
		} else
		{
			int tmp = px * px + py * py + pz * pz;
			if (tmp < r * r && tmp >= (r - 1) * (r - 1))
				res = true;
		}

		if (res)
		{
			switch (sphereType)
			{
			case LOWER:
				if (py > 0)
					res = false;
				break;
			case UPPER:
				if (py <= 0)
					res = false;
				break;
			}
		}

		return res;
	}