ODEApi.cs 126 KB

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