| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
- using System;
- using System.Runtime.CompilerServices;
- using System.Runtime.InteropServices;
- namespace BansheeEngine
- {
- /** @addtogroup Animation
- * @{
- */
- /// <summary>
- /// Animation spline represented by a set of keyframes, each representing an endpoint of a cubic hermite curve. The spline
- /// can be evaluated at any time, and uses caching to speed up multiple sequential evaluations.
- /// </summary>
- public partial class AnimationCurve : ScriptObject
- {
- private AnimationCurve(bool __dummy0) { }
- protected AnimationCurve() { }
- /// <summary>Creates a new animation curve.</summary>
- /// <param name="keyframes">Keyframes to initialize the curve with. They must be sorted by time.</param>
- public AnimationCurve(KeyFrame[] keyframes)
- {
- Internal_TAnimationCurve(this, keyframes);
- }
- /// <summary>Returns a list of all keyframes in the curve.</summary>
- public KeyFrame[] KeyFrames
- {
- get { return Internal_getKeyFrames(mCachedPtr); }
- }
- /// <summary>
- /// Evaluate the animation curve at the specified time. If evaluating multiple values in a sequential order consider
- /// using the cached version of evaluate() for better performance.
- /// </summary>
- /// <param name="time">%Time to evaluate the curve at.</param>
- /// <param name="loop">
- /// If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.
- /// </param>
- /// <returns>Interpolated value from the curve at provided time.</returns>
- public float Evaluate(float time, bool loop = true)
- {
- return Internal_evaluate(mCachedPtr, time, loop);
- }
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_TAnimationCurve(AnimationCurve managedInstance, KeyFrame[] keyframes);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern float Internal_evaluate(IntPtr thisPtr, float time, bool loop);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern KeyFrame[] Internal_getKeyFrames(IntPtr thisPtr);
- }
- /** @} */
- /** @addtogroup Animation
- * @{
- */
- /// <summary>
- /// Animation spline represented by a set of keyframes, each representing an endpoint of a cubic hermite curve. The spline
- /// can be evaluated at any time, and uses caching to speed up multiple sequential evaluations.
- /// </summary>
- public partial class Vector3Curve : ScriptObject
- {
- private Vector3Curve(bool __dummy0) { }
- protected Vector3Curve() { }
- /// <summary>Creates a new animation curve.</summary>
- /// <param name="keyframes">Keyframes to initialize the curve with. They must be sorted by time.</param>
- public Vector3Curve(KeyFrameVec3[] keyframes)
- {
- Internal_TAnimationCurve(this, keyframes);
- }
- /// <summary>Returns a list of all keyframes in the curve.</summary>
- public KeyFrameVec3[] KeyFrames
- {
- get { return Internal_getKeyFrames(mCachedPtr); }
- }
- /// <summary>
- /// Evaluate the animation curve at the specified time. If evaluating multiple values in a sequential order consider
- /// using the cached version of evaluate() for better performance.
- /// </summary>
- /// <param name="time">%Time to evaluate the curve at.</param>
- /// <param name="loop">
- /// If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.
- /// </param>
- /// <returns>Interpolated value from the curve at provided time.</returns>
- public Vector3 Evaluate(float time, bool loop = true)
- {
- Vector3 temp;
- Internal_evaluate(mCachedPtr, time, loop, out temp);
- return temp;
- }
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_TAnimationCurve(Vector3Curve managedInstance, KeyFrameVec3[] keyframes);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_evaluate(IntPtr thisPtr, float time, bool loop, out Vector3 __output);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern KeyFrameVec3[] Internal_getKeyFrames(IntPtr thisPtr);
- }
- /** @} */
- /** @addtogroup Animation
- * @{
- */
- /// <summary>
- /// Animation spline represented by a set of keyframes, each representing an endpoint of a cubic hermite curve. The spline
- /// can be evaluated at any time, and uses caching to speed up multiple sequential evaluations.
- /// </summary>
- public partial class Vector2Curve : ScriptObject
- {
- private Vector2Curve(bool __dummy0) { }
- protected Vector2Curve() { }
- /// <summary>Creates a new animation curve.</summary>
- /// <param name="keyframes">Keyframes to initialize the curve with. They must be sorted by time.</param>
- public Vector2Curve(KeyFrameVec2[] keyframes)
- {
- Internal_TAnimationCurve(this, keyframes);
- }
- /// <summary>Returns a list of all keyframes in the curve.</summary>
- public KeyFrameVec2[] KeyFrames
- {
- get { return Internal_getKeyFrames(mCachedPtr); }
- }
- /// <summary>
- /// Evaluate the animation curve at the specified time. If evaluating multiple values in a sequential order consider
- /// using the cached version of evaluate() for better performance.
- /// </summary>
- /// <param name="time">%Time to evaluate the curve at.</param>
- /// <param name="loop">
- /// If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.
- /// </param>
- /// <returns>Interpolated value from the curve at provided time.</returns>
- public Vector2 Evaluate(float time, bool loop = true)
- {
- Vector2 temp;
- Internal_evaluate(mCachedPtr, time, loop, out temp);
- return temp;
- }
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_TAnimationCurve(Vector2Curve managedInstance, KeyFrameVec2[] keyframes);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_evaluate(IntPtr thisPtr, float time, bool loop, out Vector2 __output);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern KeyFrameVec2[] Internal_getKeyFrames(IntPtr thisPtr);
- }
- /** @} */
- /** @addtogroup Animation
- * @{
- */
- /// <summary>
- /// Animation spline represented by a set of keyframes, each representing an endpoint of a cubic hermite curve. The spline
- /// can be evaluated at any time, and uses caching to speed up multiple sequential evaluations.
- /// </summary>
- public partial class QuaternionCurve : ScriptObject
- {
- private QuaternionCurve(bool __dummy0) { }
- protected QuaternionCurve() { }
- /// <summary>Creates a new animation curve.</summary>
- /// <param name="keyframes">Keyframes to initialize the curve with. They must be sorted by time.</param>
- public QuaternionCurve(KeyFrameQuat[] keyframes)
- {
- Internal_TAnimationCurve(this, keyframes);
- }
- /// <summary>Returns a list of all keyframes in the curve.</summary>
- public KeyFrameQuat[] KeyFrames
- {
- get { return Internal_getKeyFrames(mCachedPtr); }
- }
- /// <summary>
- /// Evaluate the animation curve at the specified time. If evaluating multiple values in a sequential order consider
- /// using the cached version of evaluate() for better performance.
- /// </summary>
- /// <param name="time">%Time to evaluate the curve at.</param>
- /// <param name="loop">
- /// If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.
- /// </param>
- /// <returns>Interpolated value from the curve at provided time.</returns>
- public Quaternion Evaluate(float time, bool loop = true)
- {
- Quaternion temp;
- Internal_evaluate(mCachedPtr, time, loop, out temp);
- return temp;
- }
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_TAnimationCurve(QuaternionCurve managedInstance, KeyFrameQuat[] keyframes);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_evaluate(IntPtr thisPtr, float time, bool loop, out Quaternion __output);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern KeyFrameQuat[] Internal_getKeyFrames(IntPtr thisPtr);
- }
- /** @} */
- /** @addtogroup Animation
- * @{
- */
- /// <summary>
- /// Animation spline represented by a set of keyframes, each representing an endpoint of a cubic hermite curve. The spline
- /// can be evaluated at any time, and uses caching to speed up multiple sequential evaluations.
- /// </summary>
- public partial class IntegerCurve : ScriptObject
- {
- private IntegerCurve(bool __dummy0) { }
- protected IntegerCurve() { }
- /// <summary>Creates a new animation curve.</summary>
- /// <param name="keyframes">Keyframes to initialize the curve with. They must be sorted by time.</param>
- public IntegerCurve(KeyFrameInt[] keyframes)
- {
- Internal_TAnimationCurve(this, keyframes);
- }
- /// <summary>Returns a list of all keyframes in the curve.</summary>
- public KeyFrameInt[] KeyFrames
- {
- get { return Internal_getKeyFrames(mCachedPtr); }
- }
- /// <summary>
- /// Evaluate the animation curve at the specified time. If evaluating multiple values in a sequential order consider
- /// using the cached version of evaluate() for better performance.
- /// </summary>
- /// <param name="time">%Time to evaluate the curve at.</param>
- /// <param name="loop">
- /// If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.
- /// </param>
- /// <returns>Interpolated value from the curve at provided time.</returns>
- public int Evaluate(float time, bool loop = true)
- {
- return Internal_evaluate(mCachedPtr, time, loop);
- }
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_TAnimationCurve(IntegerCurve managedInstance, KeyFrameInt[] keyframes);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern int Internal_evaluate(IntPtr thisPtr, float time, bool loop);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern KeyFrameInt[] Internal_getKeyFrames(IntPtr thisPtr);
- }
- /** @} */
- }
|