public HandlePush ( Direction pushDirection ) : void | ||
pushDirection | Direction | |
return | void |
public void HandlePush(Direction pushDirection)
{
if (handMode == HandMode.Normal)
{
if (pushDirection == Direction.Forward)
{
buttonSender.SendKey(ButtonCodes.MidPush);
}
else
{
intervalTimer.Stop();
buttonSender.SendNotification("KinEmote v0.3", "Hand moved to back plane.");
handMode = HandMode.BackPlane;
}
}
else
{
handMode = HandMode.Normal;
buttonSender.SendNotification("KinEmote v0.3", "Hand moved to mid plane.");
}
}
private void slider2D_ItemSelected(object sender, SelectableSlider2DSelectEventArgs e) { if (handHandler != null) { handHandler.HandlePush(e.SelectDirection); } if (e.SelectDirection == Direction.Backward) { slider2D.Reposition(new XnMPoint(lastRealHandPoint.X, lastRealHandPoint.Y, lastRealHandPoint.Z)); } }