FingerPoseListExtension.Add Method

Definition

Overloads

Add(ICollection<PoseConstraint>, Finger, PoseDirection)

Creates and adds to the poseConstraints collection a new FingerPose constraint which requires finger to be aligned with direction.

Add(ICollection<PoseConstraint>, FingersContext, PoseDirection)

Creates and adds to the poseConstraints collection a new FingerPose constraint which requires the fingers indicated by fingersContext to be aligned with direction.

Add(ICollection<PoseConstraint>, IEnumerable<Finger>, PoseDirection)

Creates and adds to the poseConstraints collection a new FingerPose constraint which requires each of the fingers to be aligned with direction.

Add(ICollection<PoseConstraint>, Finger, FingerFlexion, PoseDirection)

Creates and adds to the poseConstraints collection a new FingerPose constraint which requires finger to attain the specified flexion state and be aligned with direction.

Add(ICollection<PoseConstraint>, FingersContext, FingerFlexion, PoseDirection)

Creates and adds to the poseConstraints collection a new FingerPose constraint which requires the fingers indicated by fingersContext to attain the specified flexion state and to be aligned with the given direction.

Add(ICollection<PoseConstraint>, IEnumerable<Finger>, FingerFlexion, PoseDirection)

Creates and adds to the poseConstraints collection a new FingerPose constraint which requires each of the fingers to attain the specified flexion state and to be aligned with the given direction.

Add(ICollection<PoseConstraint>, Finger, PoseDirection)

Creates and adds to the poseConstraints collection a new FingerPose constraint which requires finger to be aligned with direction.

public static void Add (this System.Collections.Generic.ICollection<Microsoft.Gestures.PoseConstraint> poseConstraints, Microsoft.Gestures.Finger finger, Microsoft.Gestures.PoseDirection direction);

Parameters

poseConstraints
System.Collections.Generic.ICollection<PoseConstraint>

An existing collection of PoseConstraint objects, this will often be the PoseConstraints property.

finger
Finger

The Finger participating in the FingerPose constraint.

direction
PoseDirection

The PoseDirectionfinger is required to be aligned with.

Remarks

This extension method is a handy way to augment an existing HandPose with a new FingerPose constraint:

var handPose = new HandPose("MyPose");
// will be satisfied when the index finger is pointing up
handPose.PoseConstraints.Add(Finger.Index, PoseDirection.Up); 

Applies to

Add(ICollection<PoseConstraint>, FingersContext, PoseDirection)

Creates and adds to the poseConstraints collection a new FingerPose constraint which requires the fingers indicated by fingersContext to be aligned with direction.

public static void Add (this System.Collections.Generic.ICollection<Microsoft.Gestures.PoseConstraint> poseConstraints, Microsoft.Gestures.FingersContext fingersContext, Microsoft.Gestures.PoseDirection direction);

Parameters

poseConstraints
System.Collections.Generic.ICollection<PoseConstraint>

An existing collection of PoseConstraint objects, this will often be the PoseConstraints property.

fingersContext
FingersContext

Specifies the FingersContext of the fingers participating in the FingerPose constraint.

direction
PoseDirection

The PoseDirection that is required of the fingers indicated by fingersContext.

Remarks

This extension method is a handy way to augment an existing HandPose with a new FingerPose constraint:

var handPose = new HandPose("MyPose");
// will be satisfied when at least one of the thumb, index or middle fingers is pointing right
handPose.PoseConstraints.Add(new AnyFingersContext(new[] {Finger.Thumb, Finger.Index, Finger.Middle}), PoseDirection.Right);

Applies to

Add(ICollection<PoseConstraint>, IEnumerable<Finger>, PoseDirection)

Creates and adds to the poseConstraints collection a new FingerPose constraint which requires each of the fingers to be aligned with direction.

public static void Add (this System.Collections.Generic.ICollection<Microsoft.Gestures.PoseConstraint> poseConstraints, System.Collections.Generic.IEnumerable<Microsoft.Gestures.Finger> fingers, Microsoft.Gestures.PoseDirection direction);

Parameters

poseConstraints
System.Collections.Generic.ICollection<PoseConstraint>

An existing collection of PoseConstraint objects, this will often be the PoseConstraints property.

fingers
System.Collections.Generic.IEnumerable<Finger>

An enumeration of all the fingers that will participate in the FingerPose constraint.

direction
PoseDirection

The PoseDirection each of the fingers is required to be aligned with.

Remarks

This extension method is a handy way to augment an existing HandPose with a new FingerPose constraint:

