@@ -303,33 +303,6 @@ public virtual int Compare(Keyframe a, Keyframe b)
303
303
}
304
304
}
305
305
306
- public class KeyTangentComparer : IComparer < Keyframe >
307
- {
308
- public int CompareKeyTangents ( Keyframe a , Keyframe b )
309
- {
310
- bool result = true ;
311
-
312
- result &= a . time . Equals ( b . time ) ;
313
- #if DEBUG_UNITTEST
314
- Debug . Log ( string . Format ( "{2} a.time: {0}, b.time: {1}" , a . time , b . time , result ) ) ;
315
- #endif
316
- // TODO : use AnimationUtility.GetLeftTangentMode
317
- // requires reference to AnimationCurve and keyindex
318
- result &= ( a . tangentMode == b . tangentMode ) ;
319
- #if DEBUG_UNITTEST
320
- Debug . Log ( string . Format ( "{2} a.tangentMode={0} b.tangentMode={1}" ,
321
- ( ( AnimationUtility . TangentMode ) a . tangentMode ) . ToString ( ) ,
322
- ( ( AnimationUtility . TangentMode ) b . tangentMode ) . ToString ( ) , result ) ) ;
323
- #endif
324
- return result ? 0 : 1 ;
325
- }
326
-
327
- public int Compare ( Keyframe a , Keyframe b )
328
- {
329
- return CompareKeyTangents ( a , b ) ;
330
- }
331
- }
332
-
333
306
public class AnimTester
334
307
{
335
308
public FbxAnimationTest . KeyData keyData ;
@@ -752,30 +725,6 @@ public int ContinuousRotationAnimTest (RotationCurveType rotCurveType, float []
752
725
return tester . DoIt ( ) ;
753
726
}
754
727
755
- [ Description ( "Uni-35935 key tangents" ) ]
756
- [ Test , TestCaseSource ( typeof ( AnimationTestDataClass ) , "KeyTangentsTestCases" ) ]
757
- public int KeyTangentsAnimTest ( float [ ] keyTimesInSeconds , Vector3 [ ] keyPosValues , Vector3 [ ] keyRotValues )
758
- {
759
- System . Type componentType = typeof ( Transform ) ;
760
-
761
- if ( keyRotValues == null )
762
- {
763
- keyRotValues = new Vector3 [ keyPosValues . Length ] ;
764
- }
765
-
766
- string [ ] propertyNames = null ;
767
- string testName = componentType . ToString ( ) + "_KeyTangents" ;
768
- RotationCurveType rotCurveType = RotationCurveType . kEuler ;
769
-
770
- testName += "_Euler" ;
771
- propertyNames = AnimationTestDataClass . m_rotationEulerNames . Concat ( AnimationTestDataClass . m_translationNames ) . ToArray ( ) ;
772
-
773
- KeyData keyData = new TransformKeyData { RotationType = rotCurveType , propertyNames = propertyNames , componentType = componentType , keyTimes = keyTimesInSeconds , keyPosValues = keyPosValues , keyEulerValues = keyRotValues } ;
774
-
775
- var tester = new AnimTester { keyData = keyData , testName = testName , path = GetRandomFbxFilePath ( ) , keyComparer = new KeyTangentComparer ( ) } ;
776
- return tester . DoIt ( ) ;
777
- }
778
-
779
728
[ Test , TestCaseSource ( typeof ( AnimationTestDataClass ) , "ComponentTestCases" ) ]
780
729
public int ComponentAnimTest ( System . Type componentType )
781
730
{
0 commit comments