Ejemplo n.º 1
0
        public static LinearColor CInterpTo(LinearColor Current, LinearColor Target, float DeltaTime, float InterpSpeed)
        {
            // If no interp speed, jump to target value
            if (InterpSpeed <= 0f)
            {
                return(Target);
            }

            // Difference between colors
            float Dist = LinearColor.Dist(Target, Current);

            // If distance is too small, just set the desired color
            if (Dist < Const.KINDA_SMALL_NUMBER)
            {
                return(Target);
            }

            // Delta change, Clamp so we do not over shoot.
            var DeltaMove = (Target - Current) * Math.Clamp(DeltaTime * InterpSpeed, 0f, 1f);

            return(Current + DeltaMove);
        }
Ejemplo n.º 2
0
 private extern static void _SetSelectedSplineSegmentColor(IntPtr handler, LinearColor SelectedSplineSegmentColor);
 private extern static void _SetColorParameter(IntPtr handler, string ParameterName, LinearColor Param);
 public void SetColorParameter(string ParameterName, LinearColor Param)
 {
     _SetColorParameter(NativeHandler, ParameterName, Param);
 }
Ejemplo n.º 5
0
 private extern static void _SetVectorParameter(IntPtr handler, string name, LinearColor value);
Ejemplo n.º 6
0
 public void SetVectorParameter(string name, LinearColor value)
 {
     _SetVectorParameter(NativeHandler, name, value);
 }