ParticleEmitter.generated.cs 9.6 KB

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