TDistribution.generated.cs 17 KB

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