GeoXYZ.cs 888 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Ips.Library.Entity
  5. {
  6. public class GeoXYZ
  7. {
  8. public GeoXYZ() : this(0, 0, 0) { }
  9. public GeoXYZ(double x, double y) : this(x, y, 0) { }
  10. public GeoXYZ(double x, double y, double z)
  11. {
  12. X = x;
  13. Y = y;
  14. Z = z;
  15. }
  16. /// <summary>
  17. /// 位置X
  18. /// </summary>
  19. public double X { get; set; }
  20. /// <summary>
  21. /// 位置Y
  22. /// </summary>
  23. public double Y { get; set; }
  24. /// <summary>
  25. /// 位置Z
  26. /// </summary>
  27. public double Z { get; set; }
  28. public override string ToString()
  29. {
  30. return $"{X},{Y},{Z}";
  31. }
  32. public virtual double[] ToArray()
  33. {
  34. return new[] { X, Y, Z };
  35. }
  36. }
  37. }