AnimationUtility.generated.cs 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using System.Runtime.InteropServices;
  4. namespace BansheeEngine
  5. {
  6. /** @addtogroup Animation
  7. * @{
  8. */
  9. /// <summary>Helper class for dealing with animations, animation clips and curves.</summary>
  10. [ShowInInspector]
  11. public partial class AnimationUtility : ScriptObject
  12. {
  13. private AnimationUtility(bool __dummy0) { }
  14. protected AnimationUtility() { }
  15. /// <summary>Converts a curve in euler angles (in degrees) into a curve using quaternions.</summary>
  16. public static QuaternionCurve EulerToQuaternionCurve(Vector3Curve eulerCurve)
  17. {
  18. return Internal_eulerToQuaternionCurve(eulerCurve);
  19. }
  20. /// <summary>Converts a curve in quaternions into a curve using euler angles (in degrees).</summary>
  21. public static Vector3Curve QuaternionToEulerCurve(QuaternionCurve quatCurve)
  22. {
  23. return Internal_quaternionToEulerCurve(quatCurve);
  24. }
  25. /// <summary>Splits a Vector3 curve into three individual curves, one for each component.</summary>
  26. public static AnimationCurve[] SplitCurve3D(Vector3Curve compoundCurve)
  27. {
  28. return Internal_splitCurve3D(compoundCurve);
  29. }
  30. /// <summary>Combines three single component curves into a Vector3 curve.</summary>
  31. public static Vector3Curve CombineCurve3D(AnimationCurve[] curveComponents)
  32. {
  33. return Internal_combineCurve3D(curveComponents);
  34. }
  35. /// <summary>Splits a Vector2 curve into two individual curves, one for each component.</summary>
  36. public static AnimationCurve[] SplitCurve2D(Vector2Curve compoundCurve)
  37. {
  38. return Internal_splitCurve2D(compoundCurve);
  39. }
  40. /// <summary>Combines two single component curves into a Vector2 curve.</summary>
  41. public static Vector2Curve CombineCurve2D(AnimationCurve[] curveComponents)
  42. {
  43. return Internal_combineCurve2D(curveComponents);
  44. }
  45. /// <summary>Calculates the total range covered by a set of curves.</summary>
  46. /// <param name="curves">Curves to calculate range for.</param>
  47. /// <param name="xMin">Minimum time value present in the curves.</param>
  48. /// <param name="xMax">Maximum time value present in the curves.</param>
  49. /// <param name="yMin">Minimum curve value present in the curves.</param>
  50. /// <param name="yMax">Maximum curve value present in the curves.</param>
  51. public static void CalculateRange(AnimationCurve[] curves, out float xMin, out float xMax, out float yMin, out float yMax)
  52. {
  53. Internal_calculateRange(curves, out xMin, out xMax, out yMin, out yMax);
  54. }
  55. [MethodImpl(MethodImplOptions.InternalCall)]
  56. private static extern QuaternionCurve Internal_eulerToQuaternionCurve(Vector3Curve eulerCurve);
  57. [MethodImpl(MethodImplOptions.InternalCall)]
  58. private static extern Vector3Curve Internal_quaternionToEulerCurve(QuaternionCurve quatCurve);
  59. [MethodImpl(MethodImplOptions.InternalCall)]
  60. private static extern AnimationCurve[] Internal_splitCurve3D(Vector3Curve compoundCurve);
  61. [MethodImpl(MethodImplOptions.InternalCall)]
  62. private static extern Vector3Curve Internal_combineCurve3D(AnimationCurve[] curveComponents);
  63. [MethodImpl(MethodImplOptions.InternalCall)]
  64. private static extern AnimationCurve[] Internal_splitCurve2D(Vector2Curve compoundCurve);
  65. [MethodImpl(MethodImplOptions.InternalCall)]
  66. private static extern Vector2Curve Internal_combineCurve2D(AnimationCurve[] curveComponents);
  67. [MethodImpl(MethodImplOptions.InternalCall)]
  68. private static extern void Internal_calculateRange(AnimationCurve[] curves, out float xMin, out float xMax, out float yMin, out float yMax);
  69. }
  70. /** @} */
  71. }