public PositionTracker(PersistentHand hand, Func<PersistentHand, Vector> positionGetter, Func<PersistentHand, int> velocityGetter) { Hand = hand; PositionGetter = positionGetter; VelocityGetter = velocityGetter; _CurrentPosition = PositionGetter(Hand); }
public void PromotePotentialHand(PersistentHand potential) { _Velocity.InitValue(potential.Velocity); _X.InitValue(potential.X); _Y.InitValue(potential.Y); _Z.InitValue(potential.Z); _Pitch.InitValue(potential.Pitch); _Roll.InitValue(potential.Roll); _Yaw.InitValue(potential.Yaw); _FingerCount.InitValue(potential.FingerCount); HandTracker.InitPosition(potential.HandTracker.CurrentPosition); FingerTracker.InitPosition(potential.FingerTracker.CurrentPosition); Id = potential.Id; DetectedHand = potential.DetectedHand; FinalHand = potential.FinalHand; CurrentHand = potential.CurrentHand; CurrentFPS = potential.CurrentFPS; StabilizedHand = potential.StabilizedHand; potential.FinalHand = potential.CurrentHand; potential.DetectedHand = Hand.Invalid; potential.StabilizedHand = Hand.Invalid; potential.CurrentHand = Hand.Invalid; potential._Stabilized.CurrentValue = false; potential.Id = 0; }
public PositionTracker(PersistentHand hand, Func <PersistentHand, Vector> positionGetter, Func <PersistentHand, int> velocityGetter) { Hand = hand; PositionGetter = positionGetter; VelocityGetter = velocityGetter; _CurrentPosition = PositionGetter(Hand); }
public BooleanHandState(PersistentHand hand, Predicate <Hand> enterPredicate, long enterTime, long exitTime) : base(hand) { _EnterPredicate = enterPredicate; _ExitPredicate = (t => !_EnterPredicate(t)); EnterTimeThreshold = enterTime; ExitTimeThreshold = exitTime; }
public IntegerHandState(PersistentHand hand, Func <Hand, int> valueGetter, long smoothTime) : base(hand) { _ValueGetter = valueGetter; SmoothTime = smoothTime; StableTime = 0; StableDelta = 0; StableVelocity = 0; }
public BooleanHandState(PersistentHand hand, Predicate <Hand> enterPredicate, Predicate <Hand> exitPredicate, long enterTime, long exitTime) : this(hand, enterPredicate, enterTime, exitTime) { _ExitPredicate = exitPredicate; }
protected HandState(PersistentHand hand) { Hand = hand; }