ParticleEmitter.generated.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using System.Runtime.InteropServices;
  4. namespace BansheeEngine
  5. {
  6. /** @addtogroup Particles
  7. * @{
  8. */
  9. /// <summary>Handles spawning of new particles using the specified parameters and shape.</summary>
  10. [ShowInInspector]
  11. public partial class ParticleEmitter : ScriptObject
  12. {
  13. private ParticleEmitter(bool __dummy0) { }
  14. /// <summary>Creates a new emitter.</summary>
  15. public ParticleEmitter()
  16. {
  17. Internal_create(this);
  18. }
  19. /// <summary>Shape over which to emit the particles.</summary>
  20. [ShowInInspector]
  21. [NativeWrapper]
  22. public ParticleEmitterShape Shape
  23. {
  24. get { return Internal_getShape(mCachedPtr); }
  25. set { Internal_setShape(mCachedPtr, value); }
  26. }
  27. /// <summary>Determines the number of particles that are emitted every second.</summary>
  28. [ShowInInspector]
  29. [NotNull]
  30. [PassByCopy]
  31. [NativeWrapper]
  32. public FloatDistribution EmissionRate
  33. {
  34. get { return Internal_getEmissionRate(mCachedPtr); }
  35. set { Internal_setEmissionRate(mCachedPtr, value); }
  36. }
  37. /// <summary>Determines discrete intervals to emit particles.</summary>
  38. [ShowInInspector]
  39. [NativeWrapper]
  40. public ParticleBurst[] EmissionBursts
  41. {
  42. get { return Internal_getEmissionBursts(mCachedPtr); }
  43. set { Internal_setEmissionBursts(mCachedPtr, value); }
  44. }
  45. /// <summary>Determines the lifetime of particles when they are initially spawned, in seconds.</summary>
  46. [ShowInInspector]
  47. [NotNull]
  48. [PassByCopy]
  49. [NativeWrapper]
  50. public FloatDistribution InitialLifetime
  51. {
  52. get { return Internal_getInitialLifetime(mCachedPtr); }
  53. set { Internal_setInitialLifetime(mCachedPtr, value); }
  54. }
  55. /// <summary>
  56. /// Sets the initial speed of the particles, in meters/second. The speed is applied along the particle's velocity
  57. /// direction, which is determined by the emission shape and potentially other properties.
  58. /// </summary>
  59. [ShowInInspector]
  60. [NotNull]
  61. [PassByCopy]
  62. [NativeWrapper]
  63. public FloatDistribution InitialSpeed
  64. {
  65. get { return Internal_getInitialSpeed(mCachedPtr); }
  66. set { Internal_setInitialSpeed(mCachedPtr, value); }
  67. }
  68. /// <summary>
  69. /// Determines the size of the particles when initially spawned. The size is applied uniformly in all dimensions. Only
  70. /// used if 3D size is disabled.
  71. /// </summary>
  72. [ShowInInspector]
  73. [NotNull]
  74. [PassByCopy]
  75. [NativeWrapper]
  76. public FloatDistribution InitialSize
  77. {
  78. get { return Internal_getInitialSize(mCachedPtr); }
  79. set { Internal_setInitialSize(mCachedPtr, value); }
  80. }
  81. /// <summary>
  82. /// Determines the size of the particles when initially spawned. Size can be specified for each dimension separately.
  83. /// Only used if 3D size is enabled.
  84. /// </summary>
  85. [ShowInInspector]
  86. [NotNull]
  87. [PassByCopy]
  88. [NativeWrapper]
  89. public Vector3Distribution InitialSize3D
  90. {
  91. get { return Internal_getInitialSize3D(mCachedPtr); }
  92. set { Internal_setInitialSize3D(mCachedPtr, value); }
  93. }
  94. /// <summary>
  95. /// Determines should the initial particle size be applied uniformly (if disabled), or evaluated separately for each
  96. /// dimension (if enabled).
  97. /// </summary>
  98. [ShowInInspector]
  99. [NativeWrapper]
  100. public bool Use3DSize
  101. {
  102. get { return Internal_getUse3DSize(mCachedPtr); }
  103. set { Internal_setUse3DSize(mCachedPtr, value); }
  104. }
  105. /// <summary>
  106. /// Determines the rotation of the particles when initially spawned, in degrees. The rotation is applied around the
  107. /// particle's local Z axis. Only used if 3D rotation is disabled.
  108. /// </summary>
  109. [ShowInInspector]
  110. [NotNull]
  111. [PassByCopy]
  112. [NativeWrapper]
  113. public FloatDistribution InitialRotation
  114. {
  115. get { return Internal_getInitialRotation(mCachedPtr); }
  116. set { Internal_setInitialRotation(mCachedPtr, value); }
  117. }
  118. /// <summary>
  119. /// Determines the rotation of the particles when initially spawned, in Euler angles. Only used if 3D rotation is enabled.
  120. /// </summary>
  121. [ShowInInspector]
  122. [NotNull]
  123. [PassByCopy]
  124. [NativeWrapper]
  125. public Vector3Distribution InitialRotation3D
  126. {
  127. get { return Internal_getInitialRotation3D(mCachedPtr); }
  128. set { Internal_setInitialRotation3D(mCachedPtr, value); }
  129. }
  130. /// <summary>
  131. /// Determines should the initial particle rotation be a single angle applied around a Z axis (if disabled), or a set of
  132. /// Euler angles that allow you to rotate around every axis (if enabled).
  133. /// </summary>
  134. [ShowInInspector]
  135. [NativeWrapper]
  136. public bool Use3DRotation
  137. {
  138. get { return Internal_getUse3DRotation(mCachedPtr); }
  139. set { Internal_setUse3DRotation(mCachedPtr, value); }
  140. }
  141. /// <summary>Determines the initial color (in RGB channels) and transparency (in A channel) of particles.</summary>
  142. [ShowInInspector]
  143. [NotNull]
  144. [PassByCopy]
  145. [NativeWrapper]
  146. public ColorDistribution InitialColor
  147. {
  148. get { return Internal_getInitialColor(mCachedPtr); }
  149. set { Internal_setInitialColor(mCachedPtr, value); }
  150. }
  151. /// <summary>
  152. /// Determines a range of values determining a random offset to apply to particle position after it has been emitted.
  153. /// Offset will be randomly selected in all three axes in range [-value, value].
  154. /// </summary>
  155. [ShowInInspector]
  156. [NativeWrapper]
  157. public float RandomOffset
  158. {
  159. get { return Internal_getRandomOffset(mCachedPtr); }
  160. set { Internal_setRandomOffset(mCachedPtr, value); }
  161. }
  162. /// <summary>
  163. /// Determines should particle U texture coordinate be randomly flipped, mirroring the image. The value represents a
  164. /// percent of particles that should be flipped, in range [0, 1].
  165. /// </summary>
  166. [ShowInInspector]
  167. [NativeWrapper]
  168. public float FlipU
  169. {
  170. get { return Internal_getFlipU(mCachedPtr); }
  171. set { Internal_setFlipU(mCachedPtr, value); }
  172. }
  173. /// <summary>
  174. /// Determines should particle V texture coordinate be randomly flipped, mirroring the image. The value represents a
  175. /// percent of particles that should be flipped, in range [0, 1].
  176. /// </summary>
  177. [ShowInInspector]
  178. [NativeWrapper]
  179. public float FlipV
  180. {
  181. get { return Internal_getFlipV(mCachedPtr); }
  182. set { Internal_setFlipV(mCachedPtr, value); }
  183. }
  184. [MethodImpl(MethodImplOptions.InternalCall)]
  185. private static extern void Internal_setShape(IntPtr thisPtr, ParticleEmitterShape shape);
  186. [MethodImpl(MethodImplOptions.InternalCall)]
  187. private static extern ParticleEmitterShape Internal_getShape(IntPtr thisPtr);
  188. [MethodImpl(MethodImplOptions.InternalCall)]
  189. private static extern void Internal_setEmissionRate(IntPtr thisPtr, FloatDistribution value);
  190. [MethodImpl(MethodImplOptions.InternalCall)]
  191. private static extern FloatDistribution Internal_getEmissionRate(IntPtr thisPtr);
  192. [MethodImpl(MethodImplOptions.InternalCall)]
  193. private static extern void Internal_setEmissionBursts(IntPtr thisPtr, ParticleBurst[] bursts);
  194. [MethodImpl(MethodImplOptions.InternalCall)]
  195. private static extern ParticleBurst[] Internal_getEmissionBursts(IntPtr thisPtr);
  196. [MethodImpl(MethodImplOptions.InternalCall)]
  197. private static extern void Internal_setInitialLifetime(IntPtr thisPtr, FloatDistribution value);
  198. [MethodImpl(MethodImplOptions.InternalCall)]
  199. private static extern FloatDistribution Internal_getInitialLifetime(IntPtr thisPtr);
  200. [MethodImpl(MethodImplOptions.InternalCall)]
  201. private static extern void Internal_setInitialSpeed(IntPtr thisPtr, FloatDistribution value);
  202. [MethodImpl(MethodImplOptions.InternalCall)]
  203. private static extern FloatDistribution Internal_getInitialSpeed(IntPtr thisPtr);
  204. [MethodImpl(MethodImplOptions.InternalCall)]
  205. private static extern void Internal_setInitialSize(IntPtr thisPtr, FloatDistribution value);
  206. [MethodImpl(MethodImplOptions.InternalCall)]
  207. private static extern FloatDistribution Internal_getInitialSize(IntPtr thisPtr);
  208. [MethodImpl(MethodImplOptions.InternalCall)]
  209. private static extern void Internal_setInitialSize3D(IntPtr thisPtr, Vector3Distribution value);
  210. [MethodImpl(MethodImplOptions.InternalCall)]
  211. private static extern Vector3Distribution Internal_getInitialSize3D(IntPtr thisPtr);
  212. [MethodImpl(MethodImplOptions.InternalCall)]
  213. private static extern void Internal_setUse3DSize(IntPtr thisPtr, bool value);
  214. [MethodImpl(MethodImplOptions.InternalCall)]
  215. private static extern bool Internal_getUse3DSize(IntPtr thisPtr);
  216. [MethodImpl(MethodImplOptions.InternalCall)]
  217. private static extern void Internal_setInitialRotation(IntPtr thisPtr, FloatDistribution value);
  218. [MethodImpl(MethodImplOptions.InternalCall)]
  219. private static extern FloatDistribution Internal_getInitialRotation(IntPtr thisPtr);
  220. [MethodImpl(MethodImplOptions.InternalCall)]
  221. private static extern void Internal_setInitialRotation3D(IntPtr thisPtr, Vector3Distribution value);
  222. [MethodImpl(MethodImplOptions.InternalCall)]
  223. private static extern Vector3Distribution Internal_getInitialRotation3D(IntPtr thisPtr);
  224. [MethodImpl(MethodImplOptions.InternalCall)]
  225. private static extern void Internal_setUse3DRotation(IntPtr thisPtr, bool value);
  226. [MethodImpl(MethodImplOptions.InternalCall)]
  227. private static extern bool Internal_getUse3DRotation(IntPtr thisPtr);
  228. [MethodImpl(MethodImplOptions.InternalCall)]
  229. private static extern void Internal_setInitialColor(IntPtr thisPtr, ColorDistribution value);
  230. [MethodImpl(MethodImplOptions.InternalCall)]
  231. private static extern ColorDistribution Internal_getInitialColor(IntPtr thisPtr);
  232. [MethodImpl(MethodImplOptions.InternalCall)]
  233. private static extern void Internal_setRandomOffset(IntPtr thisPtr, float value);
  234. [MethodImpl(MethodImplOptions.InternalCall)]
  235. private static extern float Internal_getRandomOffset(IntPtr thisPtr);
  236. [MethodImpl(MethodImplOptions.InternalCall)]
  237. private static extern void Internal_setFlipU(IntPtr thisPtr, float value);
  238. [MethodImpl(MethodImplOptions.InternalCall)]
  239. private static extern float Internal_getFlipU(IntPtr thisPtr);
  240. [MethodImpl(MethodImplOptions.InternalCall)]
  241. private static extern void Internal_setFlipV(IntPtr thisPtr, float value);
  242. [MethodImpl(MethodImplOptions.InternalCall)]
  243. private static extern float Internal_getFlipV(IntPtr thisPtr);
  244. [MethodImpl(MethodImplOptions.InternalCall)]
  245. private static extern void Internal_create(ParticleEmitter managedInstance);
  246. }
  247. /** @} */
  248. }