/// <summary> /// Reads a <see cref="Polygon2f"/> from an <see cref="Ibasa.IO.BinaryReader">. /// </summary> public static Polygon2f ReadPolygon2f(this Ibasa.IO.BinaryReader reader) { var length = reader.ReadInt32(); var array = new Point2f[length]; for (int i = 0; i < length; ++i) { array[i] = reader.ReadPoint2f(); } return(new Polygon2f(array)); }
/// <summary> /// Reads a <see cref="Line2f"/> from an <see cref="Ibasa.IO.BinaryReader">. /// </summary> public static Line2f ReadLine2f(this Ibasa.IO.BinaryReader reader) { return(new Line2f(reader.ReadPoint2f(), reader.ReadPoint2f())); }