/// <summary> /// /// </summary> public virtual void SetGesture(HandGesture i_gesture) { for (int i = 0, imax = 5; i < imax; ++i) { fingers[i].Stretch( i_gesture.GetStretch(i) ); } }
/// <summary> /// /// </summary> public static void LerpStretch(HandControllerBase o_ctrl, HandGesture i_from, HandGesture i_to, float i_t) { float from, to; for (int i = 0, imax = 5; i < imax; ++i) { from = i_from.GetStretch(i); to = i_to.GetStretch(i); o_ctrl.fingers[i].Stretch( from * (1.0f - i_t) + to * i_t ); } }