private static bool ULeft(PolyVertex a, PolyVertex b, PolyVertex c) { return (b.X - a.X) * (c.Z - a.Z) - (c.X - a.X) * (b.Z - a.Z) < 0; }