OffMeshConnection.cs 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. // WARNING - AUTOGENERATED - DO NOT EDIT
  2. //
  3. // Generated using `sharpie urho`
  4. //
  5. // OffMeshConnection.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.Navigation
  18. {
  19. /// <summary>
  20. /// A link between otherwise unconnected regions of the navigation mesh.
  21. /// </summary>
  22. public unsafe partial class OffMeshConnection : Component
  23. {
  24. unsafe partial void OnOffMeshConnectionCreated ();
  25. [Preserve]
  26. public OffMeshConnection (IntPtr handle) : base (handle)
  27. {
  28. OnOffMeshConnectionCreated ();
  29. }
  30. [Preserve]
  31. protected OffMeshConnection (UrhoObjectFlag emptyFlag) : base (emptyFlag)
  32. {
  33. OnOffMeshConnectionCreated ();
  34. }
  35. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  36. internal static extern int OffMeshConnection_GetType (IntPtr handle);
  37. private StringHash UrhoGetType ()
  38. {
  39. Runtime.ValidateRefCounted (this);
  40. return new StringHash (OffMeshConnection_GetType (handle));
  41. }
  42. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  43. internal static extern IntPtr OffMeshConnection_GetTypeName (IntPtr handle);
  44. private string GetTypeName ()
  45. {
  46. Runtime.ValidateRefCounted (this);
  47. return Marshal.PtrToStringAnsi (OffMeshConnection_GetTypeName (handle));
  48. }
  49. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  50. internal static extern int OffMeshConnection_GetTypeStatic ();
  51. private static StringHash GetTypeStatic ()
  52. {
  53. Runtime.Validate (typeof(OffMeshConnection));
  54. return new StringHash (OffMeshConnection_GetTypeStatic ());
  55. }
  56. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  57. internal static extern IntPtr OffMeshConnection_GetTypeNameStatic ();
  58. private static string GetTypeNameStatic ()
  59. {
  60. Runtime.Validate (typeof(OffMeshConnection));
  61. return Marshal.PtrToStringAnsi (OffMeshConnection_GetTypeNameStatic ());
  62. }
  63. [Preserve]
  64. public OffMeshConnection () : this (Application.CurrentContext)
  65. {
  66. }
  67. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  68. internal static extern IntPtr OffMeshConnection_OffMeshConnection (IntPtr context);
  69. [Preserve]
  70. public OffMeshConnection (Context context) : base (UrhoObjectFlag.Empty)
  71. {
  72. Runtime.Validate (typeof(OffMeshConnection));
  73. handle = OffMeshConnection_OffMeshConnection ((object)context == null ? IntPtr.Zero : context.Handle);
  74. Runtime.RegisterObject (this);
  75. OnOffMeshConnectionCreated ();
  76. }
  77. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  78. internal static extern void OffMeshConnection_RegisterObject (IntPtr context);
  79. /// <summary>
  80. /// Register object factory.
  81. /// </summary>
  82. public new static void RegisterObject (Context context)
  83. {
  84. Runtime.Validate (typeof(OffMeshConnection));
  85. OffMeshConnection_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
  86. }
  87. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  88. internal static extern void OffMeshConnection_ApplyAttributes (IntPtr handle);
  89. /// <summary>
  90. /// Apply attribute changes that can not be applied immediately. Called after scene load or a network update.
  91. /// </summary>
  92. public override void ApplyAttributes ()
  93. {
  94. Runtime.ValidateRefCounted (this);
  95. OffMeshConnection_ApplyAttributes (handle);
  96. }
  97. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  98. internal static extern void OffMeshConnection_DrawDebugGeometry (IntPtr handle, IntPtr debug, bool depthTest);
  99. /// <summary>
  100. /// Visualize the component as debug geometry.
  101. /// </summary>
  102. public override void DrawDebugGeometry (DebugRenderer debug, bool depthTest)
  103. {
  104. Runtime.ValidateRefCounted (this);
  105. OffMeshConnection_DrawDebugGeometry (handle, (object)debug == null ? IntPtr.Zero : debug.Handle, depthTest);
  106. }
  107. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  108. internal static extern void OffMeshConnection_SetEndPoint (IntPtr handle, IntPtr node);
  109. /// <summary>
  110. /// Set endpoint node.
  111. /// </summary>
  112. private void SetEndPoint (Node node)
  113. {
  114. Runtime.ValidateRefCounted (this);
  115. OffMeshConnection_SetEndPoint (handle, (object)node == null ? IntPtr.Zero : node.Handle);
  116. }
  117. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  118. internal static extern void OffMeshConnection_SetEndPointNodeIDAttr (IntPtr handle, uint nodeID);
  119. /// <summary>
  120. /// Set endpoint node ID.
  121. /// </summary>
  122. public void SetEndPointNodeIDAttr (uint nodeID)
  123. {
  124. Runtime.ValidateRefCounted (this);
  125. OffMeshConnection_SetEndPointNodeIDAttr (handle, nodeID);
  126. }
  127. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  128. internal static extern void OffMeshConnection_SetRadius (IntPtr handle, float radius);
  129. /// <summary>
  130. /// Set radius.
  131. /// </summary>
  132. private void SetRadius (float radius)
  133. {
  134. Runtime.ValidateRefCounted (this);
  135. OffMeshConnection_SetRadius (handle, radius);
  136. }
  137. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  138. internal static extern void OffMeshConnection_SetBidirectional (IntPtr handle, bool enabled);
  139. /// <summary>
  140. /// Set bidirectional flag. Default true.
  141. /// </summary>
  142. private void SetBidirectional (bool enabled)
  143. {
  144. Runtime.ValidateRefCounted (this);
  145. OffMeshConnection_SetBidirectional (handle, enabled);
  146. }
  147. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  148. internal static extern void OffMeshConnection_SetMask (IntPtr handle, uint newMask);
  149. /// <summary>
  150. /// Set a user assigned mask
  151. /// </summary>
  152. private void SetMask (uint newMask)
  153. {
  154. Runtime.ValidateRefCounted (this);
  155. OffMeshConnection_SetMask (handle, newMask);
  156. }
  157. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  158. internal static extern void OffMeshConnection_SetAreaID (IntPtr handle, uint newAreaID);
  159. /// <summary>
  160. /// Sets the assigned area Id for the connection
  161. /// </summary>
  162. private void SetAreaID (uint newAreaID)
  163. {
  164. Runtime.ValidateRefCounted (this);
  165. OffMeshConnection_SetAreaID (handle, newAreaID);
  166. }
  167. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  168. internal static extern IntPtr OffMeshConnection_GetEndPoint (IntPtr handle);
  169. /// <summary>
  170. /// Return endpoint node.
  171. /// </summary>
  172. private Node GetEndPoint ()
  173. {
  174. Runtime.ValidateRefCounted (this);
  175. return Runtime.LookupObject<Node> (OffMeshConnection_GetEndPoint (handle));
  176. }
  177. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  178. internal static extern uint OffMeshConnection_GetEndPointNodeID (IntPtr handle);
  179. /// <summary>
  180. /// Return endpoint node ID.
  181. /// </summary>
  182. private uint GetEndPointNodeID ()
  183. {
  184. Runtime.ValidateRefCounted (this);
  185. return OffMeshConnection_GetEndPointNodeID (handle);
  186. }
  187. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  188. internal static extern float OffMeshConnection_GetRadius (IntPtr handle);
  189. /// <summary>
  190. /// Return radius.
  191. /// </summary>
  192. private float GetRadius ()
  193. {
  194. Runtime.ValidateRefCounted (this);
  195. return OffMeshConnection_GetRadius (handle);
  196. }
  197. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  198. internal static extern bool OffMeshConnection_IsBidirectional (IntPtr handle);
  199. /// <summary>
  200. /// Return whether is bidirectional.
  201. /// </summary>
  202. private bool IsBidirectional ()
  203. {
  204. Runtime.ValidateRefCounted (this);
  205. return OffMeshConnection_IsBidirectional (handle);
  206. }
  207. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  208. internal static extern uint OffMeshConnection_GetMask (IntPtr handle);
  209. /// <summary>
  210. /// Return the user assigned mask
  211. /// </summary>
  212. private uint GetMask ()
  213. {
  214. Runtime.ValidateRefCounted (this);
  215. return OffMeshConnection_GetMask (handle);
  216. }
  217. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  218. internal static extern uint OffMeshConnection_GetAreaID (IntPtr handle);
  219. /// <summary>
  220. /// Return the user assigned area ID
  221. /// </summary>
  222. private uint GetAreaID ()
  223. {
  224. Runtime.ValidateRefCounted (this);
  225. return OffMeshConnection_GetAreaID (handle);
  226. }
  227. public override StringHash Type {
  228. get {
  229. return UrhoGetType ();
  230. }
  231. }
  232. public override string TypeName {
  233. get {
  234. return GetTypeName ();
  235. }
  236. }
  237. [Preserve]
  238. public new static StringHash TypeStatic {
  239. get {
  240. return GetTypeStatic ();
  241. }
  242. }
  243. public new static string TypeNameStatic {
  244. get {
  245. return GetTypeNameStatic ();
  246. }
  247. }
  248. /// <summary>
  249. /// Return endpoint node.
  250. /// Or
  251. /// Set endpoint node.
  252. /// </summary>
  253. public Node EndPoint {
  254. get {
  255. return GetEndPoint ();
  256. }
  257. set {
  258. SetEndPoint (value);
  259. }
  260. }
  261. /// <summary>
  262. /// Return radius.
  263. /// Or
  264. /// Set radius.
  265. /// </summary>
  266. public float Radius {
  267. get {
  268. return GetRadius ();
  269. }
  270. set {
  271. SetRadius (value);
  272. }
  273. }
  274. /// <summary>
  275. /// Return whether is bidirectional.
  276. /// Or
  277. /// Set bidirectional flag. Default true.
  278. /// </summary>
  279. public bool Bidirectional {
  280. get {
  281. return IsBidirectional ();
  282. }
  283. set {
  284. SetBidirectional (value);
  285. }
  286. }
  287. /// <summary>
  288. /// Return the user assigned mask
  289. /// Or
  290. /// Set a user assigned mask
  291. /// </summary>
  292. public uint Mask {
  293. get {
  294. return GetMask ();
  295. }
  296. set {
  297. SetMask (value);
  298. }
  299. }
  300. /// <summary>
  301. /// Return the user assigned area ID
  302. /// Or
  303. /// Sets the assigned area Id for the connection
  304. /// </summary>
  305. public uint AreaID {
  306. get {
  307. return GetAreaID ();
  308. }
  309. set {
  310. SetAreaID (value);
  311. }
  312. }
  313. /// <summary>
  314. /// Return endpoint node ID.
  315. /// </summary>
  316. public uint EndPointNodeID {
  317. get {
  318. return GetEndPointNodeID ();
  319. }
  320. }
  321. }
  322. }