Reign.Video.Abstraction.SoftwareFCurve.SoftwareFCurve C# (CSharp) Method

SoftwareFCurve() public method

public SoftwareFCurve ( RMX_ActionFCurve fcurve ) : System
fcurve RMX_ActionFCurve
return System
        public SoftwareFCurve(RMX_ActionFCurve fcurve)
        {
            switch (fcurve.Type)
            {
                case "OBJECT": Type = FCurveTypes.Object; break;
                case "BONE": Type = FCurveTypes.Bone; break;
                default: Debug.ThrowError("", "Unsuported type: " + fcurve.Type); break;
            }

            DataPath = fcurve.DataPath;
            Index = fcurve.Index;

            var values = fcurve.Coordinates.Values;
            var types = fcurve.InterpolationTypes.Content;
            KeyFrames = new List<SoftwareKeyFrame>();
            int i2 = 0, loop = values.Length / 2;
            for (int i = 0; i != loop; ++i)
            {
                InterpolationTypes interpolationType = InterpolationTypes.Bezier;
                switch (types[i])
                {
                    case 'B': interpolationType = InterpolationTypes.Bezier; break;
                    case 'L': interpolationType = InterpolationTypes.Linear; break;
                    case 'C': interpolationType = InterpolationTypes.Constant; break;
                }

                KeyFrames.Add(new SoftwareKeyFrame(new Vector2(values[i2], values[i2+1]), interpolationType));
                i2 += 2;
            }
        }
SoftwareFCurve