ODEApi.cs 125 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025
  1. /*
  2. * based on:
  3. * Ode.NET - .NET bindings for ODE
  4. * Jason Perkins ([email protected])
  5. * Licensed under the New BSD
  6. * Part of the OpenDynamicsEngine
  7. Open Dynamics Engine
  8. Copyright (c) 2001-2007, Russell L. Smith.
  9. All rights reserved.
  10. Redistribution and use in source and binary forms, with or without
  11. modification, are permitted provided that the following conditions
  12. are met:
  13. Redistributions of source code must retain the above copyright notice,
  14. this list of conditions and the following disclaimer.
  15. Redistributions in binary form must reproduce the above copyright notice,
  16. this list of conditions and the following disclaimer in the documentation
  17. and/or other materials provided with the distribution.
  18. Neither the names of ODE's copyright owner nor the names of its
  19. contributors may be used to endorse or promote products derived from
  20. this software without specific prior written permission.
  21. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  24. FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  25. OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  26. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
  27. TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  28. PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  29. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  30. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  31. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. *
  33. * changes by opensim team;
  34. * changes by Aurora team http://www.aurora-sim.org/
  35. * changes by Ubit Umarov
  36. */
  37. using System;
  38. using System.Runtime.InteropServices;
  39. using System.Security;
  40. using OMV = OpenMetaverse;
  41. namespace OpenSim.Region.PhysicsModule.ODE
  42. {
  43. //#if dDOUBLE
  44. // don't see much use in double precision with time steps of 20ms and 10 iterations used on opensim
  45. // at least we save same memory and memory access time, FPU performance on intel usually is similar
  46. // using dReal = System.Double;
  47. //#else
  48. using dReal = System.Single;
  49. //#endif
  50. public static class d
  51. {
  52. public static dReal Infinity = dReal.MaxValue;
  53. public static int NTotalBodies = 0;
  54. public static int NTotalGeoms = 0;
  55. public const uint CONTACTS_UNIMPORTANT = 0x80000000;
  56. #region Flags and Enumerations
  57. [Flags]
  58. public enum AllocateODEDataFlags : uint
  59. {
  60. BasicData = 0,
  61. CollisionData = 0x00000001,
  62. All = ~0u
  63. }
  64. [Flags]
  65. public enum IniteODEFlags : uint
  66. {
  67. dInitFlagManualThreadCleanup = 0x00000001
  68. }
  69. [Flags]
  70. public enum ContactFlags : int
  71. {
  72. Mu2 = 0x001,
  73. FDir1 = 0x002,
  74. Bounce = 0x004,
  75. SoftERP = 0x008,
  76. SoftCFM = 0x010,
  77. Motion1 = 0x020,
  78. Motion2 = 0x040,
  79. MotionN = 0x080,
  80. Slip1 = 0x100,
  81. Slip2 = 0x200,
  82. Approx0 = 0x0000,
  83. Approx1_1 = 0x1000,
  84. Approx1_2 = 0x2000,
  85. Approx1 = 0x3000
  86. }
  87. public enum GeomClassID : int
  88. {
  89. SphereClass,
  90. BoxClass,
  91. CapsuleClass,
  92. CylinderClass,
  93. PlaneClass,
  94. RayClass,
  95. ConvexClass,
  96. GeomTransformClass,
  97. TriMeshClass,
  98. HeightfieldClass,
  99. FirstSpaceClass,
  100. SimpleSpaceClass = FirstSpaceClass,
  101. HashSpaceClass,
  102. QuadTreeSpaceClass,
  103. LastSpaceClass = QuadTreeSpaceClass,
  104. ubtTerrainClass,
  105. FirstUserClass,
  106. LastUserClass = FirstUserClass + MaxUserClasses - 1,
  107. NumClasses,
  108. MaxUserClasses = 5
  109. }
  110. public enum JointType : int
  111. {
  112. None,
  113. Ball,
  114. Hinge,
  115. Slider,
  116. Contact,
  117. Universal,
  118. Hinge2,
  119. Fixed,
  120. Null,
  121. AMotor,
  122. LMotor,
  123. Plane2D
  124. }
  125. public enum JointParam : int
  126. {
  127. LoStop,
  128. HiStop,
  129. Vel,
  130. FMax,
  131. FudgeFactor,
  132. Bounce,
  133. CFM,
  134. StopERP,
  135. StopCFM,
  136. SuspensionERP,
  137. SuspensionCFM,
  138. LoStop2 = 256,
  139. HiStop2,
  140. Vel2,
  141. FMax2,
  142. FudgeFactor2,
  143. Bounce2,
  144. CFM2,
  145. StopERP2,
  146. StopCFM2,
  147. SuspensionERP2,
  148. SuspensionCFM2,
  149. LoStop3 = 512,
  150. HiStop3,
  151. Vel3,
  152. FMax3,
  153. FudgeFactor3,
  154. Bounce3,
  155. CFM3,
  156. StopERP3,
  157. StopCFM3,
  158. SuspensionERP3,
  159. SuspensionCFM3
  160. }
  161. public enum dSweepAndPruneAxis : int
  162. {
  163. XYZ = ((0)|(1<<2)|(2<<4)),
  164. XZY = ((0)|(2<<2)|(1<<4)),
  165. YXZ = ((1)|(0<<2)|(2<<4)),
  166. YZX = ((1)|(2<<2)|(0<<4)),
  167. ZXY = ((2)|(0<<2)|(1<<4)),
  168. ZYX = ((2)|(1<<2)|(0<<4))
  169. }
  170. #endregion
  171. #region Callbacks
  172. [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
  173. public delegate int AABBTestFn(IntPtr o1, IntPtr o2, ref AABB aabb);
  174. [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
  175. public delegate int ColliderFn(IntPtr o1, IntPtr o2, int flags, out ContactGeom contact, int skip);
  176. [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
  177. public delegate void GetAABBFn(IntPtr geom, out AABB aabb);
  178. [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
  179. public delegate ColliderFn GetColliderFnFn(int num);
  180. [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
  181. public delegate void GeomDtorFn(IntPtr o);
  182. [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
  183. public delegate dReal HeightfieldGetHeight(IntPtr p_user_data, int x, int z);
  184. [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
  185. public delegate dReal OSTerrainGetHeight(IntPtr p_user_data, int x, int z);
  186. [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
  187. public delegate void NearCallback(IntPtr data, IntPtr geom1, IntPtr geom2);
  188. [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
  189. public delegate int TriCallback(IntPtr trimesh, IntPtr refObject, int triangleIndex);
  190. [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
  191. public delegate int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount);
  192. [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
  193. public delegate int TriRayCallback(IntPtr trimesh, IntPtr ray, int triangleIndex, dReal u, dReal v);
  194. #endregion
  195. #region Structs
  196. [StructLayout(LayoutKind.Sequential)]
  197. public struct AABB
  198. {
  199. public dReal MinX, MaxX;
  200. public dReal MinY, MaxY;
  201. public dReal MinZ, MaxZ;
  202. }
  203. [StructLayout(LayoutKind.Sequential)]
  204. public struct Contact
  205. {
  206. public SurfaceParameters surface;
  207. public ContactGeom geom;
  208. public Vector3 fdir1;
  209. public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(Contact));
  210. }
  211. [StructLayout(LayoutKind.Sequential)]
  212. public struct ContactGeom
  213. {
  214. public Vector3 pos;
  215. public Vector3 normal;
  216. public dReal depth;
  217. public IntPtr g1;
  218. public IntPtr g2;
  219. public int side1;
  220. public int side2;
  221. public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(ContactGeom));
  222. }
  223. [StructLayout(LayoutKind.Sequential)]
  224. public struct GeomClass
  225. {
  226. public int bytes;
  227. public GetColliderFnFn collider;
  228. public GetAABBFn aabb;
  229. public AABBTestFn aabb_test;
  230. public GeomDtorFn dtor;
  231. }
  232. [StructLayout(LayoutKind.Sequential)]
  233. public struct JointFeedback
  234. {
  235. public Vector3 f1;
  236. public Vector3 t1;
  237. public Vector3 f2;
  238. public Vector3 t2;
  239. }
  240. [StructLayout(LayoutKind.Sequential)]
  241. public struct Mass
  242. {
  243. public dReal mass;
  244. public Vector4 c;
  245. public Matrix3 I;
  246. }
  247. [StructLayout(LayoutKind.Sequential)]
  248. public struct Matrix3
  249. {
  250. public Matrix3(dReal m00, dReal m10, dReal m20, dReal m01, dReal m11, dReal m21, dReal m02, dReal m12, dReal m22)
  251. {
  252. M00 = m00; M10 = m10; M20 = m20; _m30 = 0.0f;
  253. M01 = m01; M11 = m11; M21 = m21; _m31 = 0.0f;
  254. M02 = m02; M12 = m12; M22 = m22; _m32 = 0.0f;
  255. }
  256. public dReal M00, M10, M20;
  257. private dReal _m30;
  258. public dReal M01, M11, M21;
  259. private dReal _m31;
  260. public dReal M02, M12, M22;
  261. private dReal _m32;
  262. }
  263. [StructLayout(LayoutKind.Sequential)]
  264. public struct Matrix4
  265. {
  266. public Matrix4(dReal m00, dReal m10, dReal m20, dReal m30,
  267. dReal m01, dReal m11, dReal m21, dReal m31,
  268. dReal m02, dReal m12, dReal m22, dReal m32,
  269. dReal m03, dReal m13, dReal m23, dReal m33)
  270. {
  271. M00 = m00; M10 = m10; M20 = m20; M30 = m30;
  272. M01 = m01; M11 = m11; M21 = m21; M31 = m31;
  273. M02 = m02; M12 = m12; M22 = m22; M32 = m32;
  274. M03 = m03; M13 = m13; M23 = m23; M33 = m33;
  275. }
  276. public dReal M00, M10, M20, M30;
  277. public dReal M01, M11, M21, M31;
  278. public dReal M02, M12, M22, M32;
  279. public dReal M03, M13, M23, M33;
  280. }
  281. [StructLayout(LayoutKind.Sequential)]
  282. public struct Quaternion
  283. {
  284. public dReal W, X, Y, Z;
  285. }
  286. [StructLayout(LayoutKind.Sequential)]
  287. public struct SurfaceParameters
  288. {
  289. public ContactFlags mode;
  290. public dReal mu;
  291. public dReal mu2;
  292. public dReal bounce;
  293. public dReal bounce_vel;
  294. public dReal soft_erp;
  295. public dReal soft_cfm;
  296. public dReal motion1;
  297. public dReal motion2;
  298. public dReal motionN;
  299. public dReal slip1;
  300. public dReal slip2;
  301. }
  302. [StructLayout(LayoutKind.Sequential)]
  303. public struct Vector3
  304. {
  305. public Vector3(dReal x, dReal y, dReal z)
  306. {
  307. X = x; Y = y; Z = z; _w = 0.0f;
  308. }
  309. public dReal X, Y, Z;
  310. private dReal _w;
  311. }
  312. [StructLayout(LayoutKind.Sequential)]
  313. public struct Vector4
  314. {
  315. public Vector4(dReal x, dReal y, dReal z, dReal w)
  316. {
  317. X = x; Y = y; Z = z; W = w;
  318. }
  319. public dReal X, Y, Z, W;
  320. }
  321. #endregion
  322. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAllocateODEDataForThread"), SuppressUnmanagedCodeSecurity]
  323. public static extern int AllocateODEDataForThread(uint ODEInitFlags);
  324. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnected"), SuppressUnmanagedCodeSecurity]
  325. public static extern bool AreConnected(IntPtr b1, IntPtr b2);
  326. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnectedExcluding"), SuppressUnmanagedCodeSecurity]
  327. public static extern bool AreConnectedExcluding(IntPtr b1, IntPtr b2, JointType joint_type);
  328. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForce"), SuppressUnmanagedCodeSecurity]
  329. public static extern void BodyAddForce(IntPtr body, dReal fx, dReal fy, dReal fz);
  330. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtPos"), SuppressUnmanagedCodeSecurity]
  331. public static extern void BodyAddForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
  332. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtRelPos"), SuppressUnmanagedCodeSecurity]
  333. public static extern void BodyAddForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
  334. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForce"), SuppressUnmanagedCodeSecurity]
  335. public static extern void BodyAddRelForce(IntPtr body, dReal fx, dReal fy, dReal fz);
  336. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtPos"), SuppressUnmanagedCodeSecurity]
  337. public static extern void BodyAddRelForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
  338. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtRelPos"), SuppressUnmanagedCodeSecurity]
  339. public static extern void BodyAddRelForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
  340. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelTorque"), SuppressUnmanagedCodeSecurity]
  341. public static extern void BodyAddRelTorque(IntPtr body, dReal fx, dReal fy, dReal fz);
  342. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddTorque"), SuppressUnmanagedCodeSecurity]
  343. public static extern void BodyAddTorque(IntPtr body, dReal fx, dReal fy, dReal fz);
  344. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity]
  345. public static extern void BodyCopyPosition(IntPtr body, out Vector3 pos);
  346. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity]
  347. public static extern void BodyCopyPosition(IntPtr body, out dReal X);
  348. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity]
  349. public static extern void BodyCopyQuaternion(IntPtr body, out Quaternion quat);
  350. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity]
  351. public static extern void BodyCopyQuaternion(IntPtr body, out dReal X);
  352. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity]
  353. public static extern void BodyCopyRotation(IntPtr body, out Matrix3 R);
  354. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity]
  355. public static extern void BodyCopyRotation(IntPtr body, out dReal M00);
  356. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCreate"), SuppressUnmanagedCodeSecurity]
  357. public static extern IntPtr BodyiCreate(IntPtr world);
  358. public static IntPtr BodyCreate(IntPtr world)
  359. {
  360. NTotalBodies++;
  361. return BodyiCreate(world);
  362. }
  363. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDestroy"), SuppressUnmanagedCodeSecurity]
  364. public static extern void BodyiDestroy(IntPtr body);
  365. public static void BodyDestroy(IntPtr body)
  366. {
  367. NTotalBodies--;
  368. BodyiDestroy(body);
  369. }
  370. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDisable"), SuppressUnmanagedCodeSecurity]
  371. public static extern void BodyDisable(IntPtr body);
  372. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyEnable"), SuppressUnmanagedCodeSecurity]
  373. public static extern void BodyEnable(IntPtr body);
  374. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
  375. public static extern dReal BodyGetAutoDisableAngularThreshold(IntPtr body);
  376. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
  377. public static extern bool BodyGetAutoDisableFlag(IntPtr body);
  378. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity]
  379. public static extern void BodyGetAutoDisableDefaults(IntPtr body);
  380. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
  381. public static extern dReal BodyGetAutoDisableLinearThreshold(IntPtr body);
  382. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
  383. public static extern int BodyGetAutoDisableSteps(IntPtr body);
  384. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
  385. public static extern dReal BodyGetAutoDisableTime(IntPtr body);
  386. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularVel"), SuppressUnmanagedCodeSecurity]
  387. public extern unsafe static Vector3* BodyGetAngularVelUnsafe(IntPtr body);
  388. public static Vector3 BodyGetAngularVel(IntPtr body)
  389. {
  390. unsafe { return *(BodyGetAngularVelUnsafe(body)); }
  391. }
  392. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetData"), SuppressUnmanagedCodeSecurity]
  393. public static extern IntPtr BodyGetData(IntPtr body);
  394. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationMode"), SuppressUnmanagedCodeSecurity]
  395. public static extern int BodyGetFiniteRotationMode(IntPtr body);
  396. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity]
  397. public static extern void BodyGetFiniteRotationAxis(IntPtr body, out Vector3 result);
  398. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetForce"), SuppressUnmanagedCodeSecurity]
  399. public extern unsafe static Vector3* BodyGetForceUnsafe(IntPtr body);
  400. public static Vector3 BodyGetForce(IntPtr body)
  401. {
  402. unsafe { return *(BodyGetForceUnsafe(body)); }
  403. }
  404. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGravityMode"), SuppressUnmanagedCodeSecurity]
  405. public static extern bool BodyGetGravityMode(IntPtr body);
  406. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGyroscopicMode"), SuppressUnmanagedCodeSecurity]
  407. public static extern int BodyGetGyroscopicMode(IntPtr body);
  408. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetJoint"), SuppressUnmanagedCodeSecurity]
  409. public static extern IntPtr BodyGetJoint(IntPtr body, int index);
  410. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearVel"), SuppressUnmanagedCodeSecurity]
  411. public extern unsafe static Vector3* BodyGetLinearVelUnsafe(IntPtr body);
  412. public static Vector3 BodyGetLinearVel(IntPtr body)
  413. {
  414. unsafe { return *(BodyGetLinearVelUnsafe(body)); }
  415. }
  416. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetMass"), SuppressUnmanagedCodeSecurity]
  417. public static extern void BodyGetMass(IntPtr body, out Mass mass);
  418. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetNumJoints"), SuppressUnmanagedCodeSecurity]
  419. public static extern int BodyGetNumJoints(IntPtr body);
  420. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPointVel"), SuppressUnmanagedCodeSecurity]
  421. public static extern void BodyGetPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
  422. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosition"), SuppressUnmanagedCodeSecurity]
  423. public extern unsafe static Vector3* BodyGetPositionUnsafe(IntPtr body);
  424. public static Vector3 BodyGetPosition(IntPtr body)
  425. {
  426. unsafe { return *(BodyGetPositionUnsafe(body)); }
  427. }
  428. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosRelPoint"), SuppressUnmanagedCodeSecurity]
  429. public static extern void BodyGetPosRelPoint(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
  430. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetQuaternion"), SuppressUnmanagedCodeSecurity]
  431. public extern unsafe static Quaternion* BodyGetQuaternionUnsafe(IntPtr body);
  432. public static Quaternion BodyGetQuaternion(IntPtr body)
  433. {
  434. unsafe { return *(BodyGetQuaternionUnsafe(body)); }
  435. }
  436. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointPos"), SuppressUnmanagedCodeSecurity]
  437. public static extern void BodyGetRelPointPos(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
  438. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointVel"), SuppressUnmanagedCodeSecurity]
  439. public static extern void BodyGetRelPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
  440. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRotation"), SuppressUnmanagedCodeSecurity]
  441. public extern unsafe static Matrix3* BodyGetRotationUnsafe(IntPtr body);
  442. public static Matrix3 BodyGetRotation(IntPtr body)
  443. {
  444. unsafe { return *(BodyGetRotationUnsafe(body)); }
  445. }
  446. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetTorque"), SuppressUnmanagedCodeSecurity]
  447. public extern unsafe static Vector3* BodyGetTorqueUnsafe(IntPtr body);
  448. public static Vector3 BodyGetTorque(IntPtr body)
  449. {
  450. unsafe { return *(BodyGetTorqueUnsafe(body)); }
  451. }
  452. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetWorld"), SuppressUnmanagedCodeSecurity]
  453. public static extern IntPtr BodyGetWorld(IntPtr body);
  454. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFirstGeom"), SuppressUnmanagedCodeSecurity]
  455. public static extern IntPtr BodyGetFirstGeom(IntPtr body);
  456. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetNextGeom"), SuppressUnmanagedCodeSecurity]
  457. public static extern IntPtr dBodyGetNextGeom(IntPtr Geom);
  458. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyIsEnabled"), SuppressUnmanagedCodeSecurity]
  459. public static extern bool BodyIsEnabled(IntPtr body);
  460. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularVel"), SuppressUnmanagedCodeSecurity]
  461. public static extern void BodySetAngularVel(IntPtr body, dReal x, dReal y, dReal z);
  462. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
  463. public static extern void BodySetAutoDisableAngularThreshold(IntPtr body, dReal angular_threshold);
  464. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity]
  465. public static extern void BodySetAutoDisableDefaults(IntPtr body);
  466. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
  467. public static extern void BodySetAutoDisableFlag(IntPtr body, bool do_auto_disable);
  468. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
  469. public static extern void BodySetAutoDisableLinearThreshold(IntPtr body, dReal linear_threshold);
  470. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
  471. public static extern void BodySetAutoDisableSteps(IntPtr body, int steps);
  472. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
  473. public static extern void BodySetAutoDisableTime(IntPtr body, dReal time);
  474. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetData"), SuppressUnmanagedCodeSecurity]
  475. public static extern void BodySetData(IntPtr body, IntPtr data);
  476. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationMode"), SuppressUnmanagedCodeSecurity]
  477. public static extern void BodySetFiniteRotationMode(IntPtr body, int mode);
  478. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity]
  479. public static extern void BodySetFiniteRotationAxis(IntPtr body, dReal x, dReal y, dReal z);
  480. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearDamping"), SuppressUnmanagedCodeSecurity]
  481. public static extern void BodySetLinearDamping(IntPtr body, dReal scale);
  482. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularDamping"), SuppressUnmanagedCodeSecurity]
  483. public static extern void BodySetAngularDamping(IntPtr body, dReal scale);
  484. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearDamping"), SuppressUnmanagedCodeSecurity]
  485. public static extern dReal BodyGetLinearDamping(IntPtr body);
  486. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularDamping"), SuppressUnmanagedCodeSecurity]
  487. public static extern dReal BodyGetAngularDamping(IntPtr body);
  488. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularDamping"), SuppressUnmanagedCodeSecurity]
  489. public static extern void BodySetDamping(IntPtr body, dReal linear_scale, dReal angular_scale);
  490. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity]
  491. public static extern void BodySetAngularDampingThreshold(IntPtr body, dReal threshold);
  492. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity]
  493. public static extern void BodySetLinearDampingThreshold(IntPtr body, dReal threshold);
  494. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity]
  495. public static extern dReal BodyGetLinearDampingThreshold(IntPtr body);
  496. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity]
  497. public static extern dReal BodyGetAngularDampingThreshold(IntPtr body);
  498. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetForce"), SuppressUnmanagedCodeSecurity]
  499. public static extern void BodySetForce(IntPtr body, dReal x, dReal y, dReal z);
  500. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGravityMode"), SuppressUnmanagedCodeSecurity]
  501. public static extern void BodySetGravityMode(IntPtr body, bool mode);
  502. /// <summary>
  503. /// Sets the Gyroscopic term status on the body specified.
  504. /// </summary>
  505. /// <param name="body">Pointer to body</param>
  506. /// <param name="enabled">NonZero enabled, Zero disabled</param>
  507. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGyroscopicMode"), SuppressUnmanagedCodeSecurity]
  508. public static extern void dBodySetGyroscopicMode(IntPtr body, int enabled);
  509. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearVel"), SuppressUnmanagedCodeSecurity]
  510. public static extern void BodySetLinearVel(IntPtr body, dReal x, dReal y, dReal z);
  511. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetMass"), SuppressUnmanagedCodeSecurity]
  512. public static extern void BodySetMass(IntPtr body, ref Mass mass);
  513. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetPosition"), SuppressUnmanagedCodeSecurity]
  514. public static extern void BodySetPosition(IntPtr body, dReal x, dReal y, dReal z);
  515. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity]
  516. public static extern void BodySetQuaternion(IntPtr body, ref Quaternion q);
  517. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity]
  518. public static extern void BodySetQuaternion(IntPtr body, ref dReal w);
  519. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity]
  520. public static extern void BodySetRotation(IntPtr body, ref Matrix3 R);
  521. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity]
  522. public static extern void BodySetRotation(IntPtr body, ref dReal M00);
  523. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetTorque"), SuppressUnmanagedCodeSecurity]
  524. public static extern void BodySetTorque(IntPtr body, dReal x, dReal y, dReal z);
  525. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorFromWorld"), SuppressUnmanagedCodeSecurity]
  526. public static extern void BodyVectorFromWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
  527. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorToWorld"), SuppressUnmanagedCodeSecurity]
  528. public static extern void BodyVectorToWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
  529. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxBox"), SuppressUnmanagedCodeSecurity]
  530. public static extern void BoxBox(ref Vector3 p1, ref Matrix3 R1,
  531. ref Vector3 side1, ref Vector3 p2,
  532. ref Matrix3 R2, ref Vector3 side2,
  533. ref Vector3 normal, out dReal depth, out int return_code,
  534. int maxc, out ContactGeom contact, int skip);
  535. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxTouchesBox"), SuppressUnmanagedCodeSecurity]
  536. public static extern void BoxTouchesBox(ref Vector3 _p1, ref Matrix3 R1,
  537. ref Vector3 side1, ref Vector3 _p2,
  538. ref Matrix3 R2, ref Vector3 side2);
  539. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCleanupODEAllDataForThread"), SuppressUnmanagedCodeSecurity]
  540. public static extern void CleanupODEAllDataForThread();
  541. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dClosestLineSegmentPoints"), SuppressUnmanagedCodeSecurity]
  542. public static extern void ClosestLineSegmentPoints(ref Vector3 a1, ref Vector3 a2,
  543. ref Vector3 b1, ref Vector3 b2,
  544. ref Vector3 cp1, ref Vector3 cp2);
  545. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCloseODE"), SuppressUnmanagedCodeSecurity]
  546. public static extern void CloseODE();
  547. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity]
  548. public static extern int Collide(IntPtr o1, IntPtr o2, int flags, [In, Out] ContactGeom[] contact, int skip);
  549. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity]
  550. public static extern int CollidePtr(IntPtr o1, IntPtr o2, int flags, IntPtr contactgeomarray, int skip);
  551. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dConnectingJoint"), SuppressUnmanagedCodeSecurity]
  552. public static extern IntPtr ConnectingJoint(IntPtr j1, IntPtr j2);
  553. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateBox"), SuppressUnmanagedCodeSecurity]
  554. public static extern IntPtr CreateiBox(IntPtr space, dReal lx, dReal ly, dReal lz);
  555. public static IntPtr CreateBox(IntPtr space, dReal lx, dReal ly, dReal lz)
  556. {
  557. NTotalGeoms++;
  558. return CreateiBox(space, lx, ly, lz);
  559. }
  560. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCapsule"), SuppressUnmanagedCodeSecurity]
  561. public static extern IntPtr CreateiCapsule(IntPtr space, dReal radius, dReal length);
  562. public static IntPtr CreateCapsule(IntPtr space, dReal radius, dReal length)
  563. {
  564. NTotalGeoms++;
  565. return CreateiCapsule(space, radius, length);
  566. }
  567. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateConvex"), SuppressUnmanagedCodeSecurity]
  568. public static extern IntPtr CreateiConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons);
  569. public static IntPtr CreateConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons)
  570. {
  571. NTotalGeoms++;
  572. return CreateiConvex(space, planes, planeCount, points, pointCount, polygons);
  573. }
  574. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCylinder"), SuppressUnmanagedCodeSecurity]
  575. public static extern IntPtr CreateiCylinder(IntPtr space, dReal radius, dReal length);
  576. public static IntPtr CreateCylinder(IntPtr space, dReal radius, dReal length)
  577. {
  578. NTotalGeoms++;
  579. return CreateiCylinder(space, radius, length);
  580. }
  581. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateHeightfield"), SuppressUnmanagedCodeSecurity]
  582. public static extern IntPtr CreateiHeightfield(IntPtr space, IntPtr data, int bPlaceable);
  583. public static IntPtr CreateHeightfield(IntPtr space, IntPtr data, int bPlaceable)
  584. {
  585. NTotalGeoms++;
  586. return CreateiHeightfield(space, data, bPlaceable);
  587. }
  588. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateOSTerrain"), SuppressUnmanagedCodeSecurity]
  589. public static extern IntPtr CreateiOSTerrain(IntPtr space, IntPtr data, int bPlaceable);
  590. public static IntPtr CreateOSTerrain(IntPtr space, IntPtr data, int bPlaceable)
  591. {
  592. NTotalGeoms++;
  593. return CreateiOSTerrain(space, data, bPlaceable);
  594. }
  595. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeom"), SuppressUnmanagedCodeSecurity]
  596. public static extern IntPtr CreateiGeom(int classnum);
  597. public static IntPtr CreateGeom(int classnum)
  598. {
  599. NTotalGeoms++;
  600. return CreateiGeom(classnum);
  601. }
  602. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomClass"), SuppressUnmanagedCodeSecurity]
  603. public static extern int CreateGeomClass(ref GeomClass classptr);
  604. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomTransform"), SuppressUnmanagedCodeSecurity]
  605. public static extern IntPtr CreateGeomTransform(IntPtr space);
  606. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreatePlane"), SuppressUnmanagedCodeSecurity]
  607. public static extern IntPtr CreateiPlane(IntPtr space, dReal a, dReal b, dReal c, dReal d);
  608. public static IntPtr CreatePlane(IntPtr space, dReal a, dReal b, dReal c, dReal d)
  609. {
  610. NTotalGeoms++;
  611. return CreateiPlane(space, a, b, c, d);
  612. }
  613. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateRay"), SuppressUnmanagedCodeSecurity]
  614. public static extern IntPtr CreateiRay(IntPtr space, dReal length);
  615. public static IntPtr CreateRay(IntPtr space, dReal length)
  616. {
  617. NTotalGeoms++;
  618. return CreateiRay(space, length);
  619. }
  620. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateSphere"), SuppressUnmanagedCodeSecurity]
  621. public static extern IntPtr CreateiSphere(IntPtr space, dReal radius);
  622. public static IntPtr CreateSphere(IntPtr space, dReal radius)
  623. {
  624. NTotalGeoms++;
  625. return CreateiSphere(space, radius);
  626. }
  627. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateTriMesh"), SuppressUnmanagedCodeSecurity]
  628. public static extern IntPtr CreateiTriMesh(IntPtr space, IntPtr data,
  629. TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback);
  630. public static IntPtr CreateTriMesh(IntPtr space, IntPtr data,
  631. TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback)
  632. {
  633. NTotalGeoms++;
  634. return CreateiTriMesh(space, data, callback, arrayCallback, rayCallback);
  635. }
  636. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDot"), SuppressUnmanagedCodeSecurity]
  637. public static extern dReal Dot(ref dReal X0, ref dReal X1, int n);
  638. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDQfromW"), SuppressUnmanagedCodeSecurity]
  639. public static extern void DQfromW(dReal[] dq, ref Vector3 w, ref Quaternion q);
  640. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorCholesky"), SuppressUnmanagedCodeSecurity]
  641. public static extern int FactorCholesky(ref dReal A00, int n);
  642. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorLDLT"), SuppressUnmanagedCodeSecurity]
  643. public static extern void FactorLDLT(ref dReal A, out dReal d, int n, int nskip);
  644. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity]
  645. public static extern void GeomBoxGetLengths(IntPtr geom, out Vector3 len);
  646. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity]
  647. public static extern void GeomBoxGetLengths(IntPtr geom, out dReal x);
  648. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxPointDepth"), SuppressUnmanagedCodeSecurity]
  649. public static extern dReal GeomBoxPointDepth(IntPtr geom, dReal x, dReal y, dReal z);
  650. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxSetLengths"), SuppressUnmanagedCodeSecurity]
  651. public static extern void GeomBoxSetLengths(IntPtr geom, dReal x, dReal y, dReal z);
  652. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleGetParams"), SuppressUnmanagedCodeSecurity]
  653. public static extern void GeomCapsuleGetParams(IntPtr geom, out dReal radius, out dReal length);
  654. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsulePointDepth"), SuppressUnmanagedCodeSecurity]
  655. public static extern dReal GeomCapsulePointDepth(IntPtr geom, dReal x, dReal y, dReal z);
  656. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleSetParams"), SuppressUnmanagedCodeSecurity]
  657. public static extern void GeomCapsuleSetParams(IntPtr geom, dReal radius, dReal length);
  658. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomClearOffset"), SuppressUnmanagedCodeSecurity]
  659. public static extern void GeomClearOffset(IntPtr geom);
  660. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity]
  661. public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref Vector3 pos);
  662. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity]
  663. public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref dReal X);
  664. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
  665. public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref Quaternion Q);
  666. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
  667. public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref dReal X);
  668. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity]
  669. public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref Matrix3 R);
  670. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity]
  671. public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref dReal M00);
  672. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity]
  673. public static extern void GeomCopyPosition(IntPtr geom, out Vector3 pos);
  674. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity]
  675. public static extern void GeomCopyPosition(IntPtr geom, out dReal X);
  676. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity]
  677. public static extern void GeomCopyRotation(IntPtr geom, out Matrix3 R);
  678. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity]
  679. public static extern void GeomCopyRotation(IntPtr geom, out dReal M00);
  680. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderGetParams"), SuppressUnmanagedCodeSecurity]
  681. public static extern void GeomCylinderGetParams(IntPtr geom, out dReal radius, out dReal length);
  682. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderSetParams"), SuppressUnmanagedCodeSecurity]
  683. public static extern void GeomCylinderSetParams(IntPtr geom, dReal radius, dReal length);
  684. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDestroy"), SuppressUnmanagedCodeSecurity]
  685. public static extern void GeomiDestroy(IntPtr geom);
  686. public static void GeomDestroy(IntPtr geom)
  687. {
  688. NTotalGeoms--;
  689. GeomiDestroy(geom);
  690. }
  691. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDisable"), SuppressUnmanagedCodeSecurity]
  692. public static extern void GeomDisable(IntPtr geom);
  693. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomEnable"), SuppressUnmanagedCodeSecurity]
  694. public static extern void GeomEnable(IntPtr geom);
  695. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity]
  696. public static extern void GeomGetAABB(IntPtr geom, out AABB aabb);
  697. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity]
  698. public static extern void GeomGetAABB(IntPtr geom, out dReal minX);
  699. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetBody"), SuppressUnmanagedCodeSecurity]
  700. public static extern IntPtr GeomGetBody(IntPtr geom);
  701. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCategoryBits"), SuppressUnmanagedCodeSecurity]
  702. public static extern uint GeomGetCategoryBits(IntPtr geom);
  703. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClassData"), SuppressUnmanagedCodeSecurity]
  704. public static extern IntPtr GeomGetClassData(IntPtr geom);
  705. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCollideBits"), SuppressUnmanagedCodeSecurity]
  706. public static extern uint GeomGetCollideBits(IntPtr geom);
  707. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClass"), SuppressUnmanagedCodeSecurity]
  708. public static extern GeomClassID GeomGetClass(IntPtr geom);
  709. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetData"), SuppressUnmanagedCodeSecurity]
  710. public static extern IntPtr GeomGetData(IntPtr geom);
  711. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetPosition"), SuppressUnmanagedCodeSecurity]
  712. public extern unsafe static Vector3* GeomGetOffsetPositionUnsafe(IntPtr geom);
  713. public static Vector3 GeomGetOffsetPosition(IntPtr geom)
  714. {
  715. unsafe { return *(GeomGetOffsetPositionUnsafe(geom)); }
  716. }
  717. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetRotation"), SuppressUnmanagedCodeSecurity]
  718. public extern unsafe static Matrix3* GeomGetOffsetRotationUnsafe(IntPtr geom);
  719. public static Matrix3 GeomGetOffsetRotation(IntPtr geom)
  720. {
  721. unsafe { return *(GeomGetOffsetRotationUnsafe(geom)); }
  722. }
  723. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetPosition"), SuppressUnmanagedCodeSecurity]
  724. public extern unsafe static Vector3* GeomGetPositionUnsafe(IntPtr geom);
  725. public static Vector3 GeomGetPosition(IntPtr geom)
  726. {
  727. unsafe { return *(GeomGetPositionUnsafe(geom)); }
  728. }
  729. public static OMV.Vector3 GeomGetPositionOMV(IntPtr geom)
  730. {
  731. Vector3 vtmp = GeomGetPosition(geom);
  732. return new OMV.Vector3(vtmp.X, vtmp.Y, vtmp.Z);
  733. }
  734. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity]
  735. public static extern void GeomCopyQuaternion(IntPtr geom, out Quaternion q);
  736. public static OMV.Quaternion GeomGetQuaternionOMV(IntPtr geom)
  737. {
  738. Quaternion qtmp;
  739. GeomCopyQuaternion(geom, out qtmp);
  740. return new OMV.Quaternion(qtmp.X, qtmp.Y, qtmp.Z, qtmp.W);
  741. }
  742. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity]
  743. public static extern void GeomCopyQuaternion(IntPtr geom, out dReal X);
  744. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetRotation"), SuppressUnmanagedCodeSecurity]
  745. public extern unsafe static Matrix3* GeomGetRotationUnsafe(IntPtr geom);
  746. public static Matrix3 GeomGetRotation(IntPtr geom)
  747. {
  748. unsafe { return *(GeomGetRotationUnsafe(geom)); }
  749. }
  750. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetSpace"), SuppressUnmanagedCodeSecurity]
  751. public static extern IntPtr GeomGetSpace(IntPtr geom);
  752. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity]
  753. public static extern void GeomHeightfieldDataBuildByte(IntPtr d, byte[] pHeightData, int bCopyHeightData,
  754. dReal width, dReal depth, int widthSamples, int depthSamples,
  755. dReal scale, dReal offset, dReal thickness, int bWrap);
  756. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity]
  757. public static extern void GeomHeightfieldDataBuildByte(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
  758. dReal width, dReal depth, int widthSamples, int depthSamples,
  759. dReal scale, dReal offset, dReal thickness, int bWrap);
  760. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildCallback"), SuppressUnmanagedCodeSecurity]
  761. public static extern void GeomHeightfieldDataBuildCallback(IntPtr d, IntPtr pUserData, HeightfieldGetHeight pCallback,
  762. dReal width, dReal depth, int widthSamples, int depthSamples,
  763. dReal scale, dReal offset, dReal thickness, int bWrap);
  764. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity]
  765. public static extern void GeomHeightfieldDataBuildShort(IntPtr d, ushort[] pHeightData, int bCopyHeightData,
  766. dReal width, dReal depth, int widthSamples, int depthSamples,
  767. dReal scale, dReal offset, dReal thickness, int bWrap);
  768. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity]
  769. public static extern void GeomHeightfieldDataBuildShort(IntPtr d, short[] pHeightData, int bCopyHeightData,
  770. dReal width, dReal depth, int widthSamples, int depthSamples,
  771. dReal scale, dReal offset, dReal thickness, int bWrap);
  772. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity]
  773. public static extern void GeomHeightfieldDataBuildShort(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
  774. dReal width, dReal depth, int widthSamples, int depthSamples,
  775. dReal scale, dReal offset, dReal thickness, int bWrap);
  776. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity]
  777. public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, float[] pHeightData, int bCopyHeightData,
  778. dReal width, dReal depth, int widthSamples, int depthSamples,
  779. dReal scale, dReal offset, dReal thickness, int bWrap);
  780. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity]
  781. public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
  782. dReal width, dReal depth, int widthSamples, int depthSamples,
  783. dReal scale, dReal offset, dReal thickness, int bWrap);
  784. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity]
  785. public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, double[] pHeightData, int bCopyHeightData,
  786. dReal width, dReal depth, int widthSamples, int depthSamples,
  787. dReal scale, dReal offset, dReal thickness, int bWrap);
  788. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity]
  789. public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
  790. dReal width, dReal depth, int widthSamples, int depthSamples,
  791. dReal scale, dReal offset, dReal thickness, int bWrap);
  792. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataCreate"), SuppressUnmanagedCodeSecurity]
  793. public static extern IntPtr GeomHeightfieldDataCreate();
  794. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataDestroy"), SuppressUnmanagedCodeSecurity]
  795. public static extern void GeomHeightfieldDataDestroy(IntPtr d);
  796. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataSetBounds"), SuppressUnmanagedCodeSecurity]
  797. public static extern void GeomHeightfieldDataSetBounds(IntPtr d, dReal minHeight, dReal maxHeight);
  798. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldGetHeightfieldData"), SuppressUnmanagedCodeSecurity]
  799. public static extern IntPtr GeomHeightfieldGetHeightfieldData(IntPtr g);
  800. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldSetHeightfieldData"), SuppressUnmanagedCodeSecurity]
  801. public static extern void GeomHeightfieldSetHeightfieldData(IntPtr g, IntPtr d);
  802. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainDataBuild"), SuppressUnmanagedCodeSecurity]
  803. public static extern void GeomOSTerrainDataBuild(IntPtr d, float[] pHeightData, int bCopyHeightData,
  804. dReal sampleSize, int widthSamples, int depthSamples,
  805. dReal offset, dReal thickness, int bWrap);
  806. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainDataBuild"), SuppressUnmanagedCodeSecurity]
  807. public static extern void GeomOSTerrainDataBuild(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
  808. dReal sampleSize, int widthSamples, int depthSamples,
  809. dReal thickness, int bWrap);
  810. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainDataCreate"), SuppressUnmanagedCodeSecurity]
  811. public static extern IntPtr GeomOSTerrainDataCreate();
  812. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainDataDestroy"), SuppressUnmanagedCodeSecurity]
  813. public static extern void GeomOSTerrainDataDestroy(IntPtr d);
  814. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainDataSetBounds"), SuppressUnmanagedCodeSecurity]
  815. public static extern void GeomOSTerrainDataSetBounds(IntPtr d, dReal minHeight, dReal maxHeight);
  816. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainGetHeightfieldData"), SuppressUnmanagedCodeSecurity]
  817. public static extern IntPtr GeomOSTerrainGetHeightfieldData(IntPtr g);
  818. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainSetHeightfieldData"), SuppressUnmanagedCodeSecurity]
  819. public static extern void GeomOSTerrainSetHeightfieldData(IntPtr g, IntPtr d);
  820. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsEnabled"), SuppressUnmanagedCodeSecurity]
  821. public static extern bool GeomIsEnabled(IntPtr geom);
  822. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsOffset"), SuppressUnmanagedCodeSecurity]
  823. public static extern bool GeomIsOffset(IntPtr geom);
  824. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsSpace"), SuppressUnmanagedCodeSecurity]
  825. public static extern bool GeomIsSpace(IntPtr geom);
  826. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity]
  827. public static extern void GeomPlaneGetParams(IntPtr geom, ref Vector4 result);
  828. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity]
  829. public static extern void GeomPlaneGetParams(IntPtr geom, ref dReal A);
  830. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlanePointDepth"), SuppressUnmanagedCodeSecurity]
  831. public static extern dReal GeomPlanePointDepth(IntPtr geom, dReal x, dReal y, dReal z);
  832. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneSetParams"), SuppressUnmanagedCodeSecurity]
  833. public static extern void GeomPlaneSetParams(IntPtr plane, dReal a, dReal b, dReal c, dReal d);
  834. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity]
  835. public static extern void GeomRayGet(IntPtr ray, ref Vector3 start, ref Vector3 dir);
  836. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity]
  837. public static extern void GeomRayGet(IntPtr ray, ref dReal startX, ref dReal dirX);
  838. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetClosestHit"), SuppressUnmanagedCodeSecurity]
  839. public static extern int GeomRayGetClosestHit(IntPtr ray);
  840. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetLength"), SuppressUnmanagedCodeSecurity]
  841. public static extern dReal GeomRayGetLength(IntPtr ray);
  842. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetParams"), SuppressUnmanagedCodeSecurity]
  843. public static extern dReal GeomRayGetParams(IntPtr g, out int firstContact, out int backfaceCull);
  844. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySet"), SuppressUnmanagedCodeSecurity]
  845. public static extern void GeomRaySet(IntPtr ray, dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz);
  846. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetClosestHit"), SuppressUnmanagedCodeSecurity]
  847. public static extern void GeomRaySetClosestHit(IntPtr ray, int closestHit);
  848. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetLength"), SuppressUnmanagedCodeSecurity]
  849. public static extern void GeomRaySetLength(IntPtr ray, dReal length);
  850. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetParams"), SuppressUnmanagedCodeSecurity]
  851. public static extern void GeomRaySetParams(IntPtr ray, int firstContact, int backfaceCull);
  852. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetBody"), SuppressUnmanagedCodeSecurity]
  853. public static extern void GeomSetBody(IntPtr geom, IntPtr body);
  854. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCategoryBits"), SuppressUnmanagedCodeSecurity]
  855. public static extern void GeomSetCategoryBits(IntPtr geom, uint bits);
  856. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCollideBits"), SuppressUnmanagedCodeSecurity]
  857. public static extern void GeomSetCollideBits(IntPtr geom, uint bits);
  858. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetConvex"), SuppressUnmanagedCodeSecurity]
  859. public static extern IntPtr GeomSetConvex(IntPtr geom, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons);
  860. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetData"), SuppressUnmanagedCodeSecurity]
  861. public static extern void GeomSetData(IntPtr geom, IntPtr data);
  862. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetPosition"), SuppressUnmanagedCodeSecurity]
  863. public static extern void GeomSetOffsetPosition(IntPtr geom, dReal x, dReal y, dReal z);
  864. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
  865. public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref Quaternion Q);
  866. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
  867. public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref dReal X);
  868. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
  869. public static extern void GeomSetOffsetRotation(IntPtr geom, ref Matrix3 R);
  870. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
  871. public static extern void GeomSetOffsetRotation(IntPtr geom, ref dReal M00);
  872. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldPosition"), SuppressUnmanagedCodeSecurity]
  873. public static extern void GeomSetOffsetWorldPosition(IntPtr geom, dReal x, dReal y, dReal z);
  874. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity]
  875. public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref Quaternion Q);
  876. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity]
  877. public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref dReal X);
  878. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity]
  879. public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref Matrix3 R);
  880. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity]
  881. public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref dReal M00);
  882. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetPosition"), SuppressUnmanagedCodeSecurity]
  883. public static extern void GeomSetPosition(IntPtr geom, dReal x, dReal y, dReal z);
  884. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity]
  885. public static extern void GeomSetQuaternion(IntPtr geom, ref Quaternion quat);
  886. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity]
  887. public static extern void GeomSetQuaternion(IntPtr geom, ref dReal w);
  888. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity]
  889. public static extern void GeomSetRotation(IntPtr geom, ref Matrix3 R);
  890. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity]
  891. public static extern void GeomSetRotation(IntPtr geom, ref dReal M00);
  892. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereGetRadius"), SuppressUnmanagedCodeSecurity]
  893. public static extern dReal GeomSphereGetRadius(IntPtr geom);
  894. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSpherePointDepth"), SuppressUnmanagedCodeSecurity]
  895. public static extern dReal GeomSpherePointDepth(IntPtr geom, dReal x, dReal y, dReal z);
  896. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereSetRadius"), SuppressUnmanagedCodeSecurity]
  897. public static extern void GeomSphereSetRadius(IntPtr geom, dReal radius);
  898. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetCleanup"), SuppressUnmanagedCodeSecurity]
  899. public static extern int GeomTransformGetCleanup(IntPtr geom);
  900. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetGeom"), SuppressUnmanagedCodeSecurity]
  901. public static extern IntPtr GeomTransformGetGeom(IntPtr geom);
  902. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetInfo"), SuppressUnmanagedCodeSecurity]
  903. public static extern int GeomTransformGetInfo(IntPtr geom);
  904. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetCleanup"), SuppressUnmanagedCodeSecurity]
  905. public static extern void GeomTransformSetCleanup(IntPtr geom, int mode);
  906. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetGeom"), SuppressUnmanagedCodeSecurity]
  907. public static extern void GeomTransformSetGeom(IntPtr geom, IntPtr obj);
  908. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetInfo"), SuppressUnmanagedCodeSecurity]
  909. public static extern void GeomTransformSetInfo(IntPtr geom, int info);
  910. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity]
  911. public static extern void GeomTriMeshDataBuildDouble(IntPtr d,
  912. double[] vertices, int vertexStride, int vertexCount,
  913. int[] indices, int indexCount, int triStride);
  914. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity]
  915. public static extern void GeomTriMeshDataBuildDouble(IntPtr d,
  916. IntPtr vertices, int vertexStride, int vertexCount,
  917. IntPtr indices, int indexCount, int triStride);
  918. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity]
  919. public static extern void GeomTriMeshDataBuildDouble1(IntPtr d,
  920. double[] vertices, int vertexStride, int vertexCount,
  921. int[] indices, int indexCount, int triStride,
  922. double[] normals);
  923. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity]
  924. public static extern void GeomTriMeshDataBuildDouble(IntPtr d,
  925. IntPtr vertices, int vertexStride, int vertexCount,
  926. IntPtr indices, int indexCount, int triStride,
  927. IntPtr normals);
  928. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity]
  929. public static extern void GeomTriMeshDataBuildSingle(IntPtr d,
  930. dReal[] vertices, int vertexStride, int vertexCount,
  931. int[] indices, int indexCount, int triStride);
  932. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity]
  933. public static extern void GeomTriMeshDataBuildSingle(IntPtr d,
  934. IntPtr vertices, int vertexStride, int vertexCount,
  935. IntPtr indices, int indexCount, int triStride);
  936. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity]
  937. public static extern void GeomTriMeshDataBuildSingle1(IntPtr d,
  938. dReal[] vertices, int vertexStride, int vertexCount,
  939. int[] indices, int indexCount, int triStride,
  940. dReal[] normals);
  941. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity]
  942. public static extern void GeomTriMeshDataBuildSingle1(IntPtr d,
  943. IntPtr vertices, int vertexStride, int vertexCount,
  944. IntPtr indices, int indexCount, int triStride,
  945. IntPtr normals);
  946. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity]
  947. public static extern void GeomTriMeshDataBuildSimple(IntPtr d,
  948. float[] vertices, int vertexStride, int vertexCount,
  949. int[] indices, int indexCount, int triStride);
  950. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity]
  951. public static extern void GeomTriMeshDataBuildSimple(IntPtr d,
  952. IntPtr vertices, int vertexStride, int vertexCount,
  953. IntPtr indices, int indexCount, int triStride);
  954. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity]
  955. public static extern void GeomTriMeshDataBuildSimple1(IntPtr d,
  956. float[] vertices, int vertexStride, int vertexCount,
  957. int[] indices, int indexCount, int triStride,
  958. float[] normals);
  959. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity]
  960. public static extern void GeomTriMeshDataBuildSimple1(IntPtr d,
  961. IntPtr vertices, int vertexStride, int vertexCount,
  962. IntPtr indices, int indexCount, int triStride,
  963. IntPtr normals);
  964. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshClearTCCache"), SuppressUnmanagedCodeSecurity]
  965. public static extern void GeomTriMeshClearTCCache(IntPtr g);
  966. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataCreate"), SuppressUnmanagedCodeSecurity]
  967. public static extern IntPtr GeomTriMeshDataCreate();
  968. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataDestroy"), SuppressUnmanagedCodeSecurity]
  969. public static extern void GeomTriMeshDataDestroy(IntPtr d);
  970. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataGet"), SuppressUnmanagedCodeSecurity]
  971. public static extern IntPtr GeomTriMeshDataGet(IntPtr d, int data_id);
  972. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataPreprocess"), SuppressUnmanagedCodeSecurity]
  973. public static extern void GeomTriMeshDataPreprocess(IntPtr d);
  974. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataSet"), SuppressUnmanagedCodeSecurity]
  975. public static extern void GeomTriMeshDataSet(IntPtr d, int data_id, IntPtr in_data);
  976. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataUpdate"), SuppressUnmanagedCodeSecurity]
  977. public static extern void GeomTriMeshDataUpdate(IntPtr d);
  978. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshEnableTC"), SuppressUnmanagedCodeSecurity]
  979. public static extern void GeomTriMeshEnableTC(IntPtr g, int geomClass, bool enable);
  980. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetArrayCallback"), SuppressUnmanagedCodeSecurity]
  981. public static extern TriArrayCallback GeomTriMeshGetArrayCallback(IntPtr g);
  982. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetCallback"), SuppressUnmanagedCodeSecurity]
  983. public static extern TriCallback GeomTriMeshGetCallback(IntPtr g);
  984. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetData"), SuppressUnmanagedCodeSecurity]
  985. public static extern IntPtr GeomTriMeshGetData(IntPtr g);
  986. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetLastTransform"), SuppressUnmanagedCodeSecurity]
  987. public extern unsafe static Matrix4* GeomTriMeshGetLastTransformUnsafe(IntPtr geom);
  988. public static Matrix4 GeomTriMeshGetLastTransform(IntPtr geom)
  989. {
  990. unsafe { return *(GeomTriMeshGetLastTransformUnsafe(geom)); }
  991. }
  992. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetPoint"), SuppressUnmanagedCodeSecurity]
  993. public extern static void GeomTriMeshGetPoint(IntPtr g, int index, dReal u, dReal v, ref Vector3 outVec);
  994. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetRayCallback"), SuppressUnmanagedCodeSecurity]
  995. public static extern TriRayCallback GeomTriMeshGetRayCallback(IntPtr g);
  996. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangle"), SuppressUnmanagedCodeSecurity]
  997. public extern static void GeomTriMeshGetTriangle(IntPtr g, int index, ref Vector3 v0, ref Vector3 v1, ref Vector3 v2);
  998. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangleCount"), SuppressUnmanagedCodeSecurity]
  999. public extern static int GeomTriMeshGetTriangleCount(IntPtr g);
  1000. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriMeshDataID"), SuppressUnmanagedCodeSecurity]
  1001. public static extern IntPtr GeomTriMeshGetTriMeshDataID(IntPtr g);
  1002. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshIsTCEnabled"), SuppressUnmanagedCodeSecurity]
  1003. public static extern bool GeomTriMeshIsTCEnabled(IntPtr g, int geomClass);
  1004. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetArrayCallback"), SuppressUnmanagedCodeSecurity]
  1005. public static extern void GeomTriMeshSetArrayCallback(IntPtr g, TriArrayCallback arrayCallback);
  1006. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetCallback"), SuppressUnmanagedCodeSecurity]
  1007. public static extern void GeomTriMeshSetCallback(IntPtr g, TriCallback callback);
  1008. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetData"), SuppressUnmanagedCodeSecurity]
  1009. public static extern void GeomTriMeshSetData(IntPtr g, IntPtr data);
  1010. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity]
  1011. public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref Matrix4 last_trans);
  1012. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity]
  1013. public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref dReal M00);
  1014. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetRayCallback"), SuppressUnmanagedCodeSecurity]
  1015. public static extern void GeomTriMeshSetRayCallback(IntPtr g, TriRayCallback callback);
  1016. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGetConfiguration"), SuppressUnmanagedCodeSecurity]
  1017. public static extern IntPtr iGetConfiguration();
  1018. public static string GetConfiguration()
  1019. {
  1020. IntPtr ptr = iGetConfiguration();
  1021. string s = Marshal.PtrToStringAnsi(ptr);
  1022. return s;
  1023. }
  1024. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceCreate"), SuppressUnmanagedCodeSecurity]
  1025. public static extern IntPtr HashSpaceCreate(IntPtr space);
  1026. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceGetLevels"), SuppressUnmanagedCodeSecurity]
  1027. public static extern void HashSpaceGetLevels(IntPtr space, out int minlevel, out int maxlevel);
  1028. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceSetLevels"), SuppressUnmanagedCodeSecurity]
  1029. public static extern void HashSpaceSetLevels(IntPtr space, int minlevel, int maxlevel);
  1030. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInfiniteAABB"), SuppressUnmanagedCodeSecurity]
  1031. public static extern void InfiniteAABB(IntPtr geom, out AABB aabb);
  1032. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE"), SuppressUnmanagedCodeSecurity]
  1033. public static extern void InitODE();
  1034. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE2"), SuppressUnmanagedCodeSecurity]
  1035. public static extern int InitODE2(uint ODEInitFlags);
  1036. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dIsPositiveDefinite"), SuppressUnmanagedCodeSecurity]
  1037. public static extern int IsPositiveDefinite(ref dReal A, int n);
  1038. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInvertPDMatrix"), SuppressUnmanagedCodeSecurity]
  1039. public static extern int InvertPDMatrix(ref dReal A, out dReal Ainv, int n);
  1040. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddAMotorTorques"), SuppressUnmanagedCodeSecurity]
  1041. public static extern void JointAddAMotorTorques(IntPtr joint, dReal torque1, dReal torque2, dReal torque3);
  1042. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHingeTorque"), SuppressUnmanagedCodeSecurity]
  1043. public static extern void JointAddHingeTorque(IntPtr joint, dReal torque);
  1044. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHinge2Torque"), SuppressUnmanagedCodeSecurity]
  1045. public static extern void JointAddHinge2Torques(IntPtr joint, dReal torque1, dReal torque2);
  1046. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddPRTorque"), SuppressUnmanagedCodeSecurity]
  1047. public static extern void JointAddPRTorque(IntPtr joint, dReal torque);
  1048. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddUniversalTorque"), SuppressUnmanagedCodeSecurity]
  1049. public static extern void JointAddUniversalTorques(IntPtr joint, dReal torque1, dReal torque2);
  1050. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddSliderForce"), SuppressUnmanagedCodeSecurity]
  1051. public static extern void JointAddSliderForce(IntPtr joint, dReal force);
  1052. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAttach"), SuppressUnmanagedCodeSecurity]
  1053. public static extern void JointAttach(IntPtr joint, IntPtr body1, IntPtr body2);
  1054. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateAMotor"), SuppressUnmanagedCodeSecurity]
  1055. public static extern IntPtr JointCreateAMotor(IntPtr world, IntPtr group);
  1056. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateBall"), SuppressUnmanagedCodeSecurity]
  1057. public static extern IntPtr JointCreateBall(IntPtr world, IntPtr group);
  1058. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity]
  1059. public static extern IntPtr JointCreateContact(IntPtr world, IntPtr group, ref Contact contact);
  1060. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity]
  1061. public static extern IntPtr JointCreateContactPtr(IntPtr world, IntPtr group, IntPtr contact);
  1062. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateFixed"), SuppressUnmanagedCodeSecurity]
  1063. public static extern IntPtr JointCreateFixed(IntPtr world, IntPtr group);
  1064. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge"), SuppressUnmanagedCodeSecurity]
  1065. public static extern IntPtr JointCreateHinge(IntPtr world, IntPtr group);
  1066. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge2"), SuppressUnmanagedCodeSecurity]
  1067. public static extern IntPtr JointCreateHinge2(IntPtr world, IntPtr group);
  1068. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateLMotor"), SuppressUnmanagedCodeSecurity]
  1069. public static extern IntPtr JointCreateLMotor(IntPtr world, IntPtr group);
  1070. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateNull"), SuppressUnmanagedCodeSecurity]
  1071. public static extern IntPtr JointCreateNull(IntPtr world, IntPtr group);
  1072. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePR"), SuppressUnmanagedCodeSecurity]
  1073. public static extern IntPtr JointCreatePR(IntPtr world, IntPtr group);
  1074. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePlane2D"), SuppressUnmanagedCodeSecurity]
  1075. public static extern IntPtr JointCreatePlane2D(IntPtr world, IntPtr group);
  1076. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateSlider"), SuppressUnmanagedCodeSecurity]
  1077. public static extern IntPtr JointCreateSlider(IntPtr world, IntPtr group);
  1078. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateUniversal"), SuppressUnmanagedCodeSecurity]
  1079. public static extern IntPtr JointCreateUniversal(IntPtr world, IntPtr group);
  1080. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointDestroy"), SuppressUnmanagedCodeSecurity]
  1081. public static extern void JointDestroy(IntPtr j);
  1082. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngle"), SuppressUnmanagedCodeSecurity]
  1083. public static extern dReal JointGetAMotorAngle(IntPtr j, int anum);
  1084. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngleRate"), SuppressUnmanagedCodeSecurity]
  1085. public static extern dReal JointGetAMotorAngleRate(IntPtr j, int anum);
  1086. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxis"), SuppressUnmanagedCodeSecurity]
  1087. public static extern void JointGetAMotorAxis(IntPtr j, int anum, out Vector3 result);
  1088. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxisRel"), SuppressUnmanagedCodeSecurity]
  1089. public static extern int JointGetAMotorAxisRel(IntPtr j, int anum);
  1090. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorMode"), SuppressUnmanagedCodeSecurity]
  1091. public static extern int JointGetAMotorMode(IntPtr j);
  1092. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorNumAxes"), SuppressUnmanagedCodeSecurity]
  1093. public static extern int JointGetAMotorNumAxes(IntPtr j);
  1094. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorParam"), SuppressUnmanagedCodeSecurity]
  1095. public static extern dReal JointGetAMotorParam(IntPtr j, int parameter);
  1096. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor"), SuppressUnmanagedCodeSecurity]
  1097. public static extern void JointGetBallAnchor(IntPtr j, out Vector3 result);
  1098. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor2"), SuppressUnmanagedCodeSecurity]
  1099. public static extern void JointGetBallAnchor2(IntPtr j, out Vector3 result);
  1100. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBody"), SuppressUnmanagedCodeSecurity]
  1101. public static extern IntPtr JointGetBody(IntPtr j);
  1102. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetData"), SuppressUnmanagedCodeSecurity]
  1103. public static extern IntPtr JointGetData(IntPtr j);
  1104. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetFeedback"), SuppressUnmanagedCodeSecurity]
  1105. public extern unsafe static JointFeedback* JointGetFeedbackUnsafe(IntPtr j);
  1106. public static JointFeedback JointGetFeedback(IntPtr j)
  1107. {
  1108. unsafe { return *(JointGetFeedbackUnsafe(j)); }
  1109. }
  1110. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor"), SuppressUnmanagedCodeSecurity]
  1111. public static extern void JointGetHingeAnchor(IntPtr j, out Vector3 result);
  1112. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngle"), SuppressUnmanagedCodeSecurity]
  1113. public static extern dReal JointGetHingeAngle(IntPtr j);
  1114. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngleRate"), SuppressUnmanagedCodeSecurity]
  1115. public static extern dReal JointGetHingeAngleRate(IntPtr j);
  1116. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAxis"), SuppressUnmanagedCodeSecurity]
  1117. public static extern void JointGetHingeAxis(IntPtr j, out Vector3 result);
  1118. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeParam"), SuppressUnmanagedCodeSecurity]
  1119. public static extern dReal JointGetHingeParam(IntPtr j, int parameter);
  1120. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1"), SuppressUnmanagedCodeSecurity]
  1121. public static extern dReal JointGetHinge2Angle1(IntPtr j);
  1122. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1Rate"), SuppressUnmanagedCodeSecurity]
  1123. public static extern dReal JointGetHinge2Angle1Rate(IntPtr j);
  1124. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle2Rate"), SuppressUnmanagedCodeSecurity]
  1125. public static extern dReal JointGetHinge2Angle2Rate(IntPtr j);
  1126. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor2"), SuppressUnmanagedCodeSecurity]
  1127. public static extern void JointGetHingeAnchor2(IntPtr j, out Vector3 result);
  1128. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor"), SuppressUnmanagedCodeSecurity]
  1129. public static extern void JointGetHinge2Anchor(IntPtr j, out Vector3 result);
  1130. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor2"), SuppressUnmanagedCodeSecurity]
  1131. public static extern void JointGetHinge2Anchor2(IntPtr j, out Vector3 result);
  1132. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis1"), SuppressUnmanagedCodeSecurity]
  1133. public static extern void JointGetHinge2Axis1(IntPtr j, out Vector3 result);
  1134. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis2"), SuppressUnmanagedCodeSecurity]
  1135. public static extern void JointGetHinge2Axis2(IntPtr j, out Vector3 result);
  1136. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Param"), SuppressUnmanagedCodeSecurity]
  1137. public static extern dReal JointGetHinge2Param(IntPtr j, int parameter);
  1138. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorAxis"), SuppressUnmanagedCodeSecurity]
  1139. public static extern void JointGetLMotorAxis(IntPtr j, int anum, out Vector3 result);
  1140. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorNumAxes"), SuppressUnmanagedCodeSecurity]
  1141. public static extern int JointGetLMotorNumAxes(IntPtr j);
  1142. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorParam"), SuppressUnmanagedCodeSecurity]
  1143. public static extern dReal JointGetLMotorParam(IntPtr j, int parameter);
  1144. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAnchor"), SuppressUnmanagedCodeSecurity]
  1145. public static extern void JointGetPRAnchor(IntPtr j, out Vector3 result);
  1146. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis1"), SuppressUnmanagedCodeSecurity]
  1147. public static extern void JointGetPRAxis1(IntPtr j, out Vector3 result);
  1148. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis2"), SuppressUnmanagedCodeSecurity]
  1149. public static extern void JointGetPRAxis2(IntPtr j, out Vector3 result);
  1150. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRParam"), SuppressUnmanagedCodeSecurity]
  1151. public static extern dReal JointGetPRParam(IntPtr j, int parameter);
  1152. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPosition"), SuppressUnmanagedCodeSecurity]
  1153. public static extern dReal JointGetPRPosition(IntPtr j);
  1154. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPositionRate"), SuppressUnmanagedCodeSecurity]
  1155. public static extern dReal JointGetPRPositionRate(IntPtr j);
  1156. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderAxis"), SuppressUnmanagedCodeSecurity]
  1157. public static extern void JointGetSliderAxis(IntPtr j, out Vector3 result);
  1158. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderParam"), SuppressUnmanagedCodeSecurity]
  1159. public static extern dReal JointGetSliderParam(IntPtr j, int parameter);
  1160. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPosition"), SuppressUnmanagedCodeSecurity]
  1161. public static extern dReal JointGetSliderPosition(IntPtr j);
  1162. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPositionRate"), SuppressUnmanagedCodeSecurity]
  1163. public static extern dReal JointGetSliderPositionRate(IntPtr j);
  1164. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetType"), SuppressUnmanagedCodeSecurity]
  1165. public static extern JointType JointGetType(IntPtr j);
  1166. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor"), SuppressUnmanagedCodeSecurity]
  1167. public static extern void JointGetUniversalAnchor(IntPtr j, out Vector3 result);
  1168. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor2"), SuppressUnmanagedCodeSecurity]
  1169. public static extern void JointGetUniversalAnchor2(IntPtr j, out Vector3 result);
  1170. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1"), SuppressUnmanagedCodeSecurity]
  1171. public static extern dReal JointGetUniversalAngle1(IntPtr j);
  1172. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1Rate"), SuppressUnmanagedCodeSecurity]
  1173. public static extern dReal JointGetUniversalAngle1Rate(IntPtr j);
  1174. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2"), SuppressUnmanagedCodeSecurity]
  1175. public static extern dReal JointGetUniversalAngle2(IntPtr j);
  1176. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2Rate"), SuppressUnmanagedCodeSecurity]
  1177. public static extern dReal JointGetUniversalAngle2Rate(IntPtr j);
  1178. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngles"), SuppressUnmanagedCodeSecurity]
  1179. public static extern void JointGetUniversalAngles(IntPtr j, out dReal angle1, out dReal angle2);
  1180. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis1"), SuppressUnmanagedCodeSecurity]
  1181. public static extern void JointGetUniversalAxis1(IntPtr j, out Vector3 result);
  1182. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis2"), SuppressUnmanagedCodeSecurity]
  1183. public static extern void JointGetUniversalAxis2(IntPtr j, out Vector3 result);
  1184. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalParam"), SuppressUnmanagedCodeSecurity]
  1185. public static extern dReal JointGetUniversalParam(IntPtr j, int parameter);
  1186. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupCreate"), SuppressUnmanagedCodeSecurity]
  1187. public static extern IntPtr JointGroupCreate(int max_size);
  1188. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupDestroy"), SuppressUnmanagedCodeSecurity]
  1189. public static extern void JointGroupDestroy(IntPtr group);
  1190. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupEmpty"), SuppressUnmanagedCodeSecurity]
  1191. public static extern void JointGroupEmpty(IntPtr group);
  1192. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAngle"), SuppressUnmanagedCodeSecurity]
  1193. public static extern void JointSetAMotorAngle(IntPtr j, int anum, dReal angle);
  1194. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAxis"), SuppressUnmanagedCodeSecurity]
  1195. public static extern void JointSetAMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z);
  1196. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorMode"), SuppressUnmanagedCodeSecurity]
  1197. public static extern void JointSetAMotorMode(IntPtr j, int mode);
  1198. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorNumAxes"), SuppressUnmanagedCodeSecurity]
  1199. public static extern void JointSetAMotorNumAxes(IntPtr group, int num);
  1200. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorParam"), SuppressUnmanagedCodeSecurity]
  1201. public static extern void JointSetAMotorParam(IntPtr group, int parameter, dReal value);
  1202. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor"), SuppressUnmanagedCodeSecurity]
  1203. public static extern void JointSetBallAnchor(IntPtr j, dReal x, dReal y, dReal z);
  1204. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor2"), SuppressUnmanagedCodeSecurity]
  1205. public static extern void JointSetBallAnchor2(IntPtr j, dReal x, dReal y, dReal z);
  1206. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetData"), SuppressUnmanagedCodeSecurity]
  1207. public static extern void JointSetData(IntPtr j, IntPtr data);
  1208. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFeedback"), SuppressUnmanagedCodeSecurity]
  1209. public static extern void JointSetFeedback(IntPtr j, out JointFeedback feedback);
  1210. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFixed"), SuppressUnmanagedCodeSecurity]
  1211. public static extern void JointSetFixed(IntPtr j);
  1212. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchor"), SuppressUnmanagedCodeSecurity]
  1213. public static extern void JointSetHingeAnchor(IntPtr j, dReal x, dReal y, dReal z);
  1214. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchorDelta"), SuppressUnmanagedCodeSecurity]
  1215. public static extern void JointSetHingeAnchorDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
  1216. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAxis"), SuppressUnmanagedCodeSecurity]
  1217. public static extern void JointSetHingeAxis(IntPtr j, dReal x, dReal y, dReal z);
  1218. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeParam"), SuppressUnmanagedCodeSecurity]
  1219. public static extern void JointSetHingeParam(IntPtr j, int parameter, dReal value);
  1220. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Anchor"), SuppressUnmanagedCodeSecurity]
  1221. public static extern void JointSetHinge2Anchor(IntPtr j, dReal x, dReal y, dReal z);
  1222. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis1"), SuppressUnmanagedCodeSecurity]
  1223. public static extern void JointSetHinge2Axis1(IntPtr j, dReal x, dReal y, dReal z);
  1224. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis2"), SuppressUnmanagedCodeSecurity]
  1225. public static extern void JointSetHinge2Axis2(IntPtr j, dReal x, dReal y, dReal z);
  1226. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Param"), SuppressUnmanagedCodeSecurity]
  1227. public static extern void JointSetHinge2Param(IntPtr j, int parameter, dReal value);
  1228. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorAxis"), SuppressUnmanagedCodeSecurity]
  1229. public static extern void JointSetLMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z);
  1230. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorNumAxes"), SuppressUnmanagedCodeSecurity]
  1231. public static extern void JointSetLMotorNumAxes(IntPtr j, int num);
  1232. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorParam"), SuppressUnmanagedCodeSecurity]
  1233. public static extern void JointSetLMotorParam(IntPtr j, int parameter, dReal value);
  1234. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DAngleParam"), SuppressUnmanagedCodeSecurity]
  1235. public static extern void JointSetPlane2DAngleParam(IntPtr j, int parameter, dReal value);
  1236. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DXParam"), SuppressUnmanagedCodeSecurity]
  1237. public static extern void JointSetPlane2DXParam(IntPtr j, int parameter, dReal value);
  1238. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DYParam"), SuppressUnmanagedCodeSecurity]
  1239. public static extern void JointSetPlane2DYParam(IntPtr j, int parameter, dReal value);
  1240. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAnchor"), SuppressUnmanagedCodeSecurity]
  1241. public static extern void JointSetPRAnchor(IntPtr j, dReal x, dReal y, dReal z);
  1242. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis1"), SuppressUnmanagedCodeSecurity]
  1243. public static extern void JointSetPRAxis1(IntPtr j, dReal x, dReal y, dReal z);
  1244. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis2"), SuppressUnmanagedCodeSecurity]
  1245. public static extern void JointSetPRAxis2(IntPtr j, dReal x, dReal y, dReal z);
  1246. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRParam"), SuppressUnmanagedCodeSecurity]
  1247. public static extern void JointSetPRParam(IntPtr j, int parameter, dReal value);
  1248. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxis"), SuppressUnmanagedCodeSecurity]
  1249. public static extern void JointSetSliderAxis(IntPtr j, dReal x, dReal y, dReal z);
  1250. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxisDelta"), SuppressUnmanagedCodeSecurity]
  1251. public static extern void JointSetSliderAxisDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
  1252. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderParam"), SuppressUnmanagedCodeSecurity]
  1253. public static extern void JointSetSliderParam(IntPtr j, int parameter, dReal value);
  1254. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAnchor"), SuppressUnmanagedCodeSecurity]
  1255. public static extern void JointSetUniversalAnchor(IntPtr j, dReal x, dReal y, dReal z);
  1256. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis1"), SuppressUnmanagedCodeSecurity]
  1257. public static extern void JointSetUniversalAxis1(IntPtr j, dReal x, dReal y, dReal z);
  1258. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis2"), SuppressUnmanagedCodeSecurity]
  1259. public static extern void JointSetUniversalAxis2(IntPtr j, dReal x, dReal y, dReal z);
  1260. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalParam"), SuppressUnmanagedCodeSecurity]
  1261. public static extern void JointSetUniversalParam(IntPtr j, int parameter, dReal value);
  1262. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dLDLTAddTL"), SuppressUnmanagedCodeSecurity]
  1263. public static extern void LDLTAddTL(ref dReal L, ref dReal d, ref dReal a, int n, int nskip);
  1264. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdd"), SuppressUnmanagedCodeSecurity]
  1265. public static extern void MassAdd(ref Mass a, ref Mass b);
  1266. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdjust"), SuppressUnmanagedCodeSecurity]
  1267. public static extern void MassAdjust(ref Mass m, dReal newmass);
  1268. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassCheck"), SuppressUnmanagedCodeSecurity]
  1269. public static extern bool MassCheck(ref Mass m);
  1270. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity]
  1271. public static extern void MassRotate(ref Mass mass, ref Matrix3 R);
  1272. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity]
  1273. public static extern void MassRotate(ref Mass mass, ref dReal M00);
  1274. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBox"), SuppressUnmanagedCodeSecurity]
  1275. public static extern void MassSetBox(out Mass mass, dReal density, dReal lx, dReal ly, dReal lz);
  1276. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBoxTotal"), SuppressUnmanagedCodeSecurity]
  1277. public static extern void MassSetBoxTotal(out Mass mass, dReal total_mass, dReal lx, dReal ly, dReal lz);
  1278. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsule"), SuppressUnmanagedCodeSecurity]
  1279. public static extern void MassSetCapsule(out Mass mass, dReal density, int direction, dReal radius, dReal length);
  1280. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsuleTotal"), SuppressUnmanagedCodeSecurity]
  1281. public static extern void MassSetCapsuleTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length);
  1282. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinder"), SuppressUnmanagedCodeSecurity]
  1283. public static extern void MassSetCylinder(out Mass mass, dReal density, int direction, dReal radius, dReal length);
  1284. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinderTotal"), SuppressUnmanagedCodeSecurity]
  1285. public static extern void MassSetCylinderTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length);
  1286. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetParameters"), SuppressUnmanagedCodeSecurity]
  1287. public static extern void MassSetParameters(out Mass mass, dReal themass,
  1288. dReal cgx, dReal cgy, dReal cgz,
  1289. dReal i11, dReal i22, dReal i33,
  1290. dReal i12, dReal i13, dReal i23);
  1291. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphere"), SuppressUnmanagedCodeSecurity]
  1292. public static extern void MassSetSphere(out Mass mass, dReal density, dReal radius);
  1293. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphereTotal"), SuppressUnmanagedCodeSecurity]
  1294. public static extern void dMassSetSphereTotal(out Mass mass, dReal total_mass, dReal radius);
  1295. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetTrimesh"), SuppressUnmanagedCodeSecurity]
  1296. public static extern void MassSetTrimesh(out Mass mass, dReal density, IntPtr g);
  1297. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetZero"), SuppressUnmanagedCodeSecurity]
  1298. public static extern void MassSetZero(out Mass mass);
  1299. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassTranslate"), SuppressUnmanagedCodeSecurity]
  1300. public static extern void MassTranslate(ref Mass mass, dReal x, dReal y, dReal z);
  1301. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply0"), SuppressUnmanagedCodeSecurity]
  1302. public static extern void Multiply0(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r);
  1303. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply0"), SuppressUnmanagedCodeSecurity]
  1304. private static extern void MultiplyiM3V3(out Vector3 vout, ref Matrix3 matrix, ref Vector3 vect,int p, int q, int r);
  1305. public static void MultiplyM3V3(out Vector3 outvector, ref Matrix3 matrix, ref Vector3 invector)
  1306. {
  1307. MultiplyiM3V3(out outvector, ref matrix, ref invector, 3, 3, 1);
  1308. }
  1309. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply1"), SuppressUnmanagedCodeSecurity]
  1310. public static extern void Multiply1(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r);
  1311. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply2"), SuppressUnmanagedCodeSecurity]
  1312. public static extern void Multiply2(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r);
  1313. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQFromAxisAndAngle"), SuppressUnmanagedCodeSecurity]
  1314. public static extern void QFromAxisAndAngle(out Quaternion q, dReal ax, dReal ay, dReal az, dReal angle);
  1315. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQfromR"), SuppressUnmanagedCodeSecurity]
  1316. public static extern void QfromR(out Quaternion q, ref Matrix3 R);
  1317. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply0"), SuppressUnmanagedCodeSecurity]
  1318. public static extern void QMultiply0(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
  1319. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply1"), SuppressUnmanagedCodeSecurity]
  1320. public static extern void QMultiply1(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
  1321. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply2"), SuppressUnmanagedCodeSecurity]
  1322. public static extern void QMultiply2(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
  1323. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply3"), SuppressUnmanagedCodeSecurity]
  1324. public static extern void QMultiply3(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
  1325. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQSetIdentity"), SuppressUnmanagedCodeSecurity]
  1326. public static extern void QSetIdentity(out Quaternion q);
  1327. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity]
  1328. public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref Vector3 center, ref Vector3 extents, int depth);
  1329. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity]
  1330. public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref dReal centerX, ref dReal extentsX, int depth);
  1331. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRandReal"), SuppressUnmanagedCodeSecurity]
  1332. public static extern dReal RandReal();
  1333. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFrom2Axes"), SuppressUnmanagedCodeSecurity]
  1334. public static extern void RFrom2Axes(out Matrix3 R, dReal ax, dReal ay, dReal az, dReal bx, dReal by, dReal bz);
  1335. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromAxisAndAngle"), SuppressUnmanagedCodeSecurity]
  1336. public static extern void RFromAxisAndAngle(out Matrix3 R, dReal x, dReal y, dReal z, dReal angle);
  1337. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromEulerAngles"), SuppressUnmanagedCodeSecurity]
  1338. public static extern void RFromEulerAngles(out Matrix3 R, dReal phi, dReal theta, dReal psi);
  1339. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRfromQ"), SuppressUnmanagedCodeSecurity]
  1340. public static extern void RfromQ(out Matrix3 R, ref Quaternion q);
  1341. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromZAxis"), SuppressUnmanagedCodeSecurity]
  1342. public static extern void RFromZAxis(out Matrix3 R, dReal ax, dReal ay, dReal az);
  1343. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRSetIdentity"), SuppressUnmanagedCodeSecurity]
  1344. public static extern void RSetIdentity(out Matrix3 R);
  1345. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetValue"), SuppressUnmanagedCodeSecurity]
  1346. public static extern void SetValue(out dReal a, int n);
  1347. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetZero"), SuppressUnmanagedCodeSecurity]
  1348. public static extern void SetZero(out dReal a, int n);
  1349. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSimpleSpaceCreate"), SuppressUnmanagedCodeSecurity]
  1350. public static extern IntPtr SimpleSpaceCreate(IntPtr space);
  1351. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveCholesky"), SuppressUnmanagedCodeSecurity]
  1352. public static extern void SolveCholesky(ref dReal L, out dReal b, int n);
  1353. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1"), SuppressUnmanagedCodeSecurity]
  1354. public static extern void SolveL1(ref dReal L, out dReal b, int n, int nskip);
  1355. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1T"), SuppressUnmanagedCodeSecurity]
  1356. public static extern void SolveL1T(ref dReal L, out dReal b, int n, int nskip);
  1357. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveLDLT"), SuppressUnmanagedCodeSecurity]
  1358. public static extern void SolveLDLT(ref dReal L, ref dReal d, out dReal b, int n, int nskip);
  1359. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceAdd"), SuppressUnmanagedCodeSecurity]
  1360. public static extern void SpaceAdd(IntPtr space, IntPtr geom);
  1361. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceLockQuery"), SuppressUnmanagedCodeSecurity]
  1362. public static extern bool SpaceLockQuery(IntPtr space);
  1363. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceClean"), SuppressUnmanagedCodeSecurity]
  1364. public static extern void SpaceClean(IntPtr space);
  1365. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide"), SuppressUnmanagedCodeSecurity]
  1366. public static extern void SpaceCollide(IntPtr space, IntPtr data, NearCallback callback);
  1367. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide2"), SuppressUnmanagedCodeSecurity]
  1368. public static extern void SpaceCollide2(IntPtr space1, IntPtr space2, IntPtr data, NearCallback callback);
  1369. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceDestroy"), SuppressUnmanagedCodeSecurity]
  1370. public static extern void SpaceDestroy(IntPtr space);
  1371. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetCleanup"), SuppressUnmanagedCodeSecurity]
  1372. public static extern bool SpaceGetCleanup(IntPtr space);
  1373. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetNumGeoms"), SuppressUnmanagedCodeSecurity]
  1374. public static extern int SpaceGetNumGeoms(IntPtr space);
  1375. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetGeom"), SuppressUnmanagedCodeSecurity]
  1376. public static extern IntPtr SpaceGetGeom(IntPtr space, int i);
  1377. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetSublevel"), SuppressUnmanagedCodeSecurity]
  1378. public static extern int SpaceGetSublevel(IntPtr space);
  1379. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceQuery"), SuppressUnmanagedCodeSecurity]
  1380. public static extern bool SpaceQuery(IntPtr space, IntPtr geom);
  1381. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceRemove"), SuppressUnmanagedCodeSecurity]
  1382. public static extern void SpaceRemove(IntPtr space, IntPtr geom);
  1383. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetCleanup"), SuppressUnmanagedCodeSecurity]
  1384. public static extern void SpaceSetCleanup(IntPtr space, bool mode);
  1385. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetSublevel"), SuppressUnmanagedCodeSecurity]
  1386. public static extern void SpaceSetSublevel(IntPtr space, int sublevel);
  1387. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSweepAndPruneSpaceCreate"), SuppressUnmanagedCodeSecurity]
  1388. public static extern IntPtr SweepAndPruneSpaceCreate(IntPtr space, int AxisOrder);
  1389. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dVectorScale"), SuppressUnmanagedCodeSecurity]
  1390. public static extern void VectorScale(out dReal a, ref dReal d, int n);
  1391. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldCreate"), SuppressUnmanagedCodeSecurity]
  1392. public static extern IntPtr WorldCreate();
  1393. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldDestroy"), SuppressUnmanagedCodeSecurity]
  1394. public static extern void WorldDestroy(IntPtr world);
  1395. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity]
  1396. public static extern int WorldGetAutoDisableAverageSamplesCount(IntPtr world);
  1397. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
  1398. public static extern dReal WorldGetAutoDisableAngularThreshold(IntPtr world);
  1399. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
  1400. public static extern bool WorldGetAutoDisableFlag(IntPtr world);
  1401. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
  1402. public static extern dReal WorldGetAutoDisableLinearThreshold(IntPtr world);
  1403. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
  1404. public static extern int WorldGetAutoDisableSteps(IntPtr world);
  1405. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
  1406. public static extern dReal WorldGetAutoDisableTime(IntPtr world);
  1407. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity]
  1408. public static extern int WorldGetAutoEnableDepthSF1(IntPtr world);
  1409. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetCFM"), SuppressUnmanagedCodeSecurity]
  1410. public static extern dReal WorldGetCFM(IntPtr world);
  1411. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetERP"), SuppressUnmanagedCodeSecurity]
  1412. public static extern dReal WorldGetERP(IntPtr world);
  1413. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity]
  1414. public static extern void WorldGetGravity(IntPtr world, out Vector3 gravity);
  1415. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity]
  1416. public static extern void WorldGetGravity(IntPtr world, out dReal X);
  1417. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity]
  1418. public static extern dReal WorldGetContactMaxCorrectingVel(IntPtr world);
  1419. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity]
  1420. public static extern dReal WorldGetContactSurfaceLayer(IntPtr world);
  1421. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAngularDamping"), SuppressUnmanagedCodeSecurity]
  1422. public static extern dReal WorldGetAngularDamping(IntPtr world);
  1423. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity]
  1424. public static extern dReal WorldGetAngularDampingThreshold(IntPtr world);
  1425. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetLinearDamping"), SuppressUnmanagedCodeSecurity]
  1426. public static extern dReal WorldGetLinearDamping(IntPtr world);
  1427. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity]
  1428. public static extern dReal WorldGetLinearDampingThreshold(IntPtr world);
  1429. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity]
  1430. public static extern int WorldGetQuickStepNumIterations(IntPtr world);
  1431. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepW"), SuppressUnmanagedCodeSecurity]
  1432. public static extern dReal WorldGetQuickStepW(IntPtr world);
  1433. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity]
  1434. public static extern dReal WorldGetMaxAngularSpeed(IntPtr world);
  1435. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity]
  1436. public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out Vector3 force);
  1437. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity]
  1438. public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out dReal forceX);
  1439. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldQuickStep"), SuppressUnmanagedCodeSecurity]
  1440. public static extern void WorldQuickStep(IntPtr world, dReal stepsize);
  1441. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDamping"), SuppressUnmanagedCodeSecurity]
  1442. public static extern void WorldSetAngularDamping(IntPtr world, dReal scale);
  1443. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity]
  1444. public static extern void WorldSetAngularDampingThreshold(IntPtr world, dReal threshold);
  1445. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
  1446. public static extern void WorldSetAutoDisableAngularThreshold(IntPtr world, dReal angular_threshold);
  1447. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity]
  1448. public static extern void WorldSetAutoDisableAverageSamplesCount(IntPtr world, int average_samples_count);
  1449. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
  1450. public static extern void WorldSetAutoDisableFlag(IntPtr world, bool do_auto_disable);
  1451. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
  1452. public static extern void WorldSetAutoDisableLinearThreshold(IntPtr world, dReal linear_threshold);
  1453. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
  1454. public static extern void WorldSetAutoDisableSteps(IntPtr world, int steps);
  1455. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
  1456. public static extern void WorldSetAutoDisableTime(IntPtr world, dReal time);
  1457. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity]
  1458. public static extern void WorldSetAutoEnableDepthSF1(IntPtr world, int autoEnableDepth);
  1459. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetCFM"), SuppressUnmanagedCodeSecurity]
  1460. public static extern void WorldSetCFM(IntPtr world, dReal cfm);
  1461. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity]
  1462. public static extern void WorldSetContactMaxCorrectingVel(IntPtr world, dReal vel);
  1463. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity]
  1464. public static extern void WorldSetContactSurfaceLayer(IntPtr world, dReal depth);
  1465. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetDamping"), SuppressUnmanagedCodeSecurity]
  1466. public static extern void WorldSetDamping(IntPtr world, dReal linear_scale, dReal angular_scale);
  1467. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetERP"), SuppressUnmanagedCodeSecurity]
  1468. public static extern void WorldSetERP(IntPtr world, dReal erp);
  1469. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetGravity"), SuppressUnmanagedCodeSecurity]
  1470. public static extern void WorldSetGravity(IntPtr world, dReal x, dReal y, dReal z);
  1471. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDamping"), SuppressUnmanagedCodeSecurity]
  1472. public static extern void WorldSetLinearDamping(IntPtr world, dReal scale);
  1473. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity]
  1474. public static extern void WorldSetLinearDampingThreshold(IntPtr world, dReal threshold);
  1475. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity]
  1476. public static extern void WorldSetQuickStepNumIterations(IntPtr world, int num);
  1477. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepW"), SuppressUnmanagedCodeSecurity]
  1478. public static extern void WorldSetQuickStepW(IntPtr world, dReal over_relaxation);
  1479. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity]
  1480. public static extern void WorldSetMaxAngularSpeed(IntPtr world, dReal max_speed);
  1481. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStep"), SuppressUnmanagedCodeSecurity]
  1482. public static extern void WorldStep(IntPtr world, dReal stepsize);
  1483. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStepFast1"), SuppressUnmanagedCodeSecurity]
  1484. public static extern void WorldStepFast1(IntPtr world, dReal stepsize, int maxiterations);
  1485. [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldExportDIF"), SuppressUnmanagedCodeSecurity]
  1486. public static extern void WorldExportDIF(IntPtr world, string filename, bool append, string prefix);
  1487. }
  1488. }