public Spring(MassSpringInterpolation outer, int start, int end, double stiffness) { this.outer = outer; Start = start; End = end; Stiffness = stiffness; InitialLength = outer.Points[Start].Distance(outer.Points[End]); }
/// <summary> /// Moves the mouse. /// </summary> /// <param name="move">The move.</param> /// <param name="end">The end.</param> /// <param name="speed">The speed.</param> public static void MouseMove(MovementType move, Point end, double speed) { ICursorInterpolation interpolation; switch (move) { case MovementType.SINUS: interpolation = new SinusInterpolation(end, speed); break; case MovementType.SPRING: interpolation = new MassSpringInterpolation(end, speed); break; default: interpolation = new JumpInterpolation(end, speed); break; } interpolation.Interpolate(); }