TAnimationCurve.generated.cs 10.0 KB

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