CollisionShape2D.cs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. // WARNING - AUTOGENERATED - DO NOT EDIT
  2. //
  3. // Generated using `sharpie urho`
  4. //
  5. // CollisionShape2D.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.Urho2D
  18. {
  19. /// <summary>
  20. /// 2D collision shape component.
  21. /// </summary>
  22. public unsafe partial class CollisionShape2D : Component
  23. {
  24. unsafe partial void OnCollisionShape2DCreated ();
  25. [Preserve]
  26. public CollisionShape2D (IntPtr handle) : base (handle)
  27. {
  28. OnCollisionShape2DCreated ();
  29. }
  30. [Preserve]
  31. protected CollisionShape2D (UrhoObjectFlag emptyFlag) : base (emptyFlag)
  32. {
  33. OnCollisionShape2DCreated ();
  34. }
  35. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  36. internal static extern int CollisionShape2D_GetType (IntPtr handle);
  37. private StringHash UrhoGetType ()
  38. {
  39. Runtime.ValidateRefCounted (this);
  40. return new StringHash (CollisionShape2D_GetType (handle));
  41. }
  42. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  43. internal static extern IntPtr CollisionShape2D_GetTypeName (IntPtr handle);
  44. private string GetTypeName ()
  45. {
  46. Runtime.ValidateRefCounted (this);
  47. return Marshal.PtrToStringAnsi (CollisionShape2D_GetTypeName (handle));
  48. }
  49. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  50. internal static extern int CollisionShape2D_GetTypeStatic ();
  51. private static StringHash GetTypeStatic ()
  52. {
  53. Runtime.Validate (typeof(CollisionShape2D));
  54. return new StringHash (CollisionShape2D_GetTypeStatic ());
  55. }
  56. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  57. internal static extern IntPtr CollisionShape2D_GetTypeNameStatic ();
  58. private static string GetTypeNameStatic ()
  59. {
  60. Runtime.Validate (typeof(CollisionShape2D));
  61. return Marshal.PtrToStringAnsi (CollisionShape2D_GetTypeNameStatic ());
  62. }
  63. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  64. internal static extern void CollisionShape2D_RegisterObject (IntPtr context);
  65. /// <summary>
  66. /// Register object factory.
  67. /// </summary>
  68. public new static void RegisterObject (Context context)
  69. {
  70. Runtime.Validate (typeof(CollisionShape2D));
  71. CollisionShape2D_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
  72. }
  73. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  74. internal static extern void CollisionShape2D_OnSetEnabled (IntPtr handle);
  75. /// <summary>
  76. /// Handle enabled/disabled state change.
  77. /// </summary>
  78. public override void OnSetEnabled ()
  79. {
  80. Runtime.ValidateRefCounted (this);
  81. CollisionShape2D_OnSetEnabled (handle);
  82. }
  83. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  84. internal static extern void CollisionShape2D_SetTrigger (IntPtr handle, bool trigger);
  85. /// <summary>
  86. /// Set trigger.
  87. /// </summary>
  88. private void SetTrigger (bool trigger)
  89. {
  90. Runtime.ValidateRefCounted (this);
  91. CollisionShape2D_SetTrigger (handle, trigger);
  92. }
  93. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  94. internal static extern void CollisionShape2D_SetCategoryBits (IntPtr handle, int categoryBits);
  95. /// <summary>
  96. /// Set filter category bits.
  97. /// </summary>
  98. private void SetCategoryBits (int categoryBits)
  99. {
  100. Runtime.ValidateRefCounted (this);
  101. CollisionShape2D_SetCategoryBits (handle, categoryBits);
  102. }
  103. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  104. internal static extern void CollisionShape2D_SetMaskBits (IntPtr handle, int maskBits);
  105. /// <summary>
  106. /// Set filter mask bits.
  107. /// </summary>
  108. private void SetMaskBits (int maskBits)
  109. {
  110. Runtime.ValidateRefCounted (this);
  111. CollisionShape2D_SetMaskBits (handle, maskBits);
  112. }
  113. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  114. internal static extern void CollisionShape2D_SetGroupIndex (IntPtr handle, int groupIndex);
  115. /// <summary>
  116. /// Set filter group index.
  117. /// </summary>
  118. private void SetGroupIndex (int groupIndex)
  119. {
  120. Runtime.ValidateRefCounted (this);
  121. CollisionShape2D_SetGroupIndex (handle, groupIndex);
  122. }
  123. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  124. internal static extern void CollisionShape2D_SetDensity (IntPtr handle, float density);
  125. /// <summary>
  126. /// Set density.
  127. /// </summary>
  128. private void SetDensity (float density)
  129. {
  130. Runtime.ValidateRefCounted (this);
  131. CollisionShape2D_SetDensity (handle, density);
  132. }
  133. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  134. internal static extern void CollisionShape2D_SetFriction (IntPtr handle, float friction);
  135. /// <summary>
  136. /// Set friction.
  137. /// </summary>
  138. private void SetFriction (float friction)
  139. {
  140. Runtime.ValidateRefCounted (this);
  141. CollisionShape2D_SetFriction (handle, friction);
  142. }
  143. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  144. internal static extern void CollisionShape2D_SetRestitution (IntPtr handle, float restitution);
  145. /// <summary>
  146. /// Set restitution .
  147. /// </summary>
  148. private void SetRestitution (float restitution)
  149. {
  150. Runtime.ValidateRefCounted (this);
  151. CollisionShape2D_SetRestitution (handle, restitution);
  152. }
  153. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  154. internal static extern void CollisionShape2D_CreateFixture (IntPtr handle);
  155. /// <summary>
  156. /// Create fixture.
  157. /// </summary>
  158. public void CreateFixture ()
  159. {
  160. Runtime.ValidateRefCounted (this);
  161. CollisionShape2D_CreateFixture (handle);
  162. }
  163. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  164. internal static extern void CollisionShape2D_ReleaseFixture (IntPtr handle);
  165. /// <summary>
  166. /// Release fixture.
  167. /// </summary>
  168. public void ReleaseFixture ()
  169. {
  170. Runtime.ValidateRefCounted (this);
  171. CollisionShape2D_ReleaseFixture (handle);
  172. }
  173. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  174. internal static extern bool CollisionShape2D_IsTrigger (IntPtr handle);
  175. /// <summary>
  176. /// Return trigger.
  177. /// </summary>
  178. private bool IsTrigger ()
  179. {
  180. Runtime.ValidateRefCounted (this);
  181. return CollisionShape2D_IsTrigger (handle);
  182. }
  183. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  184. internal static extern int CollisionShape2D_GetCategoryBits (IntPtr handle);
  185. /// <summary>
  186. /// Return filter category bits.
  187. /// </summary>
  188. private int GetCategoryBits ()
  189. {
  190. Runtime.ValidateRefCounted (this);
  191. return CollisionShape2D_GetCategoryBits (handle);
  192. }
  193. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  194. internal static extern int CollisionShape2D_GetMaskBits (IntPtr handle);
  195. /// <summary>
  196. /// Return filter mask bits.
  197. /// </summary>
  198. private int GetMaskBits ()
  199. {
  200. Runtime.ValidateRefCounted (this);
  201. return CollisionShape2D_GetMaskBits (handle);
  202. }
  203. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  204. internal static extern int CollisionShape2D_GetGroupIndex (IntPtr handle);
  205. /// <summary>
  206. /// Return filter group index.
  207. /// </summary>
  208. private int GetGroupIndex ()
  209. {
  210. Runtime.ValidateRefCounted (this);
  211. return CollisionShape2D_GetGroupIndex (handle);
  212. }
  213. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  214. internal static extern float CollisionShape2D_GetDensity (IntPtr handle);
  215. /// <summary>
  216. /// Return density.
  217. /// </summary>
  218. private float GetDensity ()
  219. {
  220. Runtime.ValidateRefCounted (this);
  221. return CollisionShape2D_GetDensity (handle);
  222. }
  223. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  224. internal static extern float CollisionShape2D_GetFriction (IntPtr handle);
  225. /// <summary>
  226. /// Return friction.
  227. /// </summary>
  228. private float GetFriction ()
  229. {
  230. Runtime.ValidateRefCounted (this);
  231. return CollisionShape2D_GetFriction (handle);
  232. }
  233. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  234. internal static extern float CollisionShape2D_GetRestitution (IntPtr handle);
  235. /// <summary>
  236. /// Return restitution.
  237. /// </summary>
  238. private float GetRestitution ()
  239. {
  240. Runtime.ValidateRefCounted (this);
  241. return CollisionShape2D_GetRestitution (handle);
  242. }
  243. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  244. internal static extern float CollisionShape2D_GetMass (IntPtr handle);
  245. /// <summary>
  246. /// Return mass.
  247. /// </summary>
  248. private float GetMass ()
  249. {
  250. Runtime.ValidateRefCounted (this);
  251. return CollisionShape2D_GetMass (handle);
  252. }
  253. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  254. internal static extern float CollisionShape2D_GetInertia (IntPtr handle);
  255. /// <summary>
  256. /// Return inertia.
  257. /// </summary>
  258. private float GetInertia ()
  259. {
  260. Runtime.ValidateRefCounted (this);
  261. return CollisionShape2D_GetInertia (handle);
  262. }
  263. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  264. internal static extern Vector2 CollisionShape2D_GetMassCenter (IntPtr handle);
  265. /// <summary>
  266. /// Return mass center.
  267. /// </summary>
  268. private Vector2 GetMassCenter ()
  269. {
  270. Runtime.ValidateRefCounted (this);
  271. return CollisionShape2D_GetMassCenter (handle);
  272. }
  273. public override StringHash Type {
  274. get {
  275. return UrhoGetType ();
  276. }
  277. }
  278. public override string TypeName {
  279. get {
  280. return GetTypeName ();
  281. }
  282. }
  283. [Preserve]
  284. public new static StringHash TypeStatic {
  285. get {
  286. return GetTypeStatic ();
  287. }
  288. }
  289. public new static string TypeNameStatic {
  290. get {
  291. return GetTypeNameStatic ();
  292. }
  293. }
  294. /// <summary>
  295. /// Return trigger.
  296. /// Or
  297. /// Set trigger.
  298. /// </summary>
  299. public bool Trigger {
  300. get {
  301. return IsTrigger ();
  302. }
  303. set {
  304. SetTrigger (value);
  305. }
  306. }
  307. /// <summary>
  308. /// Return filter category bits.
  309. /// Or
  310. /// Set filter category bits.
  311. /// </summary>
  312. public int CategoryBits {
  313. get {
  314. return GetCategoryBits ();
  315. }
  316. set {
  317. SetCategoryBits (value);
  318. }
  319. }
  320. /// <summary>
  321. /// Return filter mask bits.
  322. /// Or
  323. /// Set filter mask bits.
  324. /// </summary>
  325. public int MaskBits {
  326. get {
  327. return GetMaskBits ();
  328. }
  329. set {
  330. SetMaskBits (value);
  331. }
  332. }
  333. /// <summary>
  334. /// Return filter group index.
  335. /// Or
  336. /// Set filter group index.
  337. /// </summary>
  338. public int GroupIndex {
  339. get {
  340. return GetGroupIndex ();
  341. }
  342. set {
  343. SetGroupIndex (value);
  344. }
  345. }
  346. /// <summary>
  347. /// Return density.
  348. /// Or
  349. /// Set density.
  350. /// </summary>
  351. public float Density {
  352. get {
  353. return GetDensity ();
  354. }
  355. set {
  356. SetDensity (value);
  357. }
  358. }
  359. /// <summary>
  360. /// Return friction.
  361. /// Or
  362. /// Set friction.
  363. /// </summary>
  364. public float Friction {
  365. get {
  366. return GetFriction ();
  367. }
  368. set {
  369. SetFriction (value);
  370. }
  371. }
  372. /// <summary>
  373. /// Return restitution.
  374. /// Or
  375. /// Set restitution .
  376. /// </summary>
  377. public float Restitution {
  378. get {
  379. return GetRestitution ();
  380. }
  381. set {
  382. SetRestitution (value);
  383. }
  384. }
  385. /// <summary>
  386. /// Return mass.
  387. /// </summary>
  388. public float Mass {
  389. get {
  390. return GetMass ();
  391. }
  392. }
  393. /// <summary>
  394. /// Return inertia.
  395. /// </summary>
  396. public float Inertia {
  397. get {
  398. return GetInertia ();
  399. }
  400. }
  401. /// <summary>
  402. /// Return mass center.
  403. /// </summary>
  404. public Vector2 MassCenter {
  405. get {
  406. return GetMassCenter ();
  407. }
  408. }
  409. }
  410. }