C# 클래스 KinectRCCar.WpfUI.ControlLogic

상속: IControlLogic, IDisposable
파일 보기 프로젝트 열기: devinh/KinectRCCar

공개 메소드들

메소드 설명
ControlLogic ( IKinectService kinectService, ICarControllerService carControllerService, IWpfUISettings settings, IUnityContainer container ) : System
DisableControl ( ) : void
Dispose ( ) : void
Start ( ) : void
Stop ( ) : void

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

비공개 메소드들

메소드 설명
CalculateDirection ( System.Windows.Media.Media3D.Vector3D leftHand, System.Windows.Media.Media3D.Vector3D handsMidpoint ) : void

Calculates the Direction to have the car go. The direction is calculated as a percentage of the angle between the position of the leftHand and 0. The calculated angle is then divided by Pi/2 to determine the direction as a percentage. A positive direction is a direction to the right. A negative position is a direction to the left.

CalculateVelocity ( double handsMidpointZ, double positionZ ) : void

Calculates the velocity of the car. The velocity is calculated as a percentage of the distance the hands are from a set neutral point. The is able to move back and forth as the neutral point is calculated based on the distance the neutral point is from the user.

ControlCar ( Microsoft.Kinect.Skeleton skeletons ) : void
CountDownTimerReset ( ) : void
EnableControl ( ) : void
EnableDisableControl ( System.Windows.Media.Media3D.Vector3D handsMidpoint, double spineYPosition, System.Windows.Media.Media3D.Vector3D leftHand, System.Windows.Media.Media3D.Vector3D rightHand ) : void

Checks to see if the hands are in the starting position and in the "play area" before enabling control. Control is disabled if the hands drop outside the "play area.

GetJointVector ( JointType joint, Microsoft.Kinect.Skeleton sd ) : System.Windows.Media.Media3D.Vector3D
HandsInPlayArea ( System.Windows.Media.Media3D.Vector3D handsMidpoint, double spinePositionY ) : bool
HandsStable ( System.Windows.Media.Media3D.Vector3D leftHand, System.Windows.Media.Media3D.Vector3D rightHand ) : bool
KinectServiceOnSkeletonFrameReady ( object sender, SkeletonArrayReadyEventArgs e ) : void
OnControllingEvent ( bool isControlling ) : void
OnNewDirectionEvent ( double direction ) : void
OnNewVelocityEvent ( double velocity ) : void
OnTimeLeftTick ( System.TimeSpan tickTime ) : void
SetupCountdownTimer ( ) : void
StartControl ( ) : void
StopControl ( ) : void

메소드 상세

ControlLogic() 공개 메소드

public ControlLogic ( IKinectService kinectService, ICarControllerService carControllerService, IWpfUISettings settings, IUnityContainer container ) : System
kinectService IKinectService
carControllerService ICarControllerService
settings IWpfUISettings
container IUnityContainer
리턴 System

DisableControl() 공개 메소드

public DisableControl ( ) : void
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

Start() 공개 메소드

public Start ( ) : void
리턴 void

Stop() 공개 메소드

public Stop ( ) : void
리턴 void