var handPose = new HandPose("MyPose");
// will be satisfied when the thumb, index and middle fingers are all pointing left
handPose.PoseConstraints.Add(new[] {Finger.Thumb, Finger.Index, Finger.Middle}, PoseDirection.Left);

Applies to

Add(ICollection<PoseConstraint>, Finger, FingerFlexion, PoseDirection)

Creates and adds to the poseConstraints collection a new FingerPose constraint which requires finger to attain the specified flexion state and be aligned with direction.

public static void Add (this System.Collections.Generic.ICollection<Microsoft.Gestures.PoseConstraint> poseConstraints, Microsoft.Gestures.Finger finger, Microsoft.Gestures.FingerFlexion flexion, Microsoft.Gestures.PoseDirection direction = Microsoft.Gestures.PoseDirection.Undefined);

Parameters

poseConstraints
System.Collections.Generic.ICollection<PoseConstraint>

An existing collection of PoseConstraint objects, this will often be the PoseConstraints property.

finger
Finger

The finger participating in the FingerPose constraint.

flexion
FingerFlexion

The FingerFlexion state (the degree to which a finger is open or folded) imposed on finger.

direction
PoseDirection

The PoseDirectionfinger is required to be aligned with.

Remarks

This extension method is a handy way to augment an existing HandPose with a new FingerPose constraint:

var handPose = new HandPose("MyPose");
// will be satisfied when the index finger is open and pointing backward
handPose.PoseConstraints.Add(Finger.Index, FingerFlexion.Open, PoseDirection.Backward); 

Applies to

Add(ICollection<PoseConstraint>, FingersContext, FingerFlexion, PoseDirection)

Creates and adds to the poseConstraints collection a new FingerPose constraint which requires the fingers indicated by fingersContext to attain the specified flexion state and to be aligned with the given direction.

public static void Add (this System.Collections.Generic.ICollection<Microsoft.Gestures.PoseConstraint> poseConstraints, Microsoft.Gestures.FingersContext fingersContext, Microsoft.Gestures.FingerFlexion flexion, Microsoft.Gestures.PoseDirection direction = Microsoft.Gestures.PoseDirection.Undefined);

Parameters

poseConstraints
System.Collections.Generic.ICollection<PoseConstraint>

An existing collection of PoseConstraint objects, this will often be the PoseConstraints property.

fingersContext
FingersContext

Specifies the FingersContext of the fingers participating in the FingerPose constraint.

flexion
FingerFlexion

The FingerFlexion state (the degree to which a finger is open or folded) imposed on the fingers indicated by fingersContext.

direction
PoseDirection

The PoseDirection required of the fingers indicated by fingersContext.

Remarks

This extension method is a handy way to augment an existing HandPose with a new FingerPose constraint:

var handPose = new HandPose("MyPose");
// will be satisfied when at least one of the thumb, index and middle fingers is folded
handPose.PoseConstraints.Add(new AnyFingerContext(new[] {Finger.Thumb, Finger.Index, Finger.Middle}), FingerFlexion.Folded);

Applies to

Add(ICollection<PoseConstraint>, IEnumerable<Finger>, FingerFlexion, PoseDirection)

Creates and adds to the poseConstraints collection a new FingerPose constraint which requires each of the fingers to attain the specified flexion state and to be aligned with the given direction.

public static void Add (this System.Collections.Generic.ICollection<Microsoft.Gestures.PoseConstraint> poseConstraints, System.Collections.Generic.IEnumerable<Microsoft.Gestures.Finger> fingers, Microsoft.Gestures.FingerFlexion flexion, Microsoft.Gestures.PoseDirection direction = Microsoft.Gestures.PoseDirection.Undefined);

Parameters

poseConstraints
System.Collections.Generic.ICollection<PoseConstraint>

An existing collection of PoseConstraint objects, this will often be the PoseConstraints property.

fingers
System.Collections.Generic.IEnumerable<Finger>

An enumeration of all the fingers which will participate in the new FingerPose constraint.

flexion
FingerFlexion

The FingerFlexion state (the degree to which a finger is open or folded) imposed on each of fingers.

direction
PoseDirection

The PoseDirection that each of fingers is required to be aligned with.

Remarks

This extension method is a handy way to augment an existing HandPose with a new FingerPose constraint:

var handPose = new HandPose("MyPose");
// will be satisfied when the thumb, index and middle fingers are all open and pointing down
handPose.PoseConstraints.Add(new[] {Finger.Thumb, Finger.Index, Finger.Middle}, FingerFlexion.Open, PoseDirection.Down);

Applies to