public void Combine(AnimationClipStats other)
		{
			this.size += other.size;
			this.positionCurves += other.positionCurves;
			this.rotationCurves += other.rotationCurves;
			this.scaleCurves += other.scaleCurves;
			this.muscleCurves += other.muscleCurves;
			this.genericCurves += other.genericCurves;
			this.pptrCurves += other.pptrCurves;
			this.totalCurves += other.totalCurves;
			this.constantCurves += other.constantCurves;
			this.denseCurves += other.denseCurves;
			this.streamCurves += other.streamCurves;
		}
Esempio n. 2
0
 public void Combine(AnimationClipStats other)
 {
     this.size           += other.size;
     this.positionCurves += other.positionCurves;
     this.rotationCurves += other.rotationCurves;
     this.scaleCurves    += other.scaleCurves;
     this.muscleCurves   += other.muscleCurves;
     this.genericCurves  += other.genericCurves;
     this.pptrCurves     += other.pptrCurves;
     this.totalCurves    += other.totalCurves;
     this.constantCurves += other.constantCurves;
     this.denseCurves    += other.denseCurves;
     this.streamCurves   += other.streamCurves;
 }
 public void Combine(AnimationClipStats other)
 {
     size             += other.size;
     positionCurves   += other.positionCurves;
     quaternionCurves += other.quaternionCurves;
     eulerCurves      += other.eulerCurves;
     scaleCurves      += other.scaleCurves;
     muscleCurves     += other.muscleCurves;
     genericCurves    += other.genericCurves;
     pptrCurves       += other.pptrCurves;
     totalCurves      += other.totalCurves;
     constantCurves   += other.constantCurves;
     denseCurves      += other.denseCurves;
     streamCurves     += other.streamCurves;
 }
Esempio n. 4
0
 private string GetStatsText()
 {
     string str = string.Empty;
     if ((base.targets.Length == 1) && (this.target as Motion).isHumanMotion)
     {
         str = ((str + "Average Velocity: ") + this.m_Clip.averageSpeed.ToString("0.000") + "\nAverage Angular Y Speed: ") + (((this.m_Clip.averageAngularSpeed * 180f) / 3.141593f)).ToString("0.0") + " deg/s";
     }
     if (this.m_ClipInfo != null)
     {
         return str;
     }
     AnimationClipStats stats = new AnimationClipStats();
     stats.Reset();
     for (int i = 0; i < base.targets.Length; i++)
     {
         AnimationClip clip = base.targets[i] as AnimationClip;
         if (clip != null)
         {
             AnimationClipStats animationClipStats = AnimationUtility.GetAnimationClipStats(clip);
             stats.Combine(animationClipStats);
         }
     }
     if (str.Length != 0)
     {
         str = str + '\n';
     }
     float num2 = (((float) stats.constantCurves) / ((float) stats.totalCurves)) * 100f;
     float num3 = (((float) stats.denseCurves) / ((float) stats.totalCurves)) * 100f;
     float num4 = (((float) stats.streamCurves) / ((float) stats.totalCurves)) * 100f;
     object[] args = new object[] { stats.positionCurves, stats.rotationCurves, stats.scaleCurves, stats.muscleCurves, stats.genericCurves, stats.pptrCurves };
     object[] objArray2 = new object[] { stats.totalCurves, stats.constantCurves, num2.ToString("0.0"), stats.denseCurves, num3.ToString("0.0"), stats.streamCurves, num4.ToString("0.0") };
     return ((str + string.Format("Curves Pos: {0} Rot: {1} Scale: {2} Muscles: {3} Generic: {4} PPtr: {5}\n", args)) + string.Format("Curves Total: {0}, Constant: {1} ({2}%) Dense: {3} ({4}%) Stream: {5} ({6}%)\n", objArray2) + EditorUtility.FormatBytes(stats.size));
 }
Esempio n. 5
0
 private static extern void GetAnimationClipStats_Injected(AnimationClip clip, out AnimationClipStats ret);
 private string GetStatsText()
 {
   string str = string.Empty;
   if (this.targets.Length == 1 && (this.target as Motion).isHumanMotion)
     str = str + "Average Velocity: " + this.m_Clip.averageSpeed.ToString("0.000") + "\nAverage Angular Y Speed: " + ((float) ((double) this.m_Clip.averageAngularSpeed * 180.0 / 3.14159274101257)).ToString("0.0") + " deg/s";
   if (this.m_ClipInfo == null)
   {
     AnimationClipStats animationClipStats1 = new AnimationClipStats();
     animationClipStats1.Reset();
     for (int index = 0; index < this.targets.Length; ++index)
     {
       AnimationClip target = this.targets[index] as AnimationClip;
       if ((UnityEngine.Object) target != (UnityEngine.Object) null)
       {
         AnimationClipStats animationClipStats2 = AnimationUtility.GetAnimationClipStats(target);
         animationClipStats1.Combine(animationClipStats2);
       }
     }
     if (str.Length != 0)
       str += (string) (object) '\n';
     float num1 = (float) ((double) animationClipStats1.constantCurves / (double) animationClipStats1.totalCurves * 100.0);
     float num2 = (float) ((double) animationClipStats1.denseCurves / (double) animationClipStats1.totalCurves * 100.0);
     float num3 = (float) ((double) animationClipStats1.streamCurves / (double) animationClipStats1.totalCurves * 100.0);
     str = str + string.Format("Curves Pos: {0} Quaternion: {1} Euler: {2} Scale: {3} Muscles: {4} Generic: {5} PPtr: {6}\n", (object) animationClipStats1.positionCurves, (object) animationClipStats1.quaternionCurves, (object) animationClipStats1.eulerCurves, (object) animationClipStats1.scaleCurves, (object) animationClipStats1.muscleCurves, (object) animationClipStats1.genericCurves, (object) animationClipStats1.pptrCurves) + string.Format("Curves Total: {0}, Constant: {1} ({2}%) Dense: {3} ({4}%) Stream: {5} ({6}%)\n", (object) animationClipStats1.totalCurves, (object) animationClipStats1.constantCurves, (object) num1.ToString("0.0"), (object) animationClipStats1.denseCurves, (object) num2.ToString("0.0"), (object) animationClipStats1.streamCurves, (object) num3.ToString("0.0")) + EditorUtility.FormatBytes(animationClipStats1.size);
   }
   return str;
 }