ParticleSystemSettings.generated.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using System.Runtime.InteropServices;
  4. namespace BansheeEngine
  5. {
  6. /** @addtogroup Particles
  7. * @{
  8. */
  9. /// <summary>Generic settings used for controlling a ParticleSystem.</summary>
  10. [ShowInInspector]
  11. public partial class ParticleSystemSettings : ScriptObject
  12. {
  13. private ParticleSystemSettings(bool __dummy0) { }
  14. protected ParticleSystemSettings() { }
  15. /// <summary>Material to render the particles with.</summary>
  16. [ShowInInspector]
  17. [NativeWrapper]
  18. public RRef<Material> Material
  19. {
  20. get { return Internal_getmaterial(mCachedPtr); }
  21. set { Internal_setmaterial(mCachedPtr, value); }
  22. }
  23. /// <summary>Mesh used for representing individual particles when using the Mesh rendering mode.</summary>
  24. [ShowInInspector]
  25. [NativeWrapper]
  26. public RRef<Mesh> Mesh
  27. {
  28. get { return Internal_getmesh(mCachedPtr); }
  29. set { Internal_setmesh(mCachedPtr, value); }
  30. }
  31. /// <summary>
  32. /// If true the particle system will be simulated on the GPU. This allows much higher particle counts at lower
  33. /// performance cost. GPU simulation ignores any provided evolvers and instead uses ParticleGpuSimulationSettings to
  34. /// customize the GPU simulation.
  35. /// </summary>
  36. [ShowInInspector]
  37. [NativeWrapper]
  38. public bool GpuSimulation
  39. {
  40. get { return Internal_getgpuSimulation(mCachedPtr); }
  41. set { Internal_setgpuSimulation(mCachedPtr, value); }
  42. }
  43. /// <summary>Determines in which space are particles in.</summary>
  44. [ShowInInspector]
  45. [NativeWrapper]
  46. public ParticleSimulationSpace SimulationSpace
  47. {
  48. get { return Internal_getsimulationSpace(mCachedPtr); }
  49. set { Internal_setsimulationSpace(mCachedPtr, value); }
  50. }
  51. /// <summary>Determines how are particles oriented when rendering.</summary>
  52. [ShowInInspector]
  53. [NativeWrapper]
  54. public ParticleOrientation Orientation
  55. {
  56. get { return Internal_getorientation(mCachedPtr); }
  57. set { Internal_setorientation(mCachedPtr, value); }
  58. }
  59. /// <summary>
  60. /// Determines should the particles only be allowed to orient themselves around the Y axis, or freely. Ignored if using
  61. /// the Plane orientation mode.
  62. /// </summary>
  63. [ShowInInspector]
  64. [NativeWrapper]
  65. public bool OrientationLockY
  66. {
  67. get { return Internal_getorientationLockY(mCachedPtr); }
  68. set { Internal_setorientationLockY(mCachedPtr, value); }
  69. }
  70. /// <summary>
  71. /// Determines a normal of the plane to orient particles towards. Only used if particle orientation mode is set to
  72. /// ParticleOrientation::Plane.
  73. /// </summary>
  74. [ShowInInspector]
  75. [NativeWrapper]
  76. public Vector3 OrientationPlaneNormal
  77. {
  78. get
  79. {
  80. Vector3 temp;
  81. Internal_getorientationPlaneNormal(mCachedPtr, out temp);
  82. return temp;
  83. }
  84. set { Internal_setorientationPlaneNormal(mCachedPtr, ref value); }
  85. }
  86. /// <summary>
  87. /// Determines how (and if) are particles sorted. Sorting controls in what order are particles rendered. If GPU
  88. /// simulation is enabled only distance based sorting is supported.
  89. /// </summary>
  90. [ShowInInspector]
  91. [NativeWrapper]
  92. public ParticleSortMode SortMode
  93. {
  94. get { return Internal_getsortMode(mCachedPtr); }
  95. set { Internal_setsortMode(mCachedPtr, value); }
  96. }
  97. /// <summary>
  98. /// Determines the time period during which the system runs, in seconds. This effects evaluation of distributions with
  99. /// curves using particle system time for evaluation.
  100. /// </summary>
  101. [ShowInInspector]
  102. [NativeWrapper]
  103. public float Duration
  104. {
  105. get { return Internal_getduration(mCachedPtr); }
  106. set { Internal_setduration(mCachedPtr, value); }
  107. }
  108. /// <summary>Determines should the particle system time wrap around once it reaches its duration.</summary>
  109. [ShowInInspector]
  110. [NativeWrapper]
  111. public bool IsLooping
  112. {
  113. get { return Internal_getisLooping(mCachedPtr); }
  114. set { Internal_setisLooping(mCachedPtr, value); }
  115. }
  116. /// <summary>
  117. /// Determines the maximum number of particles that can ever be active in this system. This number is ignored if GPU
  118. /// simulation is enabled, and instead particle count is instead only limited by the size of the internal buffers (shared
  119. /// between all particle systems).
  120. /// </summary>
  121. [ShowInInspector]
  122. [NativeWrapper]
  123. public uint MaxParticles
  124. {
  125. get { return Internal_getmaxParticles(mCachedPtr); }
  126. set { Internal_setmaxParticles(mCachedPtr, value); }
  127. }
  128. /// <summary>
  129. /// Determines should an automatic seed be used for the internal random number generator. This ensures the particle
  130. /// system yields different results each time it is ran.
  131. /// </summary>
  132. [ShowInInspector]
  133. [NativeWrapper]
  134. public bool UseAutomaticSeed
  135. {
  136. get { return Internal_getuseAutomaticSeed(mCachedPtr); }
  137. set { Internal_setuseAutomaticSeed(mCachedPtr, value); }
  138. }
  139. /// <summary>
  140. /// Determines the seed to use for the internal random number generator. Allows you to guarantee identical behaviour
  141. /// between different runs. Only relevant if automatic seed is disabled.
  142. /// </summary>
  143. [ShowInInspector]
  144. [NativeWrapper]
  145. public uint ManualSeed
  146. {
  147. get { return Internal_getmanualSeed(mCachedPtr); }
  148. set { Internal_setmanualSeed(mCachedPtr, value); }
  149. }
  150. /// <summary>
  151. /// Determines should the particle system bounds be automatically calculated, or should the fixed value provided be used.
  152. /// Bounds are used primarily for culling purposes. Note that automatic bounds are not supported when GPU simulation is
  153. /// enabled.
  154. /// </summary>
  155. [ShowInInspector]
  156. [NativeWrapper]
  157. public bool UseAutomaticBounds
  158. {
  159. get { return Internal_getuseAutomaticBounds(mCachedPtr); }
  160. set { Internal_setuseAutomaticBounds(mCachedPtr, value); }
  161. }
  162. /// <summary>
  163. /// Custom bounds to use them <see cref="useAutomaticBounds"/> is disabled. The bounds are in the simulation space of the
  164. /// particle system.
  165. /// </summary>
  166. [ShowInInspector]
  167. [NativeWrapper]
  168. public AABox CustomBounds
  169. {
  170. get
  171. {
  172. AABox temp;
  173. Internal_getcustomBounds(mCachedPtr, out temp);
  174. return temp;
  175. }
  176. set { Internal_setcustomBounds(mCachedPtr, ref value); }
  177. }
  178. /// <summary>Determines how is each particle represented on the screen.</summary>
  179. [ShowInInspector]
  180. [NativeWrapper]
  181. public ParticleRenderMode RenderMode
  182. {
  183. get { return Internal_getrenderMode(mCachedPtr); }
  184. set { Internal_setrenderMode(mCachedPtr, value); }
  185. }
  186. [MethodImpl(MethodImplOptions.InternalCall)]
  187. private static extern RRef<Material> Internal_getmaterial(IntPtr thisPtr);
  188. [MethodImpl(MethodImplOptions.InternalCall)]
  189. private static extern void Internal_setmaterial(IntPtr thisPtr, RRef<Material> value);
  190. [MethodImpl(MethodImplOptions.InternalCall)]
  191. private static extern RRef<Mesh> Internal_getmesh(IntPtr thisPtr);
  192. [MethodImpl(MethodImplOptions.InternalCall)]
  193. private static extern void Internal_setmesh(IntPtr thisPtr, RRef<Mesh> value);
  194. [MethodImpl(MethodImplOptions.InternalCall)]
  195. private static extern bool Internal_getgpuSimulation(IntPtr thisPtr);
  196. [MethodImpl(MethodImplOptions.InternalCall)]
  197. private static extern void Internal_setgpuSimulation(IntPtr thisPtr, bool value);
  198. [MethodImpl(MethodImplOptions.InternalCall)]
  199. private static extern ParticleSimulationSpace Internal_getsimulationSpace(IntPtr thisPtr);
  200. [MethodImpl(MethodImplOptions.InternalCall)]
  201. private static extern void Internal_setsimulationSpace(IntPtr thisPtr, ParticleSimulationSpace value);
  202. [MethodImpl(MethodImplOptions.InternalCall)]
  203. private static extern ParticleOrientation Internal_getorientation(IntPtr thisPtr);
  204. [MethodImpl(MethodImplOptions.InternalCall)]
  205. private static extern void Internal_setorientation(IntPtr thisPtr, ParticleOrientation value);
  206. [MethodImpl(MethodImplOptions.InternalCall)]
  207. private static extern bool Internal_getorientationLockY(IntPtr thisPtr);
  208. [MethodImpl(MethodImplOptions.InternalCall)]
  209. private static extern void Internal_setorientationLockY(IntPtr thisPtr, bool value);
  210. [MethodImpl(MethodImplOptions.InternalCall)]
  211. private static extern void Internal_getorientationPlaneNormal(IntPtr thisPtr, out Vector3 __output);
  212. [MethodImpl(MethodImplOptions.InternalCall)]
  213. private static extern void Internal_setorientationPlaneNormal(IntPtr thisPtr, ref Vector3 value);
  214. [MethodImpl(MethodImplOptions.InternalCall)]
  215. private static extern ParticleSortMode Internal_getsortMode(IntPtr thisPtr);
  216. [MethodImpl(MethodImplOptions.InternalCall)]
  217. private static extern void Internal_setsortMode(IntPtr thisPtr, ParticleSortMode value);
  218. [MethodImpl(MethodImplOptions.InternalCall)]
  219. private static extern float Internal_getduration(IntPtr thisPtr);
  220. [MethodImpl(MethodImplOptions.InternalCall)]
  221. private static extern void Internal_setduration(IntPtr thisPtr, float value);
  222. [MethodImpl(MethodImplOptions.InternalCall)]
  223. private static extern bool Internal_getisLooping(IntPtr thisPtr);
  224. [MethodImpl(MethodImplOptions.InternalCall)]
  225. private static extern void Internal_setisLooping(IntPtr thisPtr, bool value);
  226. [MethodImpl(MethodImplOptions.InternalCall)]
  227. private static extern uint Internal_getmaxParticles(IntPtr thisPtr);
  228. [MethodImpl(MethodImplOptions.InternalCall)]
  229. private static extern void Internal_setmaxParticles(IntPtr thisPtr, uint value);
  230. [MethodImpl(MethodImplOptions.InternalCall)]
  231. private static extern bool Internal_getuseAutomaticSeed(IntPtr thisPtr);
  232. [MethodImpl(MethodImplOptions.InternalCall)]
  233. private static extern void Internal_setuseAutomaticSeed(IntPtr thisPtr, bool value);
  234. [MethodImpl(MethodImplOptions.InternalCall)]
  235. private static extern uint Internal_getmanualSeed(IntPtr thisPtr);
  236. [MethodImpl(MethodImplOptions.InternalCall)]
  237. private static extern void Internal_setmanualSeed(IntPtr thisPtr, uint value);
  238. [MethodImpl(MethodImplOptions.InternalCall)]
  239. private static extern bool Internal_getuseAutomaticBounds(IntPtr thisPtr);
  240. [MethodImpl(MethodImplOptions.InternalCall)]
  241. private static extern void Internal_setuseAutomaticBounds(IntPtr thisPtr, bool value);
  242. [MethodImpl(MethodImplOptions.InternalCall)]
  243. private static extern void Internal_getcustomBounds(IntPtr thisPtr, out AABox __output);
  244. [MethodImpl(MethodImplOptions.InternalCall)]
  245. private static extern void Internal_setcustomBounds(IntPtr thisPtr, ref AABox value);
  246. [MethodImpl(MethodImplOptions.InternalCall)]
  247. private static extern ParticleRenderMode Internal_getrenderMode(IntPtr thisPtr);
  248. [MethodImpl(MethodImplOptions.InternalCall)]
  249. private static extern void Internal_setrenderMode(IntPtr thisPtr, ParticleRenderMode value);
  250. }
  251. /** @} */
  252. }