Frame.cs 840 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. namespace OptiTrack
  2. {
  3. public class Frame
  4. {
  5. public Trackable[] Trackables;
  6. public Marker[] Markers;
  7. public Frame(int markerCount, int trackableCount)
  8. {
  9. Trackables = new Trackable[trackableCount];
  10. Markers = new Marker[markerCount];
  11. }
  12. }
  13. public class Trackable
  14. {
  15. public int Id;
  16. public float X, Y, Z, Qx, Qy, Qz, Qw, Pitch, Roll, Yaw;
  17. public bool IsTracked;
  18. internal bool IsAlmostSameCoordinates(Trackable t)
  19. {
  20. return X == t.X && Y == t.Y && Z == t.Z;
  21. }
  22. }
  23. public class Marker
  24. {
  25. public float X, Y, Z;
  26. public Trackable BoundToTrackable;
  27. public Marker(float x, float y, float z)
  28. {
  29. X = x;
  30. Y = y;
  31. Z = z;
  32. }
  33. }
  34. }