using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace BansheeEngine { /** @addtogroup Animation * @{ */ /// /// 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. /// public partial class AnimationCurve : ScriptObject { private AnimationCurve(bool __dummy0) { } protected AnimationCurve() { } /// Creates a new animation curve. /// Keyframes to initialize the curve with. They must be sorted by time. public AnimationCurve(KeyFrame[] keyframes) { Internal_TAnimationCurve(this, keyframes); } /// Returns a list of all keyframes in the curve. public KeyFrame[] KeyFrames { get { return Internal_getKeyFrames(mCachedPtr); } } /// /// 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. /// /// %Time to evaluate the curve at. /// /// If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped. /// /// Interpolated value from the curve at provided time. 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 * @{ */ /// /// 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. /// public partial class Vector3Curve : ScriptObject { private Vector3Curve(bool __dummy0) { } protected Vector3Curve() { } /// Creates a new animation curve. /// Keyframes to initialize the curve with. They must be sorted by time. public Vector3Curve(KeyFrameVec3[] keyframes) { Internal_TAnimationCurve(this, keyframes); } /// Returns a list of all keyframes in the curve. public KeyFrameVec3[] KeyFrames { get { return Internal_getKeyFrames(mCachedPtr); } } /// /// 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. /// /// %Time to evaluate the curve at. /// /// If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped. /// /// Interpolated value from the curve at provided time. 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 * @{ */ /// /// 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. /// public partial class QuaternionCurve : ScriptObject { private QuaternionCurve(bool __dummy0) { } protected QuaternionCurve() { } /// Creates a new animation curve. /// Keyframes to initialize the curve with. They must be sorted by time. public QuaternionCurve(KeyFrameQuat[] keyframes) { Internal_TAnimationCurve(this, keyframes); } /// Returns a list of all keyframes in the curve. public KeyFrameQuat[] KeyFrames { get { return Internal_getKeyFrames(mCachedPtr); } } /// /// 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. /// /// %Time to evaluate the curve at. /// /// If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped. /// /// Interpolated value from the curve at provided time. 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 * @{ */ /// /// 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. /// public partial class IntegerCurve : ScriptObject { private IntegerCurve(bool __dummy0) { } protected IntegerCurve() { } /// Creates a new animation curve. /// Keyframes to initialize the curve with. They must be sorted by time. public IntegerCurve(KeyFrameInt[] keyframes) { Internal_TAnimationCurve(this, keyframes); } /// Returns a list of all keyframes in the curve. public KeyFrameInt[] KeyFrames { get { return Internal_getKeyFrames(mCachedPtr); } } /// /// 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. /// /// %Time to evaluate the curve at. /// /// If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped. /// /// Interpolated value from the curve at provided time. 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); } /** @} */ }