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