TDistribution.generated.cs 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using System.Runtime.InteropServices;
  4. namespace BansheeEngine
  5. {
  6. /** @addtogroup Particles
  7. * @{
  8. */
  9. /// <summary>Specifies a value as a distribution, which can include a constant value, random range or a curve.</summary>
  10. public partial class FloatDistribution : ScriptObject
  11. {
  12. private FloatDistribution(bool __dummy0) { }
  13. /// <summary>Creates a new empty distribution.</summary>
  14. public FloatDistribution()
  15. {
  16. Internal_TDistribution(this);
  17. }
  18. /// <summary>Creates a new distribution that returns a constant value.</summary>
  19. public FloatDistribution(float value)
  20. {
  21. Internal_TDistribution0(this, value);
  22. }
  23. /// <summary>Creates a new distribution that returns a random value in the specified range.</summary>
  24. public FloatDistribution(float minValue, float maxValue)
  25. {
  26. Internal_TDistribution1(this, minValue, maxValue);
  27. }
  28. /// <summary>Creates a new distribution that evaluates a curve.</summary>
  29. public FloatDistribution(AnimationCurve curve)
  30. {
  31. Internal_TDistribution2(this, curve);
  32. }
  33. /// <summary>Creates a new distribution that returns a random value in a range determined by two curves.</summary>
  34. public FloatDistribution(AnimationCurve minCurve, AnimationCurve maxCurve)
  35. {
  36. Internal_TDistribution3(this, minCurve, maxCurve);
  37. }
  38. /// <summary>Returns the type of the represented distribution.</summary>
  39. public PropertyDistributionType DistributionType
  40. {
  41. get { return Internal_getType(mCachedPtr); }
  42. }
  43. /// <summary>
  44. /// Returns the constant value of the distribution, or the minimal value of a constant range. Undefined if the
  45. /// distribution is represented by a curve.
  46. /// </summary>
  47. public float GetMinConstant()
  48. {
  49. return Internal_getMinConstant(mCachedPtr);
  50. }
  51. /// <summary>
  52. /// Returns the maximum value of a constant range. Only defined if the distribution represents a non-curve range.
  53. /// </summary>
  54. public float GetMaxConstant()
  55. {
  56. return Internal_getMaxConstant(mCachedPtr);
  57. }
  58. /// <summary>
  59. /// Returns the curve representing the distribution, or the first curve representing a curve range. Undefined if the
  60. /// distribution is represented by a constant or a non-curve range.
  61. /// </summary>
  62. public AnimationCurve GetMinCurve()
  63. {
  64. return Internal_getMinCurve(mCachedPtr);
  65. }
  66. /// <summary>
  67. /// Returns the curve representing the second curve of a curve range. Only defined if the distribution represents a curve
  68. /// range.
  69. /// </summary>
  70. public AnimationCurve GetMaxCurve()
  71. {
  72. return Internal_getMaxCurve(mCachedPtr);
  73. }
  74. /// <summary>Evaluates the value of the distribution.</summary>
  75. /// <param name="t">
  76. /// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
  77. /// </param>
  78. /// <param name="factor">
  79. /// Value in range [0, 1] that determines how to interpolate between min/max value, if the distribution represents a
  80. /// range. Value of 0 will return the minimum value, while value of 1 will return the maximum value, and interpolate the
  81. /// values in-between.
  82. /// </param>
  83. /// <returns>Evaluated value.</returns>
  84. public float Evaluate(float t, float factor)
  85. {
  86. return Internal_evaluate(mCachedPtr, t, factor);
  87. }
  88. /// <summary>Evaluates the value of the distribution.</summary>
  89. /// <param name="t">
  90. /// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
  91. /// </param>
  92. /// <param name="factor">
  93. /// Random number generator that determines the factor. Factor determines how to interpolate between min/max value, if
  94. /// the distribution represents a range.
  95. /// </param>
  96. /// <returns>Evaluated value.</returns>
  97. public float Evaluate(float t, Random factor)
  98. {
  99. return Internal_evaluate0(mCachedPtr, t, factor);
  100. }
  101. [MethodImpl(MethodImplOptions.InternalCall)]
  102. private static extern void Internal_TDistribution(FloatDistribution managedInstance);
  103. [MethodImpl(MethodImplOptions.InternalCall)]
  104. private static extern void Internal_TDistribution0(FloatDistribution managedInstance, float value);
  105. [MethodImpl(MethodImplOptions.InternalCall)]
  106. private static extern void Internal_TDistribution1(FloatDistribution managedInstance, float minValue, float maxValue);
  107. [MethodImpl(MethodImplOptions.InternalCall)]
  108. private static extern void Internal_TDistribution2(FloatDistribution managedInstance, AnimationCurve curve);
  109. [MethodImpl(MethodImplOptions.InternalCall)]
  110. private static extern void Internal_TDistribution3(FloatDistribution managedInstance, AnimationCurve minCurve, AnimationCurve maxCurve);
  111. [MethodImpl(MethodImplOptions.InternalCall)]
  112. private static extern PropertyDistributionType Internal_getType(IntPtr thisPtr);
  113. [MethodImpl(MethodImplOptions.InternalCall)]
  114. private static extern float Internal_getMinConstant(IntPtr thisPtr);
  115. [MethodImpl(MethodImplOptions.InternalCall)]
  116. private static extern float Internal_getMaxConstant(IntPtr thisPtr);
  117. [MethodImpl(MethodImplOptions.InternalCall)]
  118. private static extern AnimationCurve Internal_getMinCurve(IntPtr thisPtr);
  119. [MethodImpl(MethodImplOptions.InternalCall)]
  120. private static extern AnimationCurve Internal_getMaxCurve(IntPtr thisPtr);
  121. [MethodImpl(MethodImplOptions.InternalCall)]
  122. private static extern float Internal_evaluate(IntPtr thisPtr, float t, float factor);
  123. [MethodImpl(MethodImplOptions.InternalCall)]
  124. private static extern float Internal_evaluate0(IntPtr thisPtr, float t, Random factor);
  125. }
  126. /** @} */
  127. /** @addtogroup Particles
  128. * @{
  129. */
  130. /// <summary>Specifies a value as a distribution, which can include a constant value, random range or a curve.</summary>
  131. public partial class Vector3Distribution : ScriptObject
  132. {
  133. private Vector3Distribution(bool __dummy0) { }
  134. /// <summary>Creates a new empty distribution.</summary>
  135. public Vector3Distribution()
  136. {
  137. Internal_TDistribution(this);
  138. }
  139. /// <summary>Creates a new distribution that returns a constant value.</summary>
  140. public Vector3Distribution(Vector3 value)
  141. {
  142. Internal_TDistribution0(this, ref value);
  143. }
  144. /// <summary>Creates a new distribution that returns a random value in the specified range.</summary>
  145. public Vector3Distribution(Vector3 minValue, Vector3 maxValue)
  146. {
  147. Internal_TDistribution1(this, ref minValue, ref maxValue);
  148. }
  149. /// <summary>Creates a new distribution that evaluates a curve.</summary>
  150. public Vector3Distribution(Vector3Curve curve)
  151. {
  152. Internal_TDistribution2(this, curve);
  153. }
  154. /// <summary>Creates a new distribution that returns a random value in a range determined by two curves.</summary>
  155. public Vector3Distribution(Vector3Curve minCurve, Vector3Curve maxCurve)
  156. {
  157. Internal_TDistribution3(this, minCurve, maxCurve);
  158. }
  159. /// <summary>Returns the type of the represented distribution.</summary>
  160. public PropertyDistributionType DistributionType
  161. {
  162. get { return Internal_getType(mCachedPtr); }
  163. }
  164. /// <summary>
  165. /// Returns the constant value of the distribution, or the minimal value of a constant range. Undefined if the
  166. /// distribution is represented by a curve.
  167. /// </summary>
  168. public Vector3 GetMinConstant()
  169. {
  170. Vector3 temp;
  171. Internal_getMinConstant(mCachedPtr, out temp);
  172. return temp;
  173. }
  174. /// <summary>
  175. /// Returns the maximum value of a constant range. Only defined if the distribution represents a non-curve range.
  176. /// </summary>
  177. public Vector3 GetMaxConstant()
  178. {
  179. Vector3 temp;
  180. Internal_getMaxConstant(mCachedPtr, out temp);
  181. return temp;
  182. }
  183. /// <summary>
  184. /// Returns the curve representing the distribution, or the first curve representing a curve range. Undefined if the
  185. /// distribution is represented by a constant or a non-curve range.
  186. /// </summary>
  187. public Vector3Curve GetMinCurve()
  188. {
  189. return Internal_getMinCurve(mCachedPtr);
  190. }
  191. /// <summary>
  192. /// Returns the curve representing the second curve of a curve range. Only defined if the distribution represents a curve
  193. /// range.
  194. /// </summary>
  195. public Vector3Curve GetMaxCurve()
  196. {
  197. return Internal_getMaxCurve(mCachedPtr);
  198. }
  199. /// <summary>Evaluates the value of the distribution.</summary>
  200. /// <param name="t">
  201. /// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
  202. /// </param>
  203. /// <param name="factor">
  204. /// Value in range [0, 1] that determines how to interpolate between min/max value, if the distribution represents a
  205. /// range. Value of 0 will return the minimum value, while value of 1 will return the maximum value, and interpolate the
  206. /// values in-between.
  207. /// </param>
  208. /// <returns>Evaluated value.</returns>
  209. public Vector3 Evaluate(float t, float factor)
  210. {
  211. Vector3 temp;
  212. Internal_evaluate(mCachedPtr, t, factor, out temp);
  213. return temp;
  214. }
  215. /// <summary>Evaluates the value of the distribution.</summary>
  216. /// <param name="t">
  217. /// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
  218. /// </param>
  219. /// <param name="factor">
  220. /// Random number generator that determines the factor. Factor determines how to interpolate between min/max value, if
  221. /// the distribution represents a range.
  222. /// </param>
  223. /// <returns>Evaluated value.</returns>
  224. public Vector3 Evaluate(float t, Random factor)
  225. {
  226. Vector3 temp;
  227. Internal_evaluate0(mCachedPtr, t, factor, out temp);
  228. return temp;
  229. }
  230. [MethodImpl(MethodImplOptions.InternalCall)]
  231. private static extern void Internal_TDistribution(Vector3Distribution managedInstance);
  232. [MethodImpl(MethodImplOptions.InternalCall)]
  233. private static extern void Internal_TDistribution0(Vector3Distribution managedInstance, ref Vector3 value);
  234. [MethodImpl(MethodImplOptions.InternalCall)]
  235. private static extern void Internal_TDistribution1(Vector3Distribution managedInstance, ref Vector3 minValue, ref Vector3 maxValue);
  236. [MethodImpl(MethodImplOptions.InternalCall)]
  237. private static extern void Internal_TDistribution2(Vector3Distribution managedInstance, Vector3Curve curve);
  238. [MethodImpl(MethodImplOptions.InternalCall)]
  239. private static extern void Internal_TDistribution3(Vector3Distribution managedInstance, Vector3Curve minCurve, Vector3Curve maxCurve);
  240. [MethodImpl(MethodImplOptions.InternalCall)]
  241. private static extern PropertyDistributionType Internal_getType(IntPtr thisPtr);
  242. [MethodImpl(MethodImplOptions.InternalCall)]
  243. private static extern void Internal_getMinConstant(IntPtr thisPtr, out Vector3 __output);
  244. [MethodImpl(MethodImplOptions.InternalCall)]
  245. private static extern void Internal_getMaxConstant(IntPtr thisPtr, out Vector3 __output);
  246. [MethodImpl(MethodImplOptions.InternalCall)]
  247. private static extern Vector3Curve Internal_getMinCurve(IntPtr thisPtr);
  248. [MethodImpl(MethodImplOptions.InternalCall)]
  249. private static extern Vector3Curve Internal_getMaxCurve(IntPtr thisPtr);
  250. [MethodImpl(MethodImplOptions.InternalCall)]
  251. private static extern void Internal_evaluate(IntPtr thisPtr, float t, float factor, out Vector3 __output);
  252. [MethodImpl(MethodImplOptions.InternalCall)]
  253. private static extern void Internal_evaluate0(IntPtr thisPtr, float t, Random factor, out Vector3 __output);
  254. }
  255. /** @} */
  256. /** @addtogroup Particles
  257. * @{
  258. */
  259. /// <summary>Specifies a value as a distribution, which can include a constant value, random range or a curve.</summary>
  260. public partial class Vector2Distribution : ScriptObject
  261. {
  262. private Vector2Distribution(bool __dummy0) { }
  263. /// <summary>Creates a new empty distribution.</summary>
  264. public Vector2Distribution()
  265. {
  266. Internal_TDistribution(this);
  267. }
  268. /// <summary>Creates a new distribution that returns a constant value.</summary>
  269. public Vector2Distribution(Vector2 value)
  270. {
  271. Internal_TDistribution0(this, ref value);
  272. }
  273. /// <summary>Creates a new distribution that returns a random value in the specified range.</summary>
  274. public Vector2Distribution(Vector2 minValue, Vector2 maxValue)
  275. {
  276. Internal_TDistribution1(this, ref minValue, ref maxValue);
  277. }
  278. /// <summary>Creates a new distribution that evaluates a curve.</summary>
  279. public Vector2Distribution(Vector2Curve curve)
  280. {
  281. Internal_TDistribution2(this, curve);
  282. }
  283. /// <summary>Creates a new distribution that returns a random value in a range determined by two curves.</summary>
  284. public Vector2Distribution(Vector2Curve minCurve, Vector2Curve maxCurve)
  285. {
  286. Internal_TDistribution3(this, minCurve, maxCurve);
  287. }
  288. /// <summary>Returns the type of the represented distribution.</summary>
  289. public PropertyDistributionType DistributionType
  290. {
  291. get { return Internal_getType(mCachedPtr); }
  292. }
  293. /// <summary>
  294. /// Returns the constant value of the distribution, or the minimal value of a constant range. Undefined if the
  295. /// distribution is represented by a curve.
  296. /// </summary>
  297. public Vector2 GetMinConstant()
  298. {
  299. Vector2 temp;
  300. Internal_getMinConstant(mCachedPtr, out temp);
  301. return temp;
  302. }
  303. /// <summary>
  304. /// Returns the maximum value of a constant range. Only defined if the distribution represents a non-curve range.
  305. /// </summary>
  306. public Vector2 GetMaxConstant()
  307. {
  308. Vector2 temp;
  309. Internal_getMaxConstant(mCachedPtr, out temp);
  310. return temp;
  311. }
  312. /// <summary>
  313. /// Returns the curve representing the distribution, or the first curve representing a curve range. Undefined if the
  314. /// distribution is represented by a constant or a non-curve range.
  315. /// </summary>
  316. public Vector2Curve GetMinCurve()
  317. {
  318. return Internal_getMinCurve(mCachedPtr);
  319. }
  320. /// <summary>
  321. /// Returns the curve representing the second curve of a curve range. Only defined if the distribution represents a curve
  322. /// range.
  323. /// </summary>
  324. public Vector2Curve GetMaxCurve()
  325. {
  326. return Internal_getMaxCurve(mCachedPtr);
  327. }
  328. /// <summary>Evaluates the value of the distribution.</summary>
  329. /// <param name="t">
  330. /// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
  331. /// </param>
  332. /// <param name="factor">
  333. /// Value in range [0, 1] that determines how to interpolate between min/max value, if the distribution represents a
  334. /// range. Value of 0 will return the minimum value, while value of 1 will return the maximum value, and interpolate the
  335. /// values in-between.
  336. /// </param>
  337. /// <returns>Evaluated value.</returns>
  338. public Vector2 Evaluate(float t, float factor)
  339. {
  340. Vector2 temp;
  341. Internal_evaluate(mCachedPtr, t, factor, out temp);
  342. return temp;
  343. }
  344. /// <summary>Evaluates the value of the distribution.</summary>
  345. /// <param name="t">
  346. /// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
  347. /// </param>
  348. /// <param name="factor">
  349. /// Random number generator that determines the factor. Factor determines how to interpolate between min/max value, if
  350. /// the distribution represents a range.
  351. /// </param>
  352. /// <returns>Evaluated value.</returns>
  353. public Vector2 Evaluate(float t, Random factor)
  354. {
  355. Vector2 temp;
  356. Internal_evaluate0(mCachedPtr, t, factor, out temp);
  357. return temp;
  358. }
  359. [MethodImpl(MethodImplOptions.InternalCall)]
  360. private static extern void Internal_TDistribution(Vector2Distribution managedInstance);
  361. [MethodImpl(MethodImplOptions.InternalCall)]
  362. private static extern void Internal_TDistribution0(Vector2Distribution managedInstance, ref Vector2 value);
  363. [MethodImpl(MethodImplOptions.InternalCall)]
  364. private static extern void Internal_TDistribution1(Vector2Distribution managedInstance, ref Vector2 minValue, ref Vector2 maxValue);
  365. [MethodImpl(MethodImplOptions.InternalCall)]
  366. private static extern void Internal_TDistribution2(Vector2Distribution managedInstance, Vector2Curve curve);
  367. [MethodImpl(MethodImplOptions.InternalCall)]
  368. private static extern void Internal_TDistribution3(Vector2Distribution managedInstance, Vector2Curve minCurve, Vector2Curve maxCurve);
  369. [MethodImpl(MethodImplOptions.InternalCall)]
  370. private static extern PropertyDistributionType Internal_getType(IntPtr thisPtr);
  371. [MethodImpl(MethodImplOptions.InternalCall)]
  372. private static extern void Internal_getMinConstant(IntPtr thisPtr, out Vector2 __output);
  373. [MethodImpl(MethodImplOptions.InternalCall)]
  374. private static extern void Internal_getMaxConstant(IntPtr thisPtr, out Vector2 __output);
  375. [MethodImpl(MethodImplOptions.InternalCall)]
  376. private static extern Vector2Curve Internal_getMinCurve(IntPtr thisPtr);
  377. [MethodImpl(MethodImplOptions.InternalCall)]
  378. private static extern Vector2Curve Internal_getMaxCurve(IntPtr thisPtr);
  379. [MethodImpl(MethodImplOptions.InternalCall)]
  380. private static extern void Internal_evaluate(IntPtr thisPtr, float t, float factor, out Vector2 __output);
  381. [MethodImpl(MethodImplOptions.InternalCall)]
  382. private static extern void Internal_evaluate0(IntPtr thisPtr, float t, Random factor, out Vector2 __output);
  383. }
  384. /** @} */
  385. }