C# Класс KinectRCCar.WpfUI.ControlLogic

Наследование: IControlLogic, IDisposable
Показать файл Открыть проект

Открытые методы

Метод Описание
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