LineIdentified.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using o0.Geometry2D.Float;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace o0.Project
  8. {
  9. public class LineIdentified
  10. {
  11. // 属于的识别批次
  12. public int Batch;
  13. // 线段
  14. public Line Line;
  15. // 线梯度
  16. public float Gradient;
  17. // 线梯度方向, 0 - 180度
  18. public float GradientDegree;
  19. public LineIdentified(int batch, Line line, float gradient, float gradientDegree)
  20. {
  21. Batch = batch;
  22. Line = line;
  23. Gradient = gradient;
  24. GradientDegree = gradientDegree;
  25. }
  26. public LineIdentified(int batch, (Line line, float gradient, float gradientDegree) lineParams)
  27. {
  28. Batch = batch;
  29. Line = lineParams.line;
  30. Gradient = lineParams.gradient;
  31. GradientDegree = lineParams.gradientDegree;
  32. }
  33. public void Offset(Vector offset)
  34. {
  35. Line += offset;
  36. }
  37. }
  38. }