TAnimationCurve.generated.cs 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using System.Runtime.InteropServices;
  4. namespace BansheeEngine
  5. {
  6. /** @addtogroup Animation
  7. * @{
  8. */
  9. /// <summary>
  10. /// Animation spline represented by a set of keyframes, each representing an endpoint of a cubic hermite curve. The spline
  11. /// can be evaluated at any time, and uses caching to speed up multiple sequential evaluations.
  12. /// </summary>
  13. public partial class AnimationCurve : ScriptObject
  14. {
  15. private AnimationCurve(bool __dummy0) { }
  16. protected AnimationCurve() { }
  17. /// <summary>Creates a new animation curve.</summary>
  18. /// <param name="keyframes">Keyframes to initialize the curve with. They must be sorted by time.</param>
  19. public AnimationCurve(KeyFrame[] keyframes)
  20. {
  21. Internal_TAnimationCurve(this, keyframes);
  22. }
  23. /// <summary>Returns a list of all keyframes in the curve.</summary>
  24. public KeyFrame[] KeyFrames
  25. {
  26. get { return Internal_getKeyFrames(mCachedPtr); }
  27. }
  28. /// <summary>
  29. /// Evaluate the animation curve at the specified time. If evaluating multiple values in a sequential order consider
  30. /// using the cached version of evaluate() for better performance.
  31. /// </summary>
  32. /// <param name="time">%Time to evaluate the curve at.</param>
  33. /// <param name="loop">
  34. /// If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.
  35. /// </param>
  36. /// <returns>Interpolated value from the curve at provided time.</returns>
  37. public float Evaluate(float time, bool loop = true)
  38. {
  39. return Internal_evaluate(mCachedPtr, time, loop);
  40. }
  41. [MethodImpl(MethodImplOptions.InternalCall)]
  42. private static extern void Internal_TAnimationCurve(AnimationCurve managedInstance, KeyFrame[] keyframes);
  43. [MethodImpl(MethodImplOptions.InternalCall)]
  44. private static extern float Internal_evaluate(IntPtr thisPtr, float time, bool loop);
  45. [MethodImpl(MethodImplOptions.InternalCall)]
  46. private static extern KeyFrame[] Internal_getKeyFrames(IntPtr thisPtr);
  47. }
  48. /** @} */
  49. /** @addtogroup Animation
  50. * @{
  51. */
  52. /// <summary>
  53. /// Animation spline represented by a set of keyframes, each representing an endpoint of a cubic hermite curve. The spline
  54. /// can be evaluated at any time, and uses caching to speed up multiple sequential evaluations.
  55. /// </summary>
  56. public partial class Vector3Curve : ScriptObject
  57. {
  58. private Vector3Curve(bool __dummy0) { }
  59. protected Vector3Curve() { }
  60. /// <summary>Creates a new animation curve.</summary>
  61. /// <param name="keyframes">Keyframes to initialize the curve with. They must be sorted by time.</param>
  62. public Vector3Curve(KeyFrameVec3[] keyframes)
  63. {
  64. Internal_TAnimationCurve(this, keyframes);
  65. }
  66. /// <summary>Returns a list of all keyframes in the curve.</summary>
  67. public KeyFrameVec3[] KeyFrames
  68. {
  69. get { return Internal_getKeyFrames(mCachedPtr); }
  70. }
  71. /// <summary>
  72. /// Evaluate the animation curve at the specified time. If evaluating multiple values in a sequential order consider
  73. /// using the cached version of evaluate() for better performance.
  74. /// </summary>
  75. /// <param name="time">%Time to evaluate the curve at.</param>
  76. /// <param name="loop">
  77. /// If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.
  78. /// </param>
  79. /// <returns>Interpolated value from the curve at provided time.</returns>
  80. public Vector3 Evaluate(float time, bool loop = true)
  81. {
  82. Vector3 temp;
  83. Internal_evaluate(mCachedPtr, time, loop, out temp);
  84. return temp;
  85. }
  86. [MethodImpl(MethodImplOptions.InternalCall)]
  87. private static extern void Internal_TAnimationCurve(Vector3Curve managedInstance, KeyFrameVec3[] keyframes);
  88. [MethodImpl(MethodImplOptions.InternalCall)]
  89. private static extern void Internal_evaluate(IntPtr thisPtr, float time, bool loop, out Vector3 __output);
  90. [MethodImpl(MethodImplOptions.InternalCall)]
  91. private static extern KeyFrameVec3[] Internal_getKeyFrames(IntPtr thisPtr);
  92. }
  93. /** @} */
  94. /** @addtogroup Animation
  95. * @{
  96. */
  97. /// <summary>
  98. /// Animation spline represented by a set of keyframes, each representing an endpoint of a cubic hermite curve. The spline
  99. /// can be evaluated at any time, and uses caching to speed up multiple sequential evaluations.
  100. /// </summary>
  101. public partial class Vector2Curve : ScriptObject
  102. {
  103. private Vector2Curve(bool __dummy0) { }
  104. protected Vector2Curve() { }
  105. /// <summary>Creates a new animation curve.</summary>
  106. /// <param name="keyframes">Keyframes to initialize the curve with. They must be sorted by time.</param>
  107. public Vector2Curve(KeyFrameVec2[] keyframes)
  108. {
  109. Internal_TAnimationCurve(this, keyframes);
  110. }
  111. /// <summary>Returns a list of all keyframes in the curve.</summary>
  112. public KeyFrameVec2[] KeyFrames
  113. {
  114. get { return Internal_getKeyFrames(mCachedPtr); }
  115. }
  116. /// <summary>
  117. /// Evaluate the animation curve at the specified time. If evaluating multiple values in a sequential order consider
  118. /// using the cached version of evaluate() for better performance.
  119. /// </summary>
  120. /// <param name="time">%Time to evaluate the curve at.</param>
  121. /// <param name="loop">
  122. /// If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.
  123. /// </param>
  124. /// <returns>Interpolated value from the curve at provided time.</returns>
  125. public Vector2 Evaluate(float time, bool loop = true)
  126. {
  127. Vector2 temp;
  128. Internal_evaluate(mCachedPtr, time, loop, out temp);
  129. return temp;
  130. }
  131. [MethodImpl(MethodImplOptions.InternalCall)]
  132. private static extern void Internal_TAnimationCurve(Vector2Curve managedInstance, KeyFrameVec2[] keyframes);
  133. [MethodImpl(MethodImplOptions.InternalCall)]
  134. private static extern void Internal_evaluate(IntPtr thisPtr, float time, bool loop, out Vector2 __output);
  135. [MethodImpl(MethodImplOptions.InternalCall)]
  136. private static extern KeyFrameVec2[] Internal_getKeyFrames(IntPtr thisPtr);
  137. }
  138. /** @} */
  139. /** @addtogroup Animation
  140. * @{
  141. */
  142. /// <summary>
  143. /// Animation spline represented by a set of keyframes, each representing an endpoint of a cubic hermite curve. The spline
  144. /// can be evaluated at any time, and uses caching to speed up multiple sequential evaluations.
  145. /// </summary>
  146. public partial class QuaternionCurve : ScriptObject
  147. {
  148. private QuaternionCurve(bool __dummy0) { }
  149. protected QuaternionCurve() { }
  150. /// <summary>Creates a new animation curve.</summary>
  151. /// <param name="keyframes">Keyframes to initialize the curve with. They must be sorted by time.</param>
  152. public QuaternionCurve(KeyFrameQuat[] keyframes)
  153. {
  154. Internal_TAnimationCurve(this, keyframes);
  155. }
  156. /// <summary>Returns a list of all keyframes in the curve.</summary>
  157. public KeyFrameQuat[] KeyFrames
  158. {
  159. get { return Internal_getKeyFrames(mCachedPtr); }
  160. }
  161. /// <summary>
  162. /// Evaluate the animation curve at the specified time. If evaluating multiple values in a sequential order consider
  163. /// using the cached version of evaluate() for better performance.
  164. /// </summary>
  165. /// <param name="time">%Time to evaluate the curve at.</param>
  166. /// <param name="loop">
  167. /// If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.
  168. /// </param>
  169. /// <returns>Interpolated value from the curve at provided time.</returns>
  170. public Quaternion Evaluate(float time, bool loop = true)
  171. {
  172. Quaternion temp;
  173. Internal_evaluate(mCachedPtr, time, loop, out temp);
  174. return temp;
  175. }
  176. [MethodImpl(MethodImplOptions.InternalCall)]
  177. private static extern void Internal_TAnimationCurve(QuaternionCurve managedInstance, KeyFrameQuat[] keyframes);
  178. [MethodImpl(MethodImplOptions.InternalCall)]
  179. private static extern void Internal_evaluate(IntPtr thisPtr, float time, bool loop, out Quaternion __output);
  180. [MethodImpl(MethodImplOptions.InternalCall)]
  181. private static extern KeyFrameQuat[] Internal_getKeyFrames(IntPtr thisPtr);
  182. }
  183. /** @} */
  184. /** @addtogroup Animation
  185. * @{
  186. */
  187. /// <summary>
  188. /// Animation spline represented by a set of keyframes, each representing an endpoint of a cubic hermite curve. The spline
  189. /// can be evaluated at any time, and uses caching to speed up multiple sequential evaluations.
  190. /// </summary>
  191. public partial class IntegerCurve : ScriptObject
  192. {
  193. private IntegerCurve(bool __dummy0) { }
  194. protected IntegerCurve() { }
  195. /// <summary>Creates a new animation curve.</summary>
  196. /// <param name="keyframes">Keyframes to initialize the curve with. They must be sorted by time.</param>
  197. public IntegerCurve(KeyFrameInt[] keyframes)
  198. {
  199. Internal_TAnimationCurve(this, keyframes);
  200. }
  201. /// <summary>Returns a list of all keyframes in the curve.</summary>
  202. public KeyFrameInt[] KeyFrames
  203. {
  204. get { return Internal_getKeyFrames(mCachedPtr); }
  205. }
  206. /// <summary>
  207. /// Evaluate the animation curve at the specified time. If evaluating multiple values in a sequential order consider
  208. /// using the cached version of evaluate() for better performance.
  209. /// </summary>
  210. /// <param name="time">%Time to evaluate the curve at.</param>
  211. /// <param name="loop">
  212. /// If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.
  213. /// </param>
  214. /// <returns>Interpolated value from the curve at provided time.</returns>
  215. public int Evaluate(float time, bool loop = true)
  216. {
  217. return Internal_evaluate(mCachedPtr, time, loop);
  218. }
  219. [MethodImpl(MethodImplOptions.InternalCall)]
  220. private static extern void Internal_TAnimationCurve(IntegerCurve managedInstance, KeyFrameInt[] keyframes);
  221. [MethodImpl(MethodImplOptions.InternalCall)]
  222. private static extern int Internal_evaluate(IntPtr thisPtr, float time, bool loop);
  223. [MethodImpl(MethodImplOptions.InternalCall)]
  224. private static extern KeyFrameInt[] Internal_getKeyFrames(IntPtr thisPtr);
  225. }
  226. /** @} */
  227. }