예제 #1
0
        private static void KeepPointAngle(GenericPosture posture, GenericPostureImpactKeepAngle impact)
        {
            // The point is moved so that the angle between its leg and the other leg is kept.
            if (impact == null)
            {
                return;
            }

            PointF origin = posture.PointList[impact.Origin];
            PointF leg1   = posture.PointList[impact.Leg1];

            if (origin == leg1)
            {
                return;
            }

            PointF result = GeometryHelper.GetPointAtAngleAndDistance(origin, leg1, impact.OldAngle, impact.OldDistance);

            posture.PointList[impact.Leg2] = result;
        }