public boolean cubeInFrustum(float x, float y, float z, float size)
	{
		// This test is a bit more work, but not too much more complicated.
		// Basically, what is going on is, that we are given the center of the
		// cube,
		// and half the length. Think of it like a radius. Then we checking each
		// point
		// in the cube and seeing if it is inside the frustum. If a point is
		// found in front
		// of a side, then we skip to the next side. If we get to a plane that
		// does NOT have
		// a point in front of it, then it will return false.

		// *Note* - This will sometimes say that a cube is inside the frustum
		// when it isn't.
		// This happens when all the corners of the bounding box are not behind
		// any one plane.
		// This is rare and shouldn't effect the overall rendering speed.

		for (int i = 0; i < 6; i++)
		{
			Plane plane = m_Frustum[i];

			float axm = plane.x * (x - size);
			float bym = plane.y * (y - size);
			float czm = plane.z * (z - size);
			float d = plane.d;

			if (axm + bym + czm + d > 0)
				continue;

			float axp = plane.x * (x + size);

			if (axp + bym + czm + d > 0)
				continue;

			float byp = plane.y * (y + size);

			if (axm + byp + czm + d > 0)
				continue;
			if (axp + byp + czm + d > 0)
				continue;

			float czp = plane.z * (z + size);

			if (axm + bym + czp + d > 0)
				continue;
			if (axp + bym + czp + d > 0)
				continue;
			if (axm + byp + czp + d > 0)
				continue;
			if (axp + byp + czp + d > 0)
				continue;

			// If we get here, it isn't in the frustum
			return false;
		}

		return true;
	}