HandRepresentation.cs 834 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. namespace Leap.Unity
  3. {
  4. public abstract class HandRepresentation
  5. {
  6. public HandRepresentation(int handID, Hand hand, Chirality chirality, ModelType modelType)
  7. {
  8. this.HandID = handID;
  9. this.MostRecentHand = hand;
  10. this.RepChirality = chirality;
  11. this.RepType = modelType;
  12. }
  13. public int HandID { get; private set; }
  14. public int LastUpdatedTime { get; set; }
  15. public bool IsMarked { get; set; }
  16. public Chirality RepChirality { get; protected set; }
  17. public ModelType RepType { get; protected set; }
  18. public Hand MostRecentHand { get; protected set; }
  19. public virtual void UpdateRepresentation(Hand hand)
  20. {
  21. this.MostRecentHand = hand;
  22. }
  23. public abstract void Finish();
  24. public abstract void AddModel(IHandModel model);
  25. public abstract void RemoveModel(IHandModel model);
  26. }
  27. }