Sphere.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. // WARNING - AUTOGENERATED - DO NOT EDIT
  2. //
  3. // Generated using `sharpie urho`
  4. //
  5. // Sphere.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. /// %Sphere in three-dimensional space.
  21. /// </summary>
  22. public unsafe partial class SphereShape
  23. {
  24. private IntPtr handle;
  25. public IntPtr Handle {
  26. get {
  27. return handle;
  28. }
  29. }
  30. unsafe partial void OnSphereCreated ();
  31. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  32. internal static extern IntPtr Sphere_Sphere ();
  33. [Preserve]
  34. public SphereShape ()
  35. {
  36. Runtime.Validate (typeof(SphereShape));
  37. handle = Sphere_Sphere ();
  38. OnSphereCreated ();
  39. }
  40. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  41. internal static extern IntPtr Sphere_Sphere0 (IntPtr sphere);
  42. [Preserve]
  43. public SphereShape (SphereShape sphere)
  44. {
  45. Runtime.Validate (typeof(SphereShape));
  46. handle = Sphere_Sphere0 ((object)sphere == null ? IntPtr.Zero : sphere.Handle);
  47. OnSphereCreated ();
  48. }
  49. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  50. internal static extern IntPtr Sphere_Sphere1 (ref Urho.Vector3 center, float radius);
  51. [Preserve]
  52. public SphereShape (Urho.Vector3 center, float radius)
  53. {
  54. Runtime.Validate (typeof(SphereShape));
  55. handle = Sphere_Sphere1 (ref center, radius);
  56. OnSphereCreated ();
  57. }
  58. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  59. internal static extern IntPtr Sphere_Sphere2 (Vector3* vertices, uint count);
  60. [Preserve]
  61. public SphereShape (Vector3* vertices, uint count)
  62. {
  63. Runtime.Validate (typeof(SphereShape));
  64. handle = Sphere_Sphere2 (vertices, count);
  65. OnSphereCreated ();
  66. }
  67. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  68. internal static extern IntPtr Sphere_Sphere3 (ref Urho.BoundingBox box);
  69. [Preserve]
  70. public SphereShape (Urho.BoundingBox box)
  71. {
  72. Runtime.Validate (typeof(SphereShape));
  73. handle = Sphere_Sphere3 (ref box);
  74. OnSphereCreated ();
  75. }
  76. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  77. internal static extern IntPtr Sphere_Sphere4 (IntPtr frustum);
  78. [Preserve]
  79. public SphereShape (Frustum frustum)
  80. {
  81. Runtime.Validate (typeof(SphereShape));
  82. handle = Sphere_Sphere4 ((object)frustum == null ? IntPtr.Zero : frustum.Handle);
  83. OnSphereCreated ();
  84. }
  85. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  86. internal static extern IntPtr Sphere_Sphere5 (IntPtr poly);
  87. [Preserve]
  88. public SphereShape (Polyhedron poly)
  89. {
  90. Runtime.Validate (typeof(SphereShape));
  91. handle = Sphere_Sphere5 ((object)poly == null ? IntPtr.Zero : poly.Handle);
  92. OnSphereCreated ();
  93. }
  94. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  95. internal static extern void Sphere_Define (IntPtr handle, IntPtr sphere);
  96. /// <summary>
  97. /// Define from another sphere.
  98. /// </summary>
  99. public void Define (SphereShape sphere)
  100. {
  101. Runtime.ValidateObject (this);
  102. Sphere_Define (handle, (object)sphere == null ? IntPtr.Zero : sphere.Handle);
  103. }
  104. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  105. internal static extern void Sphere_Define6 (IntPtr handle, ref Urho.Vector3 center, float radius);
  106. /// <summary>
  107. /// Define from center and radius.
  108. /// </summary>
  109. public void Define (Urho.Vector3 center, float radius)
  110. {
  111. Runtime.ValidateObject (this);
  112. Sphere_Define6 (handle, ref center, radius);
  113. }
  114. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  115. internal static extern void Sphere_Define7 (IntPtr handle, Vector3* vertices, uint count);
  116. /// <summary>
  117. /// Define from an array of vertices.
  118. /// </summary>
  119. public void Define (Vector3* vertices, uint count)
  120. {
  121. Runtime.ValidateObject (this);
  122. Sphere_Define7 (handle, vertices, count);
  123. }
  124. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  125. internal static extern void Sphere_Define8 (IntPtr handle, ref Urho.BoundingBox box);
  126. /// <summary>
  127. /// Define from a bounding box.
  128. /// </summary>
  129. public void Define (Urho.BoundingBox box)
  130. {
  131. Runtime.ValidateObject (this);
  132. Sphere_Define8 (handle, ref box);
  133. }
  134. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  135. internal static extern void Sphere_Define9 (IntPtr handle, IntPtr frustum);
  136. /// <summary>
  137. /// Define from a frustum.
  138. /// </summary>
  139. public void Define (Frustum frustum)
  140. {
  141. Runtime.ValidateObject (this);
  142. Sphere_Define9 (handle, (object)frustum == null ? IntPtr.Zero : frustum.Handle);
  143. }
  144. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  145. internal static extern void Sphere_Define10 (IntPtr handle, IntPtr poly);
  146. /// <summary>
  147. /// Define from a polyhedron.
  148. /// </summary>
  149. public void Define (Polyhedron poly)
  150. {
  151. Runtime.ValidateObject (this);
  152. Sphere_Define10 (handle, (object)poly == null ? IntPtr.Zero : poly.Handle);
  153. }
  154. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  155. internal static extern void Sphere_Merge (IntPtr handle, ref Urho.Vector3 point);
  156. /// <summary>
  157. /// Merge a point.
  158. /// </summary>
  159. public void Merge (Urho.Vector3 point)
  160. {
  161. Runtime.ValidateObject (this);
  162. Sphere_Merge (handle, ref point);
  163. }
  164. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  165. internal static extern void Sphere_Merge11 (IntPtr handle, Vector3* vertices, uint count);
  166. /// <summary>
  167. /// Merge an array of vertices.
  168. /// </summary>
  169. public void Merge (Vector3* vertices, uint count)
  170. {
  171. Runtime.ValidateObject (this);
  172. Sphere_Merge11 (handle, vertices, count);
  173. }
  174. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  175. internal static extern void Sphere_Merge12 (IntPtr handle, ref Urho.BoundingBox box);
  176. /// <summary>
  177. /// Merge a bounding box.
  178. /// </summary>
  179. public void Merge (Urho.BoundingBox box)
  180. {
  181. Runtime.ValidateObject (this);
  182. Sphere_Merge12 (handle, ref box);
  183. }
  184. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  185. internal static extern void Sphere_Merge13 (IntPtr handle, IntPtr frustum);
  186. /// <summary>
  187. /// Merge a frustum.
  188. /// </summary>
  189. public void Merge (Frustum frustum)
  190. {
  191. Runtime.ValidateObject (this);
  192. Sphere_Merge13 (handle, (object)frustum == null ? IntPtr.Zero : frustum.Handle);
  193. }
  194. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  195. internal static extern void Sphere_Merge14 (IntPtr handle, IntPtr poly);
  196. /// <summary>
  197. /// Merge a polyhedron.
  198. /// </summary>
  199. public void Merge (Polyhedron poly)
  200. {
  201. Runtime.ValidateObject (this);
  202. Sphere_Merge14 (handle, (object)poly == null ? IntPtr.Zero : poly.Handle);
  203. }
  204. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  205. internal static extern void Sphere_Merge15 (IntPtr handle, IntPtr sphere);
  206. /// <summary>
  207. /// Merge a sphere.
  208. /// </summary>
  209. public void Merge (SphereShape sphere)
  210. {
  211. Runtime.ValidateObject (this);
  212. Sphere_Merge15 (handle, (object)sphere == null ? IntPtr.Zero : sphere.Handle);
  213. }
  214. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  215. internal static extern void Sphere_Clear (IntPtr handle);
  216. /// <summary>
  217. /// Clear to undefined state.
  218. /// </summary>
  219. public void Clear ()
  220. {
  221. Runtime.ValidateObject (this);
  222. Sphere_Clear (handle);
  223. }
  224. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  225. internal static extern bool Sphere_Defined (IntPtr handle);
  226. /// <summary>
  227. /// Return true if this sphere is defined via a previous call to Define() or Merge().
  228. /// </summary>
  229. public bool Defined ()
  230. {
  231. Runtime.ValidateObject (this);
  232. return Sphere_Defined (handle);
  233. }
  234. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  235. internal static extern Intersection Sphere_IsInside (IntPtr handle, ref Urho.Vector3 point);
  236. /// <summary>
  237. /// Test if a point is inside.
  238. /// </summary>
  239. public Intersection IsInside (Urho.Vector3 point)
  240. {
  241. Runtime.ValidateObject (this);
  242. return Sphere_IsInside (handle, ref point);
  243. }
  244. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  245. internal static extern Intersection Sphere_IsInside16 (IntPtr handle, IntPtr sphere);
  246. /// <summary>
  247. /// Test if another sphere is inside, outside or intersects.
  248. /// </summary>
  249. public Intersection IsInside (SphereShape sphere)
  250. {
  251. Runtime.ValidateObject (this);
  252. return Sphere_IsInside16 (handle, (object)sphere == null ? IntPtr.Zero : sphere.Handle);
  253. }
  254. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  255. internal static extern Intersection Sphere_IsInsideFast (IntPtr handle, IntPtr sphere);
  256. /// <summary>
  257. /// Test if another sphere is (partially) inside or outside.
  258. /// </summary>
  259. public Intersection IsInsideFast (SphereShape sphere)
  260. {
  261. Runtime.ValidateObject (this);
  262. return Sphere_IsInsideFast (handle, (object)sphere == null ? IntPtr.Zero : sphere.Handle);
  263. }
  264. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  265. internal static extern Intersection Sphere_IsInside17 (IntPtr handle, ref Urho.BoundingBox box);
  266. /// <summary>
  267. /// Test if a bounding box is inside, outside or intersects.
  268. /// </summary>
  269. public Intersection IsInside (Urho.BoundingBox box)
  270. {
  271. Runtime.ValidateObject (this);
  272. return Sphere_IsInside17 (handle, ref box);
  273. }
  274. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  275. internal static extern Intersection Sphere_IsInsideFast18 (IntPtr handle, ref Urho.BoundingBox box);
  276. /// <summary>
  277. /// Test if a bounding box is (partially) inside or outside.
  278. /// </summary>
  279. public Intersection IsInsideFast (Urho.BoundingBox box)
  280. {
  281. Runtime.ValidateObject (this);
  282. return Sphere_IsInsideFast18 (handle, ref box);
  283. }
  284. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  285. internal static extern float Sphere_Distance (IntPtr handle, ref Urho.Vector3 point);
  286. /// <summary>
  287. /// Return distance of a point to the surface, or 0 if inside.
  288. /// </summary>
  289. public float Distance (Urho.Vector3 point)
  290. {
  291. Runtime.ValidateObject (this);
  292. return Sphere_Distance (handle, ref point);
  293. }
  294. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  295. internal static extern Vector3 Sphere_GetLocalPoint (IntPtr handle, float theta, float phi);
  296. /// <summary>
  297. /// Return point on the sphere relative to sphere position.
  298. /// </summary>
  299. public Vector3 GetLocalPoint (float theta, float phi)
  300. {
  301. Runtime.ValidateObject (this);
  302. return Sphere_GetLocalPoint (handle, theta, phi);
  303. }
  304. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  305. internal static extern Vector3 Sphere_GetPoint (IntPtr handle, float theta, float phi);
  306. /// <summary>
  307. /// Return point on the sphere.
  308. /// </summary>
  309. public Vector3 GetPoint (float theta, float phi)
  310. {
  311. Runtime.ValidateObject (this);
  312. return Sphere_GetPoint (handle, theta, phi);
  313. }
  314. }
  315. }