IInputProvider.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using MathNet.Numerics.LinearAlgebra.Single;
  7. namespace bbiwarg.InputProviders
  8. {
  9. public enum DetectionStatus
  10. {
  11. Inactive,
  12. Detected,
  13. Tracked
  14. }
  15. public enum HandSide
  16. {
  17. Unknown,
  18. Left,
  19. Right
  20. }
  21. interface IInputProvider
  22. {
  23. void init();
  24. void start();
  25. void stop();
  26. void updateFrame();
  27. void releaseFrame();
  28. float getFrameRate();
  29. float getHFOV();
  30. float getVFOV();
  31. bool isActive();
  32. InputFrame getInputFrame();
  33. /*
  34. * all handIndices have to be 1 or 2
  35. */
  36. bool isHandOpen(uint handIndex);
  37. Vector getPalmPosition3D(uint handIndex);
  38. Vector getPalmPosition2D(uint handIndex);
  39. Vector getTipPosition3D(uint handIndex);
  40. Vector getForearmPosition3D(uint handIndex);
  41. Vector getPalmNormal3D(uint handIndex);
  42. DetectionStatus[] getFingerStatus(uint handIndex);
  43. DetectionStatus getHandStatus(uint handIndex);
  44. Vector[] getFingerTipPositions3D(uint handIndex);
  45. Vector[] getFingerTipPositions2D(uint handIndex);
  46. HandSide getHandSide(uint handIndex);
  47. }
  48. }