BadSubseg.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // -----------------------------------------------------------------------
  2. // <copyright file="BadSubseg.cs" company="">
  3. // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html
  4. // Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/
  5. // </copyright>
  6. // -----------------------------------------------------------------------
  7. namespace UnityEngine.U2D.Animation.TriangleNet
  8. .Meshing.Data
  9. {
  10. using System;
  11. using Animation.TriangleNet.Geometry;
  12. using Animation.TriangleNet.Topology;
  13. /// <summary>
  14. /// A queue used to store encroached subsegments.
  15. /// </summary>
  16. /// <remarks>
  17. /// Each subsegment's vertices are stored so that we can check whether a
  18. /// subsegment is still the same.
  19. /// </remarks>
  20. class BadSubseg
  21. {
  22. public Osub subseg; // An encroached subsegment.
  23. public Vertex org, dest; // Its two vertices.
  24. public override int GetHashCode()
  25. {
  26. return subseg.seg.hash;
  27. }
  28. public override string ToString()
  29. {
  30. return String.Format("B-SID {0}", subseg.seg.hash);
  31. }
  32. }
  33. }