using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace BansheeEngine { /** @addtogroup Particles * @{ */ /// Specifies a value as a distribution, which can include a constant value, random range or a curve. public partial class FloatDistribution : ScriptObject { private FloatDistribution(bool __dummy0) { } /// Creates a new empty distribution. public FloatDistribution() { Internal_TDistribution(this); } /// Creates a new distribution that returns a constant value. public FloatDistribution(float value) { Internal_TDistribution0(this, value); } /// Creates a new distribution that returns a random value in the specified range. public FloatDistribution(float minValue, float maxValue) { Internal_TDistribution1(this, minValue, maxValue); } /// Creates a new distribution that evaluates a curve. public FloatDistribution(AnimationCurve curve) { Internal_TDistribution2(this, curve); } /// Creates a new distribution that returns a random value in a range determined by two curves. public FloatDistribution(AnimationCurve minCurve, AnimationCurve maxCurve) { Internal_TDistribution3(this, minCurve, maxCurve); } /// Returns the type of the represented distribution. public PropertyDistributionType DistributionType { get { return Internal_getType(mCachedPtr); } } /// /// Returns the constant value of the distribution, or the minimal value of a constant range. Undefined if the /// distribution is represented by a curve. /// public float GetMinConstant() { return Internal_getMinConstant(mCachedPtr); } /// /// Returns the maximum value of a constant range. Only defined if the distribution represents a non-curve range. /// public float GetMaxConstant() { return Internal_getMaxConstant(mCachedPtr); } /// /// Returns the curve representing the distribution, or the first curve representing a curve range. Undefined if the /// distribution is represented by a constant or a non-curve range. /// public AnimationCurve GetMinCurve() { return Internal_getMinCurve(mCachedPtr); } /// /// Returns the curve representing the second curve of a curve range. Only defined if the distribution represents a curve /// range. /// public AnimationCurve GetMaxCurve() { return Internal_getMaxCurve(mCachedPtr); } /// Evaluates the value of the distribution. /// /// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves. /// /// /// Value in range [0, 1] that determines how to interpolate between min/max value, if the distribution represents a /// range. Value of 0 will return the minimum value, while value of 1 will return the maximum value, and interpolate the /// values in-between. /// /// Evaluated value. public float Evaluate(float t, float factor) { return Internal_evaluate(mCachedPtr, t, factor); } /// Evaluates the value of the distribution. /// /// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves. /// /// /// Random number generator that determines the factor. Factor determines how to interpolate between min/max value, if /// the distribution represents a range. /// /// Evaluated value. public float Evaluate(float t, Random factor) { return Internal_evaluate0(mCachedPtr, t, factor); } [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_TDistribution(FloatDistribution managedInstance); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_TDistribution0(FloatDistribution managedInstance, float value); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_TDistribution1(FloatDistribution managedInstance, float minValue, float maxValue); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_TDistribution2(FloatDistribution managedInstance, AnimationCurve curve); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_TDistribution3(FloatDistribution managedInstance, AnimationCurve minCurve, AnimationCurve maxCurve); [MethodImpl(MethodImplOptions.InternalCall)] private static extern PropertyDistributionType Internal_getType(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern float Internal_getMinConstant(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern float Internal_getMaxConstant(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern AnimationCurve Internal_getMinCurve(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern AnimationCurve Internal_getMaxCurve(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern float Internal_evaluate(IntPtr thisPtr, float t, float factor); [MethodImpl(MethodImplOptions.InternalCall)] private static extern float Internal_evaluate0(IntPtr thisPtr, float t, Random factor); } /** @} */ /** @addtogroup Particles * @{ */ /// Specifies a value as a distribution, which can include a constant value, random range or a curve. public partial class Vector3Distribution : ScriptObject { private Vector3Distribution(bool __dummy0) { } /// Creates a new empty distribution. public Vector3Distribution() { Internal_TDistribution(this); } /// Creates a new distribution that returns a constant value. public Vector3Distribution(Vector3 value) { Internal_TDistribution0(this, ref value); } /// Creates a new distribution that returns a random value in the specified range. public Vector3Distribution(Vector3 minValue, Vector3 maxValue) { Internal_TDistribution1(this, ref minValue, ref maxValue); } /// Creates a new distribution that evaluates a curve. public Vector3Distribution(Vector3Curve curve) { Internal_TDistribution2(this, curve); } /// Creates a new distribution that returns a random value in a range determined by two curves. public Vector3Distribution(Vector3Curve minCurve, Vector3Curve maxCurve) { Internal_TDistribution3(this, minCurve, maxCurve); } /// Returns the type of the represented distribution. public PropertyDistributionType DistributionType { get { return Internal_getType(mCachedPtr); } } /// /// Returns the constant value of the distribution, or the minimal value of a constant range. Undefined if the /// distribution is represented by a curve. /// public Vector3 GetMinConstant() { Vector3 temp; Internal_getMinConstant(mCachedPtr, out temp); return temp; } /// /// Returns the maximum value of a constant range. Only defined if the distribution represents a non-curve range. /// public Vector3 GetMaxConstant() { Vector3 temp; Internal_getMaxConstant(mCachedPtr, out temp); return temp; } /// /// Returns the curve representing the distribution, or the first curve representing a curve range. Undefined if the /// distribution is represented by a constant or a non-curve range. /// public Vector3Curve GetMinCurve() { return Internal_getMinCurve(mCachedPtr); } /// /// Returns the curve representing the second curve of a curve range. Only defined if the distribution represents a curve /// range. /// public Vector3Curve GetMaxCurve() { return Internal_getMaxCurve(mCachedPtr); } /// Evaluates the value of the distribution. /// /// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves. /// /// /// Value in range [0, 1] that determines how to interpolate between min/max value, if the distribution represents a /// range. Value of 0 will return the minimum value, while value of 1 will return the maximum value, and interpolate the /// values in-between. /// /// Evaluated value. public Vector3 Evaluate(float t, float factor) { Vector3 temp; Internal_evaluate(mCachedPtr, t, factor, out temp); return temp; } /// Evaluates the value of the distribution. /// /// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves. /// /// /// Random number generator that determines the factor. Factor determines how to interpolate between min/max value, if /// the distribution represents a range. /// /// Evaluated value. public Vector3 Evaluate(float t, Random factor) { Vector3 temp; Internal_evaluate0(mCachedPtr, t, factor, out temp); return temp; } [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_TDistribution(Vector3Distribution managedInstance); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_TDistribution0(Vector3Distribution managedInstance, ref Vector3 value); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_TDistribution1(Vector3Distribution managedInstance, ref Vector3 minValue, ref Vector3 maxValue); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_TDistribution2(Vector3Distribution managedInstance, Vector3Curve curve); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_TDistribution3(Vector3Distribution managedInstance, Vector3Curve minCurve, Vector3Curve maxCurve); [MethodImpl(MethodImplOptions.InternalCall)] private static extern PropertyDistributionType Internal_getType(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_getMinConstant(IntPtr thisPtr, out Vector3 __output); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_getMaxConstant(IntPtr thisPtr, out Vector3 __output); [MethodImpl(MethodImplOptions.InternalCall)] private static extern Vector3Curve Internal_getMinCurve(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern Vector3Curve Internal_getMaxCurve(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_evaluate(IntPtr thisPtr, float t, float factor, out Vector3 __output); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_evaluate0(IntPtr thisPtr, float t, Random factor, out Vector3 __output); } /** @} */ /** @addtogroup Particles * @{ */ /// Specifies a value as a distribution, which can include a constant value, random range or a curve. public partial class Vector2Distribution : ScriptObject { private Vector2Distribution(bool __dummy0) { } /// Creates a new empty distribution. public Vector2Distribution() { Internal_TDistribution(this); } /// Creates a new distribution that returns a constant value. public Vector2Distribution(Vector2 value) { Internal_TDistribution0(this, ref value); } /// Creates a new distribution that returns a random value in the specified range. public Vector2Distribution(Vector2 minValue, Vector2 maxValue) { Internal_TDistribution1(this, ref minValue, ref maxValue); } /// Creates a new distribution that evaluates a curve. public Vector2Distribution(Vector2Curve curve) { Internal_TDistribution2(this, curve); } /// Creates a new distribution that returns a random value in a range determined by two curves. public Vector2Distribution(Vector2Curve minCurve, Vector2Curve maxCurve) { Internal_TDistribution3(this, minCurve, maxCurve); } /// Returns the type of the represented distribution. public PropertyDistributionType DistributionType { get { return Internal_getType(mCachedPtr); } } /// /// Returns the constant value of the distribution, or the minimal value of a constant range. Undefined if the /// distribution is represented by a curve. /// public Vector2 GetMinConstant() { Vector2 temp; Internal_getMinConstant(mCachedPtr, out temp); return temp; } /// /// Returns the maximum value of a constant range. Only defined if the distribution represents a non-curve range. /// public Vector2 GetMaxConstant() { Vector2 temp; Internal_getMaxConstant(mCachedPtr, out temp); return temp; } /// /// Returns the curve representing the distribution, or the first curve representing a curve range. Undefined if the /// distribution is represented by a constant or a non-curve range. /// public Vector2Curve GetMinCurve() { return Internal_getMinCurve(mCachedPtr); } /// /// Returns the curve representing the second curve of a curve range. Only defined if the distribution represents a curve /// range. /// public Vector2Curve GetMaxCurve() { return Internal_getMaxCurve(mCachedPtr); } /// Evaluates the value of the distribution. /// /// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves. /// /// /// Value in range [0, 1] that determines how to interpolate between min/max value, if the distribution represents a /// range. Value of 0 will return the minimum value, while value of 1 will return the maximum value, and interpolate the /// values in-between. /// /// Evaluated value. public Vector2 Evaluate(float t, float factor) { Vector2 temp; Internal_evaluate(mCachedPtr, t, factor, out temp); return temp; } /// Evaluates the value of the distribution. /// /// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves. /// /// /// Random number generator that determines the factor. Factor determines how to interpolate between min/max value, if /// the distribution represents a range. /// /// Evaluated value. public Vector2 Evaluate(float t, Random factor) { Vector2 temp; Internal_evaluate0(mCachedPtr, t, factor, out temp); return temp; } [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_TDistribution(Vector2Distribution managedInstance); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_TDistribution0(Vector2Distribution managedInstance, ref Vector2 value); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_TDistribution1(Vector2Distribution managedInstance, ref Vector2 minValue, ref Vector2 maxValue); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_TDistribution2(Vector2Distribution managedInstance, Vector2Curve curve); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_TDistribution3(Vector2Distribution managedInstance, Vector2Curve minCurve, Vector2Curve maxCurve); [MethodImpl(MethodImplOptions.InternalCall)] private static extern PropertyDistributionType Internal_getType(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_getMinConstant(IntPtr thisPtr, out Vector2 __output); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_getMaxConstant(IntPtr thisPtr, out Vector2 __output); [MethodImpl(MethodImplOptions.InternalCall)] private static extern Vector2Curve Internal_getMinCurve(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern Vector2Curve Internal_getMaxCurve(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_evaluate(IntPtr thisPtr, float t, float factor, out Vector2 __output); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_evaluate0(IntPtr thisPtr, float t, Random factor, out Vector2 __output); } /** @} */ }