IPolygonFormat.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // -----------------------------------------------------------------------
  2. // <copyright file="IPolygonFormat.cs" company="">
  3. // Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/
  4. // </copyright>
  5. // -----------------------------------------------------------------------
  6. namespace UnityEngine.U2D.Animation.TriangleNet
  7. .IO
  8. {
  9. using System.IO;
  10. using Animation.TriangleNet.Geometry;
  11. /// <summary>
  12. /// Interface for geometry input.
  13. /// </summary>
  14. internal interface IPolygonFormat : IFileFormat
  15. {
  16. /// <summary>
  17. /// Read a file containing polygon geometry.
  18. /// </summary>
  19. /// <param name="filename">The path of the file to read.</param>
  20. /// <returns>An instance of the <see cref="IPolygon" /> class.</returns>
  21. IPolygon Read(string filename);
  22. /// <summary>
  23. /// Save a polygon geometry to disk.
  24. /// </summary>
  25. /// <param name="polygon">An instance of the <see cref="IPolygon" /> class.</param>
  26. /// <param name="filename">The path of the file to save.</param>
  27. void Write(IPolygon polygon, string filename);
  28. /// <summary>
  29. /// Save a polygon geometry to a <see cref="Stream" />.
  30. /// </summary>
  31. /// <param name="polygon">An instance of the <see cref="IPolygon" /> class.</param>
  32. /// <param name="stream">The stream to save to.</param>
  33. void Write(IPolygon polygon, Stream stream);
  34. }
  35. }