DynamicNavigationMesh.cs 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. // WARNING - AUTOGENERATED - DO NOT EDIT
  2. //
  3. // Generated using `sharpie urho`
  4. //
  5. // DynamicNavigationMesh.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. /// Constructor.
  21. /// </summary>
  22. public unsafe partial class DynamicNavigationMesh : NavigationMesh
  23. {
  24. public DynamicNavigationMesh (IntPtr handle) : base (handle)
  25. {
  26. }
  27. protected DynamicNavigationMesh (UrhoObjectFlag emptyFlag) : base (emptyFlag)
  28. {
  29. }
  30. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  31. internal static extern int DynamicNavigationMesh_GetType (IntPtr handle);
  32. private StringHash UrhoGetType ()
  33. {
  34. Runtime.ValidateRefCounted (this);
  35. return new StringHash (DynamicNavigationMesh_GetType (handle));
  36. }
  37. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  38. internal static extern IntPtr DynamicNavigationMesh_GetTypeName (IntPtr handle);
  39. private string GetTypeName ()
  40. {
  41. Runtime.ValidateRefCounted (this);
  42. return Marshal.PtrToStringAnsi (DynamicNavigationMesh_GetTypeName (handle));
  43. }
  44. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  45. internal static extern int DynamicNavigationMesh_GetTypeStatic ();
  46. private static StringHash GetTypeStatic ()
  47. {
  48. Runtime.Validate (typeof(DynamicNavigationMesh));
  49. return new StringHash (DynamicNavigationMesh_GetTypeStatic ());
  50. }
  51. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  52. internal static extern IntPtr DynamicNavigationMesh_GetTypeNameStatic ();
  53. private static string GetTypeNameStatic ()
  54. {
  55. Runtime.Validate (typeof(DynamicNavigationMesh));
  56. return Marshal.PtrToStringAnsi (DynamicNavigationMesh_GetTypeNameStatic ());
  57. }
  58. public DynamicNavigationMesh () : this (Application.CurrentContext)
  59. {
  60. }
  61. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  62. internal static extern IntPtr DynamicNavigationMesh_DynamicNavigationMesh (IntPtr param1);
  63. public DynamicNavigationMesh (Context param1) : base (UrhoObjectFlag.Empty)
  64. {
  65. Runtime.Validate (typeof(DynamicNavigationMesh));
  66. handle = DynamicNavigationMesh_DynamicNavigationMesh ((object)param1 == null ? IntPtr.Zero : param1.Handle);
  67. Runtime.RegisterObject (this);
  68. }
  69. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  70. internal static extern void DynamicNavigationMesh_RegisterObject (IntPtr param1);
  71. /// <summary>
  72. /// Register with engine context.
  73. /// </summary>
  74. public new static void RegisterObject (Context param1)
  75. {
  76. Runtime.Validate (typeof(DynamicNavigationMesh));
  77. DynamicNavigationMesh_RegisterObject ((object)param1 == null ? IntPtr.Zero : param1.Handle);
  78. }
  79. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  80. internal static extern bool DynamicNavigationMesh_Build (IntPtr handle);
  81. /// <summary>
  82. /// Build/rebuild the entire navigation mesh.
  83. /// </summary>
  84. public override bool Build ()
  85. {
  86. Runtime.ValidateRefCounted (this);
  87. return DynamicNavigationMesh_Build (handle);
  88. }
  89. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  90. internal static extern bool DynamicNavigationMesh_Build0 (IntPtr handle, ref Urho.BoundingBox boundingBox);
  91. /// <summary>
  92. /// Build/rebuild a portion of the navigation mesh.
  93. /// </summary>
  94. public override bool Build (Urho.BoundingBox boundingBox)
  95. {
  96. Runtime.ValidateRefCounted (this);
  97. return DynamicNavigationMesh_Build0 (handle, ref boundingBox);
  98. }
  99. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  100. internal static extern void DynamicNavigationMesh_DrawDebugGeometry (IntPtr handle, IntPtr debug, bool depthTest);
  101. /// <summary>
  102. /// Visualize the component as debug geometry.
  103. /// </summary>
  104. public override void DrawDebugGeometry (DebugRenderer debug, bool depthTest)
  105. {
  106. Runtime.ValidateRefCounted (this);
  107. DynamicNavigationMesh_DrawDebugGeometry (handle, (object)debug == null ? IntPtr.Zero : debug.Handle, depthTest);
  108. }
  109. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  110. internal static extern void DynamicNavigationMesh_DrawDebugGeometry1 (IntPtr handle, bool depthTest);
  111. /// <summary>
  112. /// Add debug geometry to the debug renderer.
  113. /// </summary>
  114. public override void DrawDebugGeometry (bool depthTest)
  115. {
  116. Runtime.ValidateRefCounted (this);
  117. DynamicNavigationMesh_DrawDebugGeometry1 (handle, depthTest);
  118. }
  119. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  120. internal static extern void DynamicNavigationMesh_SetMaxObstacles (IntPtr handle, uint maxObstacles);
  121. /// <summary>
  122. /// Set the maximum number of obstacles allowed.
  123. /// </summary>
  124. private void SetMaxObstacles (uint maxObstacles)
  125. {
  126. Runtime.ValidateRefCounted (this);
  127. DynamicNavigationMesh_SetMaxObstacles (handle, maxObstacles);
  128. }
  129. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  130. internal static extern void DynamicNavigationMesh_SetMaxLayers (IntPtr handle, uint maxLayers);
  131. /// <summary>
  132. /// Set the maximum number of layers that navigation construction can create.
  133. /// </summary>
  134. private void SetMaxLayers (uint maxLayers)
  135. {
  136. Runtime.ValidateRefCounted (this);
  137. DynamicNavigationMesh_SetMaxLayers (handle, maxLayers);
  138. }
  139. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  140. internal static extern uint DynamicNavigationMesh_GetMaxObstacles (IntPtr handle);
  141. /// <summary>
  142. /// Return the maximum number of obstacles allowed.
  143. /// </summary>
  144. private uint GetMaxObstacles ()
  145. {
  146. Runtime.ValidateRefCounted (this);
  147. return DynamicNavigationMesh_GetMaxObstacles (handle);
  148. }
  149. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  150. internal static extern uint DynamicNavigationMesh_GetMaxLayers (IntPtr handle);
  151. /// <summary>
  152. /// Return the maximum number of layers permitted to build.
  153. /// </summary>
  154. private uint GetMaxLayers ()
  155. {
  156. Runtime.ValidateRefCounted (this);
  157. return DynamicNavigationMesh_GetMaxLayers (handle);
  158. }
  159. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  160. internal static extern void DynamicNavigationMesh_SetDrawObstacles (IntPtr handle, bool enable);
  161. /// <summary>
  162. /// Draw debug geometry for Obstacles.
  163. /// </summary>
  164. private void SetDrawObstacles (bool enable)
  165. {
  166. Runtime.ValidateRefCounted (this);
  167. DynamicNavigationMesh_SetDrawObstacles (handle, enable);
  168. }
  169. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  170. internal static extern bool DynamicNavigationMesh_GetDrawObstacles (IntPtr handle);
  171. /// <summary>
  172. /// Return whether to draw Obstacles.
  173. /// </summary>
  174. private bool GetDrawObstacles ()
  175. {
  176. Runtime.ValidateRefCounted (this);
  177. return DynamicNavigationMesh_GetDrawObstacles (handle);
  178. }
  179. public override StringHash Type {
  180. get {
  181. return UrhoGetType ();
  182. }
  183. }
  184. public override string TypeName {
  185. get {
  186. return GetTypeName ();
  187. }
  188. }
  189. public new static StringHash TypeStatic {
  190. get {
  191. return GetTypeStatic ();
  192. }
  193. }
  194. public new static string TypeNameStatic {
  195. get {
  196. return GetTypeNameStatic ();
  197. }
  198. }
  199. /// <summary>
  200. /// Return the maximum number of obstacles allowed.
  201. /// Or
  202. /// Set the maximum number of obstacles allowed.
  203. /// </summary>
  204. public uint MaxObstacles {
  205. get {
  206. return GetMaxObstacles ();
  207. }
  208. set {
  209. SetMaxObstacles (value);
  210. }
  211. }
  212. /// <summary>
  213. /// Return the maximum number of layers permitted to build.
  214. /// Or
  215. /// Set the maximum number of layers that navigation construction can create.
  216. /// </summary>
  217. public uint MaxLayers {
  218. get {
  219. return GetMaxLayers ();
  220. }
  221. set {
  222. SetMaxLayers (value);
  223. }
  224. }
  225. /// <summary>
  226. /// Return whether to draw Obstacles.
  227. /// Or
  228. /// Draw debug geometry for Obstacles.
  229. /// </summary>
  230. public bool DrawObstacles {
  231. get {
  232. return GetDrawObstacles ();
  233. }
  234. set {
  235. SetDrawObstacles (value);
  236. }
  237. }
  238. }
  239. }