Exemplo n.º 1
0
 public BlockRotationEvent(Group group, Transformation transformation, SplittedRegion splittedRegion)
 {
     Group = group;
     Transformation = transformation;
     SplittedRegion = splittedRegion;
 }
Exemplo n.º 2
0
 public GroupRotationEvent(Group group, Transformation transformation)
 {
     Group = group;
     Transformation = transformation;
 }
Exemplo n.º 3
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);
        }