MarkerInfo.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System.Linq;
  2. namespace Unity.XR.PICO.TOBSupport
  3. {
  4. public class MarkerInfo
  5. {
  6. // position
  7. public double posX;
  8. public double posY;
  9. public double posZ;
  10. // rotation
  11. public double rotationX;
  12. public double rotationY;
  13. public double rotationZ;
  14. public double rotationW;
  15. // 标志位:识别无效=0,识别有效=1
  16. public int validFlag;
  17. // 类型:静态=1/动态=0
  18. public int markerType;
  19. // marker id
  20. public int iMarkerId;
  21. // 检测图像的时间戳
  22. public double dTimestamp;
  23. // 预留标志位
  24. public float[] reserve;
  25. public override string ToString()
  26. {
  27. return $"{nameof(posX)}: {posX}, {nameof(posY)}: {posY}, {nameof(posZ)}: {posZ}, {nameof(rotationX)}: {rotationX}, {nameof(rotationY)}: {rotationY}, {nameof(rotationZ)}: {rotationZ}, {nameof(rotationW)}: {rotationW}, {nameof(validFlag)}: {validFlag}, {nameof(markerType)}: {markerType}, {nameof(iMarkerId)}: {iMarkerId}, {nameof(dTimestamp)}: {dTimestamp}, {nameof(reserve)}: {string.Join(" ", reserve)}";
  28. }
  29. }
  30. }