ParticleEffect.cs 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690
  1. // WARNING - AUTOGENERATED - DO NOT EDIT
  2. //
  3. // Generated using `sharpie urho`
  4. //
  5. // ParticleEffect.cs
  6. //
  7. // Copyright 2015 Xamarin Inc. All rights reserved.
  8. using System;
  9. using System.Runtime.InteropServices;
  10. using System.Collections.Generic;
  11. using Urho.Urho2D;
  12. using Urho.Gui;
  13. using Urho.Resources;
  14. using Urho.IO;
  15. using Urho.Navigation;
  16. using Urho.Network;
  17. namespace Urho
  18. {
  19. /// <summary>
  20. /// %Particle effect definition.
  21. /// </summary>
  22. public unsafe partial class ParticleEffect : Resource
  23. {
  24. unsafe partial void OnParticleEffectCreated ();
  25. [Preserve]
  26. public ParticleEffect (IntPtr handle) : base (handle)
  27. {
  28. OnParticleEffectCreated ();
  29. }
  30. [Preserve]
  31. protected ParticleEffect (UrhoObjectFlag emptyFlag) : base (emptyFlag)
  32. {
  33. OnParticleEffectCreated ();
  34. }
  35. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  36. internal static extern int ParticleEffect_GetType (IntPtr handle);
  37. private StringHash UrhoGetType ()
  38. {
  39. Runtime.ValidateRefCounted (this);
  40. return new StringHash (ParticleEffect_GetType (handle));
  41. }
  42. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  43. internal static extern IntPtr ParticleEffect_GetTypeName (IntPtr handle);
  44. private string GetTypeName ()
  45. {
  46. Runtime.ValidateRefCounted (this);
  47. return Marshal.PtrToStringAnsi (ParticleEffect_GetTypeName (handle));
  48. }
  49. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  50. internal static extern int ParticleEffect_GetTypeStatic ();
  51. private static StringHash GetTypeStatic ()
  52. {
  53. Runtime.Validate (typeof(ParticleEffect));
  54. return new StringHash (ParticleEffect_GetTypeStatic ());
  55. }
  56. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  57. internal static extern IntPtr ParticleEffect_GetTypeNameStatic ();
  58. private static string GetTypeNameStatic ()
  59. {
  60. Runtime.Validate (typeof(ParticleEffect));
  61. return Marshal.PtrToStringAnsi (ParticleEffect_GetTypeNameStatic ());
  62. }
  63. [Preserve]
  64. public ParticleEffect () : this (Application.CurrentContext)
  65. {
  66. }
  67. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  68. internal static extern IntPtr ParticleEffect_ParticleEffect (IntPtr context);
  69. [Preserve]
  70. public ParticleEffect (Context context) : base (UrhoObjectFlag.Empty)
  71. {
  72. Runtime.Validate (typeof(ParticleEffect));
  73. handle = ParticleEffect_ParticleEffect ((object)context == null ? IntPtr.Zero : context.Handle);
  74. Runtime.RegisterObject (this);
  75. OnParticleEffectCreated ();
  76. }
  77. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  78. internal static extern void ParticleEffect_RegisterObject (IntPtr context);
  79. /// <summary>
  80. /// Register object factory.
  81. /// </summary>
  82. public static void RegisterObject (Context context)
  83. {
  84. Runtime.Validate (typeof(ParticleEffect));
  85. ParticleEffect_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
  86. }
  87. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  88. internal static extern bool ParticleEffect_BeginLoad_File (IntPtr handle, IntPtr source);
  89. /// <summary>
  90. /// Load resource from stream. May be called from a worker thread. Return true if successful.
  91. /// </summary>
  92. public override bool BeginLoad (File source)
  93. {
  94. Runtime.ValidateRefCounted (this);
  95. return ParticleEffect_BeginLoad_File (handle, (object)source == null ? IntPtr.Zero : source.Handle);
  96. }
  97. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  98. internal static extern bool ParticleEffect_BeginLoad_MemoryBuffer (IntPtr handle, IntPtr source);
  99. /// <summary>
  100. /// Load resource from stream. May be called from a worker thread. Return true if successful.
  101. /// </summary>
  102. public override bool BeginLoad (MemoryBuffer source)
  103. {
  104. Runtime.ValidateRefCounted (this);
  105. return ParticleEffect_BeginLoad_MemoryBuffer (handle, (object)source == null ? IntPtr.Zero : source.Handle);
  106. }
  107. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  108. internal static extern bool ParticleEffect_EndLoad (IntPtr handle);
  109. /// <summary>
  110. /// Finish resource loading. Always called from the main thread. Return true if successful.
  111. /// </summary>
  112. public override bool EndLoad ()
  113. {
  114. Runtime.ValidateRefCounted (this);
  115. return ParticleEffect_EndLoad (handle);
  116. }
  117. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  118. internal static extern bool ParticleEffect_Save_File (IntPtr handle, IntPtr dest);
  119. /// <summary>
  120. /// Save resource. Return true if successful.
  121. /// </summary>
  122. public override bool Save (File dest)
  123. {
  124. Runtime.ValidateRefCounted (this);
  125. return ParticleEffect_Save_File (handle, (object)dest == null ? IntPtr.Zero : dest.Handle);
  126. }
  127. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  128. internal static extern bool ParticleEffect_Save_MemoryBuffer (IntPtr handle, IntPtr dest);
  129. /// <summary>
  130. /// Save resource. Return true if successful.
  131. /// </summary>
  132. public override bool Save (MemoryBuffer dest)
  133. {
  134. Runtime.ValidateRefCounted (this);
  135. return ParticleEffect_Save_MemoryBuffer (handle, (object)dest == null ? IntPtr.Zero : dest.Handle);
  136. }
  137. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  138. internal static extern bool ParticleEffect_Save0 (IntPtr handle, IntPtr dest);
  139. /// <summary>
  140. /// Save resource to XMLElement. Return true if successful.
  141. /// </summary>
  142. public bool Save (XmlElement dest)
  143. {
  144. Runtime.ValidateRefCounted (this);
  145. return ParticleEffect_Save0 (handle, (object)dest == null ? IntPtr.Zero : dest.Handle);
  146. }
  147. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  148. internal static extern bool ParticleEffect_Load (IntPtr handle, IntPtr source);
  149. /// <summary>
  150. /// Load resource from XMLElement synchronously. Return true if successful.
  151. /// </summary>
  152. public bool Load (XmlElement source)
  153. {
  154. Runtime.ValidateRefCounted (this);
  155. return ParticleEffect_Load (handle, (object)source == null ? IntPtr.Zero : source.Handle);
  156. }
  157. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  158. internal static extern void ParticleEffect_SetMaterial (IntPtr handle, IntPtr material);
  159. /// <summary>
  160. /// Set material.
  161. /// </summary>
  162. private void SetMaterial (Material material)
  163. {
  164. Runtime.ValidateRefCounted (this);
  165. ParticleEffect_SetMaterial (handle, (object)material == null ? IntPtr.Zero : material.Handle);
  166. }
  167. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  168. internal static extern void ParticleEffect_SetNumParticles (IntPtr handle, uint num);
  169. /// <summary>
  170. /// Set maximum number of particles.
  171. /// </summary>
  172. private void SetNumParticles (uint num)
  173. {
  174. Runtime.ValidateRefCounted (this);
  175. ParticleEffect_SetNumParticles (handle, num);
  176. }
  177. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  178. internal static extern void ParticleEffect_SetUpdateInvisible (IntPtr handle, bool enable);
  179. /// <summary>
  180. /// Set whether to update when particles are not visible.
  181. /// </summary>
  182. private void SetUpdateInvisible (bool enable)
  183. {
  184. Runtime.ValidateRefCounted (this);
  185. ParticleEffect_SetUpdateInvisible (handle, enable);
  186. }
  187. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  188. internal static extern void ParticleEffect_SetRelative (IntPtr handle, bool enable);
  189. /// <summary>
  190. /// Set whether billboards are relative to the scene node.
  191. /// </summary>
  192. private void SetRelative (bool enable)
  193. {
  194. Runtime.ValidateRefCounted (this);
  195. ParticleEffect_SetRelative (handle, enable);
  196. }
  197. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  198. internal static extern void ParticleEffect_SetScaled (IntPtr handle, bool enable);
  199. /// <summary>
  200. /// Set whether scene node scale affects billboards' size.
  201. /// </summary>
  202. private void SetScaled (bool enable)
  203. {
  204. Runtime.ValidateRefCounted (this);
  205. ParticleEffect_SetScaled (handle, enable);
  206. }
  207. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  208. internal static extern void ParticleEffect_SetSorted (IntPtr handle, bool enable);
  209. /// <summary>
  210. /// Set whether billboards are sorted by distance.
  211. /// </summary>
  212. private void SetSorted (bool enable)
  213. {
  214. Runtime.ValidateRefCounted (this);
  215. ParticleEffect_SetSorted (handle, enable);
  216. }
  217. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  218. internal static extern void ParticleEffect_SetFixedScreenSize (IntPtr handle, bool enable);
  219. /// <summary>
  220. /// Set whether billboards have fixed size on screen (measured in pixels) regardless of distance to camera.
  221. /// </summary>
  222. private void SetFixedScreenSize (bool enable)
  223. {
  224. Runtime.ValidateRefCounted (this);
  225. ParticleEffect_SetFixedScreenSize (handle, enable);
  226. }
  227. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  228. internal static extern void ParticleEffect_SetAnimationLodBias (IntPtr handle, float lodBias);
  229. /// <summary>
  230. /// Set animation LOD bias.
  231. /// </summary>
  232. private void SetAnimationLodBias (float lodBias)
  233. {
  234. Runtime.ValidateRefCounted (this);
  235. ParticleEffect_SetAnimationLodBias (handle, lodBias);
  236. }
  237. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  238. internal static extern void ParticleEffect_SetEmitterType (IntPtr handle, EmitterType type);
  239. /// <summary>
  240. /// Set emitter type.
  241. /// </summary>
  242. private void SetEmitterType (EmitterType type)
  243. {
  244. Runtime.ValidateRefCounted (this);
  245. ParticleEffect_SetEmitterType (handle, type);
  246. }
  247. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  248. internal static extern void ParticleEffect_SetEmitterSize (IntPtr handle, ref Urho.Vector3 size);
  249. /// <summary>
  250. /// Set emitter size.
  251. /// </summary>
  252. private void SetEmitterSize (Urho.Vector3 size)
  253. {
  254. Runtime.ValidateRefCounted (this);
  255. ParticleEffect_SetEmitterSize (handle, ref size);
  256. }
  257. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  258. internal static extern void ParticleEffect_SetMinDirection (IntPtr handle, ref Urho.Vector3 direction);
  259. /// <summary>
  260. /// Set negative direction limit.
  261. /// </summary>
  262. private void SetMinDirection (Urho.Vector3 direction)
  263. {
  264. Runtime.ValidateRefCounted (this);
  265. ParticleEffect_SetMinDirection (handle, ref direction);
  266. }
  267. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  268. internal static extern void ParticleEffect_SetMaxDirection (IntPtr handle, ref Urho.Vector3 direction);
  269. /// <summary>
  270. /// Set positive direction limit.
  271. /// </summary>
  272. private void SetMaxDirection (Urho.Vector3 direction)
  273. {
  274. Runtime.ValidateRefCounted (this);
  275. ParticleEffect_SetMaxDirection (handle, ref direction);
  276. }
  277. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  278. internal static extern void ParticleEffect_SetConstantForce (IntPtr handle, ref Urho.Vector3 force);
  279. /// <summary>
  280. /// Set constant force acting on particles.
  281. /// </summary>
  282. private void SetConstantForce (Urho.Vector3 force)
  283. {
  284. Runtime.ValidateRefCounted (this);
  285. ParticleEffect_SetConstantForce (handle, ref force);
  286. }
  287. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  288. internal static extern void ParticleEffect_SetDampingForce (IntPtr handle, float force);
  289. /// <summary>
  290. /// Set particle velocity damping force.
  291. /// </summary>
  292. private void SetDampingForce (float force)
  293. {
  294. Runtime.ValidateRefCounted (this);
  295. ParticleEffect_SetDampingForce (handle, force);
  296. }
  297. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  298. internal static extern void ParticleEffect_SetActiveTime (IntPtr handle, float time);
  299. /// <summary>
  300. /// Set emission active period length (0 = infinite.)
  301. /// </summary>
  302. private void SetActiveTime (float time)
  303. {
  304. Runtime.ValidateRefCounted (this);
  305. ParticleEffect_SetActiveTime (handle, time);
  306. }
  307. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  308. internal static extern void ParticleEffect_SetInactiveTime (IntPtr handle, float time);
  309. /// <summary>
  310. /// Set emission inactive period length (0 = infinite.)
  311. /// </summary>
  312. private void SetInactiveTime (float time)
  313. {
  314. Runtime.ValidateRefCounted (this);
  315. ParticleEffect_SetInactiveTime (handle, time);
  316. }
  317. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  318. internal static extern void ParticleEffect_SetMinEmissionRate (IntPtr handle, float rate);
  319. /// <summary>
  320. /// Set minimum emission rate.
  321. /// </summary>
  322. private void SetMinEmissionRate (float rate)
  323. {
  324. Runtime.ValidateRefCounted (this);
  325. ParticleEffect_SetMinEmissionRate (handle, rate);
  326. }
  327. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  328. internal static extern void ParticleEffect_SetMaxEmissionRate (IntPtr handle, float rate);
  329. /// <summary>
  330. /// Set maximum emission rate.
  331. /// </summary>
  332. private void SetMaxEmissionRate (float rate)
  333. {
  334. Runtime.ValidateRefCounted (this);
  335. ParticleEffect_SetMaxEmissionRate (handle, rate);
  336. }
  337. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  338. internal static extern void ParticleEffect_SetMinParticleSize (IntPtr handle, ref Urho.Vector2 size);
  339. /// <summary>
  340. /// Set particle minimum size.
  341. /// </summary>
  342. private void SetMinParticleSize (Urho.Vector2 size)
  343. {
  344. Runtime.ValidateRefCounted (this);
  345. ParticleEffect_SetMinParticleSize (handle, ref size);
  346. }
  347. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  348. internal static extern void ParticleEffect_SetMaxParticleSize (IntPtr handle, ref Urho.Vector2 size);
  349. /// <summary>
  350. /// Set particle maximum size.
  351. /// </summary>
  352. private void SetMaxParticleSize (Urho.Vector2 size)
  353. {
  354. Runtime.ValidateRefCounted (this);
  355. ParticleEffect_SetMaxParticleSize (handle, ref size);
  356. }
  357. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  358. internal static extern void ParticleEffect_SetMinTimeToLive (IntPtr handle, float time);
  359. /// <summary>
  360. /// Set particle minimum time to live.
  361. /// </summary>
  362. private void SetMinTimeToLive (float time)
  363. {
  364. Runtime.ValidateRefCounted (this);
  365. ParticleEffect_SetMinTimeToLive (handle, time);
  366. }
  367. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  368. internal static extern void ParticleEffect_SetMaxTimeToLive (IntPtr handle, float time);
  369. /// <summary>
  370. /// Set particle maximum time to live.
  371. /// </summary>
  372. private void SetMaxTimeToLive (float time)
  373. {
  374. Runtime.ValidateRefCounted (this);
  375. ParticleEffect_SetMaxTimeToLive (handle, time);
  376. }
  377. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  378. internal static extern void ParticleEffect_SetMinVelocity (IntPtr handle, float velocity);
  379. /// <summary>
  380. /// Set particle minimum velocity.
  381. /// </summary>
  382. private void SetMinVelocity (float velocity)
  383. {
  384. Runtime.ValidateRefCounted (this);
  385. ParticleEffect_SetMinVelocity (handle, velocity);
  386. }
  387. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  388. internal static extern void ParticleEffect_SetMaxVelocity (IntPtr handle, float velocity);
  389. /// <summary>
  390. /// Set particle maximum velocity.
  391. /// </summary>
  392. private void SetMaxVelocity (float velocity)
  393. {
  394. Runtime.ValidateRefCounted (this);
  395. ParticleEffect_SetMaxVelocity (handle, velocity);
  396. }
  397. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  398. internal static extern void ParticleEffect_SetMinRotation (IntPtr handle, float rotation);
  399. /// <summary>
  400. /// Set particle minimum rotation.
  401. /// </summary>
  402. private void SetMinRotation (float rotation)
  403. {
  404. Runtime.ValidateRefCounted (this);
  405. ParticleEffect_SetMinRotation (handle, rotation);
  406. }
  407. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  408. internal static extern void ParticleEffect_SetMaxRotation (IntPtr handle, float rotation);
  409. /// <summary>
  410. /// Set particle maximum rotation.
  411. /// </summary>
  412. private void SetMaxRotation (float rotation)
  413. {
  414. Runtime.ValidateRefCounted (this);
  415. ParticleEffect_SetMaxRotation (handle, rotation);
  416. }
  417. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  418. internal static extern void ParticleEffect_SetMinRotationSpeed (IntPtr handle, float speed);
  419. /// <summary>
  420. /// Set particle minimum rotation speed.
  421. /// </summary>
  422. private void SetMinRotationSpeed (float speed)
  423. {
  424. Runtime.ValidateRefCounted (this);
  425. ParticleEffect_SetMinRotationSpeed (handle, speed);
  426. }
  427. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  428. internal static extern void ParticleEffect_SetMaxRotationSpeed (IntPtr handle, float speed);
  429. /// <summary>
  430. /// Set particle maximum rotation speed.
  431. /// </summary>
  432. private void SetMaxRotationSpeed (float speed)
  433. {
  434. Runtime.ValidateRefCounted (this);
  435. ParticleEffect_SetMaxRotationSpeed (handle, speed);
  436. }
  437. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  438. internal static extern void ParticleEffect_SetSizeAdd (IntPtr handle, float sizeAdd);
  439. /// <summary>
  440. /// Set particle size additive modifier.
  441. /// </summary>
  442. private void SetSizeAdd (float sizeAdd)
  443. {
  444. Runtime.ValidateRefCounted (this);
  445. ParticleEffect_SetSizeAdd (handle, sizeAdd);
  446. }
  447. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  448. internal static extern void ParticleEffect_SetSizeMul (IntPtr handle, float sizeMul);
  449. /// <summary>
  450. /// Set particle size multiplicative modifier.
  451. /// </summary>
  452. private void SetSizeMul (float sizeMul)
  453. {
  454. Runtime.ValidateRefCounted (this);
  455. ParticleEffect_SetSizeMul (handle, sizeMul);
  456. }
  457. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  458. internal static extern void ParticleEffect_SetFaceCameraMode (IntPtr handle, FaceCameraMode mode);
  459. /// <summary>
  460. /// Set how the particles should rotate in relation to the camera. Default is to follow camera rotation on all axes (FC_ROTATE_XYZ.)
  461. /// </summary>
  462. private void SetFaceCameraMode (FaceCameraMode mode)
  463. {
  464. Runtime.ValidateRefCounted (this);
  465. ParticleEffect_SetFaceCameraMode (handle, mode);
  466. }
  467. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  468. internal static extern void ParticleEffect_AddColorTime (IntPtr handle, ref Urho.Color color, float time);
  469. /// <summary>
  470. /// Add a color frame sorted in the correct position based on time.
  471. /// </summary>
  472. public void AddColorTime (Urho.Color color, float time)
  473. {
  474. Runtime.ValidateRefCounted (this);
  475. ParticleEffect_AddColorTime (handle, ref color, time);
  476. }
  477. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  478. internal static extern void ParticleEffect_RemoveColorFrame (IntPtr handle, uint index);
  479. /// <summary>
  480. /// Remove color frame at index
  481. /// </summary>
  482. public void RemoveColorFrame (uint index)
  483. {
  484. Runtime.ValidateRefCounted (this);
  485. ParticleEffect_RemoveColorFrame (handle, index);
  486. }
  487. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  488. internal static extern void ParticleEffect_SetNumColorFrames (IntPtr handle, uint number);
  489. /// <summary>
  490. /// Set number of color frames.
  491. /// </summary>
  492. private void SetNumColorFrames (uint number)
  493. {
  494. Runtime.ValidateRefCounted (this);
  495. ParticleEffect_SetNumColorFrames (handle, number);
  496. }
  497. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  498. internal static extern void ParticleEffect_SortColorFrames (IntPtr handle);
  499. /// <summary>
  500. /// Sort the list of color frames based on time.
  501. /// </summary>
  502. public void SortColorFrames ()
  503. {
  504. Runtime.ValidateRefCounted (this);
  505. ParticleEffect_SortColorFrames (handle);
  506. }
  507. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  508. internal static extern void ParticleEffect_RemoveTextureFrame (IntPtr handle, uint index);
  509. /// <summary>
  510. /// Remove texture frame at index
  511. /// </summary>
  512. public void RemoveTextureFrame (uint index)
  513. {
  514. Runtime.ValidateRefCounted (this);
  515. ParticleEffect_RemoveTextureFrame (handle, index);
  516. }
  517. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  518. internal static extern void ParticleEffect_SetNumTextureFrames (IntPtr handle, uint number);
  519. /// <summary>
  520. /// Set number of texture frames.
  521. /// </summary>
  522. private void SetNumTextureFrames (uint number)
  523. {
  524. Runtime.ValidateRefCounted (this);
  525. ParticleEffect_SetNumTextureFrames (handle, number);
  526. }
  527. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  528. internal static extern void ParticleEffect_SortTextureFrames (IntPtr handle);
  529. /// <summary>
  530. /// Sort the list of texture frames based on time.
  531. /// </summary>
  532. public void SortTextureFrames ()
  533. {
  534. Runtime.ValidateRefCounted (this);
  535. ParticleEffect_SortTextureFrames (handle);
  536. }
  537. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  538. internal static extern IntPtr ParticleEffect_Clone (IntPtr handle, string cloneName);
  539. /// <summary>
  540. /// Clone the particle effect.
  541. /// </summary>
  542. public ParticleEffect Clone (string cloneName = "")
  543. {
  544. Runtime.ValidateRefCounted (this);
  545. return Runtime.LookupRefCounted<ParticleEffect> (ParticleEffect_Clone (handle, cloneName));
  546. }
  547. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  548. internal static extern IntPtr ParticleEffect_GetMaterial (IntPtr handle);
  549. /// <summary>
  550. /// Return material.
  551. /// </summary>
  552. private Material GetMaterial ()
  553. {
  554. Runtime.ValidateRefCounted (this);
  555. return Runtime.LookupObject<Material> (ParticleEffect_GetMaterial (handle));
  556. }
  557. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  558. internal static extern uint ParticleEffect_GetNumParticles (IntPtr handle);
  559. /// <summary>
  560. /// Return maximum number of particles.
  561. /// </summary>
  562. private uint GetNumParticles ()
  563. {
  564. Runtime.ValidateRefCounted (this);
  565. return ParticleEffect_GetNumParticles (handle);
  566. }
  567. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  568. internal static extern bool ParticleEffect_GetUpdateInvisible (IntPtr handle);
  569. /// <summary>
  570. /// Return whether to update when particles are not visible.
  571. /// </summary>
  572. private bool GetUpdateInvisible ()
  573. {
  574. Runtime.ValidateRefCounted (this);
  575. return ParticleEffect_GetUpdateInvisible (handle);
  576. }
  577. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  578. internal static extern bool ParticleEffect_IsRelative (IntPtr handle);
  579. /// <summary>
  580. /// Return whether billboards are relative to the scene node.
  581. /// </summary>
  582. private bool IsRelative ()
  583. {
  584. Runtime.ValidateRefCounted (this);
  585. return ParticleEffect_IsRelative (handle);
  586. }
  587. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  588. internal static extern bool ParticleEffect_IsScaled (IntPtr handle);
  589. /// <summary>
  590. /// Return whether scene node scale affects billboards' size.
  591. /// </summary>
  592. private bool IsScaled ()
  593. {
  594. Runtime.ValidateRefCounted (this);
  595. return ParticleEffect_IsScaled (handle);
  596. }
  597. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  598. internal static extern bool ParticleEffect_IsSorted (IntPtr handle);
  599. /// <summary>
  600. /// Return whether billboards are sorted.
  601. /// </summary>
  602. private bool IsSorted ()
  603. {
  604. Runtime.ValidateRefCounted (this);
  605. return ParticleEffect_IsSorted (handle);
  606. }
  607. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  608. internal static extern bool ParticleEffect_IsFixedScreenSize (IntPtr handle);
  609. /// <summary>
  610. /// Return whether billboards are fixed screen size.
  611. /// </summary>
  612. private bool IsFixedScreenSize ()
  613. {
  614. Runtime.ValidateRefCounted (this);
  615. return ParticleEffect_IsFixedScreenSize (handle);
  616. }
  617. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  618. internal static extern float ParticleEffect_GetAnimationLodBias (IntPtr handle);
  619. /// <summary>
  620. /// Return animation Lod bias.
  621. /// </summary>
  622. private float GetAnimationLodBias ()
  623. {
  624. Runtime.ValidateRefCounted (this);
  625. return ParticleEffect_GetAnimationLodBias (handle);
  626. }
  627. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  628. internal static extern EmitterType ParticleEffect_GetEmitterType (IntPtr handle);
  629. /// <summary>
  630. /// Return emitter type.
  631. /// </summary>
  632. private EmitterType GetEmitterType ()
  633. {
  634. Runtime.ValidateRefCounted (this);
  635. return ParticleEffect_GetEmitterType (handle);
  636. }
  637. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  638. internal static extern Urho.Vector3 ParticleEffect_GetEmitterSize (IntPtr handle);
  639. /// <summary>
  640. /// Return emitter size.
  641. /// </summary>
  642. private Urho.Vector3 GetEmitterSize ()
  643. {
  644. Runtime.ValidateRefCounted (this);
  645. return ParticleEffect_GetEmitterSize (handle);
  646. }
  647. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  648. internal static extern Urho.Vector3 ParticleEffect_GetMinDirection (IntPtr handle);
  649. /// <summary>
  650. /// Return negative direction limit.
  651. /// </summary>
  652. private Urho.Vector3 GetMinDirection ()
  653. {
  654. Runtime.ValidateRefCounted (this);
  655. return ParticleEffect_GetMinDirection (handle);
  656. }
  657. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  658. internal static extern Urho.Vector3 ParticleEffect_GetMaxDirection (IntPtr handle);
  659. /// <summary>
  660. /// Return positive direction limit.
  661. /// </summary>
  662. private Urho.Vector3 GetMaxDirection ()
  663. {
  664. Runtime.ValidateRefCounted (this);
  665. return ParticleEffect_GetMaxDirection (handle);
  666. }
  667. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  668. internal static extern Urho.Vector3 ParticleEffect_GetConstantForce (IntPtr handle);
  669. /// <summary>
  670. /// Return constant force acting on particles.
  671. /// </summary>
  672. private Urho.Vector3 GetConstantForce ()
  673. {
  674. Runtime.ValidateRefCounted (this);
  675. return ParticleEffect_GetConstantForce (handle);
  676. }
  677. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  678. internal static extern float ParticleEffect_GetDampingForce (IntPtr handle);
  679. /// <summary>
  680. /// Return particle velocity damping force.
  681. /// </summary>
  682. private float GetDampingForce ()
  683. {
  684. Runtime.ValidateRefCounted (this);
  685. return ParticleEffect_GetDampingForce (handle);
  686. }
  687. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  688. internal static extern float ParticleEffect_GetActiveTime (IntPtr handle);
  689. /// <summary>
  690. /// Return emission active period length (0 = infinite.)
  691. /// </summary>
  692. private float GetActiveTime ()
  693. {
  694. Runtime.ValidateRefCounted (this);
  695. return ParticleEffect_GetActiveTime (handle);
  696. }
  697. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  698. internal static extern float ParticleEffect_GetInactiveTime (IntPtr handle);
  699. /// <summary>
  700. /// Return emission inactive period length (0 = infinite.)
  701. /// </summary>
  702. private float GetInactiveTime ()
  703. {
  704. Runtime.ValidateRefCounted (this);
  705. return ParticleEffect_GetInactiveTime (handle);
  706. }
  707. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  708. internal static extern float ParticleEffect_GetMinEmissionRate (IntPtr handle);
  709. /// <summary>
  710. /// Return minimum emission rate.
  711. /// </summary>
  712. private float GetMinEmissionRate ()
  713. {
  714. Runtime.ValidateRefCounted (this);
  715. return ParticleEffect_GetMinEmissionRate (handle);
  716. }
  717. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  718. internal static extern float ParticleEffect_GetMaxEmissionRate (IntPtr handle);
  719. /// <summary>
  720. /// Return maximum emission rate.
  721. /// </summary>
  722. private float GetMaxEmissionRate ()
  723. {
  724. Runtime.ValidateRefCounted (this);
  725. return ParticleEffect_GetMaxEmissionRate (handle);
  726. }
  727. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  728. internal static extern Urho.Vector2 ParticleEffect_GetMinParticleSize (IntPtr handle);
  729. /// <summary>
  730. /// Return particle minimum size.
  731. /// </summary>
  732. private Urho.Vector2 GetMinParticleSize ()
  733. {
  734. Runtime.ValidateRefCounted (this);
  735. return ParticleEffect_GetMinParticleSize (handle);
  736. }
  737. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  738. internal static extern Urho.Vector2 ParticleEffect_GetMaxParticleSize (IntPtr handle);
  739. /// <summary>
  740. /// Return particle maximum size.
  741. /// </summary>
  742. private Urho.Vector2 GetMaxParticleSize ()
  743. {
  744. Runtime.ValidateRefCounted (this);
  745. return ParticleEffect_GetMaxParticleSize (handle);
  746. }
  747. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  748. internal static extern float ParticleEffect_GetMinTimeToLive (IntPtr handle);
  749. /// <summary>
  750. /// Return particle minimum time to live.
  751. /// </summary>
  752. private float GetMinTimeToLive ()
  753. {
  754. Runtime.ValidateRefCounted (this);
  755. return ParticleEffect_GetMinTimeToLive (handle);
  756. }
  757. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  758. internal static extern float ParticleEffect_GetMaxTimeToLive (IntPtr handle);
  759. /// <summary>
  760. /// Return particle maximum time to live.
  761. /// </summary>
  762. private float GetMaxTimeToLive ()
  763. {
  764. Runtime.ValidateRefCounted (this);
  765. return ParticleEffect_GetMaxTimeToLive (handle);
  766. }
  767. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  768. internal static extern float ParticleEffect_GetMinVelocity (IntPtr handle);
  769. /// <summary>
  770. /// Return particle minimum velocity.
  771. /// </summary>
  772. private float GetMinVelocity ()
  773. {
  774. Runtime.ValidateRefCounted (this);
  775. return ParticleEffect_GetMinVelocity (handle);
  776. }
  777. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  778. internal static extern float ParticleEffect_GetMaxVelocity (IntPtr handle);
  779. /// <summary>
  780. /// Return particle maximum velocity.
  781. /// </summary>
  782. private float GetMaxVelocity ()
  783. {
  784. Runtime.ValidateRefCounted (this);
  785. return ParticleEffect_GetMaxVelocity (handle);
  786. }
  787. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  788. internal static extern float ParticleEffect_GetMinRotation (IntPtr handle);
  789. /// <summary>
  790. /// Return particle minimum rotation.
  791. /// </summary>
  792. private float GetMinRotation ()
  793. {
  794. Runtime.ValidateRefCounted (this);
  795. return ParticleEffect_GetMinRotation (handle);
  796. }
  797. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  798. internal static extern float ParticleEffect_GetMaxRotation (IntPtr handle);
  799. /// <summary>
  800. /// Return particle maximum rotation.
  801. /// </summary>
  802. private float GetMaxRotation ()
  803. {
  804. Runtime.ValidateRefCounted (this);
  805. return ParticleEffect_GetMaxRotation (handle);
  806. }
  807. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  808. internal static extern float ParticleEffect_GetMinRotationSpeed (IntPtr handle);
  809. /// <summary>
  810. /// Return particle minimum rotation speed.
  811. /// </summary>
  812. private float GetMinRotationSpeed ()
  813. {
  814. Runtime.ValidateRefCounted (this);
  815. return ParticleEffect_GetMinRotationSpeed (handle);
  816. }
  817. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  818. internal static extern float ParticleEffect_GetMaxRotationSpeed (IntPtr handle);
  819. /// <summary>
  820. /// Return particle maximum rotation speed.
  821. /// </summary>
  822. private float GetMaxRotationSpeed ()
  823. {
  824. Runtime.ValidateRefCounted (this);
  825. return ParticleEffect_GetMaxRotationSpeed (handle);
  826. }
  827. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  828. internal static extern float ParticleEffect_GetSizeAdd (IntPtr handle);
  829. /// <summary>
  830. /// Return particle size additive modifier.
  831. /// </summary>
  832. private float GetSizeAdd ()
  833. {
  834. Runtime.ValidateRefCounted (this);
  835. return ParticleEffect_GetSizeAdd (handle);
  836. }
  837. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  838. internal static extern float ParticleEffect_GetSizeMul (IntPtr handle);
  839. /// <summary>
  840. /// Return particle size multiplicative modifier.
  841. /// </summary>
  842. private float GetSizeMul ()
  843. {
  844. Runtime.ValidateRefCounted (this);
  845. return ParticleEffect_GetSizeMul (handle);
  846. }
  847. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  848. internal static extern uint ParticleEffect_GetNumColorFrames (IntPtr handle);
  849. /// <summary>
  850. /// Return number of color animation frames.
  851. /// </summary>
  852. private uint GetNumColorFrames ()
  853. {
  854. Runtime.ValidateRefCounted (this);
  855. return ParticleEffect_GetNumColorFrames (handle);
  856. }
  857. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  858. internal static extern ColorFrame* ParticleEffect_GetColorFrame (IntPtr handle, uint index);
  859. /// <summary>
  860. /// Return a color animation frame, or null if outside range.
  861. /// </summary>
  862. public ColorFrame* GetColorFrame (uint index)
  863. {
  864. Runtime.ValidateRefCounted (this);
  865. return ParticleEffect_GetColorFrame (handle, index);
  866. }
  867. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  868. internal static extern uint ParticleEffect_GetNumTextureFrames (IntPtr handle);
  869. /// <summary>
  870. /// Return number of texture animation frames.
  871. /// </summary>
  872. private uint GetNumTextureFrames ()
  873. {
  874. Runtime.ValidateRefCounted (this);
  875. return ParticleEffect_GetNumTextureFrames (handle);
  876. }
  877. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  878. internal static extern TextureFrame* ParticleEffect_GetTextureFrame (IntPtr handle, uint index);
  879. /// <summary>
  880. /// Return a texture animation frame, or null if outside range.
  881. /// </summary>
  882. public TextureFrame* GetTextureFrame (uint index)
  883. {
  884. Runtime.ValidateRefCounted (this);
  885. return ParticleEffect_GetTextureFrame (handle, index);
  886. }
  887. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  888. internal static extern FaceCameraMode ParticleEffect_GetFaceCameraMode (IntPtr handle);
  889. /// <summary>
  890. /// Return how the particles rotate in relation to the camera.
  891. /// </summary>
  892. private FaceCameraMode GetFaceCameraMode ()
  893. {
  894. Runtime.ValidateRefCounted (this);
  895. return ParticleEffect_GetFaceCameraMode (handle);
  896. }
  897. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  898. internal static extern Vector3 ParticleEffect_GetRandomDirection (IntPtr handle);
  899. /// <summary>
  900. /// Return random direction.
  901. /// </summary>
  902. private Vector3 GetRandomDirection ()
  903. {
  904. Runtime.ValidateRefCounted (this);
  905. return ParticleEffect_GetRandomDirection (handle);
  906. }
  907. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  908. internal static extern Vector2 ParticleEffect_GetRandomSize (IntPtr handle);
  909. /// <summary>
  910. /// Return random size.
  911. /// </summary>
  912. private Vector2 GetRandomSize ()
  913. {
  914. Runtime.ValidateRefCounted (this);
  915. return ParticleEffect_GetRandomSize (handle);
  916. }
  917. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  918. internal static extern float ParticleEffect_GetRandomVelocity (IntPtr handle);
  919. /// <summary>
  920. /// Return random velocity.
  921. /// </summary>
  922. private float GetRandomVelocity ()
  923. {
  924. Runtime.ValidateRefCounted (this);
  925. return ParticleEffect_GetRandomVelocity (handle);
  926. }
  927. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  928. internal static extern float ParticleEffect_GetRandomTimeToLive (IntPtr handle);
  929. /// <summary>
  930. /// Return random timetolive.
  931. /// </summary>
  932. private float GetRandomTimeToLive ()
  933. {
  934. Runtime.ValidateRefCounted (this);
  935. return ParticleEffect_GetRandomTimeToLive (handle);
  936. }
  937. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  938. internal static extern float ParticleEffect_GetRandomRotationSpeed (IntPtr handle);
  939. /// <summary>
  940. /// Return random rotationspeed.
  941. /// </summary>
  942. private float GetRandomRotationSpeed ()
  943. {
  944. Runtime.ValidateRefCounted (this);
  945. return ParticleEffect_GetRandomRotationSpeed (handle);
  946. }
  947. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  948. internal static extern float ParticleEffect_GetRandomRotation (IntPtr handle);
  949. /// <summary>
  950. /// Return random rotation.
  951. /// </summary>
  952. private float GetRandomRotation ()
  953. {
  954. Runtime.ValidateRefCounted (this);
  955. return ParticleEffect_GetRandomRotation (handle);
  956. }
  957. public override StringHash Type {
  958. get {
  959. return UrhoGetType ();
  960. }
  961. }
  962. public override string TypeName {
  963. get {
  964. return GetTypeName ();
  965. }
  966. }
  967. [Preserve]
  968. public new static StringHash TypeStatic {
  969. get {
  970. return GetTypeStatic ();
  971. }
  972. }
  973. public new static string TypeNameStatic {
  974. get {
  975. return GetTypeNameStatic ();
  976. }
  977. }
  978. /// <summary>
  979. /// Return material.
  980. /// Or
  981. /// Set material.
  982. /// </summary>
  983. public Material Material {
  984. get {
  985. return GetMaterial ();
  986. }
  987. set {
  988. SetMaterial (value);
  989. }
  990. }
  991. /// <summary>
  992. /// Return maximum number of particles.
  993. /// Or
  994. /// Set maximum number of particles.
  995. /// </summary>
  996. public uint NumParticles {
  997. get {
  998. return GetNumParticles ();
  999. }
  1000. set {
  1001. SetNumParticles (value);
  1002. }
  1003. }
  1004. /// <summary>
  1005. /// Return whether to update when particles are not visible.
  1006. /// Or
  1007. /// Set whether to update when particles are not visible.
  1008. /// </summary>
  1009. public bool UpdateInvisible {
  1010. get {
  1011. return GetUpdateInvisible ();
  1012. }
  1013. set {
  1014. SetUpdateInvisible (value);
  1015. }
  1016. }
  1017. /// <summary>
  1018. /// Return whether billboards are relative to the scene node.
  1019. /// Or
  1020. /// Set whether billboards are relative to the scene node.
  1021. /// </summary>
  1022. public bool Relative {
  1023. get {
  1024. return IsRelative ();
  1025. }
  1026. set {
  1027. SetRelative (value);
  1028. }
  1029. }
  1030. /// <summary>
  1031. /// Return whether scene node scale affects billboards' size.
  1032. /// Or
  1033. /// Set whether scene node scale affects billboards' size.
  1034. /// </summary>
  1035. public bool Scaled {
  1036. get {
  1037. return IsScaled ();
  1038. }
  1039. set {
  1040. SetScaled (value);
  1041. }
  1042. }
  1043. /// <summary>
  1044. /// Return whether billboards are sorted.
  1045. /// Or
  1046. /// Set whether billboards are sorted by distance.
  1047. /// </summary>
  1048. public bool Sorted {
  1049. get {
  1050. return IsSorted ();
  1051. }
  1052. set {
  1053. SetSorted (value);
  1054. }
  1055. }
  1056. /// <summary>
  1057. /// Return whether billboards are fixed screen size.
  1058. /// Or
  1059. /// Set whether billboards have fixed size on screen (measured in pixels) regardless of distance to camera.
  1060. /// </summary>
  1061. public bool FixedScreenSize {
  1062. get {
  1063. return IsFixedScreenSize ();
  1064. }
  1065. set {
  1066. SetFixedScreenSize (value);
  1067. }
  1068. }
  1069. /// <summary>
  1070. /// Return animation Lod bias.
  1071. /// Or
  1072. /// Set animation LOD bias.
  1073. /// </summary>
  1074. public float AnimationLodBias {
  1075. get {
  1076. return GetAnimationLodBias ();
  1077. }
  1078. set {
  1079. SetAnimationLodBias (value);
  1080. }
  1081. }
  1082. /// <summary>
  1083. /// Return emitter type.
  1084. /// Or
  1085. /// Set emitter type.
  1086. /// </summary>
  1087. public EmitterType EmitterType {
  1088. get {
  1089. return GetEmitterType ();
  1090. }
  1091. set {
  1092. SetEmitterType (value);
  1093. }
  1094. }
  1095. /// <summary>
  1096. /// Return emitter size.
  1097. /// Or
  1098. /// Set emitter size.
  1099. /// </summary>
  1100. public Urho.Vector3 EmitterSize {
  1101. get {
  1102. return GetEmitterSize ();
  1103. }
  1104. set {
  1105. SetEmitterSize (value);
  1106. }
  1107. }
  1108. /// <summary>
  1109. /// Return negative direction limit.
  1110. /// Or
  1111. /// Set negative direction limit.
  1112. /// </summary>
  1113. public Urho.Vector3 MinDirection {
  1114. get {
  1115. return GetMinDirection ();
  1116. }
  1117. set {
  1118. SetMinDirection (value);
  1119. }
  1120. }
  1121. /// <summary>
  1122. /// Return positive direction limit.
  1123. /// Or
  1124. /// Set positive direction limit.
  1125. /// </summary>
  1126. public Urho.Vector3 MaxDirection {
  1127. get {
  1128. return GetMaxDirection ();
  1129. }
  1130. set {
  1131. SetMaxDirection (value);
  1132. }
  1133. }
  1134. /// <summary>
  1135. /// Return constant force acting on particles.
  1136. /// Or
  1137. /// Set constant force acting on particles.
  1138. /// </summary>
  1139. public Urho.Vector3 ConstantForce {
  1140. get {
  1141. return GetConstantForce ();
  1142. }
  1143. set {
  1144. SetConstantForce (value);
  1145. }
  1146. }
  1147. /// <summary>
  1148. /// Return particle velocity damping force.
  1149. /// Or
  1150. /// Set particle velocity damping force.
  1151. /// </summary>
  1152. public float DampingForce {
  1153. get {
  1154. return GetDampingForce ();
  1155. }
  1156. set {
  1157. SetDampingForce (value);
  1158. }
  1159. }
  1160. /// <summary>
  1161. /// Return emission active period length (0 = infinite.)
  1162. /// Or
  1163. /// Set emission active period length (0 = infinite.)
  1164. /// </summary>
  1165. public float ActiveTime {
  1166. get {
  1167. return GetActiveTime ();
  1168. }
  1169. set {
  1170. SetActiveTime (value);
  1171. }
  1172. }
  1173. /// <summary>
  1174. /// Return emission inactive period length (0 = infinite.)
  1175. /// Or
  1176. /// Set emission inactive period length (0 = infinite.)
  1177. /// </summary>
  1178. public float InactiveTime {
  1179. get {
  1180. return GetInactiveTime ();
  1181. }
  1182. set {
  1183. SetInactiveTime (value);
  1184. }
  1185. }
  1186. /// <summary>
  1187. /// Return minimum emission rate.
  1188. /// Or
  1189. /// Set minimum emission rate.
  1190. /// </summary>
  1191. public float MinEmissionRate {
  1192. get {
  1193. return GetMinEmissionRate ();
  1194. }
  1195. set {
  1196. SetMinEmissionRate (value);
  1197. }
  1198. }
  1199. /// <summary>
  1200. /// Return maximum emission rate.
  1201. /// Or
  1202. /// Set maximum emission rate.
  1203. /// </summary>
  1204. public float MaxEmissionRate {
  1205. get {
  1206. return GetMaxEmissionRate ();
  1207. }
  1208. set {
  1209. SetMaxEmissionRate (value);
  1210. }
  1211. }
  1212. /// <summary>
  1213. /// Return particle minimum size.
  1214. /// Or
  1215. /// Set particle minimum size.
  1216. /// </summary>
  1217. public Urho.Vector2 MinParticleSize {
  1218. get {
  1219. return GetMinParticleSize ();
  1220. }
  1221. set {
  1222. SetMinParticleSize (value);
  1223. }
  1224. }
  1225. /// <summary>
  1226. /// Return particle maximum size.
  1227. /// Or
  1228. /// Set particle maximum size.
  1229. /// </summary>
  1230. public Urho.Vector2 MaxParticleSize {
  1231. get {
  1232. return GetMaxParticleSize ();
  1233. }
  1234. set {
  1235. SetMaxParticleSize (value);
  1236. }
  1237. }
  1238. /// <summary>
  1239. /// Return particle minimum time to live.
  1240. /// Or
  1241. /// Set particle minimum time to live.
  1242. /// </summary>
  1243. public float MinTimeToLive {
  1244. get {
  1245. return GetMinTimeToLive ();
  1246. }
  1247. set {
  1248. SetMinTimeToLive (value);
  1249. }
  1250. }
  1251. /// <summary>
  1252. /// Return particle maximum time to live.
  1253. /// Or
  1254. /// Set particle maximum time to live.
  1255. /// </summary>
  1256. public float MaxTimeToLive {
  1257. get {
  1258. return GetMaxTimeToLive ();
  1259. }
  1260. set {
  1261. SetMaxTimeToLive (value);
  1262. }
  1263. }
  1264. /// <summary>
  1265. /// Return particle minimum velocity.
  1266. /// Or
  1267. /// Set particle minimum velocity.
  1268. /// </summary>
  1269. public float MinVelocity {
  1270. get {
  1271. return GetMinVelocity ();
  1272. }
  1273. set {
  1274. SetMinVelocity (value);
  1275. }
  1276. }
  1277. /// <summary>
  1278. /// Return particle maximum velocity.
  1279. /// Or
  1280. /// Set particle maximum velocity.
  1281. /// </summary>
  1282. public float MaxVelocity {
  1283. get {
  1284. return GetMaxVelocity ();
  1285. }
  1286. set {
  1287. SetMaxVelocity (value);
  1288. }
  1289. }
  1290. /// <summary>
  1291. /// Return particle minimum rotation.
  1292. /// Or
  1293. /// Set particle minimum rotation.
  1294. /// </summary>
  1295. public float MinRotation {
  1296. get {
  1297. return GetMinRotation ();
  1298. }
  1299. set {
  1300. SetMinRotation (value);
  1301. }
  1302. }
  1303. /// <summary>
  1304. /// Return particle maximum rotation.
  1305. /// Or
  1306. /// Set particle maximum rotation.
  1307. /// </summary>
  1308. public float MaxRotation {
  1309. get {
  1310. return GetMaxRotation ();
  1311. }
  1312. set {
  1313. SetMaxRotation (value);
  1314. }
  1315. }
  1316. /// <summary>
  1317. /// Return particle minimum rotation speed.
  1318. /// Or
  1319. /// Set particle minimum rotation speed.
  1320. /// </summary>
  1321. public float MinRotationSpeed {
  1322. get {
  1323. return GetMinRotationSpeed ();
  1324. }
  1325. set {
  1326. SetMinRotationSpeed (value);
  1327. }
  1328. }
  1329. /// <summary>
  1330. /// Return particle maximum rotation speed.
  1331. /// Or
  1332. /// Set particle maximum rotation speed.
  1333. /// </summary>
  1334. public float MaxRotationSpeed {
  1335. get {
  1336. return GetMaxRotationSpeed ();
  1337. }
  1338. set {
  1339. SetMaxRotationSpeed (value);
  1340. }
  1341. }
  1342. /// <summary>
  1343. /// Return particle size additive modifier.
  1344. /// Or
  1345. /// Set particle size additive modifier.
  1346. /// </summary>
  1347. public float SizeAdd {
  1348. get {
  1349. return GetSizeAdd ();
  1350. }
  1351. set {
  1352. SetSizeAdd (value);
  1353. }
  1354. }
  1355. /// <summary>
  1356. /// Return particle size multiplicative modifier.
  1357. /// Or
  1358. /// Set particle size multiplicative modifier.
  1359. /// </summary>
  1360. public float SizeMul {
  1361. get {
  1362. return GetSizeMul ();
  1363. }
  1364. set {
  1365. SetSizeMul (value);
  1366. }
  1367. }
  1368. /// <summary>
  1369. /// Return how the particles rotate in relation to the camera.
  1370. /// Or
  1371. /// Set how the particles should rotate in relation to the camera. Default is to follow camera rotation on all axes (FC_ROTATE_XYZ.)
  1372. /// </summary>
  1373. public FaceCameraMode FaceCameraMode {
  1374. get {
  1375. return GetFaceCameraMode ();
  1376. }
  1377. set {
  1378. SetFaceCameraMode (value);
  1379. }
  1380. }
  1381. /// <summary>
  1382. /// Return number of color animation frames.
  1383. /// Or
  1384. /// Set number of color frames.
  1385. /// </summary>
  1386. public uint NumColorFrames {
  1387. get {
  1388. return GetNumColorFrames ();
  1389. }
  1390. set {
  1391. SetNumColorFrames (value);
  1392. }
  1393. }
  1394. /// <summary>
  1395. /// Return number of texture animation frames.
  1396. /// Or
  1397. /// Set number of texture frames.
  1398. /// </summary>
  1399. public uint NumTextureFrames {
  1400. get {
  1401. return GetNumTextureFrames ();
  1402. }
  1403. set {
  1404. SetNumTextureFrames (value);
  1405. }
  1406. }
  1407. /// <summary>
  1408. /// Return random direction.
  1409. /// </summary>
  1410. public Vector3 RandomDirection {
  1411. get {
  1412. return GetRandomDirection ();
  1413. }
  1414. }
  1415. /// <summary>
  1416. /// Return random size.
  1417. /// </summary>
  1418. public Vector2 RandomSize {
  1419. get {
  1420. return GetRandomSize ();
  1421. }
  1422. }
  1423. /// <summary>
  1424. /// Return random velocity.
  1425. /// </summary>
  1426. public float RandomVelocity {
  1427. get {
  1428. return GetRandomVelocity ();
  1429. }
  1430. }
  1431. /// <summary>
  1432. /// Return random timetolive.
  1433. /// </summary>
  1434. public float RandomTimeToLive {
  1435. get {
  1436. return GetRandomTimeToLive ();
  1437. }
  1438. }
  1439. /// <summary>
  1440. /// Return random rotationspeed.
  1441. /// </summary>
  1442. public float RandomRotationSpeed {
  1443. get {
  1444. return GetRandomRotationSpeed ();
  1445. }
  1446. }
  1447. /// <summary>
  1448. /// Return random rotation.
  1449. /// </summary>
  1450. public float RandomRotation {
  1451. get {
  1452. return GetRandomRotation ();
  1453. }
  1454. }
  1455. }
  1456. }