ParticleEmitter.generated.cs 9.3 KB

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