C# Class RectNavigation.RectNavigationControl

Interaktionslogik für UserControl1.xaml
Inheritance: System.Windows.Controls.UserControl
Mostra file Open project: rechc/KinectMiniApps

Public Methods

Method Description
AnimatePointerArrow ( ) : void

Animates the Pointer Arrow from the right hand to the rectangle

GestureRecognition ( Microsoft.Kinect.Skeleton skel ) : void

Handles the rectangle gesture recognition.

RectNavigationControl ( ) : System
SetBottomText ( string text ) : void
SetTopText ( string text ) : void
Start ( Microsoft.Kinect.KinectSensor sensor ) : void

Private Methods

Method Description
AnimateHandPoint ( Point from, Point to ) : void

Moves the Hand WPF Element to the hand skeleton position.

AnimationCompleted ( object sender, EventArgs e ) : void
ArrowAnimationCompleted ( object sender, EventArgs e ) : void
FireNoSwipe ( ) : void
FireSwipeDown ( double progress ) : void
FireSwipeLeft ( double progress ) : void
FireSwipeRight ( double progress ) : void
FireSwipeUp ( double progress ) : void
GetInnerRectLeft ( Microsoft.Kinect.Skeleton skeleton ) : Rect

Calculates the innerRect for the left side based on sekeleton input. Spine, hip and shoulder are used.

GetInnerRectRight ( Microsoft.Kinect.Skeleton skeleton ) : Rect

Calculates the innerRect for the right side based on sekeleton input. Spine, hip and shoulder are used.

GetOuterRect ( Rect innerRect ) : Rect

Calculates the outerRect based on the innerRect.

GetPercentageSwipeBottom ( Point hand ) : double

Returns a value (between 0 and 1) indicating how much the SwipeBottom gesture is complete.

GetPercentageSwipeLeft ( Point hand ) : double

Returns a value (between 0 and 1) indicating how much the SwipeLeft gesture is complete.

GetPercentageSwipeRight ( Point hand ) : double

Returns a value (between 0 and 1) indicating how much the SwipeRight gesture is complete.

GetPercentageSwipeTop ( Point hand ) : double

Returns a value (between 0 and 1) indicating how much the SwipeTop gesture is complete.

SkeletonPointToScreen ( Microsoft.Kinect.SkeletonPoint skelpoint ) : Point

Maps a SkeletonPoint to lie within our render space and converts to Point

TransformHand ( Point point ) : void
TransformRectangles ( ) : void

Moves and resizes the innerRect and outerRect WPF elements.

getRotateAngle ( System.Windows.Vector arrow, System.Windows.Vector rect ) : double
getTimeStamp ( ) : long
setRectInvisible ( ) : void
setRectVisible ( ) : void

Method Details

AnimatePointerArrow() public method

Animates the Pointer Arrow from the right hand to the rectangle
public AnimatePointerArrow ( ) : void
return void

GestureRecognition() public method

Handles the rectangle gesture recognition.
public GestureRecognition ( Microsoft.Kinect.Skeleton skel ) : void
skel Microsoft.Kinect.Skeleton
return void

RectNavigationControl() public method

public RectNavigationControl ( ) : System
return System

SetBottomText() public method

public SetBottomText ( string text ) : void
text string
return void

SetTopText() public method

public SetTopText ( string text ) : void
text string
return void

Start() public method

public Start ( Microsoft.Kinect.KinectSensor sensor ) : void
sensor Microsoft.Kinect.KinectSensor
return void