Пример #1
0
 public RotationAnimator(SplitSide splitSide, Quaternion from, Quaternion to, RotateableBranch rotateable)
 {
     SplitSide = splitSide;
     Rotateable = rotateable;
     From = from;
     To = to;
     Delta = 0;
 }
Пример #2
0
        private RotationAnimator CreateRotationAnimation(SplitSide splitSide, RotateableBranch rotateable, Quaternion rotationDelta, out Transformation transformation)
        {
            BlockBounds rotatedBounds = rotateable.RotatedBounds;
            Quaternion startRot = rotatedBounds.Rotation;
            Quaternion endRot = startRot * rotationDelta;

            rotatedBounds.SetToRotationFrom(endRot, splitSide.Pivot, rotateable.OriginalBounds);
            transformation = new RotateAroundPivotTransform(splitSide.Pivot, endRot);
            return new RotationAnimator(splitSide, startRot, endRot, rotateable);
        }