Exemplo n.º 1
0
        public static void EaseValue(PlaneProjection current, PlaneProjection startValue, PlaneProjection endValue, double percent)
        {
            if (current.RotationX != endValue.RotationX)
            {
                current.RotationX = EaseHelper.EaseValue(startValue.RotationX, endValue.RotationX, percent);
            }
            if (current.RotationY != endValue.RotationY)
            {
                current.RotationY = EaseHelper.EaseValue(startValue.RotationY, endValue.RotationY, percent);
            }
            if (current.RotationZ != endValue.RotationZ)
            {
                current.RotationZ = EaseHelper.EaseValue(startValue.RotationZ, endValue.RotationZ, percent);
            }
            if (current.LocalOffsetX != endValue.LocalOffsetX)
            {
                current.LocalOffsetX = EaseHelper.EaseValue(startValue.LocalOffsetX, endValue.LocalOffsetX, percent);
            }
            if (current.LocalOffsetY != endValue.LocalOffsetY)
            {
                current.LocalOffsetY = EaseHelper.EaseValue(startValue.LocalOffsetY, endValue.LocalOffsetY, percent);
            }
            if (current.LocalOffsetZ != endValue.LocalOffsetZ)
            {
                current.LocalOffsetZ = EaseHelper.EaseValue(startValue.LocalOffsetZ, endValue.LocalOffsetZ, percent);
            }
            if (current.GlobalOffsetX != endValue.GlobalOffsetX)
            {
                current.GlobalOffsetX = EaseHelper.EaseValue(startValue.GlobalOffsetX, endValue.GlobalOffsetX, percent);
            }
            if (current.GlobalOffsetY != endValue.GlobalOffsetY)
            {
                current.GlobalOffsetY = EaseHelper.EaseValue(startValue.GlobalOffsetY, endValue.GlobalOffsetY, percent);
            }
            if (current.GlobalOffsetZ != endValue.GlobalOffsetZ)
            {
                current.GlobalOffsetZ = EaseHelper.EaseValue(startValue.GlobalOffsetZ, endValue.GlobalOffsetZ, percent);
            }
            if (current.CenterOfRotationX != endValue.CenterOfRotationX)
            {
                current.CenterOfRotationX = EaseHelper.EaseValue(startValue.CenterOfRotationX, endValue.CenterOfRotationX, percent);
            }
            if (current.CenterOfRotationY != endValue.CenterOfRotationY)
            {
                current.CenterOfRotationY = EaseHelper.EaseValue(startValue.CenterOfRotationY, endValue.CenterOfRotationY, percent);
            }
            if (current.CenterOfRotationZ != endValue.CenterOfRotationZ)
            {
                current.CenterOfRotationZ = EaseHelper.EaseValue(startValue.CenterOfRotationZ, endValue.CenterOfRotationZ, percent);
            }

            //  NOT TEST
            //if (current.ProjectionMatrix != endValue.ProjectionMatrix) EaseValue(current.ProjectionMatrix, startValue.ProjectionMatrix, endValue.ProjectionMatrix, percent);
        }
Exemplo n.º 2
0
 public static void EaseValue(DropShadowEffect current, DropShadowEffect startValue, DropShadowEffect endValue, double percent)
 {
     if (current.BlurRadius != endValue.BlurRadius)
     {
         current.BlurRadius = EaseHelper.EaseValue(startValue.BlurRadius, endValue.BlurRadius, percent);
     }
     if (current.Opacity != endValue.Opacity)
     {
         current.Opacity = EaseHelper.EaseValue(startValue.Opacity, endValue.Opacity, percent);
     }
     if (current.Color != endValue.Color)
     {
         current.Color = EaseHelper.EaseValue(startValue.Color, endValue.Color, percent);
     }
     if (current.Direction != endValue.Direction)
     {
         current.Direction = EaseHelper.EaseValue(startValue.Direction, endValue.Direction, percent);
     }
     if (current.ShadowDepth != endValue.ShadowDepth)
     {
         current.ShadowDepth = EaseHelper.EaseValue(startValue.ShadowDepth, endValue.ShadowDepth, percent);
     }
 }
Exemplo n.º 3
0
 public static void EaseValue(Matrix3D current, Matrix3D startValue, Matrix3D endValue, double percent)
 {
     if (current.M11 != endValue.M11)
     {
         EaseHelper.EaseValue(startValue.M11, endValue.M11, percent);
     }
     if (current.M12 != endValue.M12)
     {
         EaseHelper.EaseValue(startValue.M12, endValue.M12, percent);
     }
     if (current.M13 != endValue.M13)
     {
         EaseHelper.EaseValue(startValue.M13, endValue.M13, percent);
     }
     if (current.M14 != endValue.M14)
     {
         EaseHelper.EaseValue(startValue.M14, endValue.M14, percent);
     }
     if (current.M21 != endValue.M21)
     {
         EaseHelper.EaseValue(startValue.M21, endValue.M21, percent);
     }
     if (current.M22 != endValue.M22)
     {
         EaseHelper.EaseValue(startValue.M22, endValue.M22, percent);
     }
     if (current.M23 != endValue.M23)
     {
         EaseHelper.EaseValue(startValue.M23, endValue.M23, percent);
     }
     if (current.M24 != endValue.M24)
     {
         EaseHelper.EaseValue(startValue.M24, endValue.M24, percent);
     }
     if (current.M31 != endValue.M31)
     {
         EaseHelper.EaseValue(startValue.M31, endValue.M31, percent);
     }
     if (current.M32 != endValue.M32)
     {
         EaseHelper.EaseValue(startValue.M32, endValue.M32, percent);
     }
     if (current.M33 != endValue.M33)
     {
         EaseHelper.EaseValue(startValue.M33, endValue.M33, percent);
     }
     if (current.M34 != endValue.M34)
     {
         EaseHelper.EaseValue(startValue.M34, endValue.M34, percent);
     }
     if (current.M44 != endValue.M44)
     {
         EaseHelper.EaseValue(startValue.M44, endValue.M44, percent);
     }
     if (current.OffsetX != endValue.OffsetX)
     {
         EaseHelper.EaseValue(startValue.OffsetX, endValue.OffsetX, percent);
     }
     if (current.OffsetY != endValue.OffsetY)
     {
         EaseHelper.EaseValue(startValue.OffsetY, endValue.OffsetY, percent);
     }
     if (current.OffsetZ != endValue.OffsetZ)
     {
         EaseHelper.EaseValue(startValue.OffsetZ, endValue.OffsetZ, percent);
     }
 }