Navigable.cs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. // WARNING - AUTOGENERATED - DO NOT EDIT
  2. //
  3. // Generated using `sharpie urho`
  4. //
  5. // Navigable.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. /// Component which tags geometry for inclusion in the navigation mesh. Optionally auto-includes geometry from child nodes.
  21. /// </summary>
  22. public unsafe partial class Navigable : Component
  23. {
  24. unsafe partial void OnNavigableCreated ();
  25. [Preserve]
  26. public Navigable (IntPtr handle) : base (handle)
  27. {
  28. OnNavigableCreated ();
  29. }
  30. [Preserve]
  31. protected Navigable (UrhoObjectFlag emptyFlag) : base (emptyFlag)
  32. {
  33. OnNavigableCreated ();
  34. }
  35. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  36. internal static extern int Navigable_GetType (IntPtr handle);
  37. private StringHash UrhoGetType ()
  38. {
  39. Runtime.ValidateRefCounted (this);
  40. return new StringHash (Navigable_GetType (handle));
  41. }
  42. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  43. internal static extern IntPtr Navigable_GetTypeName (IntPtr handle);
  44. private string GetTypeName ()
  45. {
  46. Runtime.ValidateRefCounted (this);
  47. return Marshal.PtrToStringAnsi (Navigable_GetTypeName (handle));
  48. }
  49. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  50. internal static extern int Navigable_GetTypeStatic ();
  51. private static StringHash GetTypeStatic ()
  52. {
  53. Runtime.Validate (typeof(Navigable));
  54. return new StringHash (Navigable_GetTypeStatic ());
  55. }
  56. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  57. internal static extern IntPtr Navigable_GetTypeNameStatic ();
  58. private static string GetTypeNameStatic ()
  59. {
  60. Runtime.Validate (typeof(Navigable));
  61. return Marshal.PtrToStringAnsi (Navigable_GetTypeNameStatic ());
  62. }
  63. [Preserve]
  64. public Navigable () : this (Application.CurrentContext)
  65. {
  66. }
  67. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  68. internal static extern IntPtr Navigable_Navigable (IntPtr context);
  69. [Preserve]
  70. public Navigable (Context context) : base (UrhoObjectFlag.Empty)
  71. {
  72. Runtime.Validate (typeof(Navigable));
  73. handle = Navigable_Navigable ((object)context == null ? IntPtr.Zero : context.Handle);
  74. Runtime.RegisterObject (this);
  75. OnNavigableCreated ();
  76. }
  77. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  78. internal static extern void Navigable_RegisterObject (IntPtr context);
  79. /// <summary>
  80. /// Register object factory.
  81. /// </summary>
  82. public new static void RegisterObject (Context context)
  83. {
  84. Runtime.Validate (typeof(Navigable));
  85. Navigable_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
  86. }
  87. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  88. internal static extern void Navigable_SetRecursive (IntPtr handle, bool enable);
  89. /// <summary>
  90. /// Set whether geometry is automatically collected from child nodes. Default true.
  91. /// </summary>
  92. private void SetRecursive (bool enable)
  93. {
  94. Runtime.ValidateRefCounted (this);
  95. Navigable_SetRecursive (handle, enable);
  96. }
  97. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  98. internal static extern bool Navigable_IsRecursive (IntPtr handle);
  99. /// <summary>
  100. /// Return whether geometry is automatically collected from child nodes.
  101. /// </summary>
  102. private bool IsRecursive ()
  103. {
  104. Runtime.ValidateRefCounted (this);
  105. return Navigable_IsRecursive (handle);
  106. }
  107. public override StringHash Type {
  108. get {
  109. return UrhoGetType ();
  110. }
  111. }
  112. public override string TypeName {
  113. get {
  114. return GetTypeName ();
  115. }
  116. }
  117. [Preserve]
  118. public new static StringHash TypeStatic {
  119. get {
  120. return GetTypeStatic ();
  121. }
  122. }
  123. public new static string TypeNameStatic {
  124. get {
  125. return GetTypeNameStatic ();
  126. }
  127. }
  128. /// <summary>
  129. /// Return whether geometry is automatically collected from child nodes.
  130. /// Or
  131. /// Set whether geometry is automatically collected from child nodes. Default true.
  132. /// </summary>
  133. public bool Recursive {
  134. get {
  135. return IsRecursive ();
  136. }
  137. set {
  138. SetRecursive (value);
  139. }
  140. }
  141. }
  142. }