internal static void CalculateQualityCurves(AnimationClip clip, QualityCurvesTime time, Vector2[] poseCurve, Vector2[] rotationCurve, Vector2[] heightCurve, Vector2[] positionCurve)
        {
            if (poseCurve.Length != rotationCurve.Length || rotationCurve.Length != heightCurve.Length || heightCurve.Length != positionCurve.Length)
            {
                throw new ArgumentException(string.Format(
                                                "poseCurve '{0}', rotationCurve '{1}', heightCurve '{2}' and positionCurve '{3}' Length must be equals.",
                                                poseCurve.Length, rotationCurve.Length, heightCurve.Length, positionCurve.Length));
            }

            CalculateQualityCurves(clip, time.fixedTime, time.variableEndStart, time.variableEndEnd, time.q, poseCurve, rotationCurve, heightCurve, positionCurve);
        }
 public static extern void CalculateQualityCurves(AnimationClip clip, QualityCurvesTime time, Vector2[] poseCurve, Vector2[] rotationCurve, Vector2[] heightCurve, Vector2[] positionCurve);
 public static extern void CalculateQualityCurves(AnimationClip clip, QualityCurvesTime time, Vector2[] poseCurve, Vector2[] rotationCurve, Vector2[] heightCurve, Vector2[] positionCurve);
Пример #4
0
 private void CalculateQualityCurves()
 {
     for (int i = 0; i < 4; i++)
     {
         this.m_QualityCurves[i] = new Vector2[2][];
     }
     for (int j = 0; j < 2; j++)
     {
         float num3 = Mathf.Clamp(this.m_ClipInfo.firstFrame / this.m_Clip.frameRate, this.m_Clip.startTime, this.m_Clip.stopTime);
         float num4 = Mathf.Clamp(this.m_ClipInfo.lastFrame / this.m_Clip.frameRate, this.m_Clip.startTime, this.m_Clip.stopTime);
         float num5 = (j != 0) ? num3 : num4;
         float num6 = (j != 0) ? num3 : 0f;
         float num7 = (j != 0) ? this.m_Clip.length : num4;
         int num8 = Mathf.FloorToInt(num6 * 60f);
         int num9 = Mathf.CeilToInt(num7 * 60f);
         this.m_QualityCurves[0][j] = new Vector2[(num9 - num8) + 1];
         this.m_QualityCurves[1][j] = new Vector2[(num9 - num8) + 1];
         this.m_QualityCurves[2][j] = new Vector2[(num9 - num8) + 1];
         this.m_QualityCurves[3][j] = new Vector2[(num9 - num8) + 1];
         QualityCurvesTime time = new QualityCurvesTime {
             fixedTime = num5,
             variableEndStart = num6,
             variableEndEnd = num7,
             q = j
         };
         MuscleClipEditorUtilities.CalculateQualityCurves(this.m_Clip, time, this.m_QualityCurves[0][j], this.m_QualityCurves[1][j], this.m_QualityCurves[2][j], this.m_QualityCurves[3][j]);
     }
     this.m_DirtyQualityCurves = false;
 }