Edge.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // -----------------------------------------------------------------------
  2. // <copyright file="Edge.cs" company="">
  3. // Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/
  4. // </copyright>
  5. // -----------------------------------------------------------------------
  6. namespace UnityEngine.U2D.Animation.TriangleNet
  7. .Geometry
  8. {
  9. /// <summary>
  10. /// Represents a straight line segment in 2D space.
  11. /// </summary>
  12. internal class Edge : IEdge
  13. {
  14. /// <summary>
  15. /// Gets the first endpoints index.
  16. /// </summary>
  17. public int P0
  18. {
  19. get;
  20. private set;
  21. }
  22. /// <summary>
  23. /// Gets the second endpoints index.
  24. /// </summary>
  25. public int P1
  26. {
  27. get;
  28. private set;
  29. }
  30. /// <summary>
  31. /// Gets the segments boundary mark.
  32. /// </summary>
  33. public int Label
  34. {
  35. get;
  36. private set;
  37. }
  38. /// <summary>
  39. /// Initializes a new instance of the <see cref="Edge" /> class.
  40. /// </summary>
  41. public Edge(int p0, int p1)
  42. : this(p0, p1, 0)
  43. {}
  44. /// <summary>
  45. /// Initializes a new instance of the <see cref="Edge" /> class.
  46. /// </summary>
  47. public Edge(int p0, int p1, int label)
  48. {
  49. this.P0 = p0;
  50. this.P1 = p1;
  51. this.Label = label;
  52. }
  53. }
  54. }