diff options
author | UbitUmarov | 2018-01-14 01:40:49 +0000 |
---|---|---|
committer | UbitUmarov | 2018-01-14 01:40:49 +0000 |
commit | 3d87e37d99b0db26847e079f5b1da3ac82412ddc (patch) | |
tree | 18919f5348ea877ab3befb7946fb58ef65403e39 /OpenSim/Region/PhysicsModules/Ode | |
parent | make ubOde PInvoke follow ms coding rules (diff) | |
download | opensim-SC-3d87e37d99b0db26847e079f5b1da3ac82412ddc.zip opensim-SC-3d87e37d99b0db26847e079f5b1da3ac82412ddc.tar.gz opensim-SC-3d87e37d99b0db26847e079f5b1da3ac82412ddc.tar.bz2 opensim-SC-3d87e37d99b0db26847e079f5b1da3ac82412ddc.tar.xz |
make old Ode PInvoke follow ms coding rules
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/PhysicsModules/Ode/ODEApi.cs | 1186 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs | 128 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs | 52 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/Ode/ODEModule.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs | 374 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs | 26 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | 281 |
7 files changed, 1023 insertions, 1026 deletions
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEApi.cs b/OpenSim/Region/PhysicsModules/Ode/ODEApi.cs index c851b12..cc3077e 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODEApi.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODEApi.cs | |||
@@ -55,18 +55,18 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
55 | using dReal = System.Single; | 55 | using dReal = System.Single; |
56 | //#endif | 56 | //#endif |
57 | 57 | ||
58 | public static class d | 58 | internal static class SafeNativeMethods |
59 | { | 59 | { |
60 | public static dReal Infinity = dReal.MaxValue; | 60 | internal static dReal Infinity = dReal.MaxValue; |
61 | public static int NTotalBodies = 0; | 61 | internal static int NTotalBodies = 0; |
62 | public static int NTotalGeoms = 0; | 62 | internal static int NTotalGeoms = 0; |
63 | 63 | ||
64 | public const uint CONTACTS_UNIMPORTANT = 0x80000000; | 64 | internal const uint CONTACTS_UNIMPORTANT = 0x80000000; |
65 | 65 | ||
66 | #region Flags and Enumerations | 66 | #region Flags and Enumerations |
67 | 67 | ||
68 | [Flags] | 68 | [Flags] |
69 | public enum AllocateODEDataFlags : uint | 69 | internal enum AllocateODEDataFlags : uint |
70 | { | 70 | { |
71 | BasicData = 0, | 71 | BasicData = 0, |
72 | CollisionData = 0x00000001, | 72 | CollisionData = 0x00000001, |
@@ -74,13 +74,13 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
74 | } | 74 | } |
75 | 75 | ||
76 | [Flags] | 76 | [Flags] |
77 | public enum IniteODEFlags : uint | 77 | internal enum IniteODEFlags : uint |
78 | { | 78 | { |
79 | dInitFlagManualThreadCleanup = 0x00000001 | 79 | dInitFlagManualThreadCleanup = 0x00000001 |
80 | } | 80 | } |
81 | 81 | ||
82 | [Flags] | 82 | [Flags] |
83 | public enum ContactFlags : int | 83 | internal enum ContactFlags : int |
84 | { | 84 | { |
85 | Mu2 = 0x001, | 85 | Mu2 = 0x001, |
86 | FDir1 = 0x002, | 86 | FDir1 = 0x002, |
@@ -98,7 +98,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
98 | Approx1 = 0x3000 | 98 | Approx1 = 0x3000 |
99 | } | 99 | } |
100 | 100 | ||
101 | public enum GeomClassID : int | 101 | internal enum GeomClassID : int |
102 | { | 102 | { |
103 | SphereClass, | 103 | SphereClass, |
104 | BoxClass, | 104 | BoxClass, |
@@ -122,7 +122,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
122 | MaxUserClasses = 5 | 122 | MaxUserClasses = 5 |
123 | } | 123 | } |
124 | 124 | ||
125 | public enum JointType : int | 125 | internal enum JointType : int |
126 | { | 126 | { |
127 | None, | 127 | None, |
128 | Ball, | 128 | Ball, |
@@ -138,7 +138,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
138 | Plane2D | 138 | Plane2D |
139 | } | 139 | } |
140 | 140 | ||
141 | public enum JointParam : int | 141 | internal enum JointParam : int |
142 | { | 142 | { |
143 | LoStop, | 143 | LoStop, |
144 | HiStop, | 144 | HiStop, |
@@ -175,7 +175,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
175 | SuspensionCFM3 | 175 | SuspensionCFM3 |
176 | } | 176 | } |
177 | 177 | ||
178 | public enum dSweepAndPruneAxis : int | 178 | internal enum dSweepAndPruneAxis : int |
179 | { | 179 | { |
180 | XYZ = ((0)|(1<<2)|(2<<4)), | 180 | XYZ = ((0)|(1<<2)|(2<<4)), |
181 | XZY = ((0)|(2<<2)|(1<<4)), | 181 | XZY = ((0)|(2<<2)|(1<<4)), |
@@ -190,126 +190,126 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
190 | #region Callbacks | 190 | #region Callbacks |
191 | 191 | ||
192 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] | 192 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
193 | public delegate int AABBTestFn(IntPtr o1, IntPtr o2, ref AABB aabb); | 193 | internal delegate int AABBTestFn(IntPtr o1, IntPtr o2, ref AABB aabb); |
194 | 194 | ||
195 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] | 195 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
196 | public delegate int ColliderFn(IntPtr o1, IntPtr o2, int flags, out ContactGeom contact, int skip); | 196 | internal delegate int ColliderFn(IntPtr o1, IntPtr o2, int flags, out ContactGeom contact, int skip); |
197 | 197 | ||
198 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] | 198 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
199 | public delegate void GetAABBFn(IntPtr geom, out AABB aabb); | 199 | internal delegate void GetAABBFn(IntPtr geom, out AABB aabb); |
200 | 200 | ||
201 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] | 201 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
202 | public delegate ColliderFn GetColliderFnFn(int num); | 202 | internal delegate ColliderFn GetColliderFnFn(int num); |
203 | 203 | ||
204 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] | 204 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
205 | public delegate void GeomDtorFn(IntPtr o); | 205 | internal delegate void GeomDtorFn(IntPtr o); |
206 | 206 | ||
207 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] | 207 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
208 | public delegate dReal HeightfieldGetHeight(IntPtr p_user_data, int x, int z); | 208 | internal delegate dReal HeightfieldGetHeight(IntPtr p_user_data, int x, int z); |
209 | 209 | ||
210 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] | 210 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
211 | public delegate dReal OSTerrainGetHeight(IntPtr p_user_data, int x, int z); | 211 | internal delegate dReal OSTerrainGetHeight(IntPtr p_user_data, int x, int z); |
212 | 212 | ||
213 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] | 213 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
214 | public delegate void NearCallback(IntPtr data, IntPtr geom1, IntPtr geom2); | 214 | internal delegate void NearCallback(IntPtr data, IntPtr geom1, IntPtr geom2); |
215 | 215 | ||
216 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] | 216 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
217 | public delegate int TriCallback(IntPtr trimesh, IntPtr refObject, int triangleIndex); | 217 | internal delegate int TriCallback(IntPtr trimesh, IntPtr refObject, int triangleIndex); |
218 | 218 | ||
219 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] | 219 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
220 | public delegate int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount); | 220 | internal delegate int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount); |
221 | 221 | ||
222 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] | 222 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
223 | public delegate int TriRayCallback(IntPtr trimesh, IntPtr ray, int triangleIndex, dReal u, dReal v); | 223 | internal delegate int TriRayCallback(IntPtr trimesh, IntPtr ray, int triangleIndex, dReal u, dReal v); |
224 | 224 | ||
225 | #endregion | 225 | #endregion |
226 | 226 | ||
227 | #region Structs | 227 | #region Structs |
228 | 228 | ||
229 | [StructLayout(LayoutKind.Sequential)] | 229 | [StructLayout(LayoutKind.Sequential)] |
230 | public struct AABB | 230 | internal struct AABB |
231 | { | 231 | { |
232 | public dReal MinX, MaxX; | 232 | internal dReal MinX, MaxX; |
233 | public dReal MinY, MaxY; | 233 | internal dReal MinY, MaxY; |
234 | public dReal MinZ, MaxZ; | 234 | internal dReal MinZ, MaxZ; |
235 | } | 235 | } |
236 | 236 | ||
237 | 237 | ||
238 | [StructLayout(LayoutKind.Sequential)] | 238 | [StructLayout(LayoutKind.Sequential)] |
239 | public struct Contact | 239 | internal struct Contact |
240 | { | 240 | { |
241 | public SurfaceParameters surface; | 241 | internal SurfaceParameters surface; |
242 | public ContactGeom geom; | 242 | internal ContactGeom geom; |
243 | public Vector3 fdir1; | 243 | internal Vector3 fdir1; |
244 | public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(Contact)); | 244 | internal static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(Contact)); |
245 | } | 245 | } |
246 | 246 | ||
247 | 247 | ||
248 | [StructLayout(LayoutKind.Sequential)] | 248 | [StructLayout(LayoutKind.Sequential)] |
249 | public struct ContactGeom | 249 | internal struct ContactGeom |
250 | { | 250 | { |
251 | 251 | ||
252 | public Vector3 pos; | 252 | internal Vector3 pos; |
253 | public Vector3 normal; | 253 | internal Vector3 normal; |
254 | public dReal depth; | 254 | internal dReal depth; |
255 | public IntPtr g1; | 255 | internal IntPtr g1; |
256 | public IntPtr g2; | 256 | internal IntPtr g2; |
257 | public int side1; | 257 | internal int side1; |
258 | public int side2; | 258 | internal int side2; |
259 | public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(ContactGeom)); | 259 | internal static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(ContactGeom)); |
260 | } | 260 | } |
261 | 261 | ||
262 | [StructLayout(LayoutKind.Sequential)] | 262 | [StructLayout(LayoutKind.Sequential)] |
263 | public struct GeomClass | 263 | internal struct GeomClass |
264 | { | 264 | { |
265 | public int bytes; | 265 | internal int bytes; |
266 | public GetColliderFnFn collider; | 266 | internal GetColliderFnFn collider; |
267 | public GetAABBFn aabb; | 267 | internal GetAABBFn aabb; |
268 | public AABBTestFn aabb_test; | 268 | internal AABBTestFn aabb_test; |
269 | public GeomDtorFn dtor; | 269 | internal GeomDtorFn dtor; |
270 | } | 270 | } |
271 | 271 | ||
272 | 272 | ||
273 | [StructLayout(LayoutKind.Sequential)] | 273 | [StructLayout(LayoutKind.Sequential)] |
274 | public struct JointFeedback | 274 | internal struct JointFeedback |
275 | { | 275 | { |
276 | public Vector3 f1; | 276 | internal Vector3 f1; |
277 | public Vector3 t1; | 277 | internal Vector3 t1; |
278 | public Vector3 f2; | 278 | internal Vector3 f2; |
279 | public Vector3 t2; | 279 | internal Vector3 t2; |
280 | } | 280 | } |
281 | 281 | ||
282 | 282 | ||
283 | [StructLayout(LayoutKind.Sequential)] | 283 | [StructLayout(LayoutKind.Sequential)] |
284 | public struct Mass | 284 | internal struct Mass |
285 | { | 285 | { |
286 | public dReal mass; | 286 | internal dReal mass; |
287 | public Vector4 c; | 287 | internal Vector4 c; |
288 | public Matrix3 I; | 288 | internal Matrix3 I; |
289 | } | 289 | } |
290 | 290 | ||
291 | 291 | ||
292 | [StructLayout(LayoutKind.Sequential)] | 292 | [StructLayout(LayoutKind.Sequential)] |
293 | public struct Matrix3 | 293 | internal struct Matrix3 |
294 | { | 294 | { |
295 | public Matrix3(dReal m00, dReal m10, dReal m20, dReal m01, dReal m11, dReal m21, dReal m02, dReal m12, dReal m22) | 295 | internal Matrix3(dReal m00, dReal m10, dReal m20, dReal m01, dReal m11, dReal m21, dReal m02, dReal m12, dReal m22) |
296 | { | 296 | { |
297 | M00 = m00; M10 = m10; M20 = m20; _m30 = 0.0f; | 297 | M00 = m00; M10 = m10; M20 = m20; _m30 = 0.0f; |
298 | M01 = m01; M11 = m11; M21 = m21; _m31 = 0.0f; | 298 | M01 = m01; M11 = m11; M21 = m21; _m31 = 0.0f; |
299 | M02 = m02; M12 = m12; M22 = m22; _m32 = 0.0f; | 299 | M02 = m02; M12 = m12; M22 = m22; _m32 = 0.0f; |
300 | } | 300 | } |
301 | public dReal M00, M10, M20; | 301 | internal dReal M00, M10, M20; |
302 | private dReal _m30; | 302 | private dReal _m30; |
303 | public dReal M01, M11, M21; | 303 | internal dReal M01, M11, M21; |
304 | private dReal _m31; | 304 | private dReal _m31; |
305 | public dReal M02, M12, M22; | 305 | internal dReal M02, M12, M22; |
306 | private dReal _m32; | 306 | private dReal _m32; |
307 | } | 307 | } |
308 | 308 | ||
309 | [StructLayout(LayoutKind.Sequential)] | 309 | [StructLayout(LayoutKind.Sequential)] |
310 | public struct Matrix4 | 310 | internal struct Matrix4 |
311 | { | 311 | { |
312 | public Matrix4(dReal m00, dReal m10, dReal m20, dReal m30, | 312 | internal Matrix4(dReal m00, dReal m10, dReal m20, dReal m30, |
313 | dReal m01, dReal m11, dReal m21, dReal m31, | 313 | dReal m01, dReal m11, dReal m21, dReal m31, |
314 | dReal m02, dReal m12, dReal m22, dReal m32, | 314 | dReal m02, dReal m12, dReal m22, dReal m32, |
315 | dReal m03, dReal m13, dReal m23, dReal m33) | 315 | dReal m03, dReal m13, dReal m23, dReal m33) |
@@ -319,312 +319,312 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
319 | M02 = m02; M12 = m12; M22 = m22; M32 = m32; | 319 | M02 = m02; M12 = m12; M22 = m22; M32 = m32; |
320 | M03 = m03; M13 = m13; M23 = m23; M33 = m33; | 320 | M03 = m03; M13 = m13; M23 = m23; M33 = m33; |
321 | } | 321 | } |
322 | public dReal M00, M10, M20, M30; | 322 | internal dReal M00, M10, M20, M30; |
323 | public dReal M01, M11, M21, M31; | 323 | internal dReal M01, M11, M21, M31; |
324 | public dReal M02, M12, M22, M32; | 324 | internal dReal M02, M12, M22, M32; |
325 | public dReal M03, M13, M23, M33; | 325 | internal dReal M03, M13, M23, M33; |
326 | } | 326 | } |
327 | 327 | ||
328 | [StructLayout(LayoutKind.Sequential)] | 328 | [StructLayout(LayoutKind.Sequential)] |
329 | public struct Quaternion | 329 | internal struct Quaternion |
330 | { | 330 | { |
331 | public dReal W, X, Y, Z; | 331 | internal dReal W, X, Y, Z; |
332 | } | 332 | } |
333 | 333 | ||
334 | 334 | ||
335 | [StructLayout(LayoutKind.Sequential)] | 335 | [StructLayout(LayoutKind.Sequential)] |
336 | public struct SurfaceParameters | 336 | internal struct SurfaceParameters |
337 | { | 337 | { |
338 | public ContactFlags mode; | 338 | internal ContactFlags mode; |
339 | public dReal mu; | 339 | internal dReal mu; |
340 | public dReal mu2; | 340 | internal dReal mu2; |
341 | public dReal bounce; | 341 | internal dReal bounce; |
342 | public dReal bounce_vel; | 342 | internal dReal bounce_vel; |
343 | public dReal soft_erp; | 343 | internal dReal soft_erp; |
344 | public dReal soft_cfm; | 344 | internal dReal soft_cfm; |
345 | public dReal motion1; | 345 | internal dReal motion1; |
346 | public dReal motion2; | 346 | internal dReal motion2; |
347 | public dReal motionN; | 347 | internal dReal motionN; |
348 | public dReal slip1; | 348 | internal dReal slip1; |
349 | public dReal slip2; | 349 | internal dReal slip2; |
350 | } | 350 | } |
351 | 351 | ||
352 | 352 | ||
353 | [StructLayout(LayoutKind.Sequential)] | 353 | [StructLayout(LayoutKind.Sequential)] |
354 | public struct Vector3 | 354 | internal struct Vector3 |
355 | { | 355 | { |
356 | public Vector3(dReal x, dReal y, dReal z) | 356 | internal Vector3(dReal x, dReal y, dReal z) |
357 | { | 357 | { |
358 | X = x; Y = y; Z = z; _w = 0.0f; | 358 | X = x; Y = y; Z = z; _w = 0.0f; |
359 | } | 359 | } |
360 | public dReal X, Y, Z; | 360 | internal dReal X, Y, Z; |
361 | private dReal _w; | 361 | private dReal _w; |
362 | } | 362 | } |
363 | 363 | ||
364 | 364 | ||
365 | [StructLayout(LayoutKind.Sequential)] | 365 | [StructLayout(LayoutKind.Sequential)] |
366 | public struct Vector4 | 366 | internal struct Vector4 |
367 | { | 367 | { |
368 | public Vector4(dReal x, dReal y, dReal z, dReal w) | 368 | internal Vector4(dReal x, dReal y, dReal z, dReal w) |
369 | { | 369 | { |
370 | X = x; Y = y; Z = z; W = w; | 370 | X = x; Y = y; Z = z; W = w; |
371 | } | 371 | } |
372 | public dReal X, Y, Z, W; | 372 | internal dReal X, Y, Z, W; |
373 | } | 373 | } |
374 | 374 | ||
375 | #endregion | 375 | #endregion |
376 | 376 | ||
377 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAllocateODEDataForThread"), SuppressUnmanagedCodeSecurity] | 377 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAllocateODEDataForThread"), SuppressUnmanagedCodeSecurity] |
378 | public static extern int AllocateODEDataForThread(uint ODEInitFlags); | 378 | internal static extern int AllocateODEDataForThread(uint ODEInitFlags); |
379 | 379 | ||
380 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnected"), SuppressUnmanagedCodeSecurity] | 380 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnected"), SuppressUnmanagedCodeSecurity] |
381 | public static extern bool AreConnected(IntPtr b1, IntPtr b2); | 381 | internal static extern bool AreConnected(IntPtr b1, IntPtr b2); |
382 | 382 | ||
383 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnectedExcluding"), SuppressUnmanagedCodeSecurity] | 383 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnectedExcluding"), SuppressUnmanagedCodeSecurity] |
384 | public static extern bool AreConnectedExcluding(IntPtr b1, IntPtr b2, JointType joint_type); | 384 | internal static extern bool AreConnectedExcluding(IntPtr b1, IntPtr b2, JointType joint_type); |
385 | 385 | ||
386 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForce"), SuppressUnmanagedCodeSecurity] | 386 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForce"), SuppressUnmanagedCodeSecurity] |
387 | public static extern void BodyAddForce(IntPtr body, dReal fx, dReal fy, dReal fz); | 387 | internal static extern void BodyAddForce(IntPtr body, dReal fx, dReal fy, dReal fz); |
388 | 388 | ||
389 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtPos"), SuppressUnmanagedCodeSecurity] | 389 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtPos"), SuppressUnmanagedCodeSecurity] |
390 | public static extern void BodyAddForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); | 390 | internal static extern void BodyAddForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); |
391 | 391 | ||
392 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtRelPos"), SuppressUnmanagedCodeSecurity] | 392 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtRelPos"), SuppressUnmanagedCodeSecurity] |
393 | public static extern void BodyAddForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); | 393 | internal static extern void BodyAddForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); |
394 | 394 | ||
395 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForce"), SuppressUnmanagedCodeSecurity] | 395 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForce"), SuppressUnmanagedCodeSecurity] |
396 | public static extern void BodyAddRelForce(IntPtr body, dReal fx, dReal fy, dReal fz); | 396 | internal static extern void BodyAddRelForce(IntPtr body, dReal fx, dReal fy, dReal fz); |
397 | 397 | ||
398 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtPos"), SuppressUnmanagedCodeSecurity] | 398 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtPos"), SuppressUnmanagedCodeSecurity] |
399 | public static extern void BodyAddRelForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); | 399 | internal static extern void BodyAddRelForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); |
400 | 400 | ||
401 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtRelPos"), SuppressUnmanagedCodeSecurity] | 401 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtRelPos"), SuppressUnmanagedCodeSecurity] |
402 | public static extern void BodyAddRelForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); | 402 | internal static extern void BodyAddRelForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); |
403 | 403 | ||
404 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelTorque"), SuppressUnmanagedCodeSecurity] | 404 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelTorque"), SuppressUnmanagedCodeSecurity] |
405 | public static extern void BodyAddRelTorque(IntPtr body, dReal fx, dReal fy, dReal fz); | 405 | internal static extern void BodyAddRelTorque(IntPtr body, dReal fx, dReal fy, dReal fz); |
406 | 406 | ||
407 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddTorque"), SuppressUnmanagedCodeSecurity] | 407 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddTorque"), SuppressUnmanagedCodeSecurity] |
408 | public static extern void BodyAddTorque(IntPtr body, dReal fx, dReal fy, dReal fz); | 408 | internal static extern void BodyAddTorque(IntPtr body, dReal fx, dReal fy, dReal fz); |
409 | 409 | ||
410 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity] | 410 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity] |
411 | public static extern void BodyCopyPosition(IntPtr body, out Vector3 pos); | 411 | internal static extern void BodyCopyPosition(IntPtr body, out Vector3 pos); |
412 | 412 | ||
413 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity] | 413 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity] |
414 | public static extern void BodyCopyPosition(IntPtr body, out dReal X); | 414 | internal static extern void BodyCopyPosition(IntPtr body, out dReal X); |
415 | 415 | ||
416 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity] | 416 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity] |
417 | public static extern void BodyCopyQuaternion(IntPtr body, out Quaternion quat); | 417 | internal static extern void BodyCopyQuaternion(IntPtr body, out Quaternion quat); |
418 | 418 | ||
419 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity] | 419 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity] |
420 | public static extern void BodyCopyQuaternion(IntPtr body, out dReal X); | 420 | internal static extern void BodyCopyQuaternion(IntPtr body, out dReal X); |
421 | 421 | ||
422 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity] | 422 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity] |
423 | public static extern void BodyCopyRotation(IntPtr body, out Matrix3 R); | 423 | internal static extern void BodyCopyRotation(IntPtr body, out Matrix3 R); |
424 | 424 | ||
425 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity] | 425 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity] |
426 | public static extern void BodyCopyRotation(IntPtr body, out dReal M00); | 426 | internal static extern void BodyCopyRotation(IntPtr body, out dReal M00); |
427 | 427 | ||
428 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCreate"), SuppressUnmanagedCodeSecurity] | 428 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCreate"), SuppressUnmanagedCodeSecurity] |
429 | public static extern IntPtr BodyiCreate(IntPtr world); | 429 | internal static extern IntPtr BodyiCreate(IntPtr world); |
430 | public static IntPtr BodyCreate(IntPtr world) | 430 | internal static IntPtr BodyCreate(IntPtr world) |
431 | { | 431 | { |
432 | NTotalBodies++; | 432 | NTotalBodies++; |
433 | return BodyiCreate(world); | 433 | return BodyiCreate(world); |
434 | } | 434 | } |
435 | 435 | ||
436 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDestroy"), SuppressUnmanagedCodeSecurity] | 436 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDestroy"), SuppressUnmanagedCodeSecurity] |
437 | public static extern void BodyiDestroy(IntPtr body); | 437 | internal static extern void BodyiDestroy(IntPtr body); |
438 | public static void BodyDestroy(IntPtr body) | 438 | internal static void BodyDestroy(IntPtr body) |
439 | { | 439 | { |
440 | NTotalBodies--; | 440 | NTotalBodies--; |
441 | BodyiDestroy(body); | 441 | BodyiDestroy(body); |
442 | } | 442 | } |
443 | 443 | ||
444 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDisable"), SuppressUnmanagedCodeSecurity] | 444 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDisable"), SuppressUnmanagedCodeSecurity] |
445 | public static extern void BodyDisable(IntPtr body); | 445 | internal static extern void BodyDisable(IntPtr body); |
446 | 446 | ||
447 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyEnable"), SuppressUnmanagedCodeSecurity] | 447 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyEnable"), SuppressUnmanagedCodeSecurity] |
448 | public static extern void BodyEnable(IntPtr body); | 448 | internal static extern void BodyEnable(IntPtr body); |
449 | 449 | ||
450 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] | 450 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] |
451 | public static extern dReal BodyGetAutoDisableAngularThreshold(IntPtr body); | 451 | internal static extern dReal BodyGetAutoDisableAngularThreshold(IntPtr body); |
452 | 452 | ||
453 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] | 453 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] |
454 | public static extern bool BodyGetAutoDisableFlag(IntPtr body); | 454 | internal static extern bool BodyGetAutoDisableFlag(IntPtr body); |
455 | 455 | ||
456 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity] | 456 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity] |
457 | public static extern void BodyGetAutoDisableDefaults(IntPtr body); | 457 | internal static extern void BodyGetAutoDisableDefaults(IntPtr body); |
458 | 458 | ||
459 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] | 459 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] |
460 | public static extern dReal BodyGetAutoDisableLinearThreshold(IntPtr body); | 460 | internal static extern dReal BodyGetAutoDisableLinearThreshold(IntPtr body); |
461 | 461 | ||
462 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] | 462 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] |
463 | public static extern int BodyGetAutoDisableSteps(IntPtr body); | 463 | internal static extern int BodyGetAutoDisableSteps(IntPtr body); |
464 | 464 | ||
465 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableTime"), SuppressUnmanagedCodeSecurity] | 465 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableTime"), SuppressUnmanagedCodeSecurity] |
466 | public static extern dReal BodyGetAutoDisableTime(IntPtr body); | 466 | internal static extern dReal BodyGetAutoDisableTime(IntPtr body); |
467 | 467 | ||
468 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularVel"), SuppressUnmanagedCodeSecurity] | 468 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularVel"), SuppressUnmanagedCodeSecurity] |
469 | public extern unsafe static Vector3* BodyGetAngularVelUnsafe(IntPtr body); | 469 | internal extern unsafe static Vector3* BodyGetAngularVelUnsafe(IntPtr body); |
470 | public static Vector3 BodyGetAngularVel(IntPtr body) | 470 | internal static Vector3 BodyGetAngularVel(IntPtr body) |
471 | { | 471 | { |
472 | unsafe { return *(BodyGetAngularVelUnsafe(body)); } | 472 | unsafe { return *(BodyGetAngularVelUnsafe(body)); } |
473 | } | 473 | } |
474 | 474 | ||
475 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetData"), SuppressUnmanagedCodeSecurity] | 475 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetData"), SuppressUnmanagedCodeSecurity] |
476 | public static extern IntPtr BodyGetData(IntPtr body); | 476 | internal static extern IntPtr BodyGetData(IntPtr body); |
477 | 477 | ||
478 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationMode"), SuppressUnmanagedCodeSecurity] | 478 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationMode"), SuppressUnmanagedCodeSecurity] |
479 | public static extern int BodyGetFiniteRotationMode(IntPtr body); | 479 | internal static extern int BodyGetFiniteRotationMode(IntPtr body); |
480 | 480 | ||
481 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity] | 481 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity] |
482 | public static extern void BodyGetFiniteRotationAxis(IntPtr body, out Vector3 result); | 482 | internal static extern void BodyGetFiniteRotationAxis(IntPtr body, out Vector3 result); |
483 | 483 | ||
484 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetForce"), SuppressUnmanagedCodeSecurity] | 484 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetForce"), SuppressUnmanagedCodeSecurity] |
485 | public extern unsafe static Vector3* BodyGetForceUnsafe(IntPtr body); | 485 | internal extern unsafe static Vector3* BodyGetForceUnsafe(IntPtr body); |
486 | public static Vector3 BodyGetForce(IntPtr body) | 486 | internal static Vector3 BodyGetForce(IntPtr body) |
487 | { | 487 | { |
488 | unsafe { return *(BodyGetForceUnsafe(body)); } | 488 | unsafe { return *(BodyGetForceUnsafe(body)); } |
489 | } | 489 | } |
490 | 490 | ||
491 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGravityMode"), SuppressUnmanagedCodeSecurity] | 491 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGravityMode"), SuppressUnmanagedCodeSecurity] |
492 | public static extern bool BodyGetGravityMode(IntPtr body); | 492 | internal static extern bool BodyGetGravityMode(IntPtr body); |
493 | 493 | ||
494 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGyroscopicMode"), SuppressUnmanagedCodeSecurity] | 494 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGyroscopicMode"), SuppressUnmanagedCodeSecurity] |
495 | public static extern int BodyGetGyroscopicMode(IntPtr body); | 495 | internal static extern int BodyGetGyroscopicMode(IntPtr body); |
496 | 496 | ||
497 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetJoint"), SuppressUnmanagedCodeSecurity] | 497 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetJoint"), SuppressUnmanagedCodeSecurity] |
498 | public static extern IntPtr BodyGetJoint(IntPtr body, int index); | 498 | internal static extern IntPtr BodyGetJoint(IntPtr body, int index); |
499 | 499 | ||
500 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearVel"), SuppressUnmanagedCodeSecurity] | 500 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearVel"), SuppressUnmanagedCodeSecurity] |
501 | public extern unsafe static Vector3* BodyGetLinearVelUnsafe(IntPtr body); | 501 | internal extern unsafe static Vector3* BodyGetLinearVelUnsafe(IntPtr body); |
502 | public static Vector3 BodyGetLinearVel(IntPtr body) | 502 | internal static Vector3 BodyGetLinearVel(IntPtr body) |
503 | { | 503 | { |
504 | unsafe { return *(BodyGetLinearVelUnsafe(body)); } | 504 | unsafe { return *(BodyGetLinearVelUnsafe(body)); } |
505 | } | 505 | } |
506 | 506 | ||
507 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetMass"), SuppressUnmanagedCodeSecurity] | 507 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetMass"), SuppressUnmanagedCodeSecurity] |
508 | public static extern void BodyGetMass(IntPtr body, out Mass mass); | 508 | internal static extern void BodyGetMass(IntPtr body, out Mass mass); |
509 | 509 | ||
510 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetNumJoints"), SuppressUnmanagedCodeSecurity] | 510 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetNumJoints"), SuppressUnmanagedCodeSecurity] |
511 | public static extern int BodyGetNumJoints(IntPtr body); | 511 | internal static extern int BodyGetNumJoints(IntPtr body); |
512 | 512 | ||
513 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPointVel"), SuppressUnmanagedCodeSecurity] | 513 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPointVel"), SuppressUnmanagedCodeSecurity] |
514 | public static extern void BodyGetPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); | 514 | internal static extern void BodyGetPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); |
515 | 515 | ||
516 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosition"), SuppressUnmanagedCodeSecurity] | 516 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosition"), SuppressUnmanagedCodeSecurity] |
517 | public extern unsafe static Vector3* BodyGetPositionUnsafe(IntPtr body); | 517 | internal extern unsafe static Vector3* BodyGetPositionUnsafe(IntPtr body); |
518 | public static Vector3 BodyGetPosition(IntPtr body) | 518 | internal static Vector3 BodyGetPosition(IntPtr body) |
519 | { | 519 | { |
520 | unsafe { return *(BodyGetPositionUnsafe(body)); } | 520 | unsafe { return *(BodyGetPositionUnsafe(body)); } |
521 | } | 521 | } |
522 | 522 | ||
523 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosRelPoint"), SuppressUnmanagedCodeSecurity] | 523 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosRelPoint"), SuppressUnmanagedCodeSecurity] |
524 | public static extern void BodyGetPosRelPoint(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); | 524 | internal static extern void BodyGetPosRelPoint(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); |
525 | 525 | ||
526 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetQuaternion"), SuppressUnmanagedCodeSecurity] | 526 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetQuaternion"), SuppressUnmanagedCodeSecurity] |
527 | public extern unsafe static Quaternion* BodyGetQuaternionUnsafe(IntPtr body); | 527 | internal extern unsafe static Quaternion* BodyGetQuaternionUnsafe(IntPtr body); |
528 | public static Quaternion BodyGetQuaternion(IntPtr body) | 528 | internal static Quaternion BodyGetQuaternion(IntPtr body) |
529 | { | 529 | { |
530 | unsafe { return *(BodyGetQuaternionUnsafe(body)); } | 530 | unsafe { return *(BodyGetQuaternionUnsafe(body)); } |
531 | } | 531 | } |
532 | 532 | ||
533 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointPos"), SuppressUnmanagedCodeSecurity] | 533 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointPos"), SuppressUnmanagedCodeSecurity] |
534 | public static extern void BodyGetRelPointPos(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); | 534 | internal static extern void BodyGetRelPointPos(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); |
535 | 535 | ||
536 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointVel"), SuppressUnmanagedCodeSecurity] | 536 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointVel"), SuppressUnmanagedCodeSecurity] |
537 | public static extern void BodyGetRelPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); | 537 | internal static extern void BodyGetRelPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); |
538 | 538 | ||
539 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRotation"), SuppressUnmanagedCodeSecurity] | 539 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRotation"), SuppressUnmanagedCodeSecurity] |
540 | public extern unsafe static Matrix3* BodyGetRotationUnsafe(IntPtr body); | 540 | internal extern unsafe static Matrix3* BodyGetRotationUnsafe(IntPtr body); |
541 | public static Matrix3 BodyGetRotation(IntPtr body) | 541 | internal static Matrix3 BodyGetRotation(IntPtr body) |
542 | { | 542 | { |
543 | unsafe { return *(BodyGetRotationUnsafe(body)); } | 543 | unsafe { return *(BodyGetRotationUnsafe(body)); } |
544 | } | 544 | } |
545 | 545 | ||
546 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetTorque"), SuppressUnmanagedCodeSecurity] | 546 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetTorque"), SuppressUnmanagedCodeSecurity] |
547 | public extern unsafe static Vector3* BodyGetTorqueUnsafe(IntPtr body); | 547 | internal extern unsafe static Vector3* BodyGetTorqueUnsafe(IntPtr body); |
548 | public static Vector3 BodyGetTorque(IntPtr body) | 548 | internal static Vector3 BodyGetTorque(IntPtr body) |
549 | { | 549 | { |
550 | unsafe { return *(BodyGetTorqueUnsafe(body)); } | 550 | unsafe { return *(BodyGetTorqueUnsafe(body)); } |
551 | } | 551 | } |
552 | 552 | ||
553 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetWorld"), SuppressUnmanagedCodeSecurity] | 553 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetWorld"), SuppressUnmanagedCodeSecurity] |
554 | public static extern IntPtr BodyGetWorld(IntPtr body); | 554 | internal static extern IntPtr BodyGetWorld(IntPtr body); |
555 | 555 | ||
556 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFirstGeom"), SuppressUnmanagedCodeSecurity] | 556 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFirstGeom"), SuppressUnmanagedCodeSecurity] |
557 | public static extern IntPtr BodyGetFirstGeom(IntPtr body); | 557 | internal static extern IntPtr BodyGetFirstGeom(IntPtr body); |
558 | 558 | ||
559 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetNextGeom"), SuppressUnmanagedCodeSecurity] | 559 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetNextGeom"), SuppressUnmanagedCodeSecurity] |
560 | public static extern IntPtr dBodyGetNextGeom(IntPtr Geom); | 560 | internal static extern IntPtr dBodyGetNextGeom(IntPtr Geom); |
561 | 561 | ||
562 | 562 | ||
563 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyIsEnabled"), SuppressUnmanagedCodeSecurity] | 563 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyIsEnabled"), SuppressUnmanagedCodeSecurity] |
564 | public static extern bool BodyIsEnabled(IntPtr body); | 564 | internal static extern bool BodyIsEnabled(IntPtr body); |
565 | 565 | ||
566 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularVel"), SuppressUnmanagedCodeSecurity] | 566 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularVel"), SuppressUnmanagedCodeSecurity] |
567 | public static extern void BodySetAngularVel(IntPtr body, dReal x, dReal y, dReal z); | 567 | internal static extern void BodySetAngularVel(IntPtr body, dReal x, dReal y, dReal z); |
568 | 568 | ||
569 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] | 569 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] |
570 | public static extern void BodySetAutoDisableAngularThreshold(IntPtr body, dReal angular_threshold); | 570 | internal static extern void BodySetAutoDisableAngularThreshold(IntPtr body, dReal angular_threshold); |
571 | 571 | ||
572 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity] | 572 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity] |
573 | public static extern void BodySetAutoDisableDefaults(IntPtr body); | 573 | internal static extern void BodySetAutoDisableDefaults(IntPtr body); |
574 | 574 | ||
575 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] | 575 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] |
576 | public static extern void BodySetAutoDisableFlag(IntPtr body, bool do_auto_disable); | 576 | internal static extern void BodySetAutoDisableFlag(IntPtr body, bool do_auto_disable); |
577 | 577 | ||
578 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] | 578 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] |
579 | public static extern void BodySetAutoDisableLinearThreshold(IntPtr body, dReal linear_threshold); | 579 | internal static extern void BodySetAutoDisableLinearThreshold(IntPtr body, dReal linear_threshold); |
580 | 580 | ||
581 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] | 581 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] |
582 | public static extern void BodySetAutoDisableSteps(IntPtr body, int steps); | 582 | internal static extern void BodySetAutoDisableSteps(IntPtr body, int steps); |
583 | 583 | ||
584 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableTime"), SuppressUnmanagedCodeSecurity] | 584 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableTime"), SuppressUnmanagedCodeSecurity] |
585 | public static extern void BodySetAutoDisableTime(IntPtr body, dReal time); | 585 | internal static extern void BodySetAutoDisableTime(IntPtr body, dReal time); |
586 | 586 | ||
587 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetData"), SuppressUnmanagedCodeSecurity] | 587 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetData"), SuppressUnmanagedCodeSecurity] |
588 | public static extern void BodySetData(IntPtr body, IntPtr data); | 588 | internal static extern void BodySetData(IntPtr body, IntPtr data); |
589 | 589 | ||
590 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationMode"), SuppressUnmanagedCodeSecurity] | 590 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationMode"), SuppressUnmanagedCodeSecurity] |
591 | public static extern void BodySetFiniteRotationMode(IntPtr body, int mode); | 591 | internal static extern void BodySetFiniteRotationMode(IntPtr body, int mode); |
592 | 592 | ||
593 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity] | 593 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity] |
594 | public static extern void BodySetFiniteRotationAxis(IntPtr body, dReal x, dReal y, dReal z); | 594 | internal static extern void BodySetFiniteRotationAxis(IntPtr body, dReal x, dReal y, dReal z); |
595 | 595 | ||
596 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearDamping"), SuppressUnmanagedCodeSecurity] | 596 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearDamping"), SuppressUnmanagedCodeSecurity] |
597 | public static extern void BodySetLinearDamping(IntPtr body, dReal scale); | 597 | internal static extern void BodySetLinearDamping(IntPtr body, dReal scale); |
598 | 598 | ||
599 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularDamping"), SuppressUnmanagedCodeSecurity] | 599 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularDamping"), SuppressUnmanagedCodeSecurity] |
600 | public static extern void BodySetAngularDamping(IntPtr body, dReal scale); | 600 | internal static extern void BodySetAngularDamping(IntPtr body, dReal scale); |
601 | 601 | ||
602 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearDamping"), SuppressUnmanagedCodeSecurity] | 602 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearDamping"), SuppressUnmanagedCodeSecurity] |
603 | public static extern dReal BodyGetLinearDamping(IntPtr body); | 603 | internal static extern dReal BodyGetLinearDamping(IntPtr body); |
604 | 604 | ||
605 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularDamping"), SuppressUnmanagedCodeSecurity] | 605 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularDamping"), SuppressUnmanagedCodeSecurity] |
606 | public static extern dReal BodyGetAngularDamping(IntPtr body); | 606 | internal static extern dReal BodyGetAngularDamping(IntPtr body); |
607 | 607 | ||
608 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularDamping"), SuppressUnmanagedCodeSecurity] | 608 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularDamping"), SuppressUnmanagedCodeSecurity] |
609 | public static extern void BodySetDamping(IntPtr body, dReal linear_scale, dReal angular_scale); | 609 | internal static extern void BodySetDamping(IntPtr body, dReal linear_scale, dReal angular_scale); |
610 | 610 | ||
611 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] | 611 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] |
612 | public static extern void BodySetAngularDampingThreshold(IntPtr body, dReal threshold); | 612 | internal static extern void BodySetAngularDampingThreshold(IntPtr body, dReal threshold); |
613 | 613 | ||
614 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] | 614 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] |
615 | public static extern void BodySetLinearDampingThreshold(IntPtr body, dReal threshold); | 615 | internal static extern void BodySetLinearDampingThreshold(IntPtr body, dReal threshold); |
616 | 616 | ||
617 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] | 617 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] |
618 | public static extern dReal BodyGetLinearDampingThreshold(IntPtr body); | 618 | internal static extern dReal BodyGetLinearDampingThreshold(IntPtr body); |
619 | 619 | ||
620 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] | 620 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] |
621 | public static extern dReal BodyGetAngularDampingThreshold(IntPtr body); | 621 | internal static extern dReal BodyGetAngularDampingThreshold(IntPtr body); |
622 | 622 | ||
623 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetForce"), SuppressUnmanagedCodeSecurity] | 623 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetForce"), SuppressUnmanagedCodeSecurity] |
624 | public static extern void BodySetForce(IntPtr body, dReal x, dReal y, dReal z); | 624 | internal static extern void BodySetForce(IntPtr body, dReal x, dReal y, dReal z); |
625 | 625 | ||
626 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGravityMode"), SuppressUnmanagedCodeSecurity] | 626 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGravityMode"), SuppressUnmanagedCodeSecurity] |
627 | public static extern void BodySetGravityMode(IntPtr body, bool mode); | 627 | internal static extern void BodySetGravityMode(IntPtr body, bool mode); |
628 | 628 | ||
629 | /// <summary> | 629 | /// <summary> |
630 | /// Sets the Gyroscopic term status on the body specified. | 630 | /// Sets the Gyroscopic term status on the body specified. |
@@ -632,112 +632,112 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
632 | /// <param name="body">Pointer to body</param> | 632 | /// <param name="body">Pointer to body</param> |
633 | /// <param name="enabled">NonZero enabled, Zero disabled</param> | 633 | /// <param name="enabled">NonZero enabled, Zero disabled</param> |
634 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGyroscopicMode"), SuppressUnmanagedCodeSecurity] | 634 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGyroscopicMode"), SuppressUnmanagedCodeSecurity] |
635 | public static extern void dBodySetGyroscopicMode(IntPtr body, int enabled); | 635 | internal static extern void dBodySetGyroscopicMode(IntPtr body, int enabled); |
636 | 636 | ||
637 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearVel"), SuppressUnmanagedCodeSecurity] | 637 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearVel"), SuppressUnmanagedCodeSecurity] |
638 | public static extern void BodySetLinearVel(IntPtr body, dReal x, dReal y, dReal z); | 638 | internal static extern void BodySetLinearVel(IntPtr body, dReal x, dReal y, dReal z); |
639 | 639 | ||
640 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetMass"), SuppressUnmanagedCodeSecurity] | 640 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetMass"), SuppressUnmanagedCodeSecurity] |
641 | public static extern void BodySetMass(IntPtr body, ref Mass mass); | 641 | internal static extern void BodySetMass(IntPtr body, ref Mass mass); |
642 | 642 | ||
643 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetPosition"), SuppressUnmanagedCodeSecurity] | 643 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetPosition"), SuppressUnmanagedCodeSecurity] |
644 | public static extern void BodySetPosition(IntPtr body, dReal x, dReal y, dReal z); | 644 | internal static extern void BodySetPosition(IntPtr body, dReal x, dReal y, dReal z); |
645 | 645 | ||
646 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity] | 646 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity] |
647 | public static extern void BodySetQuaternion(IntPtr body, ref Quaternion q); | 647 | internal static extern void BodySetQuaternion(IntPtr body, ref Quaternion q); |
648 | 648 | ||
649 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity] | 649 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity] |
650 | public static extern void BodySetQuaternion(IntPtr body, ref dReal w); | 650 | internal static extern void BodySetQuaternion(IntPtr body, ref dReal w); |
651 | 651 | ||
652 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity] | 652 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity] |
653 | public static extern void BodySetRotation(IntPtr body, ref Matrix3 R); | 653 | internal static extern void BodySetRotation(IntPtr body, ref Matrix3 R); |
654 | 654 | ||
655 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity] | 655 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity] |
656 | public static extern void BodySetRotation(IntPtr body, ref dReal M00); | 656 | internal static extern void BodySetRotation(IntPtr body, ref dReal M00); |
657 | 657 | ||
658 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetTorque"), SuppressUnmanagedCodeSecurity] | 658 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetTorque"), SuppressUnmanagedCodeSecurity] |
659 | public static extern void BodySetTorque(IntPtr body, dReal x, dReal y, dReal z); | 659 | internal static extern void BodySetTorque(IntPtr body, dReal x, dReal y, dReal z); |
660 | 660 | ||
661 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorFromWorld"), SuppressUnmanagedCodeSecurity] | 661 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorFromWorld"), SuppressUnmanagedCodeSecurity] |
662 | public static extern void BodyVectorFromWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); | 662 | internal static extern void BodyVectorFromWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); |
663 | 663 | ||
664 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorToWorld"), SuppressUnmanagedCodeSecurity] | 664 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorToWorld"), SuppressUnmanagedCodeSecurity] |
665 | public static extern void BodyVectorToWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); | 665 | internal static extern void BodyVectorToWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); |
666 | 666 | ||
667 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxBox"), SuppressUnmanagedCodeSecurity] | 667 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxBox"), SuppressUnmanagedCodeSecurity] |
668 | public static extern void BoxBox(ref Vector3 p1, ref Matrix3 R1, | 668 | internal static extern void BoxBox(ref Vector3 p1, ref Matrix3 R1, |
669 | ref Vector3 side1, ref Vector3 p2, | 669 | ref Vector3 side1, ref Vector3 p2, |
670 | ref Matrix3 R2, ref Vector3 side2, | 670 | ref Matrix3 R2, ref Vector3 side2, |
671 | ref Vector3 normal, out dReal depth, out int return_code, | 671 | ref Vector3 normal, out dReal depth, out int return_code, |
672 | int maxc, out ContactGeom contact, int skip); | 672 | int maxc, out ContactGeom contact, int skip); |
673 | 673 | ||
674 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxTouchesBox"), SuppressUnmanagedCodeSecurity] | 674 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxTouchesBox"), SuppressUnmanagedCodeSecurity] |
675 | public static extern void BoxTouchesBox(ref Vector3 _p1, ref Matrix3 R1, | 675 | internal static extern void BoxTouchesBox(ref Vector3 _p1, ref Matrix3 R1, |
676 | ref Vector3 side1, ref Vector3 _p2, | 676 | ref Vector3 side1, ref Vector3 _p2, |
677 | ref Matrix3 R2, ref Vector3 side2); | 677 | ref Matrix3 R2, ref Vector3 side2); |
678 | 678 | ||
679 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCleanupODEAllDataForThread"), SuppressUnmanagedCodeSecurity] | 679 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCleanupODEAllDataForThread"), SuppressUnmanagedCodeSecurity] |
680 | public static extern void CleanupODEAllDataForThread(); | 680 | internal static extern void CleanupODEAllDataForThread(); |
681 | 681 | ||
682 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dClosestLineSegmentPoints"), SuppressUnmanagedCodeSecurity] | 682 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dClosestLineSegmentPoints"), SuppressUnmanagedCodeSecurity] |
683 | public static extern void ClosestLineSegmentPoints(ref Vector3 a1, ref Vector3 a2, | 683 | internal static extern void ClosestLineSegmentPoints(ref Vector3 a1, ref Vector3 a2, |
684 | ref Vector3 b1, ref Vector3 b2, | 684 | ref Vector3 b1, ref Vector3 b2, |
685 | ref Vector3 cp1, ref Vector3 cp2); | 685 | ref Vector3 cp1, ref Vector3 cp2); |
686 | 686 | ||
687 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCloseODE"), SuppressUnmanagedCodeSecurity] | 687 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCloseODE"), SuppressUnmanagedCodeSecurity] |
688 | public static extern void CloseODE(); | 688 | internal static extern void CloseODE(); |
689 | 689 | ||
690 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity] | 690 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity] |
691 | public static extern int Collide(IntPtr o1, IntPtr o2, int flags, [In, Out] ContactGeom[] contact, int skip); | 691 | internal static extern int Collide(IntPtr o1, IntPtr o2, int flags, [In, Out] ContactGeom[] contact, int skip); |
692 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity] | 692 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity] |
693 | public static extern int CollidePtr(IntPtr o1, IntPtr o2, int flags, IntPtr contactgeomarray, int skip); | 693 | internal static extern int CollidePtr(IntPtr o1, IntPtr o2, int flags, IntPtr contactgeomarray, int skip); |
694 | 694 | ||
695 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dConnectingJoint"), SuppressUnmanagedCodeSecurity] | 695 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dConnectingJoint"), SuppressUnmanagedCodeSecurity] |
696 | public static extern IntPtr ConnectingJoint(IntPtr j1, IntPtr j2); | 696 | internal static extern IntPtr ConnectingJoint(IntPtr j1, IntPtr j2); |
697 | 697 | ||
698 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateBox"), SuppressUnmanagedCodeSecurity] | 698 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateBox"), SuppressUnmanagedCodeSecurity] |
699 | public static extern IntPtr CreateiBox(IntPtr space, dReal lx, dReal ly, dReal lz); | 699 | internal static extern IntPtr CreateiBox(IntPtr space, dReal lx, dReal ly, dReal lz); |
700 | public static IntPtr CreateBox(IntPtr space, dReal lx, dReal ly, dReal lz) | 700 | internal static IntPtr CreateBox(IntPtr space, dReal lx, dReal ly, dReal lz) |
701 | { | 701 | { |
702 | NTotalGeoms++; | 702 | NTotalGeoms++; |
703 | return CreateiBox(space, lx, ly, lz); | 703 | return CreateiBox(space, lx, ly, lz); |
704 | } | 704 | } |
705 | 705 | ||
706 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCapsule"), SuppressUnmanagedCodeSecurity] | 706 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCapsule"), SuppressUnmanagedCodeSecurity] |
707 | public static extern IntPtr CreateiCapsule(IntPtr space, dReal radius, dReal length); | 707 | internal static extern IntPtr CreateiCapsule(IntPtr space, dReal radius, dReal length); |
708 | public static IntPtr CreateCapsule(IntPtr space, dReal radius, dReal length) | 708 | internal static IntPtr CreateCapsule(IntPtr space, dReal radius, dReal length) |
709 | { | 709 | { |
710 | NTotalGeoms++; | 710 | NTotalGeoms++; |
711 | return CreateiCapsule(space, radius, length); | 711 | return CreateiCapsule(space, radius, length); |
712 | } | 712 | } |
713 | 713 | ||
714 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateConvex"), SuppressUnmanagedCodeSecurity] | 714 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateConvex"), SuppressUnmanagedCodeSecurity] |
715 | public static extern IntPtr CreateiConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons); | 715 | internal static extern IntPtr CreateiConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons); |
716 | public static IntPtr CreateConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons) | 716 | internal static IntPtr CreateConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons) |
717 | { | 717 | { |
718 | NTotalGeoms++; | 718 | NTotalGeoms++; |
719 | return CreateiConvex(space, planes, planeCount, points, pointCount, polygons); | 719 | return CreateiConvex(space, planes, planeCount, points, pointCount, polygons); |
720 | } | 720 | } |
721 | 721 | ||
722 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCylinder"), SuppressUnmanagedCodeSecurity] | 722 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCylinder"), SuppressUnmanagedCodeSecurity] |
723 | public static extern IntPtr CreateiCylinder(IntPtr space, dReal radius, dReal length); | 723 | internal static extern IntPtr CreateiCylinder(IntPtr space, dReal radius, dReal length); |
724 | public static IntPtr CreateCylinder(IntPtr space, dReal radius, dReal length) | 724 | internal static IntPtr CreateCylinder(IntPtr space, dReal radius, dReal length) |
725 | { | 725 | { |
726 | NTotalGeoms++; | 726 | NTotalGeoms++; |
727 | return CreateiCylinder(space, radius, length); | 727 | return CreateiCylinder(space, radius, length); |
728 | } | 728 | } |
729 | 729 | ||
730 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateHeightfield"), SuppressUnmanagedCodeSecurity] | 730 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateHeightfield"), SuppressUnmanagedCodeSecurity] |
731 | public static extern IntPtr CreateiHeightfield(IntPtr space, IntPtr data, int bPlaceable); | 731 | internal static extern IntPtr CreateiHeightfield(IntPtr space, IntPtr data, int bPlaceable); |
732 | public static IntPtr CreateHeightfield(IntPtr space, IntPtr data, int bPlaceable) | 732 | internal static IntPtr CreateHeightfield(IntPtr space, IntPtr data, int bPlaceable) |
733 | { | 733 | { |
734 | NTotalGeoms++; | 734 | NTotalGeoms++; |
735 | return CreateiHeightfield(space, data, bPlaceable); | 735 | return CreateiHeightfield(space, data, bPlaceable); |
736 | } | 736 | } |
737 | 737 | ||
738 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateOSTerrain"), SuppressUnmanagedCodeSecurity] | 738 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateOSTerrain"), SuppressUnmanagedCodeSecurity] |
739 | public static extern IntPtr CreateiOSTerrain(IntPtr space, IntPtr data, int bPlaceable); | 739 | internal static extern IntPtr CreateiOSTerrain(IntPtr space, IntPtr data, int bPlaceable); |
740 | public static IntPtr CreateOSTerrain(IntPtr space, IntPtr data, int bPlaceable) | 740 | internal static IntPtr CreateOSTerrain(IntPtr space, IntPtr data, int bPlaceable) |
741 | { | 741 | { |
742 | NTotalGeoms++; | 742 | NTotalGeoms++; |
743 | return CreateiOSTerrain(space, data, bPlaceable); | 743 | return CreateiOSTerrain(space, data, bPlaceable); |
@@ -748,127 +748,127 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
748 | 748 | ||
749 | 749 | ||
750 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeom"), SuppressUnmanagedCodeSecurity] | 750 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeom"), SuppressUnmanagedCodeSecurity] |
751 | public static extern IntPtr CreateiGeom(int classnum); | 751 | internal static extern IntPtr CreateiGeom(int classnum); |
752 | public static IntPtr CreateGeom(int classnum) | 752 | internal static IntPtr CreateGeom(int classnum) |
753 | { | 753 | { |
754 | NTotalGeoms++; | 754 | NTotalGeoms++; |
755 | return CreateiGeom(classnum); | 755 | return CreateiGeom(classnum); |
756 | } | 756 | } |
757 | 757 | ||
758 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomClass"), SuppressUnmanagedCodeSecurity] | 758 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomClass"), SuppressUnmanagedCodeSecurity] |
759 | public static extern int CreateGeomClass(ref GeomClass classptr); | 759 | internal static extern int CreateGeomClass(ref GeomClass classptr); |
760 | 760 | ||
761 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomTransform"), SuppressUnmanagedCodeSecurity] | 761 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomTransform"), SuppressUnmanagedCodeSecurity] |
762 | public static extern IntPtr CreateGeomTransform(IntPtr space); | 762 | internal static extern IntPtr CreateGeomTransform(IntPtr space); |
763 | 763 | ||
764 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreatePlane"), SuppressUnmanagedCodeSecurity] | 764 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreatePlane"), SuppressUnmanagedCodeSecurity] |
765 | public static extern IntPtr CreateiPlane(IntPtr space, dReal a, dReal b, dReal c, dReal d); | 765 | internal static extern IntPtr CreateiPlane(IntPtr space, dReal a, dReal b, dReal c, dReal d); |
766 | public static IntPtr CreatePlane(IntPtr space, dReal a, dReal b, dReal c, dReal d) | 766 | internal static IntPtr CreatePlane(IntPtr space, dReal a, dReal b, dReal c, dReal d) |
767 | { | 767 | { |
768 | NTotalGeoms++; | 768 | NTotalGeoms++; |
769 | return CreateiPlane(space, a, b, c, d); | 769 | return CreateiPlane(space, a, b, c, d); |
770 | } | 770 | } |
771 | 771 | ||
772 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateRay"), SuppressUnmanagedCodeSecurity] | 772 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateRay"), SuppressUnmanagedCodeSecurity] |
773 | public static extern IntPtr CreateiRay(IntPtr space, dReal length); | 773 | internal static extern IntPtr CreateiRay(IntPtr space, dReal length); |
774 | public static IntPtr CreateRay(IntPtr space, dReal length) | 774 | internal static IntPtr CreateRay(IntPtr space, dReal length) |
775 | { | 775 | { |
776 | NTotalGeoms++; | 776 | NTotalGeoms++; |
777 | return CreateiRay(space, length); | 777 | return CreateiRay(space, length); |
778 | } | 778 | } |
779 | 779 | ||
780 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateSphere"), SuppressUnmanagedCodeSecurity] | 780 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateSphere"), SuppressUnmanagedCodeSecurity] |
781 | public static extern IntPtr CreateiSphere(IntPtr space, dReal radius); | 781 | internal static extern IntPtr CreateiSphere(IntPtr space, dReal radius); |
782 | public static IntPtr CreateSphere(IntPtr space, dReal radius) | 782 | internal static IntPtr CreateSphere(IntPtr space, dReal radius) |
783 | { | 783 | { |
784 | NTotalGeoms++; | 784 | NTotalGeoms++; |
785 | return CreateiSphere(space, radius); | 785 | return CreateiSphere(space, radius); |
786 | } | 786 | } |
787 | 787 | ||
788 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateTriMesh"), SuppressUnmanagedCodeSecurity] | 788 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateTriMesh"), SuppressUnmanagedCodeSecurity] |
789 | public static extern IntPtr CreateiTriMesh(IntPtr space, IntPtr data, | 789 | internal static extern IntPtr CreateiTriMesh(IntPtr space, IntPtr data, |
790 | TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback); | 790 | TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback); |
791 | public static IntPtr CreateTriMesh(IntPtr space, IntPtr data, | 791 | internal static IntPtr CreateTriMesh(IntPtr space, IntPtr data, |
792 | TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback) | 792 | TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback) |
793 | { | 793 | { |
794 | NTotalGeoms++; | 794 | NTotalGeoms++; |
795 | return CreateiTriMesh(space, data, callback, arrayCallback, rayCallback); | 795 | return CreateiTriMesh(space, data, callback, arrayCallback, rayCallback); |
796 | } | 796 | } |
797 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDot"), SuppressUnmanagedCodeSecurity] | 797 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDot"), SuppressUnmanagedCodeSecurity] |
798 | public static extern dReal Dot(ref dReal X0, ref dReal X1, int n); | 798 | internal static extern dReal Dot(ref dReal X0, ref dReal X1, int n); |
799 | 799 | ||
800 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDQfromW"), SuppressUnmanagedCodeSecurity] | 800 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDQfromW"), SuppressUnmanagedCodeSecurity] |
801 | public static extern void DQfromW(dReal[] dq, ref Vector3 w, ref Quaternion q); | 801 | internal static extern void DQfromW(dReal[] dq, ref Vector3 w, ref Quaternion q); |
802 | 802 | ||
803 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorCholesky"), SuppressUnmanagedCodeSecurity] | 803 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorCholesky"), SuppressUnmanagedCodeSecurity] |
804 | public static extern int FactorCholesky(ref dReal A00, int n); | 804 | internal static extern int FactorCholesky(ref dReal A00, int n); |
805 | 805 | ||
806 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorLDLT"), SuppressUnmanagedCodeSecurity] | 806 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorLDLT"), SuppressUnmanagedCodeSecurity] |
807 | public static extern void FactorLDLT(ref dReal A, out dReal d, int n, int nskip); | 807 | internal static extern void FactorLDLT(ref dReal A, out dReal d, int n, int nskip); |
808 | 808 | ||
809 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity] | 809 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity] |
810 | public static extern void GeomBoxGetLengths(IntPtr geom, out Vector3 len); | 810 | internal static extern void GeomBoxGetLengths(IntPtr geom, out Vector3 len); |
811 | 811 | ||
812 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity] | 812 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity] |
813 | public static extern void GeomBoxGetLengths(IntPtr geom, out dReal x); | 813 | internal static extern void GeomBoxGetLengths(IntPtr geom, out dReal x); |
814 | 814 | ||
815 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxPointDepth"), SuppressUnmanagedCodeSecurity] | 815 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxPointDepth"), SuppressUnmanagedCodeSecurity] |
816 | public static extern dReal GeomBoxPointDepth(IntPtr geom, dReal x, dReal y, dReal z); | 816 | internal static extern dReal GeomBoxPointDepth(IntPtr geom, dReal x, dReal y, dReal z); |
817 | 817 | ||
818 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxSetLengths"), SuppressUnmanagedCodeSecurity] | 818 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxSetLengths"), SuppressUnmanagedCodeSecurity] |
819 | public static extern void GeomBoxSetLengths(IntPtr geom, dReal x, dReal y, dReal z); | 819 | internal static extern void GeomBoxSetLengths(IntPtr geom, dReal x, dReal y, dReal z); |
820 | 820 | ||
821 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleGetParams"), SuppressUnmanagedCodeSecurity] | 821 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleGetParams"), SuppressUnmanagedCodeSecurity] |
822 | public static extern void GeomCapsuleGetParams(IntPtr geom, out dReal radius, out dReal length); | 822 | internal static extern void GeomCapsuleGetParams(IntPtr geom, out dReal radius, out dReal length); |
823 | 823 | ||
824 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsulePointDepth"), SuppressUnmanagedCodeSecurity] | 824 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsulePointDepth"), SuppressUnmanagedCodeSecurity] |
825 | public static extern dReal GeomCapsulePointDepth(IntPtr geom, dReal x, dReal y, dReal z); | 825 | internal static extern dReal GeomCapsulePointDepth(IntPtr geom, dReal x, dReal y, dReal z); |
826 | 826 | ||
827 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleSetParams"), SuppressUnmanagedCodeSecurity] | 827 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleSetParams"), SuppressUnmanagedCodeSecurity] |
828 | public static extern void GeomCapsuleSetParams(IntPtr geom, dReal radius, dReal length); | 828 | internal static extern void GeomCapsuleSetParams(IntPtr geom, dReal radius, dReal length); |
829 | 829 | ||
830 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomClearOffset"), SuppressUnmanagedCodeSecurity] | 830 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomClearOffset"), SuppressUnmanagedCodeSecurity] |
831 | public static extern void GeomClearOffset(IntPtr geom); | 831 | internal static extern void GeomClearOffset(IntPtr geom); |
832 | 832 | ||
833 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity] | 833 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity] |
834 | public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref Vector3 pos); | 834 | internal static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref Vector3 pos); |
835 | 835 | ||
836 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity] | 836 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity] |
837 | public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref dReal X); | 837 | internal static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref dReal X); |
838 | 838 | ||
839 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] | 839 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] |
840 | public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref Quaternion Q); | 840 | internal static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref Quaternion Q); |
841 | 841 | ||
842 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] | 842 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] |
843 | public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref dReal X); | 843 | internal static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref dReal X); |
844 | 844 | ||
845 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity] | 845 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity] |
846 | public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref Matrix3 R); | 846 | internal static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref Matrix3 R); |
847 | 847 | ||
848 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity] | 848 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity] |
849 | public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref dReal M00); | 849 | internal static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref dReal M00); |
850 | 850 | ||
851 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity] | 851 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity] |
852 | public static extern void GeomCopyPosition(IntPtr geom, out Vector3 pos); | 852 | internal static extern void GeomCopyPosition(IntPtr geom, out Vector3 pos); |
853 | 853 | ||
854 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity] | 854 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity] |
855 | public static extern void GeomCopyPosition(IntPtr geom, out dReal X); | 855 | internal static extern void GeomCopyPosition(IntPtr geom, out dReal X); |
856 | 856 | ||
857 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity] | 857 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity] |
858 | public static extern void GeomCopyRotation(IntPtr geom, out Matrix3 R); | 858 | internal static extern void GeomCopyRotation(IntPtr geom, out Matrix3 R); |
859 | 859 | ||
860 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity] | 860 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity] |
861 | public static extern void GeomCopyRotation(IntPtr geom, out dReal M00); | 861 | internal static extern void GeomCopyRotation(IntPtr geom, out dReal M00); |
862 | 862 | ||
863 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderGetParams"), SuppressUnmanagedCodeSecurity] | 863 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderGetParams"), SuppressUnmanagedCodeSecurity] |
864 | public static extern void GeomCylinderGetParams(IntPtr geom, out dReal radius, out dReal length); | 864 | internal static extern void GeomCylinderGetParams(IntPtr geom, out dReal radius, out dReal length); |
865 | 865 | ||
866 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderSetParams"), SuppressUnmanagedCodeSecurity] | 866 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderSetParams"), SuppressUnmanagedCodeSecurity] |
867 | public static extern void GeomCylinderSetParams(IntPtr geom, dReal radius, dReal length); | 867 | internal static extern void GeomCylinderSetParams(IntPtr geom, dReal radius, dReal length); |
868 | 868 | ||
869 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDestroy"), SuppressUnmanagedCodeSecurity] | 869 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDestroy"), SuppressUnmanagedCodeSecurity] |
870 | public static extern void GeomiDestroy(IntPtr geom); | 870 | internal static extern void GeomiDestroy(IntPtr geom); |
871 | public static void GeomDestroy(IntPtr geom) | 871 | internal static void GeomDestroy(IntPtr geom) |
872 | { | 872 | { |
873 | NTotalGeoms--; | 873 | NTotalGeoms--; |
874 | GeomiDestroy(geom); | 874 | GeomiDestroy(geom); |
@@ -876,64 +876,64 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
876 | 876 | ||
877 | 877 | ||
878 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDisable"), SuppressUnmanagedCodeSecurity] | 878 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDisable"), SuppressUnmanagedCodeSecurity] |
879 | public static extern void GeomDisable(IntPtr geom); | 879 | internal static extern void GeomDisable(IntPtr geom); |
880 | 880 | ||
881 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomEnable"), SuppressUnmanagedCodeSecurity] | 881 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomEnable"), SuppressUnmanagedCodeSecurity] |
882 | public static extern void GeomEnable(IntPtr geom); | 882 | internal static extern void GeomEnable(IntPtr geom); |
883 | 883 | ||
884 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity] | 884 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity] |
885 | public static extern void GeomGetAABB(IntPtr geom, out AABB aabb); | 885 | internal static extern void GeomGetAABB(IntPtr geom, out AABB aabb); |
886 | 886 | ||
887 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity] | 887 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity] |
888 | public static extern void GeomGetAABB(IntPtr geom, out dReal minX); | 888 | internal static extern void GeomGetAABB(IntPtr geom, out dReal minX); |
889 | 889 | ||
890 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetBody"), SuppressUnmanagedCodeSecurity] | 890 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetBody"), SuppressUnmanagedCodeSecurity] |
891 | public static extern IntPtr GeomGetBody(IntPtr geom); | 891 | internal static extern IntPtr GeomGetBody(IntPtr geom); |
892 | 892 | ||
893 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCategoryBits"), SuppressUnmanagedCodeSecurity] | 893 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCategoryBits"), SuppressUnmanagedCodeSecurity] |
894 | public static extern uint GeomGetCategoryBits(IntPtr geom); | 894 | internal static extern uint GeomGetCategoryBits(IntPtr geom); |
895 | 895 | ||
896 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClassData"), SuppressUnmanagedCodeSecurity] | 896 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClassData"), SuppressUnmanagedCodeSecurity] |
897 | public static extern IntPtr GeomGetClassData(IntPtr geom); | 897 | internal static extern IntPtr GeomGetClassData(IntPtr geom); |
898 | 898 | ||
899 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCollideBits"), SuppressUnmanagedCodeSecurity] | 899 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCollideBits"), SuppressUnmanagedCodeSecurity] |
900 | public static extern uint GeomGetCollideBits(IntPtr geom); | 900 | internal static extern uint GeomGetCollideBits(IntPtr geom); |
901 | 901 | ||
902 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClass"), SuppressUnmanagedCodeSecurity] | 902 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClass"), SuppressUnmanagedCodeSecurity] |
903 | public static extern GeomClassID GeomGetClass(IntPtr geom); | 903 | internal static extern GeomClassID GeomGetClass(IntPtr geom); |
904 | 904 | ||
905 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetData"), SuppressUnmanagedCodeSecurity] | 905 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetData"), SuppressUnmanagedCodeSecurity] |
906 | public static extern IntPtr GeomGetData(IntPtr geom); | 906 | internal static extern IntPtr GeomGetData(IntPtr geom); |
907 | 907 | ||
908 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetPosition"), SuppressUnmanagedCodeSecurity] | 908 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetPosition"), SuppressUnmanagedCodeSecurity] |
909 | public extern unsafe static Vector3* GeomGetOffsetPositionUnsafe(IntPtr geom); | 909 | internal extern unsafe static Vector3* GeomGetOffsetPositionUnsafe(IntPtr geom); |
910 | public static Vector3 GeomGetOffsetPosition(IntPtr geom) | 910 | internal static Vector3 GeomGetOffsetPosition(IntPtr geom) |
911 | { | 911 | { |
912 | unsafe { return *(GeomGetOffsetPositionUnsafe(geom)); } | 912 | unsafe { return *(GeomGetOffsetPositionUnsafe(geom)); } |
913 | } | 913 | } |
914 | 914 | ||
915 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetRotation"), SuppressUnmanagedCodeSecurity] | 915 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetRotation"), SuppressUnmanagedCodeSecurity] |
916 | public extern unsafe static Matrix3* GeomGetOffsetRotationUnsafe(IntPtr geom); | 916 | internal extern unsafe static Matrix3* GeomGetOffsetRotationUnsafe(IntPtr geom); |
917 | public static Matrix3 GeomGetOffsetRotation(IntPtr geom) | 917 | internal static Matrix3 GeomGetOffsetRotation(IntPtr geom) |
918 | { | 918 | { |
919 | unsafe { return *(GeomGetOffsetRotationUnsafe(geom)); } | 919 | unsafe { return *(GeomGetOffsetRotationUnsafe(geom)); } |
920 | } | 920 | } |
921 | 921 | ||
922 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetPosition"), SuppressUnmanagedCodeSecurity] | 922 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetPosition"), SuppressUnmanagedCodeSecurity] |
923 | public extern unsafe static Vector3* GeomGetPositionUnsafe(IntPtr geom); | 923 | internal extern unsafe static Vector3* GeomGetPositionUnsafe(IntPtr geom); |
924 | public static Vector3 GeomGetPosition(IntPtr geom) | 924 | internal static Vector3 GeomGetPosition(IntPtr geom) |
925 | { | 925 | { |
926 | unsafe { return *(GeomGetPositionUnsafe(geom)); } | 926 | unsafe { return *(GeomGetPositionUnsafe(geom)); } |
927 | } | 927 | } |
928 | public static OMV.Vector3 GeomGetPositionOMV(IntPtr geom) | 928 | internal static OMV.Vector3 GeomGetPositionOMV(IntPtr geom) |
929 | { | 929 | { |
930 | Vector3 vtmp = GeomGetPosition(geom); | 930 | Vector3 vtmp = GeomGetPosition(geom); |
931 | return new OMV.Vector3(vtmp.X, vtmp.Y, vtmp.Z); | 931 | return new OMV.Vector3(vtmp.X, vtmp.Y, vtmp.Z); |
932 | } | 932 | } |
933 | 933 | ||
934 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] | 934 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] |
935 | public static extern void GeomCopyQuaternion(IntPtr geom, out Quaternion q); | 935 | internal static extern void GeomCopyQuaternion(IntPtr geom, out Quaternion q); |
936 | public static OMV.Quaternion GeomGetQuaternionOMV(IntPtr geom) | 936 | internal static OMV.Quaternion GeomGetQuaternionOMV(IntPtr geom) |
937 | { | 937 | { |
938 | Quaternion qtmp; | 938 | Quaternion qtmp; |
939 | GeomCopyQuaternion(geom, out qtmp); | 939 | GeomCopyQuaternion(geom, out qtmp); |
@@ -941,393 +941,393 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
941 | } | 941 | } |
942 | 942 | ||
943 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] | 943 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] |
944 | public static extern void GeomCopyQuaternion(IntPtr geom, out dReal X); | 944 | internal static extern void GeomCopyQuaternion(IntPtr geom, out dReal X); |
945 | 945 | ||
946 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetRotation"), SuppressUnmanagedCodeSecurity] | 946 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetRotation"), SuppressUnmanagedCodeSecurity] |
947 | public extern unsafe static Matrix3* GeomGetRotationUnsafe(IntPtr geom); | 947 | internal extern unsafe static Matrix3* GeomGetRotationUnsafe(IntPtr geom); |
948 | public static Matrix3 GeomGetRotation(IntPtr geom) | 948 | internal static Matrix3 GeomGetRotation(IntPtr geom) |
949 | { | 949 | { |
950 | unsafe { return *(GeomGetRotationUnsafe(geom)); } | 950 | unsafe { return *(GeomGetRotationUnsafe(geom)); } |
951 | } | 951 | } |
952 | 952 | ||
953 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetSpace"), SuppressUnmanagedCodeSecurity] | 953 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetSpace"), SuppressUnmanagedCodeSecurity] |
954 | public static extern IntPtr GeomGetSpace(IntPtr geom); | 954 | internal static extern IntPtr GeomGetSpace(IntPtr geom); |
955 | 955 | ||
956 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity] | 956 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity] |
957 | public static extern void GeomHeightfieldDataBuildByte(IntPtr d, byte[] pHeightData, int bCopyHeightData, | 957 | internal static extern void GeomHeightfieldDataBuildByte(IntPtr d, byte[] pHeightData, int bCopyHeightData, |
958 | dReal width, dReal depth, int widthSamples, int depthSamples, | 958 | dReal width, dReal depth, int widthSamples, int depthSamples, |
959 | dReal scale, dReal offset, dReal thickness, int bWrap); | 959 | dReal scale, dReal offset, dReal thickness, int bWrap); |
960 | 960 | ||
961 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity] | 961 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity] |
962 | public static extern void GeomHeightfieldDataBuildByte(IntPtr d, IntPtr pHeightData, int bCopyHeightData, | 962 | internal static extern void GeomHeightfieldDataBuildByte(IntPtr d, IntPtr pHeightData, int bCopyHeightData, |
963 | dReal width, dReal depth, int widthSamples, int depthSamples, | 963 | dReal width, dReal depth, int widthSamples, int depthSamples, |
964 | dReal scale, dReal offset, dReal thickness, int bWrap); | 964 | dReal scale, dReal offset, dReal thickness, int bWrap); |
965 | 965 | ||
966 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildCallback"), SuppressUnmanagedCodeSecurity] | 966 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildCallback"), SuppressUnmanagedCodeSecurity] |
967 | public static extern void GeomHeightfieldDataBuildCallback(IntPtr d, IntPtr pUserData, HeightfieldGetHeight pCallback, | 967 | internal static extern void GeomHeightfieldDataBuildCallback(IntPtr d, IntPtr pUserData, HeightfieldGetHeight pCallback, |
968 | dReal width, dReal depth, int widthSamples, int depthSamples, | 968 | dReal width, dReal depth, int widthSamples, int depthSamples, |
969 | dReal scale, dReal offset, dReal thickness, int bWrap); | 969 | dReal scale, dReal offset, dReal thickness, int bWrap); |
970 | 970 | ||
971 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] | 971 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] |
972 | public static extern void GeomHeightfieldDataBuildShort(IntPtr d, ushort[] pHeightData, int bCopyHeightData, | 972 | internal static extern void GeomHeightfieldDataBuildShort(IntPtr d, ushort[] pHeightData, int bCopyHeightData, |
973 | dReal width, dReal depth, int widthSamples, int depthSamples, | 973 | dReal width, dReal depth, int widthSamples, int depthSamples, |
974 | dReal scale, dReal offset, dReal thickness, int bWrap); | 974 | dReal scale, dReal offset, dReal thickness, int bWrap); |
975 | 975 | ||
976 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] | 976 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] |
977 | public static extern void GeomHeightfieldDataBuildShort(IntPtr d, short[] pHeightData, int bCopyHeightData, | 977 | internal static extern void GeomHeightfieldDataBuildShort(IntPtr d, short[] pHeightData, int bCopyHeightData, |
978 | dReal width, dReal depth, int widthSamples, int depthSamples, | 978 | dReal width, dReal depth, int widthSamples, int depthSamples, |
979 | dReal scale, dReal offset, dReal thickness, int bWrap); | 979 | dReal scale, dReal offset, dReal thickness, int bWrap); |
980 | 980 | ||
981 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] | 981 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] |
982 | public static extern void GeomHeightfieldDataBuildShort(IntPtr d, IntPtr pHeightData, int bCopyHeightData, | 982 | internal static extern void GeomHeightfieldDataBuildShort(IntPtr d, IntPtr pHeightData, int bCopyHeightData, |
983 | dReal width, dReal depth, int widthSamples, int depthSamples, | 983 | dReal width, dReal depth, int widthSamples, int depthSamples, |
984 | dReal scale, dReal offset, dReal thickness, int bWrap); | 984 | dReal scale, dReal offset, dReal thickness, int bWrap); |
985 | 985 | ||
986 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity] | 986 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity] |
987 | public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, float[] pHeightData, int bCopyHeightData, | 987 | internal static extern void GeomHeightfieldDataBuildSingle(IntPtr d, float[] pHeightData, int bCopyHeightData, |
988 | dReal width, dReal depth, int widthSamples, int depthSamples, | 988 | dReal width, dReal depth, int widthSamples, int depthSamples, |
989 | dReal scale, dReal offset, dReal thickness, int bWrap); | 989 | dReal scale, dReal offset, dReal thickness, int bWrap); |
990 | 990 | ||
991 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity] | 991 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity] |
992 | public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, IntPtr pHeightData, int bCopyHeightData, | 992 | internal static extern void GeomHeightfieldDataBuildSingle(IntPtr d, IntPtr pHeightData, int bCopyHeightData, |
993 | dReal width, dReal depth, int widthSamples, int depthSamples, | 993 | dReal width, dReal depth, int widthSamples, int depthSamples, |
994 | dReal scale, dReal offset, dReal thickness, int bWrap); | 994 | dReal scale, dReal offset, dReal thickness, int bWrap); |
995 | 995 | ||
996 | 996 | ||
997 | 997 | ||
998 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity] | 998 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity] |
999 | public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, double[] pHeightData, int bCopyHeightData, | 999 | internal static extern void GeomHeightfieldDataBuildDouble(IntPtr d, double[] pHeightData, int bCopyHeightData, |
1000 | dReal width, dReal depth, int widthSamples, int depthSamples, | 1000 | dReal width, dReal depth, int widthSamples, int depthSamples, |
1001 | dReal scale, dReal offset, dReal thickness, int bWrap); | 1001 | dReal scale, dReal offset, dReal thickness, int bWrap); |
1002 | 1002 | ||
1003 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity] | 1003 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity] |
1004 | public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, IntPtr pHeightData, int bCopyHeightData, | 1004 | internal static extern void GeomHeightfieldDataBuildDouble(IntPtr d, IntPtr pHeightData, int bCopyHeightData, |
1005 | dReal width, dReal depth, int widthSamples, int depthSamples, | 1005 | dReal width, dReal depth, int widthSamples, int depthSamples, |
1006 | dReal scale, dReal offset, dReal thickness, int bWrap); | 1006 | dReal scale, dReal offset, dReal thickness, int bWrap); |
1007 | 1007 | ||
1008 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataCreate"), SuppressUnmanagedCodeSecurity] | 1008 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataCreate"), SuppressUnmanagedCodeSecurity] |
1009 | public static extern IntPtr GeomHeightfieldDataCreate(); | 1009 | internal static extern IntPtr GeomHeightfieldDataCreate(); |
1010 | 1010 | ||
1011 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataDestroy"), SuppressUnmanagedCodeSecurity] | 1011 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataDestroy"), SuppressUnmanagedCodeSecurity] |
1012 | public static extern void GeomHeightfieldDataDestroy(IntPtr d); | 1012 | internal static extern void GeomHeightfieldDataDestroy(IntPtr d); |
1013 | 1013 | ||
1014 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataSetBounds"), SuppressUnmanagedCodeSecurity] | 1014 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataSetBounds"), SuppressUnmanagedCodeSecurity] |
1015 | public static extern void GeomHeightfieldDataSetBounds(IntPtr d, dReal minHeight, dReal maxHeight); | 1015 | internal static extern void GeomHeightfieldDataSetBounds(IntPtr d, dReal minHeight, dReal maxHeight); |
1016 | 1016 | ||
1017 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldGetHeightfieldData"), SuppressUnmanagedCodeSecurity] | 1017 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldGetHeightfieldData"), SuppressUnmanagedCodeSecurity] |
1018 | public static extern IntPtr GeomHeightfieldGetHeightfieldData(IntPtr g); | 1018 | internal static extern IntPtr GeomHeightfieldGetHeightfieldData(IntPtr g); |
1019 | 1019 | ||
1020 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldSetHeightfieldData"), SuppressUnmanagedCodeSecurity] | 1020 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldSetHeightfieldData"), SuppressUnmanagedCodeSecurity] |
1021 | public static extern void GeomHeightfieldSetHeightfieldData(IntPtr g, IntPtr d); | 1021 | internal static extern void GeomHeightfieldSetHeightfieldData(IntPtr g, IntPtr d); |
1022 | 1022 | ||
1023 | 1023 | ||
1024 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainDataBuild"), SuppressUnmanagedCodeSecurity] | 1024 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainDataBuild"), SuppressUnmanagedCodeSecurity] |
1025 | public static extern void GeomOSTerrainDataBuild(IntPtr d, float[] pHeightData, int bCopyHeightData, | 1025 | internal static extern void GeomOSTerrainDataBuild(IntPtr d, float[] pHeightData, int bCopyHeightData, |
1026 | dReal sampleSize, int widthSamples, int depthSamples, | 1026 | dReal sampleSize, int widthSamples, int depthSamples, |
1027 | dReal offset, dReal thickness, int bWrap); | 1027 | dReal offset, dReal thickness, int bWrap); |
1028 | 1028 | ||
1029 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainDataBuild"), SuppressUnmanagedCodeSecurity] | 1029 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainDataBuild"), SuppressUnmanagedCodeSecurity] |
1030 | public static extern void GeomOSTerrainDataBuild(IntPtr d, IntPtr pHeightData, int bCopyHeightData, | 1030 | internal static extern void GeomOSTerrainDataBuild(IntPtr d, IntPtr pHeightData, int bCopyHeightData, |
1031 | dReal sampleSize, int widthSamples, int depthSamples, | 1031 | dReal sampleSize, int widthSamples, int depthSamples, |
1032 | dReal thickness, int bWrap); | 1032 | dReal thickness, int bWrap); |
1033 | 1033 | ||
1034 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainDataCreate"), SuppressUnmanagedCodeSecurity] | 1034 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainDataCreate"), SuppressUnmanagedCodeSecurity] |
1035 | public static extern IntPtr GeomOSTerrainDataCreate(); | 1035 | internal static extern IntPtr GeomOSTerrainDataCreate(); |
1036 | 1036 | ||
1037 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainDataDestroy"), SuppressUnmanagedCodeSecurity] | 1037 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainDataDestroy"), SuppressUnmanagedCodeSecurity] |
1038 | public static extern void GeomOSTerrainDataDestroy(IntPtr d); | 1038 | internal static extern void GeomOSTerrainDataDestroy(IntPtr d); |
1039 | 1039 | ||
1040 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainDataSetBounds"), SuppressUnmanagedCodeSecurity] | 1040 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainDataSetBounds"), SuppressUnmanagedCodeSecurity] |
1041 | public static extern void GeomOSTerrainDataSetBounds(IntPtr d, dReal minHeight, dReal maxHeight); | 1041 | internal static extern void GeomOSTerrainDataSetBounds(IntPtr d, dReal minHeight, dReal maxHeight); |
1042 | 1042 | ||
1043 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainGetHeightfieldData"), SuppressUnmanagedCodeSecurity] | 1043 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainGetHeightfieldData"), SuppressUnmanagedCodeSecurity] |
1044 | public static extern IntPtr GeomOSTerrainGetHeightfieldData(IntPtr g); | 1044 | internal static extern IntPtr GeomOSTerrainGetHeightfieldData(IntPtr g); |
1045 | 1045 | ||
1046 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainSetHeightfieldData"), SuppressUnmanagedCodeSecurity] | 1046 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomOSTerrainSetHeightfieldData"), SuppressUnmanagedCodeSecurity] |
1047 | public static extern void GeomOSTerrainSetHeightfieldData(IntPtr g, IntPtr d); | 1047 | internal static extern void GeomOSTerrainSetHeightfieldData(IntPtr g, IntPtr d); |
1048 | 1048 | ||
1049 | 1049 | ||
1050 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsEnabled"), SuppressUnmanagedCodeSecurity] | 1050 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsEnabled"), SuppressUnmanagedCodeSecurity] |
1051 | public static extern bool GeomIsEnabled(IntPtr geom); | 1051 | internal static extern bool GeomIsEnabled(IntPtr geom); |
1052 | 1052 | ||
1053 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsOffset"), SuppressUnmanagedCodeSecurity] | 1053 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsOffset"), SuppressUnmanagedCodeSecurity] |
1054 | public static extern bool GeomIsOffset(IntPtr geom); | 1054 | internal static extern bool GeomIsOffset(IntPtr geom); |
1055 | 1055 | ||
1056 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsSpace"), SuppressUnmanagedCodeSecurity] | 1056 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsSpace"), SuppressUnmanagedCodeSecurity] |
1057 | public static extern bool GeomIsSpace(IntPtr geom); | 1057 | internal static extern bool GeomIsSpace(IntPtr geom); |
1058 | 1058 | ||
1059 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity] | 1059 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity] |
1060 | public static extern void GeomPlaneGetParams(IntPtr geom, ref Vector4 result); | 1060 | internal static extern void GeomPlaneGetParams(IntPtr geom, ref Vector4 result); |
1061 | 1061 | ||
1062 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity] | 1062 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity] |
1063 | public static extern void GeomPlaneGetParams(IntPtr geom, ref dReal A); | 1063 | internal static extern void GeomPlaneGetParams(IntPtr geom, ref dReal A); |
1064 | 1064 | ||
1065 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlanePointDepth"), SuppressUnmanagedCodeSecurity] | 1065 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlanePointDepth"), SuppressUnmanagedCodeSecurity] |
1066 | public static extern dReal GeomPlanePointDepth(IntPtr geom, dReal x, dReal y, dReal z); | 1066 | internal static extern dReal GeomPlanePointDepth(IntPtr geom, dReal x, dReal y, dReal z); |
1067 | 1067 | ||
1068 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneSetParams"), SuppressUnmanagedCodeSecurity] | 1068 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneSetParams"), SuppressUnmanagedCodeSecurity] |
1069 | public static extern void GeomPlaneSetParams(IntPtr plane, dReal a, dReal b, dReal c, dReal d); | 1069 | internal static extern void GeomPlaneSetParams(IntPtr plane, dReal a, dReal b, dReal c, dReal d); |
1070 | 1070 | ||
1071 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity] | 1071 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity] |
1072 | public static extern void GeomRayGet(IntPtr ray, ref Vector3 start, ref Vector3 dir); | 1072 | internal static extern void GeomRayGet(IntPtr ray, ref Vector3 start, ref Vector3 dir); |
1073 | 1073 | ||
1074 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity] | 1074 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity] |
1075 | public static extern void GeomRayGet(IntPtr ray, ref dReal startX, ref dReal dirX); | 1075 | internal static extern void GeomRayGet(IntPtr ray, ref dReal startX, ref dReal dirX); |
1076 | 1076 | ||
1077 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetClosestHit"), SuppressUnmanagedCodeSecurity] | 1077 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetClosestHit"), SuppressUnmanagedCodeSecurity] |
1078 | public static extern int GeomRayGetClosestHit(IntPtr ray); | 1078 | internal static extern int GeomRayGetClosestHit(IntPtr ray); |
1079 | 1079 | ||
1080 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetLength"), SuppressUnmanagedCodeSecurity] | 1080 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetLength"), SuppressUnmanagedCodeSecurity] |
1081 | public static extern dReal GeomRayGetLength(IntPtr ray); | 1081 | internal static extern dReal GeomRayGetLength(IntPtr ray); |
1082 | 1082 | ||
1083 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetParams"), SuppressUnmanagedCodeSecurity] | 1083 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetParams"), SuppressUnmanagedCodeSecurity] |
1084 | public static extern dReal GeomRayGetParams(IntPtr g, out int firstContact, out int backfaceCull); | 1084 | internal static extern dReal GeomRayGetParams(IntPtr g, out int firstContact, out int backfaceCull); |
1085 | 1085 | ||
1086 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySet"), SuppressUnmanagedCodeSecurity] | 1086 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySet"), SuppressUnmanagedCodeSecurity] |
1087 | public static extern void GeomRaySet(IntPtr ray, dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz); | 1087 | internal static extern void GeomRaySet(IntPtr ray, dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz); |
1088 | 1088 | ||
1089 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetClosestHit"), SuppressUnmanagedCodeSecurity] | 1089 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetClosestHit"), SuppressUnmanagedCodeSecurity] |
1090 | public static extern void GeomRaySetClosestHit(IntPtr ray, int closestHit); | 1090 | internal static extern void GeomRaySetClosestHit(IntPtr ray, int closestHit); |
1091 | 1091 | ||
1092 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetLength"), SuppressUnmanagedCodeSecurity] | 1092 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetLength"), SuppressUnmanagedCodeSecurity] |
1093 | public static extern void GeomRaySetLength(IntPtr ray, dReal length); | 1093 | internal static extern void GeomRaySetLength(IntPtr ray, dReal length); |
1094 | 1094 | ||
1095 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetParams"), SuppressUnmanagedCodeSecurity] | 1095 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetParams"), SuppressUnmanagedCodeSecurity] |
1096 | public static extern void GeomRaySetParams(IntPtr ray, int firstContact, int backfaceCull); | 1096 | internal static extern void GeomRaySetParams(IntPtr ray, int firstContact, int backfaceCull); |
1097 | 1097 | ||
1098 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetBody"), SuppressUnmanagedCodeSecurity] | 1098 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetBody"), SuppressUnmanagedCodeSecurity] |
1099 | public static extern void GeomSetBody(IntPtr geom, IntPtr body); | 1099 | internal static extern void GeomSetBody(IntPtr geom, IntPtr body); |
1100 | 1100 | ||
1101 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCategoryBits"), SuppressUnmanagedCodeSecurity] | 1101 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCategoryBits"), SuppressUnmanagedCodeSecurity] |
1102 | public static extern void GeomSetCategoryBits(IntPtr geom, uint bits); | 1102 | internal static extern void GeomSetCategoryBits(IntPtr geom, uint bits); |
1103 | 1103 | ||
1104 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCollideBits"), SuppressUnmanagedCodeSecurity] | 1104 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCollideBits"), SuppressUnmanagedCodeSecurity] |
1105 | public static extern void GeomSetCollideBits(IntPtr geom, uint bits); | 1105 | internal static extern void GeomSetCollideBits(IntPtr geom, uint bits); |
1106 | 1106 | ||
1107 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetConvex"), SuppressUnmanagedCodeSecurity] | 1107 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetConvex"), SuppressUnmanagedCodeSecurity] |
1108 | public static extern IntPtr GeomSetConvex(IntPtr geom, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons); | 1108 | internal static extern IntPtr GeomSetConvex(IntPtr geom, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons); |
1109 | 1109 | ||
1110 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetData"), SuppressUnmanagedCodeSecurity] | 1110 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetData"), SuppressUnmanagedCodeSecurity] |
1111 | public static extern void GeomSetData(IntPtr geom, IntPtr data); | 1111 | internal static extern void GeomSetData(IntPtr geom, IntPtr data); |
1112 | 1112 | ||
1113 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetPosition"), SuppressUnmanagedCodeSecurity] | 1113 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetPosition"), SuppressUnmanagedCodeSecurity] |
1114 | public static extern void GeomSetOffsetPosition(IntPtr geom, dReal x, dReal y, dReal z); | 1114 | internal static extern void GeomSetOffsetPosition(IntPtr geom, dReal x, dReal y, dReal z); |
1115 | 1115 | ||
1116 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] | 1116 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] |
1117 | public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref Quaternion Q); | 1117 | internal static extern void GeomSetOffsetQuaternion(IntPtr geom, ref Quaternion Q); |
1118 | 1118 | ||
1119 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] | 1119 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] |
1120 | public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref dReal X); | 1120 | internal static extern void GeomSetOffsetQuaternion(IntPtr geom, ref dReal X); |
1121 | 1121 | ||
1122 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity] | 1122 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity] |
1123 | public static extern void GeomSetOffsetRotation(IntPtr geom, ref Matrix3 R); | 1123 | internal static extern void GeomSetOffsetRotation(IntPtr geom, ref Matrix3 R); |
1124 | 1124 | ||
1125 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity] | 1125 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity] |
1126 | public static extern void GeomSetOffsetRotation(IntPtr geom, ref dReal M00); | 1126 | internal static extern void GeomSetOffsetRotation(IntPtr geom, ref dReal M00); |
1127 | 1127 | ||
1128 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldPosition"), SuppressUnmanagedCodeSecurity] | 1128 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldPosition"), SuppressUnmanagedCodeSecurity] |
1129 | public static extern void GeomSetOffsetWorldPosition(IntPtr geom, dReal x, dReal y, dReal z); | 1129 | internal static extern void GeomSetOffsetWorldPosition(IntPtr geom, dReal x, dReal y, dReal z); |
1130 | 1130 | ||
1131 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity] | 1131 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity] |
1132 | public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref Quaternion Q); | 1132 | internal static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref Quaternion Q); |
1133 | 1133 | ||
1134 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity] | 1134 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity] |
1135 | public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref dReal X); | 1135 | internal static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref dReal X); |
1136 | 1136 | ||
1137 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity] | 1137 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity] |
1138 | public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref Matrix3 R); | 1138 | internal static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref Matrix3 R); |
1139 | 1139 | ||
1140 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity] | 1140 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity] |
1141 | public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref dReal M00); | 1141 | internal static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref dReal M00); |
1142 | 1142 | ||
1143 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetPosition"), SuppressUnmanagedCodeSecurity] | 1143 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetPosition"), SuppressUnmanagedCodeSecurity] |
1144 | public static extern void GeomSetPosition(IntPtr geom, dReal x, dReal y, dReal z); | 1144 | internal static extern void GeomSetPosition(IntPtr geom, dReal x, dReal y, dReal z); |
1145 | 1145 | ||
1146 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity] | 1146 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity] |
1147 | public static extern void GeomSetQuaternion(IntPtr geom, ref Quaternion quat); | 1147 | internal static extern void GeomSetQuaternion(IntPtr geom, ref Quaternion quat); |
1148 | 1148 | ||
1149 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity] | 1149 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity] |
1150 | public static extern void GeomSetQuaternion(IntPtr geom, ref dReal w); | 1150 | internal static extern void GeomSetQuaternion(IntPtr geom, ref dReal w); |
1151 | 1151 | ||
1152 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity] | 1152 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity] |
1153 | public static extern void GeomSetRotation(IntPtr geom, ref Matrix3 R); | 1153 | internal static extern void GeomSetRotation(IntPtr geom, ref Matrix3 R); |
1154 | 1154 | ||
1155 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity] | 1155 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity] |
1156 | public static extern void GeomSetRotation(IntPtr geom, ref dReal M00); | 1156 | internal static extern void GeomSetRotation(IntPtr geom, ref dReal M00); |
1157 | 1157 | ||
1158 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereGetRadius"), SuppressUnmanagedCodeSecurity] | 1158 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereGetRadius"), SuppressUnmanagedCodeSecurity] |
1159 | public static extern dReal GeomSphereGetRadius(IntPtr geom); | 1159 | internal static extern dReal GeomSphereGetRadius(IntPtr geom); |
1160 | 1160 | ||
1161 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSpherePointDepth"), SuppressUnmanagedCodeSecurity] | 1161 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSpherePointDepth"), SuppressUnmanagedCodeSecurity] |
1162 | public static extern dReal GeomSpherePointDepth(IntPtr geom, dReal x, dReal y, dReal z); | 1162 | internal static extern dReal GeomSpherePointDepth(IntPtr geom, dReal x, dReal y, dReal z); |
1163 | 1163 | ||
1164 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereSetRadius"), SuppressUnmanagedCodeSecurity] | 1164 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereSetRadius"), SuppressUnmanagedCodeSecurity] |
1165 | public static extern void GeomSphereSetRadius(IntPtr geom, dReal radius); | 1165 | internal static extern void GeomSphereSetRadius(IntPtr geom, dReal radius); |
1166 | 1166 | ||
1167 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetCleanup"), SuppressUnmanagedCodeSecurity] | 1167 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetCleanup"), SuppressUnmanagedCodeSecurity] |
1168 | public static extern int GeomTransformGetCleanup(IntPtr geom); | 1168 | internal static extern int GeomTransformGetCleanup(IntPtr geom); |
1169 | 1169 | ||
1170 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetGeom"), SuppressUnmanagedCodeSecurity] | 1170 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetGeom"), SuppressUnmanagedCodeSecurity] |
1171 | public static extern IntPtr GeomTransformGetGeom(IntPtr geom); | 1171 | internal static extern IntPtr GeomTransformGetGeom(IntPtr geom); |
1172 | 1172 | ||
1173 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetInfo"), SuppressUnmanagedCodeSecurity] | 1173 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetInfo"), SuppressUnmanagedCodeSecurity] |
1174 | public static extern int GeomTransformGetInfo(IntPtr geom); | 1174 | internal static extern int GeomTransformGetInfo(IntPtr geom); |
1175 | 1175 | ||
1176 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetCleanup"), SuppressUnmanagedCodeSecurity] | 1176 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetCleanup"), SuppressUnmanagedCodeSecurity] |
1177 | public static extern void GeomTransformSetCleanup(IntPtr geom, int mode); | 1177 | internal static extern void GeomTransformSetCleanup(IntPtr geom, int mode); |
1178 | 1178 | ||
1179 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetGeom"), SuppressUnmanagedCodeSecurity] | 1179 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetGeom"), SuppressUnmanagedCodeSecurity] |
1180 | public static extern void GeomTransformSetGeom(IntPtr geom, IntPtr obj); | 1180 | internal static extern void GeomTransformSetGeom(IntPtr geom, IntPtr obj); |
1181 | 1181 | ||
1182 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetInfo"), SuppressUnmanagedCodeSecurity] | 1182 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetInfo"), SuppressUnmanagedCodeSecurity] |
1183 | public static extern void GeomTransformSetInfo(IntPtr geom, int info); | 1183 | internal static extern void GeomTransformSetInfo(IntPtr geom, int info); |
1184 | 1184 | ||
1185 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity] | 1185 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity] |
1186 | public static extern void GeomTriMeshDataBuildDouble(IntPtr d, | 1186 | internal static extern void GeomTriMeshDataBuildDouble(IntPtr d, |
1187 | double[] vertices, int vertexStride, int vertexCount, | 1187 | double[] vertices, int vertexStride, int vertexCount, |
1188 | int[] indices, int indexCount, int triStride); | 1188 | int[] indices, int indexCount, int triStride); |
1189 | 1189 | ||
1190 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity] | 1190 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity] |
1191 | public static extern void GeomTriMeshDataBuildDouble(IntPtr d, | 1191 | internal static extern void GeomTriMeshDataBuildDouble(IntPtr d, |
1192 | IntPtr vertices, int vertexStride, int vertexCount, | 1192 | IntPtr vertices, int vertexStride, int vertexCount, |
1193 | IntPtr indices, int indexCount, int triStride); | 1193 | IntPtr indices, int indexCount, int triStride); |
1194 | 1194 | ||
1195 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity] | 1195 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity] |
1196 | public static extern void GeomTriMeshDataBuildDouble1(IntPtr d, | 1196 | internal static extern void GeomTriMeshDataBuildDouble1(IntPtr d, |
1197 | double[] vertices, int vertexStride, int vertexCount, | 1197 | double[] vertices, int vertexStride, int vertexCount, |
1198 | int[] indices, int indexCount, int triStride, | 1198 | int[] indices, int indexCount, int triStride, |
1199 | double[] normals); | 1199 | double[] normals); |
1200 | 1200 | ||
1201 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity] | 1201 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity] |
1202 | public static extern void GeomTriMeshDataBuildDouble(IntPtr d, | 1202 | internal static extern void GeomTriMeshDataBuildDouble(IntPtr d, |
1203 | IntPtr vertices, int vertexStride, int vertexCount, | 1203 | IntPtr vertices, int vertexStride, int vertexCount, |
1204 | IntPtr indices, int indexCount, int triStride, | 1204 | IntPtr indices, int indexCount, int triStride, |
1205 | IntPtr normals); | 1205 | IntPtr normals); |
1206 | 1206 | ||
1207 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity] | 1207 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity] |
1208 | public static extern void GeomTriMeshDataBuildSingle(IntPtr d, | 1208 | internal static extern void GeomTriMeshDataBuildSingle(IntPtr d, |
1209 | dReal[] vertices, int vertexStride, int vertexCount, | 1209 | dReal[] vertices, int vertexStride, int vertexCount, |
1210 | int[] indices, int indexCount, int triStride); | 1210 | int[] indices, int indexCount, int triStride); |
1211 | 1211 | ||
1212 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity] | 1212 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity] |
1213 | public static extern void GeomTriMeshDataBuildSingle(IntPtr d, | 1213 | internal static extern void GeomTriMeshDataBuildSingle(IntPtr d, |
1214 | IntPtr vertices, int vertexStride, int vertexCount, | 1214 | IntPtr vertices, int vertexStride, int vertexCount, |
1215 | IntPtr indices, int indexCount, int triStride); | 1215 | IntPtr indices, int indexCount, int triStride); |
1216 | 1216 | ||
1217 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity] | 1217 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity] |
1218 | public static extern void GeomTriMeshDataBuildSingle1(IntPtr d, | 1218 | internal static extern void GeomTriMeshDataBuildSingle1(IntPtr d, |
1219 | dReal[] vertices, int vertexStride, int vertexCount, | 1219 | dReal[] vertices, int vertexStride, int vertexCount, |
1220 | int[] indices, int indexCount, int triStride, | 1220 | int[] indices, int indexCount, int triStride, |
1221 | dReal[] normals); | 1221 | dReal[] normals); |
1222 | 1222 | ||
1223 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity] | 1223 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity] |
1224 | public static extern void GeomTriMeshDataBuildSingle1(IntPtr d, | 1224 | internal static extern void GeomTriMeshDataBuildSingle1(IntPtr d, |
1225 | IntPtr vertices, int vertexStride, int vertexCount, | 1225 | IntPtr vertices, int vertexStride, int vertexCount, |
1226 | IntPtr indices, int indexCount, int triStride, | 1226 | IntPtr indices, int indexCount, int triStride, |
1227 | IntPtr normals); | 1227 | IntPtr normals); |
1228 | 1228 | ||
1229 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity] | 1229 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity] |
1230 | public static extern void GeomTriMeshDataBuildSimple(IntPtr d, | 1230 | internal static extern void GeomTriMeshDataBuildSimple(IntPtr d, |
1231 | float[] vertices, int vertexStride, int vertexCount, | 1231 | float[] vertices, int vertexStride, int vertexCount, |
1232 | int[] indices, int indexCount, int triStride); | 1232 | int[] indices, int indexCount, int triStride); |
1233 | 1233 | ||
1234 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity] | 1234 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity] |
1235 | public static extern void GeomTriMeshDataBuildSimple(IntPtr d, | 1235 | internal static extern void GeomTriMeshDataBuildSimple(IntPtr d, |
1236 | IntPtr vertices, int vertexStride, int vertexCount, | 1236 | IntPtr vertices, int vertexStride, int vertexCount, |
1237 | IntPtr indices, int indexCount, int triStride); | 1237 | IntPtr indices, int indexCount, int triStride); |
1238 | 1238 | ||
1239 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity] | 1239 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity] |
1240 | public static extern void GeomTriMeshDataBuildSimple1(IntPtr d, | 1240 | internal static extern void GeomTriMeshDataBuildSimple1(IntPtr d, |
1241 | float[] vertices, int vertexStride, int vertexCount, | 1241 | float[] vertices, int vertexStride, int vertexCount, |
1242 | int[] indices, int indexCount, int triStride, | 1242 | int[] indices, int indexCount, int triStride, |
1243 | float[] normals); | 1243 | float[] normals); |
1244 | 1244 | ||
1245 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity] | 1245 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity] |
1246 | public static extern void GeomTriMeshDataBuildSimple1(IntPtr d, | 1246 | internal static extern void GeomTriMeshDataBuildSimple1(IntPtr d, |
1247 | IntPtr vertices, int vertexStride, int vertexCount, | 1247 | IntPtr vertices, int vertexStride, int vertexCount, |
1248 | IntPtr indices, int indexCount, int triStride, | 1248 | IntPtr indices, int indexCount, int triStride, |
1249 | IntPtr normals); | 1249 | IntPtr normals); |
1250 | 1250 | ||
1251 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshClearTCCache"), SuppressUnmanagedCodeSecurity] | 1251 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshClearTCCache"), SuppressUnmanagedCodeSecurity] |
1252 | public static extern void GeomTriMeshClearTCCache(IntPtr g); | 1252 | internal static extern void GeomTriMeshClearTCCache(IntPtr g); |
1253 | 1253 | ||
1254 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataCreate"), SuppressUnmanagedCodeSecurity] | 1254 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataCreate"), SuppressUnmanagedCodeSecurity] |
1255 | public static extern IntPtr GeomTriMeshDataCreate(); | 1255 | internal static extern IntPtr GeomTriMeshDataCreate(); |
1256 | 1256 | ||
1257 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataDestroy"), SuppressUnmanagedCodeSecurity] | 1257 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataDestroy"), SuppressUnmanagedCodeSecurity] |
1258 | public static extern void GeomTriMeshDataDestroy(IntPtr d); | 1258 | internal static extern void GeomTriMeshDataDestroy(IntPtr d); |
1259 | 1259 | ||
1260 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataGet"), SuppressUnmanagedCodeSecurity] | 1260 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataGet"), SuppressUnmanagedCodeSecurity] |
1261 | public static extern IntPtr GeomTriMeshDataGet(IntPtr d, int data_id); | 1261 | internal static extern IntPtr GeomTriMeshDataGet(IntPtr d, int data_id); |
1262 | 1262 | ||
1263 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataPreprocess"), SuppressUnmanagedCodeSecurity] | 1263 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataPreprocess"), SuppressUnmanagedCodeSecurity] |
1264 | public static extern void GeomTriMeshDataPreprocess(IntPtr d); | 1264 | internal static extern void GeomTriMeshDataPreprocess(IntPtr d); |
1265 | 1265 | ||
1266 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataSet"), SuppressUnmanagedCodeSecurity] | 1266 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataSet"), SuppressUnmanagedCodeSecurity] |
1267 | public static extern void GeomTriMeshDataSet(IntPtr d, int data_id, IntPtr in_data); | 1267 | internal static extern void GeomTriMeshDataSet(IntPtr d, int data_id, IntPtr in_data); |
1268 | 1268 | ||
1269 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataUpdate"), SuppressUnmanagedCodeSecurity] | 1269 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataUpdate"), SuppressUnmanagedCodeSecurity] |
1270 | public static extern void GeomTriMeshDataUpdate(IntPtr d); | 1270 | internal static extern void GeomTriMeshDataUpdate(IntPtr d); |
1271 | 1271 | ||
1272 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshEnableTC"), SuppressUnmanagedCodeSecurity] | 1272 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshEnableTC"), SuppressUnmanagedCodeSecurity] |
1273 | public static extern void GeomTriMeshEnableTC(IntPtr g, int geomClass, bool enable); | 1273 | internal static extern void GeomTriMeshEnableTC(IntPtr g, int geomClass, bool enable); |
1274 | 1274 | ||
1275 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetArrayCallback"), SuppressUnmanagedCodeSecurity] | 1275 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetArrayCallback"), SuppressUnmanagedCodeSecurity] |
1276 | public static extern TriArrayCallback GeomTriMeshGetArrayCallback(IntPtr g); | 1276 | internal static extern TriArrayCallback GeomTriMeshGetArrayCallback(IntPtr g); |
1277 | 1277 | ||
1278 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetCallback"), SuppressUnmanagedCodeSecurity] | 1278 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetCallback"), SuppressUnmanagedCodeSecurity] |
1279 | public static extern TriCallback GeomTriMeshGetCallback(IntPtr g); | 1279 | internal static extern TriCallback GeomTriMeshGetCallback(IntPtr g); |
1280 | 1280 | ||
1281 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetData"), SuppressUnmanagedCodeSecurity] | 1281 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetData"), SuppressUnmanagedCodeSecurity] |
1282 | public static extern IntPtr GeomTriMeshGetData(IntPtr g); | 1282 | internal static extern IntPtr GeomTriMeshGetData(IntPtr g); |
1283 | 1283 | ||
1284 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetLastTransform"), SuppressUnmanagedCodeSecurity] | 1284 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetLastTransform"), SuppressUnmanagedCodeSecurity] |
1285 | public extern unsafe static Matrix4* GeomTriMeshGetLastTransformUnsafe(IntPtr geom); | 1285 | internal extern unsafe static Matrix4* GeomTriMeshGetLastTransformUnsafe(IntPtr geom); |
1286 | public static Matrix4 GeomTriMeshGetLastTransform(IntPtr geom) | 1286 | internal static Matrix4 GeomTriMeshGetLastTransform(IntPtr geom) |
1287 | { | 1287 | { |
1288 | unsafe { return *(GeomTriMeshGetLastTransformUnsafe(geom)); } | 1288 | unsafe { return *(GeomTriMeshGetLastTransformUnsafe(geom)); } |
1289 | } | 1289 | } |
1290 | 1290 | ||
1291 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetPoint"), SuppressUnmanagedCodeSecurity] | 1291 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetPoint"), SuppressUnmanagedCodeSecurity] |
1292 | public extern static void GeomTriMeshGetPoint(IntPtr g, int index, dReal u, dReal v, ref Vector3 outVec); | 1292 | internal extern static void GeomTriMeshGetPoint(IntPtr g, int index, dReal u, dReal v, ref Vector3 outVec); |
1293 | 1293 | ||
1294 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetRayCallback"), SuppressUnmanagedCodeSecurity] | 1294 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetRayCallback"), SuppressUnmanagedCodeSecurity] |
1295 | public static extern TriRayCallback GeomTriMeshGetRayCallback(IntPtr g); | 1295 | internal static extern TriRayCallback GeomTriMeshGetRayCallback(IntPtr g); |
1296 | 1296 | ||
1297 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangle"), SuppressUnmanagedCodeSecurity] | 1297 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangle"), SuppressUnmanagedCodeSecurity] |
1298 | public extern static void GeomTriMeshGetTriangle(IntPtr g, int index, ref Vector3 v0, ref Vector3 v1, ref Vector3 v2); | 1298 | internal extern static void GeomTriMeshGetTriangle(IntPtr g, int index, ref Vector3 v0, ref Vector3 v1, ref Vector3 v2); |
1299 | 1299 | ||
1300 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangleCount"), SuppressUnmanagedCodeSecurity] | 1300 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangleCount"), SuppressUnmanagedCodeSecurity] |
1301 | public extern static int GeomTriMeshGetTriangleCount(IntPtr g); | 1301 | internal extern static int GeomTriMeshGetTriangleCount(IntPtr g); |
1302 | 1302 | ||
1303 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriMeshDataID"), SuppressUnmanagedCodeSecurity] | 1303 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriMeshDataID"), SuppressUnmanagedCodeSecurity] |
1304 | public static extern IntPtr GeomTriMeshGetTriMeshDataID(IntPtr g); | 1304 | internal static extern IntPtr GeomTriMeshGetTriMeshDataID(IntPtr g); |
1305 | 1305 | ||
1306 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshIsTCEnabled"), SuppressUnmanagedCodeSecurity] | 1306 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshIsTCEnabled"), SuppressUnmanagedCodeSecurity] |
1307 | public static extern bool GeomTriMeshIsTCEnabled(IntPtr g, int geomClass); | 1307 | internal static extern bool GeomTriMeshIsTCEnabled(IntPtr g, int geomClass); |
1308 | 1308 | ||
1309 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetArrayCallback"), SuppressUnmanagedCodeSecurity] | 1309 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetArrayCallback"), SuppressUnmanagedCodeSecurity] |
1310 | public static extern void GeomTriMeshSetArrayCallback(IntPtr g, TriArrayCallback arrayCallback); | 1310 | internal static extern void GeomTriMeshSetArrayCallback(IntPtr g, TriArrayCallback arrayCallback); |
1311 | 1311 | ||
1312 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetCallback"), SuppressUnmanagedCodeSecurity] | 1312 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetCallback"), SuppressUnmanagedCodeSecurity] |
1313 | public static extern void GeomTriMeshSetCallback(IntPtr g, TriCallback callback); | 1313 | internal static extern void GeomTriMeshSetCallback(IntPtr g, TriCallback callback); |
1314 | 1314 | ||
1315 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetData"), SuppressUnmanagedCodeSecurity] | 1315 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetData"), SuppressUnmanagedCodeSecurity] |
1316 | public static extern void GeomTriMeshSetData(IntPtr g, IntPtr data); | 1316 | internal static extern void GeomTriMeshSetData(IntPtr g, IntPtr data); |
1317 | 1317 | ||
1318 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity] | 1318 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity] |
1319 | public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref Matrix4 last_trans); | 1319 | internal static extern void GeomTriMeshSetLastTransform(IntPtr g, ref Matrix4 last_trans); |
1320 | 1320 | ||
1321 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity] | 1321 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity] |
1322 | public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref dReal M00); | 1322 | internal static extern void GeomTriMeshSetLastTransform(IntPtr g, ref dReal M00); |
1323 | 1323 | ||
1324 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetRayCallback"), SuppressUnmanagedCodeSecurity] | 1324 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetRayCallback"), SuppressUnmanagedCodeSecurity] |
1325 | public static extern void GeomTriMeshSetRayCallback(IntPtr g, TriRayCallback callback); | 1325 | internal static extern void GeomTriMeshSetRayCallback(IntPtr g, TriRayCallback callback); |
1326 | 1326 | ||
1327 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGetConfiguration"), SuppressUnmanagedCodeSecurity] | 1327 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGetConfiguration"), SuppressUnmanagedCodeSecurity] |
1328 | public static extern IntPtr iGetConfiguration(); | 1328 | internal static extern IntPtr iGetConfiguration(); |
1329 | 1329 | ||
1330 | public static string GetConfiguration() | 1330 | internal static string GetConfiguration() |
1331 | { | 1331 | { |
1332 | IntPtr ptr = iGetConfiguration(); | 1332 | IntPtr ptr = iGetConfiguration(); |
1333 | string s = Marshal.PtrToStringAnsi(ptr); | 1333 | string s = Marshal.PtrToStringAnsi(ptr); |
@@ -1335,691 +1335,691 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1335 | } | 1335 | } |
1336 | 1336 | ||
1337 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceCreate"), SuppressUnmanagedCodeSecurity] | 1337 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceCreate"), SuppressUnmanagedCodeSecurity] |
1338 | public static extern IntPtr HashSpaceCreate(IntPtr space); | 1338 | internal static extern IntPtr HashSpaceCreate(IntPtr space); |
1339 | 1339 | ||
1340 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceGetLevels"), SuppressUnmanagedCodeSecurity] | 1340 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceGetLevels"), SuppressUnmanagedCodeSecurity] |
1341 | public static extern void HashSpaceGetLevels(IntPtr space, out int minlevel, out int maxlevel); | 1341 | internal static extern void HashSpaceGetLevels(IntPtr space, out int minlevel, out int maxlevel); |
1342 | 1342 | ||
1343 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceSetLevels"), SuppressUnmanagedCodeSecurity] | 1343 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceSetLevels"), SuppressUnmanagedCodeSecurity] |
1344 | public static extern void HashSpaceSetLevels(IntPtr space, int minlevel, int maxlevel); | 1344 | internal static extern void HashSpaceSetLevels(IntPtr space, int minlevel, int maxlevel); |
1345 | 1345 | ||
1346 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInfiniteAABB"), SuppressUnmanagedCodeSecurity] | 1346 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInfiniteAABB"), SuppressUnmanagedCodeSecurity] |
1347 | public static extern void InfiniteAABB(IntPtr geom, out AABB aabb); | 1347 | internal static extern void InfiniteAABB(IntPtr geom, out AABB aabb); |
1348 | 1348 | ||
1349 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE"), SuppressUnmanagedCodeSecurity] | 1349 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE"), SuppressUnmanagedCodeSecurity] |
1350 | public static extern void InitODE(); | 1350 | internal static extern void InitODE(); |
1351 | 1351 | ||
1352 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE2"), SuppressUnmanagedCodeSecurity] | 1352 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE2"), SuppressUnmanagedCodeSecurity] |
1353 | public static extern int InitODE2(uint ODEInitFlags); | 1353 | internal static extern int InitODE2(uint ODEInitFlags); |
1354 | 1354 | ||
1355 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dIsPositiveDefinite"), SuppressUnmanagedCodeSecurity] | 1355 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dIsPositiveDefinite"), SuppressUnmanagedCodeSecurity] |
1356 | public static extern int IsPositiveDefinite(ref dReal A, int n); | 1356 | internal static extern int IsPositiveDefinite(ref dReal A, int n); |
1357 | 1357 | ||
1358 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInvertPDMatrix"), SuppressUnmanagedCodeSecurity] | 1358 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInvertPDMatrix"), SuppressUnmanagedCodeSecurity] |
1359 | public static extern int InvertPDMatrix(ref dReal A, out dReal Ainv, int n); | 1359 | internal static extern int InvertPDMatrix(ref dReal A, out dReal Ainv, int n); |
1360 | 1360 | ||
1361 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddAMotorTorques"), SuppressUnmanagedCodeSecurity] | 1361 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddAMotorTorques"), SuppressUnmanagedCodeSecurity] |
1362 | public static extern void JointAddAMotorTorques(IntPtr joint, dReal torque1, dReal torque2, dReal torque3); | 1362 | internal static extern void JointAddAMotorTorques(IntPtr joint, dReal torque1, dReal torque2, dReal torque3); |
1363 | 1363 | ||
1364 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHingeTorque"), SuppressUnmanagedCodeSecurity] | 1364 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHingeTorque"), SuppressUnmanagedCodeSecurity] |
1365 | public static extern void JointAddHingeTorque(IntPtr joint, dReal torque); | 1365 | internal static extern void JointAddHingeTorque(IntPtr joint, dReal torque); |
1366 | 1366 | ||
1367 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHinge2Torque"), SuppressUnmanagedCodeSecurity] | 1367 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHinge2Torque"), SuppressUnmanagedCodeSecurity] |
1368 | public static extern void JointAddHinge2Torques(IntPtr joint, dReal torque1, dReal torque2); | 1368 | internal static extern void JointAddHinge2Torques(IntPtr joint, dReal torque1, dReal torque2); |
1369 | 1369 | ||
1370 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddPRTorque"), SuppressUnmanagedCodeSecurity] | 1370 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddPRTorque"), SuppressUnmanagedCodeSecurity] |
1371 | public static extern void JointAddPRTorque(IntPtr joint, dReal torque); | 1371 | internal static extern void JointAddPRTorque(IntPtr joint, dReal torque); |
1372 | 1372 | ||
1373 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddUniversalTorque"), SuppressUnmanagedCodeSecurity] | 1373 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddUniversalTorque"), SuppressUnmanagedCodeSecurity] |
1374 | public static extern void JointAddUniversalTorques(IntPtr joint, dReal torque1, dReal torque2); | 1374 | internal static extern void JointAddUniversalTorques(IntPtr joint, dReal torque1, dReal torque2); |
1375 | 1375 | ||
1376 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddSliderForce"), SuppressUnmanagedCodeSecurity] | 1376 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddSliderForce"), SuppressUnmanagedCodeSecurity] |
1377 | public static extern void JointAddSliderForce(IntPtr joint, dReal force); | 1377 | internal static extern void JointAddSliderForce(IntPtr joint, dReal force); |
1378 | 1378 | ||
1379 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAttach"), SuppressUnmanagedCodeSecurity] | 1379 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAttach"), SuppressUnmanagedCodeSecurity] |
1380 | public static extern void JointAttach(IntPtr joint, IntPtr body1, IntPtr body2); | 1380 | internal static extern void JointAttach(IntPtr joint, IntPtr body1, IntPtr body2); |
1381 | 1381 | ||
1382 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateAMotor"), SuppressUnmanagedCodeSecurity] | 1382 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateAMotor"), SuppressUnmanagedCodeSecurity] |
1383 | public static extern IntPtr JointCreateAMotor(IntPtr world, IntPtr group); | 1383 | internal static extern IntPtr JointCreateAMotor(IntPtr world, IntPtr group); |
1384 | 1384 | ||
1385 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateBall"), SuppressUnmanagedCodeSecurity] | 1385 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateBall"), SuppressUnmanagedCodeSecurity] |
1386 | public static extern IntPtr JointCreateBall(IntPtr world, IntPtr group); | 1386 | internal static extern IntPtr JointCreateBall(IntPtr world, IntPtr group); |
1387 | 1387 | ||
1388 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity] | 1388 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity] |
1389 | public static extern IntPtr JointCreateContact(IntPtr world, IntPtr group, ref Contact contact); | 1389 | internal static extern IntPtr JointCreateContact(IntPtr world, IntPtr group, ref Contact contact); |
1390 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity] | 1390 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity] |
1391 | public static extern IntPtr JointCreateContactPtr(IntPtr world, IntPtr group, IntPtr contact); | 1391 | internal static extern IntPtr JointCreateContactPtr(IntPtr world, IntPtr group, IntPtr contact); |
1392 | 1392 | ||
1393 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateFixed"), SuppressUnmanagedCodeSecurity] | 1393 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateFixed"), SuppressUnmanagedCodeSecurity] |
1394 | public static extern IntPtr JointCreateFixed(IntPtr world, IntPtr group); | 1394 | internal static extern IntPtr JointCreateFixed(IntPtr world, IntPtr group); |
1395 | 1395 | ||
1396 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge"), SuppressUnmanagedCodeSecurity] | 1396 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge"), SuppressUnmanagedCodeSecurity] |
1397 | public static extern IntPtr JointCreateHinge(IntPtr world, IntPtr group); | 1397 | internal static extern IntPtr JointCreateHinge(IntPtr world, IntPtr group); |
1398 | 1398 | ||
1399 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge2"), SuppressUnmanagedCodeSecurity] | 1399 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge2"), SuppressUnmanagedCodeSecurity] |
1400 | public static extern IntPtr JointCreateHinge2(IntPtr world, IntPtr group); | 1400 | internal static extern IntPtr JointCreateHinge2(IntPtr world, IntPtr group); |
1401 | 1401 | ||
1402 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateLMotor"), SuppressUnmanagedCodeSecurity] | 1402 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateLMotor"), SuppressUnmanagedCodeSecurity] |
1403 | public static extern IntPtr JointCreateLMotor(IntPtr world, IntPtr group); | 1403 | internal static extern IntPtr JointCreateLMotor(IntPtr world, IntPtr group); |
1404 | 1404 | ||
1405 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateNull"), SuppressUnmanagedCodeSecurity] | 1405 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateNull"), SuppressUnmanagedCodeSecurity] |
1406 | public static extern IntPtr JointCreateNull(IntPtr world, IntPtr group); | 1406 | internal static extern IntPtr JointCreateNull(IntPtr world, IntPtr group); |
1407 | 1407 | ||
1408 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePR"), SuppressUnmanagedCodeSecurity] | 1408 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePR"), SuppressUnmanagedCodeSecurity] |
1409 | public static extern IntPtr JointCreatePR(IntPtr world, IntPtr group); | 1409 | internal static extern IntPtr JointCreatePR(IntPtr world, IntPtr group); |
1410 | 1410 | ||
1411 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePlane2D"), SuppressUnmanagedCodeSecurity] | 1411 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePlane2D"), SuppressUnmanagedCodeSecurity] |
1412 | public static extern IntPtr JointCreatePlane2D(IntPtr world, IntPtr group); | 1412 | internal static extern IntPtr JointCreatePlane2D(IntPtr world, IntPtr group); |
1413 | 1413 | ||
1414 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateSlider"), SuppressUnmanagedCodeSecurity] | 1414 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateSlider"), SuppressUnmanagedCodeSecurity] |
1415 | public static extern IntPtr JointCreateSlider(IntPtr world, IntPtr group); | 1415 | internal static extern IntPtr JointCreateSlider(IntPtr world, IntPtr group); |
1416 | 1416 | ||
1417 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateUniversal"), SuppressUnmanagedCodeSecurity] | 1417 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateUniversal"), SuppressUnmanagedCodeSecurity] |
1418 | public static extern IntPtr JointCreateUniversal(IntPtr world, IntPtr group); | 1418 | internal static extern IntPtr JointCreateUniversal(IntPtr world, IntPtr group); |
1419 | 1419 | ||
1420 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointDestroy"), SuppressUnmanagedCodeSecurity] | 1420 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointDestroy"), SuppressUnmanagedCodeSecurity] |
1421 | public static extern void JointDestroy(IntPtr j); | 1421 | internal static extern void JointDestroy(IntPtr j); |
1422 | 1422 | ||
1423 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngle"), SuppressUnmanagedCodeSecurity] | 1423 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngle"), SuppressUnmanagedCodeSecurity] |
1424 | public static extern dReal JointGetAMotorAngle(IntPtr j, int anum); | 1424 | internal static extern dReal JointGetAMotorAngle(IntPtr j, int anum); |
1425 | 1425 | ||
1426 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngleRate"), SuppressUnmanagedCodeSecurity] | 1426 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngleRate"), SuppressUnmanagedCodeSecurity] |
1427 | public static extern dReal JointGetAMotorAngleRate(IntPtr j, int anum); | 1427 | internal static extern dReal JointGetAMotorAngleRate(IntPtr j, int anum); |
1428 | 1428 | ||
1429 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxis"), SuppressUnmanagedCodeSecurity] | 1429 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxis"), SuppressUnmanagedCodeSecurity] |
1430 | public static extern void JointGetAMotorAxis(IntPtr j, int anum, out Vector3 result); | 1430 | internal static extern void JointGetAMotorAxis(IntPtr j, int anum, out Vector3 result); |
1431 | 1431 | ||
1432 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxisRel"), SuppressUnmanagedCodeSecurity] | 1432 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxisRel"), SuppressUnmanagedCodeSecurity] |
1433 | public static extern int JointGetAMotorAxisRel(IntPtr j, int anum); | 1433 | internal static extern int JointGetAMotorAxisRel(IntPtr j, int anum); |
1434 | 1434 | ||
1435 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorMode"), SuppressUnmanagedCodeSecurity] | 1435 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorMode"), SuppressUnmanagedCodeSecurity] |
1436 | public static extern int JointGetAMotorMode(IntPtr j); | 1436 | internal static extern int JointGetAMotorMode(IntPtr j); |
1437 | 1437 | ||
1438 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorNumAxes"), SuppressUnmanagedCodeSecurity] | 1438 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorNumAxes"), SuppressUnmanagedCodeSecurity] |
1439 | public static extern int JointGetAMotorNumAxes(IntPtr j); | 1439 | internal static extern int JointGetAMotorNumAxes(IntPtr j); |
1440 | 1440 | ||
1441 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorParam"), SuppressUnmanagedCodeSecurity] | 1441 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorParam"), SuppressUnmanagedCodeSecurity] |
1442 | public static extern dReal JointGetAMotorParam(IntPtr j, int parameter); | 1442 | internal static extern dReal JointGetAMotorParam(IntPtr j, int parameter); |
1443 | 1443 | ||
1444 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor"), SuppressUnmanagedCodeSecurity] | 1444 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor"), SuppressUnmanagedCodeSecurity] |
1445 | public static extern void JointGetBallAnchor(IntPtr j, out Vector3 result); | 1445 | internal static extern void JointGetBallAnchor(IntPtr j, out Vector3 result); |
1446 | 1446 | ||
1447 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor2"), SuppressUnmanagedCodeSecurity] | 1447 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor2"), SuppressUnmanagedCodeSecurity] |
1448 | public static extern void JointGetBallAnchor2(IntPtr j, out Vector3 result); | 1448 | internal static extern void JointGetBallAnchor2(IntPtr j, out Vector3 result); |
1449 | 1449 | ||
1450 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBody"), SuppressUnmanagedCodeSecurity] | 1450 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBody"), SuppressUnmanagedCodeSecurity] |
1451 | public static extern IntPtr JointGetBody(IntPtr j); | 1451 | internal static extern IntPtr JointGetBody(IntPtr j); |
1452 | 1452 | ||
1453 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetData"), SuppressUnmanagedCodeSecurity] | 1453 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetData"), SuppressUnmanagedCodeSecurity] |
1454 | public static extern IntPtr JointGetData(IntPtr j); | 1454 | internal static extern IntPtr JointGetData(IntPtr j); |
1455 | 1455 | ||
1456 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetFeedback"), SuppressUnmanagedCodeSecurity] | 1456 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetFeedback"), SuppressUnmanagedCodeSecurity] |
1457 | public extern unsafe static JointFeedback* JointGetFeedbackUnsafe(IntPtr j); | 1457 | internal extern unsafe static JointFeedback* JointGetFeedbackUnsafe(IntPtr j); |
1458 | public static JointFeedback JointGetFeedback(IntPtr j) | 1458 | internal static JointFeedback JointGetFeedback(IntPtr j) |
1459 | { | 1459 | { |
1460 | unsafe { return *(JointGetFeedbackUnsafe(j)); } | 1460 | unsafe { return *(JointGetFeedbackUnsafe(j)); } |
1461 | } | 1461 | } |
1462 | 1462 | ||
1463 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor"), SuppressUnmanagedCodeSecurity] | 1463 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor"), SuppressUnmanagedCodeSecurity] |
1464 | public static extern void JointGetHingeAnchor(IntPtr j, out Vector3 result); | 1464 | internal static extern void JointGetHingeAnchor(IntPtr j, out Vector3 result); |
1465 | 1465 | ||
1466 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngle"), SuppressUnmanagedCodeSecurity] | 1466 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngle"), SuppressUnmanagedCodeSecurity] |
1467 | public static extern dReal JointGetHingeAngle(IntPtr j); | 1467 | internal static extern dReal JointGetHingeAngle(IntPtr j); |
1468 | 1468 | ||
1469 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngleRate"), SuppressUnmanagedCodeSecurity] | 1469 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngleRate"), SuppressUnmanagedCodeSecurity] |
1470 | public static extern dReal JointGetHingeAngleRate(IntPtr j); | 1470 | internal static extern dReal JointGetHingeAngleRate(IntPtr j); |
1471 | 1471 | ||
1472 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAxis"), SuppressUnmanagedCodeSecurity] | 1472 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAxis"), SuppressUnmanagedCodeSecurity] |
1473 | public static extern void JointGetHingeAxis(IntPtr j, out Vector3 result); | 1473 | internal static extern void JointGetHingeAxis(IntPtr j, out Vector3 result); |
1474 | 1474 | ||
1475 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeParam"), SuppressUnmanagedCodeSecurity] | 1475 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeParam"), SuppressUnmanagedCodeSecurity] |
1476 | public static extern dReal JointGetHingeParam(IntPtr j, int parameter); | 1476 | internal static extern dReal JointGetHingeParam(IntPtr j, int parameter); |
1477 | 1477 | ||
1478 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1"), SuppressUnmanagedCodeSecurity] | 1478 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1"), SuppressUnmanagedCodeSecurity] |
1479 | public static extern dReal JointGetHinge2Angle1(IntPtr j); | 1479 | internal static extern dReal JointGetHinge2Angle1(IntPtr j); |
1480 | 1480 | ||
1481 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1Rate"), SuppressUnmanagedCodeSecurity] | 1481 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1Rate"), SuppressUnmanagedCodeSecurity] |
1482 | public static extern dReal JointGetHinge2Angle1Rate(IntPtr j); | 1482 | internal static extern dReal JointGetHinge2Angle1Rate(IntPtr j); |
1483 | 1483 | ||
1484 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle2Rate"), SuppressUnmanagedCodeSecurity] | 1484 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle2Rate"), SuppressUnmanagedCodeSecurity] |
1485 | public static extern dReal JointGetHinge2Angle2Rate(IntPtr j); | 1485 | internal static extern dReal JointGetHinge2Angle2Rate(IntPtr j); |
1486 | 1486 | ||
1487 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor2"), SuppressUnmanagedCodeSecurity] | 1487 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor2"), SuppressUnmanagedCodeSecurity] |
1488 | public static extern void JointGetHingeAnchor2(IntPtr j, out Vector3 result); | 1488 | internal static extern void JointGetHingeAnchor2(IntPtr j, out Vector3 result); |
1489 | 1489 | ||
1490 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor"), SuppressUnmanagedCodeSecurity] | 1490 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor"), SuppressUnmanagedCodeSecurity] |
1491 | public static extern void JointGetHinge2Anchor(IntPtr j, out Vector3 result); | 1491 | internal static extern void JointGetHinge2Anchor(IntPtr j, out Vector3 result); |
1492 | 1492 | ||
1493 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor2"), SuppressUnmanagedCodeSecurity] | 1493 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor2"), SuppressUnmanagedCodeSecurity] |
1494 | public static extern void JointGetHinge2Anchor2(IntPtr j, out Vector3 result); | 1494 | internal static extern void JointGetHinge2Anchor2(IntPtr j, out Vector3 result); |
1495 | 1495 | ||
1496 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis1"), SuppressUnmanagedCodeSecurity] | 1496 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis1"), SuppressUnmanagedCodeSecurity] |
1497 | public static extern void JointGetHinge2Axis1(IntPtr j, out Vector3 result); | 1497 | internal static extern void JointGetHinge2Axis1(IntPtr j, out Vector3 result); |
1498 | 1498 | ||
1499 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis2"), SuppressUnmanagedCodeSecurity] | 1499 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis2"), SuppressUnmanagedCodeSecurity] |
1500 | public static extern void JointGetHinge2Axis2(IntPtr j, out Vector3 result); | 1500 | internal static extern void JointGetHinge2Axis2(IntPtr j, out Vector3 result); |
1501 | 1501 | ||
1502 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Param"), SuppressUnmanagedCodeSecurity] | 1502 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Param"), SuppressUnmanagedCodeSecurity] |
1503 | public static extern dReal JointGetHinge2Param(IntPtr j, int parameter); | 1503 | internal static extern dReal JointGetHinge2Param(IntPtr j, int parameter); |
1504 | 1504 | ||
1505 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorAxis"), SuppressUnmanagedCodeSecurity] | 1505 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorAxis"), SuppressUnmanagedCodeSecurity] |
1506 | public static extern void JointGetLMotorAxis(IntPtr j, int anum, out Vector3 result); | 1506 | internal static extern void JointGetLMotorAxis(IntPtr j, int anum, out Vector3 result); |
1507 | 1507 | ||
1508 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorNumAxes"), SuppressUnmanagedCodeSecurity] | 1508 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorNumAxes"), SuppressUnmanagedCodeSecurity] |
1509 | public static extern int JointGetLMotorNumAxes(IntPtr j); | 1509 | internal static extern int JointGetLMotorNumAxes(IntPtr j); |
1510 | 1510 | ||
1511 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorParam"), SuppressUnmanagedCodeSecurity] | 1511 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorParam"), SuppressUnmanagedCodeSecurity] |
1512 | public static extern dReal JointGetLMotorParam(IntPtr j, int parameter); | 1512 | internal static extern dReal JointGetLMotorParam(IntPtr j, int parameter); |
1513 | 1513 | ||
1514 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAnchor"), SuppressUnmanagedCodeSecurity] | 1514 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAnchor"), SuppressUnmanagedCodeSecurity] |
1515 | public static extern void JointGetPRAnchor(IntPtr j, out Vector3 result); | 1515 | internal static extern void JointGetPRAnchor(IntPtr j, out Vector3 result); |
1516 | 1516 | ||
1517 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis1"), SuppressUnmanagedCodeSecurity] | 1517 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis1"), SuppressUnmanagedCodeSecurity] |
1518 | public static extern void JointGetPRAxis1(IntPtr j, out Vector3 result); | 1518 | internal static extern void JointGetPRAxis1(IntPtr j, out Vector3 result); |
1519 | 1519 | ||
1520 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis2"), SuppressUnmanagedCodeSecurity] | 1520 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis2"), SuppressUnmanagedCodeSecurity] |
1521 | public static extern void JointGetPRAxis2(IntPtr j, out Vector3 result); | 1521 | internal static extern void JointGetPRAxis2(IntPtr j, out Vector3 result); |
1522 | 1522 | ||
1523 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRParam"), SuppressUnmanagedCodeSecurity] | 1523 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRParam"), SuppressUnmanagedCodeSecurity] |
1524 | public static extern dReal JointGetPRParam(IntPtr j, int parameter); | 1524 | internal static extern dReal JointGetPRParam(IntPtr j, int parameter); |
1525 | 1525 | ||
1526 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPosition"), SuppressUnmanagedCodeSecurity] | 1526 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPosition"), SuppressUnmanagedCodeSecurity] |
1527 | public static extern dReal JointGetPRPosition(IntPtr j); | 1527 | internal static extern dReal JointGetPRPosition(IntPtr j); |
1528 | 1528 | ||
1529 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPositionRate"), SuppressUnmanagedCodeSecurity] | 1529 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPositionRate"), SuppressUnmanagedCodeSecurity] |
1530 | public static extern dReal JointGetPRPositionRate(IntPtr j); | 1530 | internal static extern dReal JointGetPRPositionRate(IntPtr j); |
1531 | 1531 | ||
1532 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderAxis"), SuppressUnmanagedCodeSecurity] | 1532 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderAxis"), SuppressUnmanagedCodeSecurity] |
1533 | public static extern void JointGetSliderAxis(IntPtr j, out Vector3 result); | 1533 | internal static extern void JointGetSliderAxis(IntPtr j, out Vector3 result); |
1534 | 1534 | ||
1535 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderParam"), SuppressUnmanagedCodeSecurity] | 1535 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderParam"), SuppressUnmanagedCodeSecurity] |
1536 | public static extern dReal JointGetSliderParam(IntPtr j, int parameter); | 1536 | internal static extern dReal JointGetSliderParam(IntPtr j, int parameter); |
1537 | 1537 | ||
1538 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPosition"), SuppressUnmanagedCodeSecurity] | 1538 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPosition"), SuppressUnmanagedCodeSecurity] |
1539 | public static extern dReal JointGetSliderPosition(IntPtr j); | 1539 | internal static extern dReal JointGetSliderPosition(IntPtr j); |
1540 | 1540 | ||
1541 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPositionRate"), SuppressUnmanagedCodeSecurity] | 1541 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPositionRate"), SuppressUnmanagedCodeSecurity] |
1542 | public static extern dReal JointGetSliderPositionRate(IntPtr j); | 1542 | internal static extern dReal JointGetSliderPositionRate(IntPtr j); |
1543 | 1543 | ||
1544 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetType"), SuppressUnmanagedCodeSecurity] | 1544 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetType"), SuppressUnmanagedCodeSecurity] |
1545 | public static extern JointType JointGetType(IntPtr j); | 1545 | internal static extern JointType JointGetType(IntPtr j); |
1546 | 1546 | ||
1547 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor"), SuppressUnmanagedCodeSecurity] | 1547 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor"), SuppressUnmanagedCodeSecurity] |
1548 | public static extern void JointGetUniversalAnchor(IntPtr j, out Vector3 result); | 1548 | internal static extern void JointGetUniversalAnchor(IntPtr j, out Vector3 result); |
1549 | 1549 | ||
1550 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor2"), SuppressUnmanagedCodeSecurity] | 1550 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor2"), SuppressUnmanagedCodeSecurity] |
1551 | public static extern void JointGetUniversalAnchor2(IntPtr j, out Vector3 result); | 1551 | internal static extern void JointGetUniversalAnchor2(IntPtr j, out Vector3 result); |
1552 | 1552 | ||
1553 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1"), SuppressUnmanagedCodeSecurity] | 1553 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1"), SuppressUnmanagedCodeSecurity] |
1554 | public static extern dReal JointGetUniversalAngle1(IntPtr j); | 1554 | internal static extern dReal JointGetUniversalAngle1(IntPtr j); |
1555 | 1555 | ||
1556 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1Rate"), SuppressUnmanagedCodeSecurity] | 1556 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1Rate"), SuppressUnmanagedCodeSecurity] |
1557 | public static extern dReal JointGetUniversalAngle1Rate(IntPtr j); | 1557 | internal static extern dReal JointGetUniversalAngle1Rate(IntPtr j); |
1558 | 1558 | ||
1559 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2"), SuppressUnmanagedCodeSecurity] | 1559 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2"), SuppressUnmanagedCodeSecurity] |
1560 | public static extern dReal JointGetUniversalAngle2(IntPtr j); | 1560 | internal static extern dReal JointGetUniversalAngle2(IntPtr j); |
1561 | 1561 | ||
1562 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2Rate"), SuppressUnmanagedCodeSecurity] | 1562 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2Rate"), SuppressUnmanagedCodeSecurity] |
1563 | public static extern dReal JointGetUniversalAngle2Rate(IntPtr j); | 1563 | internal static extern dReal JointGetUniversalAngle2Rate(IntPtr j); |
1564 | 1564 | ||
1565 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngles"), SuppressUnmanagedCodeSecurity] | 1565 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngles"), SuppressUnmanagedCodeSecurity] |
1566 | public static extern void JointGetUniversalAngles(IntPtr j, out dReal angle1, out dReal angle2); | 1566 | internal static extern void JointGetUniversalAngles(IntPtr j, out dReal angle1, out dReal angle2); |
1567 | 1567 | ||
1568 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis1"), SuppressUnmanagedCodeSecurity] | 1568 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis1"), SuppressUnmanagedCodeSecurity] |
1569 | public static extern void JointGetUniversalAxis1(IntPtr j, out Vector3 result); | 1569 | internal static extern void JointGetUniversalAxis1(IntPtr j, out Vector3 result); |
1570 | 1570 | ||
1571 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis2"), SuppressUnmanagedCodeSecurity] | 1571 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis2"), SuppressUnmanagedCodeSecurity] |
1572 | public static extern void JointGetUniversalAxis2(IntPtr j, out Vector3 result); | 1572 | internal static extern void JointGetUniversalAxis2(IntPtr j, out Vector3 result); |
1573 | 1573 | ||
1574 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalParam"), SuppressUnmanagedCodeSecurity] | 1574 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalParam"), SuppressUnmanagedCodeSecurity] |
1575 | public static extern dReal JointGetUniversalParam(IntPtr j, int parameter); | 1575 | internal static extern dReal JointGetUniversalParam(IntPtr j, int parameter); |
1576 | 1576 | ||
1577 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupCreate"), SuppressUnmanagedCodeSecurity] | 1577 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupCreate"), SuppressUnmanagedCodeSecurity] |
1578 | public static extern IntPtr JointGroupCreate(int max_size); | 1578 | internal static extern IntPtr JointGroupCreate(int max_size); |
1579 | 1579 | ||
1580 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupDestroy"), SuppressUnmanagedCodeSecurity] | 1580 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupDestroy"), SuppressUnmanagedCodeSecurity] |
1581 | public static extern void JointGroupDestroy(IntPtr group); | 1581 | internal static extern void JointGroupDestroy(IntPtr group); |
1582 | 1582 | ||
1583 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupEmpty"), SuppressUnmanagedCodeSecurity] | 1583 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupEmpty"), SuppressUnmanagedCodeSecurity] |
1584 | public static extern void JointGroupEmpty(IntPtr group); | 1584 | internal static extern void JointGroupEmpty(IntPtr group); |
1585 | 1585 | ||
1586 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAngle"), SuppressUnmanagedCodeSecurity] | 1586 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAngle"), SuppressUnmanagedCodeSecurity] |
1587 | public static extern void JointSetAMotorAngle(IntPtr j, int anum, dReal angle); | 1587 | internal static extern void JointSetAMotorAngle(IntPtr j, int anum, dReal angle); |
1588 | 1588 | ||
1589 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAxis"), SuppressUnmanagedCodeSecurity] | 1589 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAxis"), SuppressUnmanagedCodeSecurity] |
1590 | public static extern void JointSetAMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z); | 1590 | internal static extern void JointSetAMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z); |
1591 | 1591 | ||
1592 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorMode"), SuppressUnmanagedCodeSecurity] | 1592 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorMode"), SuppressUnmanagedCodeSecurity] |
1593 | public static extern void JointSetAMotorMode(IntPtr j, int mode); | 1593 | internal static extern void JointSetAMotorMode(IntPtr j, int mode); |
1594 | 1594 | ||
1595 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorNumAxes"), SuppressUnmanagedCodeSecurity] | 1595 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorNumAxes"), SuppressUnmanagedCodeSecurity] |
1596 | public static extern void JointSetAMotorNumAxes(IntPtr group, int num); | 1596 | internal static extern void JointSetAMotorNumAxes(IntPtr group, int num); |
1597 | 1597 | ||
1598 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorParam"), SuppressUnmanagedCodeSecurity] | 1598 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorParam"), SuppressUnmanagedCodeSecurity] |
1599 | public static extern void JointSetAMotorParam(IntPtr group, int parameter, dReal value); | 1599 | internal static extern void JointSetAMotorParam(IntPtr group, int parameter, dReal value); |
1600 | 1600 | ||
1601 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor"), SuppressUnmanagedCodeSecurity] | 1601 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor"), SuppressUnmanagedCodeSecurity] |
1602 | public static extern void JointSetBallAnchor(IntPtr j, dReal x, dReal y, dReal z); | 1602 | internal static extern void JointSetBallAnchor(IntPtr j, dReal x, dReal y, dReal z); |
1603 | 1603 | ||
1604 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor2"), SuppressUnmanagedCodeSecurity] | 1604 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor2"), SuppressUnmanagedCodeSecurity] |
1605 | public static extern void JointSetBallAnchor2(IntPtr j, dReal x, dReal y, dReal z); | 1605 | internal static extern void JointSetBallAnchor2(IntPtr j, dReal x, dReal y, dReal z); |
1606 | 1606 | ||
1607 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetData"), SuppressUnmanagedCodeSecurity] | 1607 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetData"), SuppressUnmanagedCodeSecurity] |
1608 | public static extern void JointSetData(IntPtr j, IntPtr data); | 1608 | internal static extern void JointSetData(IntPtr j, IntPtr data); |
1609 | 1609 | ||
1610 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFeedback"), SuppressUnmanagedCodeSecurity] | 1610 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFeedback"), SuppressUnmanagedCodeSecurity] |
1611 | public static extern void JointSetFeedback(IntPtr j, out JointFeedback feedback); | 1611 | internal static extern void JointSetFeedback(IntPtr j, out JointFeedback feedback); |
1612 | 1612 | ||
1613 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFixed"), SuppressUnmanagedCodeSecurity] | 1613 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFixed"), SuppressUnmanagedCodeSecurity] |
1614 | public static extern void JointSetFixed(IntPtr j); | 1614 | internal static extern void JointSetFixed(IntPtr j); |
1615 | 1615 | ||
1616 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchor"), SuppressUnmanagedCodeSecurity] | 1616 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchor"), SuppressUnmanagedCodeSecurity] |
1617 | public static extern void JointSetHingeAnchor(IntPtr j, dReal x, dReal y, dReal z); | 1617 | internal static extern void JointSetHingeAnchor(IntPtr j, dReal x, dReal y, dReal z); |
1618 | 1618 | ||
1619 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchorDelta"), SuppressUnmanagedCodeSecurity] | 1619 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchorDelta"), SuppressUnmanagedCodeSecurity] |
1620 | public static extern void JointSetHingeAnchorDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); | 1620 | internal static extern void JointSetHingeAnchorDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); |
1621 | 1621 | ||
1622 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAxis"), SuppressUnmanagedCodeSecurity] | 1622 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAxis"), SuppressUnmanagedCodeSecurity] |
1623 | public static extern void JointSetHingeAxis(IntPtr j, dReal x, dReal y, dReal z); | 1623 | internal static extern void JointSetHingeAxis(IntPtr j, dReal x, dReal y, dReal z); |
1624 | 1624 | ||
1625 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeParam"), SuppressUnmanagedCodeSecurity] | 1625 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeParam"), SuppressUnmanagedCodeSecurity] |
1626 | public static extern void JointSetHingeParam(IntPtr j, int parameter, dReal value); | 1626 | internal static extern void JointSetHingeParam(IntPtr j, int parameter, dReal value); |
1627 | 1627 | ||
1628 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Anchor"), SuppressUnmanagedCodeSecurity] | 1628 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Anchor"), SuppressUnmanagedCodeSecurity] |
1629 | public static extern void JointSetHinge2Anchor(IntPtr j, dReal x, dReal y, dReal z); | 1629 | internal static extern void JointSetHinge2Anchor(IntPtr j, dReal x, dReal y, dReal z); |
1630 | 1630 | ||
1631 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis1"), SuppressUnmanagedCodeSecurity] | 1631 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis1"), SuppressUnmanagedCodeSecurity] |
1632 | public static extern void JointSetHinge2Axis1(IntPtr j, dReal x, dReal y, dReal z); | 1632 | internal static extern void JointSetHinge2Axis1(IntPtr j, dReal x, dReal y, dReal z); |
1633 | 1633 | ||
1634 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis2"), SuppressUnmanagedCodeSecurity] | 1634 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis2"), SuppressUnmanagedCodeSecurity] |
1635 | public static extern void JointSetHinge2Axis2(IntPtr j, dReal x, dReal y, dReal z); | 1635 | internal static extern void JointSetHinge2Axis2(IntPtr j, dReal x, dReal y, dReal z); |
1636 | 1636 | ||
1637 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Param"), SuppressUnmanagedCodeSecurity] | 1637 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Param"), SuppressUnmanagedCodeSecurity] |
1638 | public static extern void JointSetHinge2Param(IntPtr j, int parameter, dReal value); | 1638 | internal static extern void JointSetHinge2Param(IntPtr j, int parameter, dReal value); |
1639 | 1639 | ||
1640 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorAxis"), SuppressUnmanagedCodeSecurity] | 1640 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorAxis"), SuppressUnmanagedCodeSecurity] |
1641 | public static extern void JointSetLMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z); | 1641 | internal static extern void JointSetLMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z); |
1642 | 1642 | ||
1643 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorNumAxes"), SuppressUnmanagedCodeSecurity] | 1643 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorNumAxes"), SuppressUnmanagedCodeSecurity] |
1644 | public static extern void JointSetLMotorNumAxes(IntPtr j, int num); | 1644 | internal static extern void JointSetLMotorNumAxes(IntPtr j, int num); |
1645 | 1645 | ||
1646 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorParam"), SuppressUnmanagedCodeSecurity] | 1646 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorParam"), SuppressUnmanagedCodeSecurity] |
1647 | public static extern void JointSetLMotorParam(IntPtr j, int parameter, dReal value); | 1647 | internal static extern void JointSetLMotorParam(IntPtr j, int parameter, dReal value); |
1648 | 1648 | ||
1649 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DAngleParam"), SuppressUnmanagedCodeSecurity] | 1649 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DAngleParam"), SuppressUnmanagedCodeSecurity] |
1650 | public static extern void JointSetPlane2DAngleParam(IntPtr j, int parameter, dReal value); | 1650 | internal static extern void JointSetPlane2DAngleParam(IntPtr j, int parameter, dReal value); |
1651 | 1651 | ||
1652 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DXParam"), SuppressUnmanagedCodeSecurity] | 1652 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DXParam"), SuppressUnmanagedCodeSecurity] |
1653 | public static extern void JointSetPlane2DXParam(IntPtr j, int parameter, dReal value); | 1653 | internal static extern void JointSetPlane2DXParam(IntPtr j, int parameter, dReal value); |
1654 | 1654 | ||
1655 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DYParam"), SuppressUnmanagedCodeSecurity] | 1655 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DYParam"), SuppressUnmanagedCodeSecurity] |
1656 | public static extern void JointSetPlane2DYParam(IntPtr j, int parameter, dReal value); | 1656 | internal static extern void JointSetPlane2DYParam(IntPtr j, int parameter, dReal value); |
1657 | 1657 | ||
1658 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAnchor"), SuppressUnmanagedCodeSecurity] | 1658 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAnchor"), SuppressUnmanagedCodeSecurity] |
1659 | public static extern void JointSetPRAnchor(IntPtr j, dReal x, dReal y, dReal z); | 1659 | internal static extern void JointSetPRAnchor(IntPtr j, dReal x, dReal y, dReal z); |
1660 | 1660 | ||
1661 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis1"), SuppressUnmanagedCodeSecurity] | 1661 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis1"), SuppressUnmanagedCodeSecurity] |
1662 | public static extern void JointSetPRAxis1(IntPtr j, dReal x, dReal y, dReal z); | 1662 | internal static extern void JointSetPRAxis1(IntPtr j, dReal x, dReal y, dReal z); |
1663 | 1663 | ||
1664 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis2"), SuppressUnmanagedCodeSecurity] | 1664 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis2"), SuppressUnmanagedCodeSecurity] |
1665 | public static extern void JointSetPRAxis2(IntPtr j, dReal x, dReal y, dReal z); | 1665 | internal static extern void JointSetPRAxis2(IntPtr j, dReal x, dReal y, dReal z); |
1666 | 1666 | ||
1667 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRParam"), SuppressUnmanagedCodeSecurity] | 1667 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRParam"), SuppressUnmanagedCodeSecurity] |
1668 | public static extern void JointSetPRParam(IntPtr j, int parameter, dReal value); | 1668 | internal static extern void JointSetPRParam(IntPtr j, int parameter, dReal value); |
1669 | 1669 | ||
1670 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxis"), SuppressUnmanagedCodeSecurity] | 1670 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxis"), SuppressUnmanagedCodeSecurity] |
1671 | public static extern void JointSetSliderAxis(IntPtr j, dReal x, dReal y, dReal z); | 1671 | internal static extern void JointSetSliderAxis(IntPtr j, dReal x, dReal y, dReal z); |
1672 | 1672 | ||
1673 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxisDelta"), SuppressUnmanagedCodeSecurity] | 1673 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxisDelta"), SuppressUnmanagedCodeSecurity] |
1674 | public static extern void JointSetSliderAxisDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); | 1674 | internal static extern void JointSetSliderAxisDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); |
1675 | 1675 | ||
1676 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderParam"), SuppressUnmanagedCodeSecurity] | 1676 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderParam"), SuppressUnmanagedCodeSecurity] |
1677 | public static extern void JointSetSliderParam(IntPtr j, int parameter, dReal value); | 1677 | internal static extern void JointSetSliderParam(IntPtr j, int parameter, dReal value); |
1678 | 1678 | ||
1679 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAnchor"), SuppressUnmanagedCodeSecurity] | 1679 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAnchor"), SuppressUnmanagedCodeSecurity] |
1680 | public static extern void JointSetUniversalAnchor(IntPtr j, dReal x, dReal y, dReal z); | 1680 | internal static extern void JointSetUniversalAnchor(IntPtr j, dReal x, dReal y, dReal z); |
1681 | 1681 | ||
1682 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis1"), SuppressUnmanagedCodeSecurity] | 1682 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis1"), SuppressUnmanagedCodeSecurity] |
1683 | public static extern void JointSetUniversalAxis1(IntPtr j, dReal x, dReal y, dReal z); | 1683 | internal static extern void JointSetUniversalAxis1(IntPtr j, dReal x, dReal y, dReal z); |
1684 | 1684 | ||
1685 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis2"), SuppressUnmanagedCodeSecurity] | 1685 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis2"), SuppressUnmanagedCodeSecurity] |
1686 | public static extern void JointSetUniversalAxis2(IntPtr j, dReal x, dReal y, dReal z); | 1686 | internal static extern void JointSetUniversalAxis2(IntPtr j, dReal x, dReal y, dReal z); |
1687 | 1687 | ||
1688 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalParam"), SuppressUnmanagedCodeSecurity] | 1688 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalParam"), SuppressUnmanagedCodeSecurity] |
1689 | public static extern void JointSetUniversalParam(IntPtr j, int parameter, dReal value); | 1689 | internal static extern void JointSetUniversalParam(IntPtr j, int parameter, dReal value); |
1690 | 1690 | ||
1691 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dLDLTAddTL"), SuppressUnmanagedCodeSecurity] | 1691 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dLDLTAddTL"), SuppressUnmanagedCodeSecurity] |
1692 | public static extern void LDLTAddTL(ref dReal L, ref dReal d, ref dReal a, int n, int nskip); | 1692 | internal static extern void LDLTAddTL(ref dReal L, ref dReal d, ref dReal a, int n, int nskip); |
1693 | 1693 | ||
1694 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdd"), SuppressUnmanagedCodeSecurity] | 1694 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdd"), SuppressUnmanagedCodeSecurity] |
1695 | public static extern void MassAdd(ref Mass a, ref Mass b); | 1695 | internal static extern void MassAdd(ref Mass a, ref Mass b); |
1696 | 1696 | ||
1697 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdjust"), SuppressUnmanagedCodeSecurity] | 1697 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdjust"), SuppressUnmanagedCodeSecurity] |
1698 | public static extern void MassAdjust(ref Mass m, dReal newmass); | 1698 | internal static extern void MassAdjust(ref Mass m, dReal newmass); |
1699 | 1699 | ||
1700 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassCheck"), SuppressUnmanagedCodeSecurity] | 1700 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassCheck"), SuppressUnmanagedCodeSecurity] |
1701 | public static extern bool MassCheck(ref Mass m); | 1701 | internal static extern bool MassCheck(ref Mass m); |
1702 | 1702 | ||
1703 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity] | 1703 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity] |
1704 | public static extern void MassRotate(ref Mass mass, ref Matrix3 R); | 1704 | internal static extern void MassRotate(ref Mass mass, ref Matrix3 R); |
1705 | 1705 | ||
1706 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity] | 1706 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity] |
1707 | public static extern void MassRotate(ref Mass mass, ref dReal M00); | 1707 | internal static extern void MassRotate(ref Mass mass, ref dReal M00); |
1708 | 1708 | ||
1709 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBox"), SuppressUnmanagedCodeSecurity] | 1709 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBox"), SuppressUnmanagedCodeSecurity] |
1710 | public static extern void MassSetBox(out Mass mass, dReal density, dReal lx, dReal ly, dReal lz); | 1710 | internal static extern void MassSetBox(out Mass mass, dReal density, dReal lx, dReal ly, dReal lz); |
1711 | 1711 | ||
1712 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBoxTotal"), SuppressUnmanagedCodeSecurity] | 1712 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBoxTotal"), SuppressUnmanagedCodeSecurity] |
1713 | public static extern void MassSetBoxTotal(out Mass mass, dReal total_mass, dReal lx, dReal ly, dReal lz); | 1713 | internal static extern void MassSetBoxTotal(out Mass mass, dReal total_mass, dReal lx, dReal ly, dReal lz); |
1714 | 1714 | ||
1715 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsule"), SuppressUnmanagedCodeSecurity] | 1715 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsule"), SuppressUnmanagedCodeSecurity] |
1716 | public static extern void MassSetCapsule(out Mass mass, dReal density, int direction, dReal radius, dReal length); | 1716 | internal static extern void MassSetCapsule(out Mass mass, dReal density, int direction, dReal radius, dReal length); |
1717 | 1717 | ||
1718 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsuleTotal"), SuppressUnmanagedCodeSecurity] | 1718 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsuleTotal"), SuppressUnmanagedCodeSecurity] |
1719 | public static extern void MassSetCapsuleTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length); | 1719 | internal static extern void MassSetCapsuleTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length); |
1720 | 1720 | ||
1721 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinder"), SuppressUnmanagedCodeSecurity] | 1721 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinder"), SuppressUnmanagedCodeSecurity] |
1722 | public static extern void MassSetCylinder(out Mass mass, dReal density, int direction, dReal radius, dReal length); | 1722 | internal static extern void MassSetCylinder(out Mass mass, dReal density, int direction, dReal radius, dReal length); |
1723 | 1723 | ||
1724 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinderTotal"), SuppressUnmanagedCodeSecurity] | 1724 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinderTotal"), SuppressUnmanagedCodeSecurity] |
1725 | public static extern void MassSetCylinderTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length); | 1725 | internal static extern void MassSetCylinderTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length); |
1726 | 1726 | ||
1727 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetParameters"), SuppressUnmanagedCodeSecurity] | 1727 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetParameters"), SuppressUnmanagedCodeSecurity] |
1728 | public static extern void MassSetParameters(out Mass mass, dReal themass, | 1728 | internal static extern void MassSetParameters(out Mass mass, dReal themass, |
1729 | dReal cgx, dReal cgy, dReal cgz, | 1729 | dReal cgx, dReal cgy, dReal cgz, |
1730 | dReal i11, dReal i22, dReal i33, | 1730 | dReal i11, dReal i22, dReal i33, |
1731 | dReal i12, dReal i13, dReal i23); | 1731 | dReal i12, dReal i13, dReal i23); |
1732 | 1732 | ||
1733 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphere"), SuppressUnmanagedCodeSecurity] | 1733 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphere"), SuppressUnmanagedCodeSecurity] |
1734 | public static extern void MassSetSphere(out Mass mass, dReal density, dReal radius); | 1734 | internal static extern void MassSetSphere(out Mass mass, dReal density, dReal radius); |
1735 | 1735 | ||
1736 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphereTotal"), SuppressUnmanagedCodeSecurity] | 1736 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphereTotal"), SuppressUnmanagedCodeSecurity] |
1737 | public static extern void dMassSetSphereTotal(out Mass mass, dReal total_mass, dReal radius); | 1737 | internal static extern void dMassSetSphereTotal(out Mass mass, dReal total_mass, dReal radius); |
1738 | 1738 | ||
1739 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetTrimesh"), SuppressUnmanagedCodeSecurity] | 1739 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetTrimesh"), SuppressUnmanagedCodeSecurity] |
1740 | public static extern void MassSetTrimesh(out Mass mass, dReal density, IntPtr g); | 1740 | internal static extern void MassSetTrimesh(out Mass mass, dReal density, IntPtr g); |
1741 | 1741 | ||
1742 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetZero"), SuppressUnmanagedCodeSecurity] | 1742 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetZero"), SuppressUnmanagedCodeSecurity] |
1743 | public static extern void MassSetZero(out Mass mass); | 1743 | internal static extern void MassSetZero(out Mass mass); |
1744 | 1744 | ||
1745 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassTranslate"), SuppressUnmanagedCodeSecurity] | 1745 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassTranslate"), SuppressUnmanagedCodeSecurity] |
1746 | public static extern void MassTranslate(ref Mass mass, dReal x, dReal y, dReal z); | 1746 | internal static extern void MassTranslate(ref Mass mass, dReal x, dReal y, dReal z); |
1747 | 1747 | ||
1748 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply0"), SuppressUnmanagedCodeSecurity] | 1748 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply0"), SuppressUnmanagedCodeSecurity] |
1749 | public static extern void Multiply0(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); | 1749 | internal static extern void Multiply0(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); |
1750 | 1750 | ||
1751 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply0"), SuppressUnmanagedCodeSecurity] | 1751 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply0"), SuppressUnmanagedCodeSecurity] |
1752 | private static extern void MultiplyiM3V3(out Vector3 vout, ref Matrix3 matrix, ref Vector3 vect,int p, int q, int r); | 1752 | private static extern void MultiplyiM3V3(out Vector3 vout, ref Matrix3 matrix, ref Vector3 vect,int p, int q, int r); |
1753 | public static void MultiplyM3V3(out Vector3 outvector, ref Matrix3 matrix, ref Vector3 invector) | 1753 | internal static void MultiplyM3V3(out Vector3 outvector, ref Matrix3 matrix, ref Vector3 invector) |
1754 | { | 1754 | { |
1755 | MultiplyiM3V3(out outvector, ref matrix, ref invector, 3, 3, 1); | 1755 | MultiplyiM3V3(out outvector, ref matrix, ref invector, 3, 3, 1); |
1756 | } | 1756 | } |
1757 | 1757 | ||
1758 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply1"), SuppressUnmanagedCodeSecurity] | 1758 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply1"), SuppressUnmanagedCodeSecurity] |
1759 | public static extern void Multiply1(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); | 1759 | internal static extern void Multiply1(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); |
1760 | 1760 | ||
1761 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply2"), SuppressUnmanagedCodeSecurity] | 1761 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply2"), SuppressUnmanagedCodeSecurity] |
1762 | public static extern void Multiply2(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); | 1762 | internal static extern void Multiply2(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); |
1763 | 1763 | ||
1764 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQFromAxisAndAngle"), SuppressUnmanagedCodeSecurity] | 1764 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQFromAxisAndAngle"), SuppressUnmanagedCodeSecurity] |
1765 | public static extern void QFromAxisAndAngle(out Quaternion q, dReal ax, dReal ay, dReal az, dReal angle); | 1765 | internal static extern void QFromAxisAndAngle(out Quaternion q, dReal ax, dReal ay, dReal az, dReal angle); |
1766 | 1766 | ||
1767 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQfromR"), SuppressUnmanagedCodeSecurity] | 1767 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQfromR"), SuppressUnmanagedCodeSecurity] |
1768 | public static extern void QfromR(out Quaternion q, ref Matrix3 R); | 1768 | internal static extern void QfromR(out Quaternion q, ref Matrix3 R); |
1769 | 1769 | ||
1770 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply0"), SuppressUnmanagedCodeSecurity] | 1770 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply0"), SuppressUnmanagedCodeSecurity] |
1771 | public static extern void QMultiply0(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); | 1771 | internal static extern void QMultiply0(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); |
1772 | 1772 | ||
1773 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply1"), SuppressUnmanagedCodeSecurity] | 1773 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply1"), SuppressUnmanagedCodeSecurity] |
1774 | public static extern void QMultiply1(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); | 1774 | internal static extern void QMultiply1(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); |
1775 | 1775 | ||
1776 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply2"), SuppressUnmanagedCodeSecurity] | 1776 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply2"), SuppressUnmanagedCodeSecurity] |
1777 | public static extern void QMultiply2(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); | 1777 | internal static extern void QMultiply2(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); |
1778 | 1778 | ||
1779 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply3"), SuppressUnmanagedCodeSecurity] | 1779 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply3"), SuppressUnmanagedCodeSecurity] |
1780 | public static extern void QMultiply3(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); | 1780 | internal static extern void QMultiply3(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); |
1781 | 1781 | ||
1782 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQSetIdentity"), SuppressUnmanagedCodeSecurity] | 1782 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQSetIdentity"), SuppressUnmanagedCodeSecurity] |
1783 | public static extern void QSetIdentity(out Quaternion q); | 1783 | internal static extern void QSetIdentity(out Quaternion q); |
1784 | 1784 | ||
1785 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity] | 1785 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity] |
1786 | public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref Vector3 center, ref Vector3 extents, int depth); | 1786 | internal static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref Vector3 center, ref Vector3 extents, int depth); |
1787 | 1787 | ||
1788 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity] | 1788 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity] |
1789 | public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref dReal centerX, ref dReal extentsX, int depth); | 1789 | internal static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref dReal centerX, ref dReal extentsX, int depth); |
1790 | 1790 | ||
1791 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRandReal"), SuppressUnmanagedCodeSecurity] | 1791 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRandReal"), SuppressUnmanagedCodeSecurity] |
1792 | public static extern dReal RandReal(); | 1792 | internal static extern dReal RandReal(); |
1793 | 1793 | ||
1794 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFrom2Axes"), SuppressUnmanagedCodeSecurity] | 1794 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFrom2Axes"), SuppressUnmanagedCodeSecurity] |
1795 | public static extern void RFrom2Axes(out Matrix3 R, dReal ax, dReal ay, dReal az, dReal bx, dReal by, dReal bz); | 1795 | internal static extern void RFrom2Axes(out Matrix3 R, dReal ax, dReal ay, dReal az, dReal bx, dReal by, dReal bz); |
1796 | 1796 | ||
1797 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromAxisAndAngle"), SuppressUnmanagedCodeSecurity] | 1797 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromAxisAndAngle"), SuppressUnmanagedCodeSecurity] |
1798 | public static extern void RFromAxisAndAngle(out Matrix3 R, dReal x, dReal y, dReal z, dReal angle); | 1798 | internal static extern void RFromAxisAndAngle(out Matrix3 R, dReal x, dReal y, dReal z, dReal angle); |
1799 | 1799 | ||
1800 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromEulerAngles"), SuppressUnmanagedCodeSecurity] | 1800 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromEulerAngles"), SuppressUnmanagedCodeSecurity] |
1801 | public static extern void RFromEulerAngles(out Matrix3 R, dReal phi, dReal theta, dReal psi); | 1801 | internal static extern void RFromEulerAngles(out Matrix3 R, dReal phi, dReal theta, dReal psi); |
1802 | 1802 | ||
1803 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRfromQ"), SuppressUnmanagedCodeSecurity] | 1803 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRfromQ"), SuppressUnmanagedCodeSecurity] |
1804 | public static extern void RfromQ(out Matrix3 R, ref Quaternion q); | 1804 | internal static extern void RfromQ(out Matrix3 R, ref Quaternion q); |
1805 | 1805 | ||
1806 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromZAxis"), SuppressUnmanagedCodeSecurity] | 1806 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromZAxis"), SuppressUnmanagedCodeSecurity] |
1807 | public static extern void RFromZAxis(out Matrix3 R, dReal ax, dReal ay, dReal az); | 1807 | internal static extern void RFromZAxis(out Matrix3 R, dReal ax, dReal ay, dReal az); |
1808 | 1808 | ||
1809 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRSetIdentity"), SuppressUnmanagedCodeSecurity] | 1809 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRSetIdentity"), SuppressUnmanagedCodeSecurity] |
1810 | public static extern void RSetIdentity(out Matrix3 R); | 1810 | internal static extern void RSetIdentity(out Matrix3 R); |
1811 | 1811 | ||
1812 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetValue"), SuppressUnmanagedCodeSecurity] | 1812 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetValue"), SuppressUnmanagedCodeSecurity] |
1813 | public static extern void SetValue(out dReal a, int n); | 1813 | internal static extern void SetValue(out dReal a, int n); |
1814 | 1814 | ||
1815 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetZero"), SuppressUnmanagedCodeSecurity] | 1815 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetZero"), SuppressUnmanagedCodeSecurity] |
1816 | public static extern void SetZero(out dReal a, int n); | 1816 | internal static extern void SetZero(out dReal a, int n); |
1817 | 1817 | ||
1818 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSimpleSpaceCreate"), SuppressUnmanagedCodeSecurity] | 1818 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSimpleSpaceCreate"), SuppressUnmanagedCodeSecurity] |
1819 | public static extern IntPtr SimpleSpaceCreate(IntPtr space); | 1819 | internal static extern IntPtr SimpleSpaceCreate(IntPtr space); |
1820 | 1820 | ||
1821 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveCholesky"), SuppressUnmanagedCodeSecurity] | 1821 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveCholesky"), SuppressUnmanagedCodeSecurity] |
1822 | public static extern void SolveCholesky(ref dReal L, out dReal b, int n); | 1822 | internal static extern void SolveCholesky(ref dReal L, out dReal b, int n); |
1823 | 1823 | ||
1824 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1"), SuppressUnmanagedCodeSecurity] | 1824 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1"), SuppressUnmanagedCodeSecurity] |
1825 | public static extern void SolveL1(ref dReal L, out dReal b, int n, int nskip); | 1825 | internal static extern void SolveL1(ref dReal L, out dReal b, int n, int nskip); |
1826 | 1826 | ||
1827 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1T"), SuppressUnmanagedCodeSecurity] | 1827 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1T"), SuppressUnmanagedCodeSecurity] |
1828 | public static extern void SolveL1T(ref dReal L, out dReal b, int n, int nskip); | 1828 | internal static extern void SolveL1T(ref dReal L, out dReal b, int n, int nskip); |
1829 | 1829 | ||
1830 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveLDLT"), SuppressUnmanagedCodeSecurity] | 1830 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveLDLT"), SuppressUnmanagedCodeSecurity] |
1831 | public static extern void SolveLDLT(ref dReal L, ref dReal d, out dReal b, int n, int nskip); | 1831 | internal static extern void SolveLDLT(ref dReal L, ref dReal d, out dReal b, int n, int nskip); |
1832 | 1832 | ||
1833 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceAdd"), SuppressUnmanagedCodeSecurity] | 1833 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceAdd"), SuppressUnmanagedCodeSecurity] |
1834 | public static extern void SpaceAdd(IntPtr space, IntPtr geom); | 1834 | internal static extern void SpaceAdd(IntPtr space, IntPtr geom); |
1835 | 1835 | ||
1836 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceLockQuery"), SuppressUnmanagedCodeSecurity] | 1836 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceLockQuery"), SuppressUnmanagedCodeSecurity] |
1837 | public static extern bool SpaceLockQuery(IntPtr space); | 1837 | internal static extern bool SpaceLockQuery(IntPtr space); |
1838 | 1838 | ||
1839 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceClean"), SuppressUnmanagedCodeSecurity] | 1839 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceClean"), SuppressUnmanagedCodeSecurity] |
1840 | public static extern void SpaceClean(IntPtr space); | 1840 | internal static extern void SpaceClean(IntPtr space); |
1841 | 1841 | ||
1842 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide"), SuppressUnmanagedCodeSecurity] | 1842 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide"), SuppressUnmanagedCodeSecurity] |
1843 | public static extern void SpaceCollide(IntPtr space, IntPtr data, NearCallback callback); | 1843 | internal static extern void SpaceCollide(IntPtr space, IntPtr data, NearCallback callback); |
1844 | 1844 | ||
1845 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide2"), SuppressUnmanagedCodeSecurity] | 1845 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide2"), SuppressUnmanagedCodeSecurity] |
1846 | public static extern void SpaceCollide2(IntPtr space1, IntPtr space2, IntPtr data, NearCallback callback); | 1846 | internal static extern void SpaceCollide2(IntPtr space1, IntPtr space2, IntPtr data, NearCallback callback); |
1847 | 1847 | ||
1848 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceDestroy"), SuppressUnmanagedCodeSecurity] | 1848 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceDestroy"), SuppressUnmanagedCodeSecurity] |
1849 | public static extern void SpaceDestroy(IntPtr space); | 1849 | internal static extern void SpaceDestroy(IntPtr space); |
1850 | 1850 | ||
1851 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetCleanup"), SuppressUnmanagedCodeSecurity] | 1851 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetCleanup"), SuppressUnmanagedCodeSecurity] |
1852 | public static extern bool SpaceGetCleanup(IntPtr space); | 1852 | internal static extern bool SpaceGetCleanup(IntPtr space); |
1853 | 1853 | ||
1854 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetNumGeoms"), SuppressUnmanagedCodeSecurity] | 1854 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetNumGeoms"), SuppressUnmanagedCodeSecurity] |
1855 | public static extern int SpaceGetNumGeoms(IntPtr space); | 1855 | internal static extern int SpaceGetNumGeoms(IntPtr space); |
1856 | 1856 | ||
1857 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetGeom"), SuppressUnmanagedCodeSecurity] | 1857 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetGeom"), SuppressUnmanagedCodeSecurity] |
1858 | public static extern IntPtr SpaceGetGeom(IntPtr space, int i); | 1858 | internal static extern IntPtr SpaceGetGeom(IntPtr space, int i); |
1859 | 1859 | ||
1860 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetSublevel"), SuppressUnmanagedCodeSecurity] | 1860 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetSublevel"), SuppressUnmanagedCodeSecurity] |
1861 | public static extern int SpaceGetSublevel(IntPtr space); | 1861 | internal static extern int SpaceGetSublevel(IntPtr space); |
1862 | 1862 | ||
1863 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceQuery"), SuppressUnmanagedCodeSecurity] | 1863 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceQuery"), SuppressUnmanagedCodeSecurity] |
1864 | public static extern bool SpaceQuery(IntPtr space, IntPtr geom); | 1864 | internal static extern bool SpaceQuery(IntPtr space, IntPtr geom); |
1865 | 1865 | ||
1866 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceRemove"), SuppressUnmanagedCodeSecurity] | 1866 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceRemove"), SuppressUnmanagedCodeSecurity] |
1867 | public static extern void SpaceRemove(IntPtr space, IntPtr geom); | 1867 | internal static extern void SpaceRemove(IntPtr space, IntPtr geom); |
1868 | 1868 | ||
1869 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetCleanup"), SuppressUnmanagedCodeSecurity] | 1869 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetCleanup"), SuppressUnmanagedCodeSecurity] |
1870 | public static extern void SpaceSetCleanup(IntPtr space, bool mode); | 1870 | internal static extern void SpaceSetCleanup(IntPtr space, bool mode); |
1871 | 1871 | ||
1872 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetSublevel"), SuppressUnmanagedCodeSecurity] | 1872 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetSublevel"), SuppressUnmanagedCodeSecurity] |
1873 | public static extern void SpaceSetSublevel(IntPtr space, int sublevel); | 1873 | internal static extern void SpaceSetSublevel(IntPtr space, int sublevel); |
1874 | 1874 | ||
1875 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSweepAndPruneSpaceCreate"), SuppressUnmanagedCodeSecurity] | 1875 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSweepAndPruneSpaceCreate"), SuppressUnmanagedCodeSecurity] |
1876 | public static extern IntPtr SweepAndPruneSpaceCreate(IntPtr space, int AxisOrder); | 1876 | internal static extern IntPtr SweepAndPruneSpaceCreate(IntPtr space, int AxisOrder); |
1877 | 1877 | ||
1878 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dVectorScale"), SuppressUnmanagedCodeSecurity] | 1878 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dVectorScale"), SuppressUnmanagedCodeSecurity] |
1879 | public static extern void VectorScale(out dReal a, ref dReal d, int n); | 1879 | internal static extern void VectorScale(out dReal a, ref dReal d, int n); |
1880 | 1880 | ||
1881 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldCreate"), SuppressUnmanagedCodeSecurity] | 1881 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldCreate"), SuppressUnmanagedCodeSecurity] |
1882 | public static extern IntPtr WorldCreate(); | 1882 | internal static extern IntPtr WorldCreate(); |
1883 | 1883 | ||
1884 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldDestroy"), SuppressUnmanagedCodeSecurity] | 1884 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldDestroy"), SuppressUnmanagedCodeSecurity] |
1885 | public static extern void WorldDestroy(IntPtr world); | 1885 | internal static extern void WorldDestroy(IntPtr world); |
1886 | 1886 | ||
1887 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity] | 1887 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity] |
1888 | public static extern int WorldGetAutoDisableAverageSamplesCount(IntPtr world); | 1888 | internal static extern int WorldGetAutoDisableAverageSamplesCount(IntPtr world); |
1889 | 1889 | ||
1890 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] | 1890 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] |
1891 | public static extern dReal WorldGetAutoDisableAngularThreshold(IntPtr world); | 1891 | internal static extern dReal WorldGetAutoDisableAngularThreshold(IntPtr world); |
1892 | 1892 | ||
1893 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] | 1893 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] |
1894 | public static extern bool WorldGetAutoDisableFlag(IntPtr world); | 1894 | internal static extern bool WorldGetAutoDisableFlag(IntPtr world); |
1895 | 1895 | ||
1896 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] | 1896 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] |
1897 | public static extern dReal WorldGetAutoDisableLinearThreshold(IntPtr world); | 1897 | internal static extern dReal WorldGetAutoDisableLinearThreshold(IntPtr world); |
1898 | 1898 | ||
1899 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] | 1899 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] |
1900 | public static extern int WorldGetAutoDisableSteps(IntPtr world); | 1900 | internal static extern int WorldGetAutoDisableSteps(IntPtr world); |
1901 | 1901 | ||
1902 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableTime"), SuppressUnmanagedCodeSecurity] | 1902 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableTime"), SuppressUnmanagedCodeSecurity] |
1903 | public static extern dReal WorldGetAutoDisableTime(IntPtr world); | 1903 | internal static extern dReal WorldGetAutoDisableTime(IntPtr world); |
1904 | 1904 | ||
1905 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity] | 1905 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity] |
1906 | public static extern int WorldGetAutoEnableDepthSF1(IntPtr world); | 1906 | internal static extern int WorldGetAutoEnableDepthSF1(IntPtr world); |
1907 | 1907 | ||
1908 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetCFM"), SuppressUnmanagedCodeSecurity] | 1908 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetCFM"), SuppressUnmanagedCodeSecurity] |
1909 | public static extern dReal WorldGetCFM(IntPtr world); | 1909 | internal static extern dReal WorldGetCFM(IntPtr world); |
1910 | 1910 | ||
1911 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetERP"), SuppressUnmanagedCodeSecurity] | 1911 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetERP"), SuppressUnmanagedCodeSecurity] |
1912 | public static extern dReal WorldGetERP(IntPtr world); | 1912 | internal static extern dReal WorldGetERP(IntPtr world); |
1913 | 1913 | ||
1914 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity] | 1914 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity] |
1915 | public static extern void WorldGetGravity(IntPtr world, out Vector3 gravity); | 1915 | internal static extern void WorldGetGravity(IntPtr world, out Vector3 gravity); |
1916 | 1916 | ||
1917 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity] | 1917 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity] |
1918 | public static extern void WorldGetGravity(IntPtr world, out dReal X); | 1918 | internal static extern void WorldGetGravity(IntPtr world, out dReal X); |
1919 | 1919 | ||
1920 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity] | 1920 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity] |
1921 | public static extern dReal WorldGetContactMaxCorrectingVel(IntPtr world); | 1921 | internal static extern dReal WorldGetContactMaxCorrectingVel(IntPtr world); |
1922 | 1922 | ||
1923 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity] | 1923 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity] |
1924 | public static extern dReal WorldGetContactSurfaceLayer(IntPtr world); | 1924 | internal static extern dReal WorldGetContactSurfaceLayer(IntPtr world); |
1925 | 1925 | ||
1926 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAngularDamping"), SuppressUnmanagedCodeSecurity] | 1926 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAngularDamping"), SuppressUnmanagedCodeSecurity] |
1927 | public static extern dReal WorldGetAngularDamping(IntPtr world); | 1927 | internal static extern dReal WorldGetAngularDamping(IntPtr world); |
1928 | 1928 | ||
1929 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] | 1929 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] |
1930 | public static extern dReal WorldGetAngularDampingThreshold(IntPtr world); | 1930 | internal static extern dReal WorldGetAngularDampingThreshold(IntPtr world); |
1931 | 1931 | ||
1932 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetLinearDamping"), SuppressUnmanagedCodeSecurity] | 1932 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetLinearDamping"), SuppressUnmanagedCodeSecurity] |
1933 | public static extern dReal WorldGetLinearDamping(IntPtr world); | 1933 | internal static extern dReal WorldGetLinearDamping(IntPtr world); |
1934 | 1934 | ||
1935 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] | 1935 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] |
1936 | public static extern dReal WorldGetLinearDampingThreshold(IntPtr world); | 1936 | internal static extern dReal WorldGetLinearDampingThreshold(IntPtr world); |
1937 | 1937 | ||
1938 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity] | 1938 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity] |
1939 | public static extern int WorldGetQuickStepNumIterations(IntPtr world); | 1939 | internal static extern int WorldGetQuickStepNumIterations(IntPtr world); |
1940 | 1940 | ||
1941 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepW"), SuppressUnmanagedCodeSecurity] | 1941 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepW"), SuppressUnmanagedCodeSecurity] |
1942 | public static extern dReal WorldGetQuickStepW(IntPtr world); | 1942 | internal static extern dReal WorldGetQuickStepW(IntPtr world); |
1943 | 1943 | ||
1944 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity] | 1944 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity] |
1945 | public static extern dReal WorldGetMaxAngularSpeed(IntPtr world); | 1945 | internal static extern dReal WorldGetMaxAngularSpeed(IntPtr world); |
1946 | 1946 | ||
1947 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity] | 1947 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity] |
1948 | public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out Vector3 force); | 1948 | internal static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out Vector3 force); |
1949 | 1949 | ||
1950 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity] | 1950 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity] |
1951 | public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out dReal forceX); | 1951 | internal static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out dReal forceX); |
1952 | 1952 | ||
1953 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldQuickStep"), SuppressUnmanagedCodeSecurity] | 1953 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldQuickStep"), SuppressUnmanagedCodeSecurity] |
1954 | public static extern void WorldQuickStep(IntPtr world, dReal stepsize); | 1954 | internal static extern void WorldQuickStep(IntPtr world, dReal stepsize); |
1955 | 1955 | ||
1956 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDamping"), SuppressUnmanagedCodeSecurity] | 1956 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDamping"), SuppressUnmanagedCodeSecurity] |
1957 | public static extern void WorldSetAngularDamping(IntPtr world, dReal scale); | 1957 | internal static extern void WorldSetAngularDamping(IntPtr world, dReal scale); |
1958 | 1958 | ||
1959 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] | 1959 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] |
1960 | public static extern void WorldSetAngularDampingThreshold(IntPtr world, dReal threshold); | 1960 | internal static extern void WorldSetAngularDampingThreshold(IntPtr world, dReal threshold); |
1961 | 1961 | ||
1962 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] | 1962 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] |
1963 | public static extern void WorldSetAutoDisableAngularThreshold(IntPtr world, dReal angular_threshold); | 1963 | internal static extern void WorldSetAutoDisableAngularThreshold(IntPtr world, dReal angular_threshold); |
1964 | 1964 | ||
1965 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity] | 1965 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity] |
1966 | public static extern void WorldSetAutoDisableAverageSamplesCount(IntPtr world, int average_samples_count); | 1966 | internal static extern void WorldSetAutoDisableAverageSamplesCount(IntPtr world, int average_samples_count); |
1967 | 1967 | ||
1968 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] | 1968 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] |
1969 | public static extern void WorldSetAutoDisableFlag(IntPtr world, bool do_auto_disable); | 1969 | internal static extern void WorldSetAutoDisableFlag(IntPtr world, bool do_auto_disable); |
1970 | 1970 | ||
1971 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] | 1971 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] |
1972 | public static extern void WorldSetAutoDisableLinearThreshold(IntPtr world, dReal linear_threshold); | 1972 | internal static extern void WorldSetAutoDisableLinearThreshold(IntPtr world, dReal linear_threshold); |
1973 | 1973 | ||
1974 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] | 1974 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] |
1975 | public static extern void WorldSetAutoDisableSteps(IntPtr world, int steps); | 1975 | internal static extern void WorldSetAutoDisableSteps(IntPtr world, int steps); |
1976 | 1976 | ||
1977 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableTime"), SuppressUnmanagedCodeSecurity] | 1977 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableTime"), SuppressUnmanagedCodeSecurity] |
1978 | public static extern void WorldSetAutoDisableTime(IntPtr world, dReal time); | 1978 | internal static extern void WorldSetAutoDisableTime(IntPtr world, dReal time); |
1979 | 1979 | ||
1980 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity] | 1980 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity] |
1981 | public static extern void WorldSetAutoEnableDepthSF1(IntPtr world, int autoEnableDepth); | 1981 | internal static extern void WorldSetAutoEnableDepthSF1(IntPtr world, int autoEnableDepth); |
1982 | 1982 | ||
1983 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetCFM"), SuppressUnmanagedCodeSecurity] | 1983 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetCFM"), SuppressUnmanagedCodeSecurity] |
1984 | public static extern void WorldSetCFM(IntPtr world, dReal cfm); | 1984 | internal static extern void WorldSetCFM(IntPtr world, dReal cfm); |
1985 | 1985 | ||
1986 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity] | 1986 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity] |
1987 | public static extern void WorldSetContactMaxCorrectingVel(IntPtr world, dReal vel); | 1987 | internal static extern void WorldSetContactMaxCorrectingVel(IntPtr world, dReal vel); |
1988 | 1988 | ||
1989 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity] | 1989 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity] |
1990 | public static extern void WorldSetContactSurfaceLayer(IntPtr world, dReal depth); | 1990 | internal static extern void WorldSetContactSurfaceLayer(IntPtr world, dReal depth); |
1991 | 1991 | ||
1992 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetDamping"), SuppressUnmanagedCodeSecurity] | 1992 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetDamping"), SuppressUnmanagedCodeSecurity] |
1993 | public static extern void WorldSetDamping(IntPtr world, dReal linear_scale, dReal angular_scale); | 1993 | internal static extern void WorldSetDamping(IntPtr world, dReal linear_scale, dReal angular_scale); |
1994 | 1994 | ||
1995 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetERP"), SuppressUnmanagedCodeSecurity] | 1995 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetERP"), SuppressUnmanagedCodeSecurity] |
1996 | public static extern void WorldSetERP(IntPtr world, dReal erp); | 1996 | internal static extern void WorldSetERP(IntPtr world, dReal erp); |
1997 | 1997 | ||
1998 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetGravity"), SuppressUnmanagedCodeSecurity] | 1998 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetGravity"), SuppressUnmanagedCodeSecurity] |
1999 | public static extern void WorldSetGravity(IntPtr world, dReal x, dReal y, dReal z); | 1999 | internal static extern void WorldSetGravity(IntPtr world, dReal x, dReal y, dReal z); |
2000 | 2000 | ||
2001 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDamping"), SuppressUnmanagedCodeSecurity] | 2001 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDamping"), SuppressUnmanagedCodeSecurity] |
2002 | public static extern void WorldSetLinearDamping(IntPtr world, dReal scale); | 2002 | internal static extern void WorldSetLinearDamping(IntPtr world, dReal scale); |
2003 | 2003 | ||
2004 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] | 2004 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] |
2005 | public static extern void WorldSetLinearDampingThreshold(IntPtr world, dReal threshold); | 2005 | internal static extern void WorldSetLinearDampingThreshold(IntPtr world, dReal threshold); |
2006 | 2006 | ||
2007 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity] | 2007 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity] |
2008 | public static extern void WorldSetQuickStepNumIterations(IntPtr world, int num); | 2008 | internal static extern void WorldSetQuickStepNumIterations(IntPtr world, int num); |
2009 | 2009 | ||
2010 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepW"), SuppressUnmanagedCodeSecurity] | 2010 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepW"), SuppressUnmanagedCodeSecurity] |
2011 | public static extern void WorldSetQuickStepW(IntPtr world, dReal over_relaxation); | 2011 | internal static extern void WorldSetQuickStepW(IntPtr world, dReal over_relaxation); |
2012 | 2012 | ||
2013 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity] | 2013 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity] |
2014 | public static extern void WorldSetMaxAngularSpeed(IntPtr world, dReal max_speed); | 2014 | internal static extern void WorldSetMaxAngularSpeed(IntPtr world, dReal max_speed); |
2015 | 2015 | ||
2016 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStep"), SuppressUnmanagedCodeSecurity] | 2016 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStep"), SuppressUnmanagedCodeSecurity] |
2017 | public static extern void WorldStep(IntPtr world, dReal stepsize); | 2017 | internal static extern void WorldStep(IntPtr world, dReal stepsize); |
2018 | 2018 | ||
2019 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStepFast1"), SuppressUnmanagedCodeSecurity] | 2019 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStepFast1"), SuppressUnmanagedCodeSecurity] |
2020 | public static extern void WorldStepFast1(IntPtr world, dReal stepsize, int maxiterations); | 2020 | internal static extern void WorldStepFast1(IntPtr world, dReal stepsize, int maxiterations); |
2021 | 2021 | ||
2022 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldExportDIF"), SuppressUnmanagedCodeSecurity] | 2022 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldExportDIF"), SuppressUnmanagedCodeSecurity] |
2023 | public static extern void WorldExportDIF(IntPtr world, string filename, bool append, string prefix); | 2023 | internal static extern void WorldExportDIF(IntPtr world, string filename, bool append, string prefix); |
2024 | } | 2024 | } |
2025 | } | 2025 | } |
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs b/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs index 98bfd1c..441aa22 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs | |||
@@ -68,7 +68,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
68 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 68 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
69 | 69 | ||
70 | private Vector3 _position; | 70 | private Vector3 _position; |
71 | private d.Vector3 _zeroPosition; | 71 | private SafeNativeMethods.Vector3 _zeroPosition; |
72 | private bool _zeroFlag = false; | 72 | private bool _zeroFlag = false; |
73 | private bool m_lastUpdateSent = false; | 73 | private bool m_lastUpdateSent = false; |
74 | private Vector3 _velocity; | 74 | private Vector3 _velocity; |
@@ -151,7 +151,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
151 | internal IntPtr Shell { get; private set; } | 151 | internal IntPtr Shell { get; private set; } |
152 | 152 | ||
153 | private IntPtr Amotor = IntPtr.Zero; | 153 | private IntPtr Amotor = IntPtr.Zero; |
154 | private d.Mass ShellMass; | 154 | private SafeNativeMethods.Mass ShellMass; |
155 | 155 | ||
156 | private int m_eventsubscription = 0; | 156 | private int m_eventsubscription = 0; |
157 | private CollisionEventUpdate CollisionEventsThisFrame = new CollisionEventUpdate(); | 157 | private CollisionEventUpdate CollisionEventsThisFrame = new CollisionEventUpdate(); |
@@ -569,12 +569,12 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
569 | float yTiltComponent = -movementVector.Y * m_tiltMagnitudeWhenProjectedOnXYPlane; | 569 | float yTiltComponent = -movementVector.Y * m_tiltMagnitudeWhenProjectedOnXYPlane; |
570 | 570 | ||
571 | //m_log.Debug("[ODE CHARACTER]: changing avatar tilt"); | 571 | //m_log.Debug("[ODE CHARACTER]: changing avatar tilt"); |
572 | d.JointSetAMotorParam(Amotor, (int)dParam.LowStop, xTiltComponent); | 572 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.LowStop, xTiltComponent); |
573 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop, xTiltComponent); // must be same as lowstop, else a different, spurious tilt is introduced | 573 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.HiStop, xTiltComponent); // must be same as lowstop, else a different, spurious tilt is introduced |
574 | d.JointSetAMotorParam(Amotor, (int)dParam.LoStop2, yTiltComponent); | 574 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.LoStop2, yTiltComponent); |
575 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop2, yTiltComponent); // same as lowstop | 575 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.HiStop2, yTiltComponent); // same as lowstop |
576 | d.JointSetAMotorParam(Amotor, (int)dParam.LoStop3, 0f); | 576 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.LoStop3, 0f); |
577 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop3, 0f); // same as lowstop | 577 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.HiStop3, 0f); // same as lowstop |
578 | } | 578 | } |
579 | 579 | ||
580 | /// <summary> | 580 | /// <summary> |
@@ -805,11 +805,11 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
805 | 805 | ||
806 | if (m_pidControllerActive == false) | 806 | if (m_pidControllerActive == false) |
807 | { | 807 | { |
808 | _zeroPosition = d.BodyGetPosition(Body); | 808 | _zeroPosition = SafeNativeMethods.BodyGetPosition(Body); |
809 | } | 809 | } |
810 | //PidStatus = true; | 810 | //PidStatus = true; |
811 | 811 | ||
812 | d.Vector3 localpos = d.BodyGetPosition(Body); | 812 | SafeNativeMethods.Vector3 localpos = SafeNativeMethods.BodyGetPosition(Body); |
813 | Vector3 localPos = new Vector3(localpos.X, localpos.Y, localpos.Z); | 813 | Vector3 localPos = new Vector3(localpos.X, localpos.Y, localpos.Z); |
814 | 814 | ||
815 | if (!localPos.IsFinite()) | 815 | if (!localPos.IsFinite()) |
@@ -824,7 +824,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
824 | } | 824 | } |
825 | 825 | ||
826 | Vector3 vec = Vector3.Zero; | 826 | Vector3 vec = Vector3.Zero; |
827 | d.Vector3 vel = d.BodyGetLinearVel(Body); | 827 | SafeNativeMethods.Vector3 vel = SafeNativeMethods.BodyGetLinearVel(Body); |
828 | 828 | ||
829 | // m_log.DebugFormat( | 829 | // m_log.DebugFormat( |
830 | // "[ODE CHARACTER]: Current velocity in Move() is <{0},{1},{2}>, target {3} for {4}", | 830 | // "[ODE CHARACTER]: Current velocity in Move() is <{0},{1},{2}>, target {3} for {4}", |
@@ -848,7 +848,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
848 | if (!_zeroFlag) | 848 | if (!_zeroFlag) |
849 | { | 849 | { |
850 | _zeroFlag = true; | 850 | _zeroFlag = true; |
851 | _zeroPosition = d.BodyGetPosition(Body); | 851 | _zeroPosition = SafeNativeMethods.BodyGetPosition(Body); |
852 | } | 852 | } |
853 | 853 | ||
854 | if (m_pidControllerActive) | 854 | if (m_pidControllerActive) |
@@ -858,7 +858,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
858 | // Avatar to Avatar collisions | 858 | // Avatar to Avatar collisions |
859 | // Prim to avatar collisions | 859 | // Prim to avatar collisions |
860 | 860 | ||
861 | d.Vector3 pos = d.BodyGetPosition(Body); | 861 | SafeNativeMethods.Vector3 pos = SafeNativeMethods.BodyGetPosition(Body); |
862 | vec.X = (_target_velocity.X - vel.X) * (PID_D) + (_zeroPosition.X - pos.X) * (PID_P * 2); | 862 | vec.X = (_target_velocity.X - vel.X) * (PID_D) + (_zeroPosition.X - pos.X) * (PID_P * 2); |
863 | vec.Y = (_target_velocity.Y - vel.Y) * (PID_D) + (_zeroPosition.Y - pos.Y)* (PID_P * 2); | 863 | vec.Y = (_target_velocity.Y - vel.Y) * (PID_D) + (_zeroPosition.Y - pos.Y)* (PID_P * 2); |
864 | if (flying) | 864 | if (flying) |
@@ -906,7 +906,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
906 | { | 906 | { |
907 | // We're colliding with something and we're not flying but we're moving | 907 | // We're colliding with something and we're not flying but we're moving |
908 | // This means we're walking or running. | 908 | // This means we're walking or running. |
909 | d.Vector3 pos = d.BodyGetPosition(Body); | 909 | SafeNativeMethods.Vector3 pos = SafeNativeMethods.BodyGetPosition(Body); |
910 | vec.Z = (_target_velocity.Z - vel.Z) * PID_D + (_zeroPosition.Z - pos.Z) * PID_P; | 910 | vec.Z = (_target_velocity.Z - vel.Z) * PID_D + (_zeroPosition.Z - pos.Z) * PID_P; |
911 | vec.X = ((_target_velocity.X - vel.X) / 1.2f) * PID_D; | 911 | vec.X = ((_target_velocity.X - vel.X) / 1.2f) * PID_D; |
912 | vec.Y = ((_target_velocity.Y - vel.Y) / 1.2f) * PID_D; | 912 | vec.Y = ((_target_velocity.Y - vel.Y) / 1.2f) * PID_D; |
@@ -940,7 +940,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
940 | if (vec.IsFinite()) | 940 | if (vec.IsFinite()) |
941 | { | 941 | { |
942 | // Apply the total force acting on this avatar | 942 | // Apply the total force acting on this avatar |
943 | d.BodyAddForce(Body, vec.X, vec.Y, vec.Z); | 943 | SafeNativeMethods.BodyAddForce(Body, vec.X, vec.Y, vec.Z); |
944 | 944 | ||
945 | if (!_zeroFlag) | 945 | if (!_zeroFlag) |
946 | AlignAvatarTiltWithCurrentDirectionOfMovement(vec); | 946 | AlignAvatarTiltWithCurrentDirectionOfMovement(vec); |
@@ -956,7 +956,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
956 | return; | 956 | return; |
957 | } | 957 | } |
958 | 958 | ||
959 | d.Vector3 newVel = d.BodyGetLinearVel(Body); | 959 | SafeNativeMethods.Vector3 newVel = SafeNativeMethods.BodyGetLinearVel(Body); |
960 | if (newVel.X >= 256 || newVel.X <= 256 || newVel.Y >= 256 || newVel.Y <= 256 || newVel.Z >= 256 || newVel.Z <= 256) | 960 | if (newVel.X >= 256 || newVel.X <= 256 || newVel.Y >= 256 || newVel.Y <= 256 || newVel.Z >= 256 || newVel.Z <= 256) |
961 | { | 961 | { |
962 | // m_log.DebugFormat( | 962 | // m_log.DebugFormat( |
@@ -972,7 +972,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
972 | else | 972 | else |
973 | newVel.Z = Util.Clamp<float>(newVel.Z, -255f, 255f); | 973 | newVel.Z = Util.Clamp<float>(newVel.Z, -255f, 255f); |
974 | 974 | ||
975 | d.BodySetLinearVel(Body, newVel.X, newVel.Y, newVel.Z); | 975 | SafeNativeMethods.BodySetLinearVel(Body, newVel.X, newVel.Y, newVel.Z); |
976 | } | 976 | } |
977 | } | 977 | } |
978 | 978 | ||
@@ -985,16 +985,16 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
985 | internal void UpdatePositionAndVelocity(List<OdeCharacter> defects) | 985 | internal void UpdatePositionAndVelocity(List<OdeCharacter> defects) |
986 | { | 986 | { |
987 | // no lock; called from Simulate() -- if you call this from elsewhere, gotta lock or do Monitor.Enter/Exit! | 987 | // no lock; called from Simulate() -- if you call this from elsewhere, gotta lock or do Monitor.Enter/Exit! |
988 | d.Vector3 newPos; | 988 | SafeNativeMethods.Vector3 newPos; |
989 | try | 989 | try |
990 | { | 990 | { |
991 | newPos = d.BodyGetPosition(Body); | 991 | newPos = SafeNativeMethods.BodyGetPosition(Body); |
992 | } | 992 | } |
993 | catch (NullReferenceException) | 993 | catch (NullReferenceException) |
994 | { | 994 | { |
995 | bad = true; | 995 | bad = true; |
996 | defects.Add(this); | 996 | defects.Add(this); |
997 | newPos = new d.Vector3(_position.X, _position.Y, _position.Z); | 997 | newPos = new SafeNativeMethods.Vector3(_position.X, _position.Y, _position.Z); |
998 | base.RaiseOutOfBounds(_position); // Tells ScenePresence that there's a problem! | 998 | base.RaiseOutOfBounds(_position); // Tells ScenePresence that there's a problem! |
999 | m_log.WarnFormat("[ODE CHARACTER]: Avatar Null reference for Avatar {0}, physical actor {1}", Name, m_uuid); | 999 | m_log.WarnFormat("[ODE CHARACTER]: Avatar Null reference for Avatar {0}, physical actor {1}", Name, m_uuid); |
1000 | 1000 | ||
@@ -1031,11 +1031,11 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1031 | else | 1031 | else |
1032 | { | 1032 | { |
1033 | m_lastUpdateSent = false; | 1033 | m_lastUpdateSent = false; |
1034 | d.Vector3 newVelocity; | 1034 | SafeNativeMethods.Vector3 newVelocity; |
1035 | 1035 | ||
1036 | try | 1036 | try |
1037 | { | 1037 | { |
1038 | newVelocity = d.BodyGetLinearVel(Body); | 1038 | newVelocity = SafeNativeMethods.BodyGetLinearVel(Body); |
1039 | } | 1039 | } |
1040 | catch (NullReferenceException) | 1040 | catch (NullReferenceException) |
1041 | { | 1041 | { |
@@ -1102,14 +1102,14 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1102 | } | 1102 | } |
1103 | 1103 | ||
1104 | // lock (OdeScene.UniversalColliderSyncObject) | 1104 | // lock (OdeScene.UniversalColliderSyncObject) |
1105 | Shell = d.CreateCapsule(_parent_scene.space, CAPSULE_RADIUS, CAPSULE_LENGTH); | 1105 | Shell = SafeNativeMethods.CreateCapsule(_parent_scene.space, CAPSULE_RADIUS, CAPSULE_LENGTH); |
1106 | 1106 | ||
1107 | d.GeomSetCategoryBits(Shell, (uint)m_collisionCategories); | 1107 | SafeNativeMethods.GeomSetCategoryBits(Shell, (uint)m_collisionCategories); |
1108 | d.GeomSetCollideBits(Shell, (uint)m_collisionFlags); | 1108 | SafeNativeMethods.GeomSetCollideBits(Shell, (uint)m_collisionFlags); |
1109 | 1109 | ||
1110 | d.MassSetCapsuleTotal(out ShellMass, m_mass, 2, CAPSULE_RADIUS, CAPSULE_LENGTH); | 1110 | SafeNativeMethods.MassSetCapsuleTotal(out ShellMass, m_mass, 2, CAPSULE_RADIUS, CAPSULE_LENGTH); |
1111 | Body = d.BodyCreate(_parent_scene.world); | 1111 | Body = SafeNativeMethods.BodyCreate(_parent_scene.world); |
1112 | d.BodySetPosition(Body, npositionX, npositionY, npositionZ); | 1112 | SafeNativeMethods.BodySetPosition(Body, npositionX, npositionY, npositionZ); |
1113 | 1113 | ||
1114 | _position.X = npositionX; | 1114 | _position.X = npositionX; |
1115 | _position.Y = npositionY; | 1115 | _position.Y = npositionY; |
@@ -1117,45 +1117,45 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1117 | 1117 | ||
1118 | m_taintPosition = _position; | 1118 | m_taintPosition = _position; |
1119 | 1119 | ||
1120 | d.BodySetMass(Body, ref ShellMass); | 1120 | SafeNativeMethods.BodySetMass(Body, ref ShellMass); |
1121 | d.Matrix3 m_caprot; | 1121 | SafeNativeMethods.Matrix3 m_caprot; |
1122 | // 90 Stand up on the cap of the capped cyllinder | 1122 | // 90 Stand up on the cap of the capped cyllinder |
1123 | if (_parent_scene.IsAvCapsuleTilted) | 1123 | if (_parent_scene.IsAvCapsuleTilted) |
1124 | { | 1124 | { |
1125 | d.RFromAxisAndAngle(out m_caprot, 1, 0, 1, (float)(Math.PI / 2)); | 1125 | SafeNativeMethods.RFromAxisAndAngle(out m_caprot, 1, 0, 1, (float)(Math.PI / 2)); |
1126 | } | 1126 | } |
1127 | else | 1127 | else |
1128 | { | 1128 | { |
1129 | d.RFromAxisAndAngle(out m_caprot, 0, 0, 1, (float)(Math.PI / 2)); | 1129 | SafeNativeMethods.RFromAxisAndAngle(out m_caprot, 0, 0, 1, (float)(Math.PI / 2)); |
1130 | } | 1130 | } |
1131 | 1131 | ||
1132 | d.GeomSetRotation(Shell, ref m_caprot); | 1132 | SafeNativeMethods.GeomSetRotation(Shell, ref m_caprot); |
1133 | d.BodySetRotation(Body, ref m_caprot); | 1133 | SafeNativeMethods.BodySetRotation(Body, ref m_caprot); |
1134 | 1134 | ||
1135 | d.GeomSetBody(Shell, Body); | 1135 | SafeNativeMethods.GeomSetBody(Shell, Body); |
1136 | 1136 | ||
1137 | // The purpose of the AMotor here is to keep the avatar's physical | 1137 | // The purpose of the AMotor here is to keep the avatar's physical |
1138 | // surrogate from rotating while moving | 1138 | // surrogate from rotating while moving |
1139 | Amotor = d.JointCreateAMotor(_parent_scene.world, IntPtr.Zero); | 1139 | Amotor = SafeNativeMethods.JointCreateAMotor(_parent_scene.world, IntPtr.Zero); |
1140 | d.JointAttach(Amotor, Body, IntPtr.Zero); | 1140 | SafeNativeMethods.JointAttach(Amotor, Body, IntPtr.Zero); |
1141 | d.JointSetAMotorMode(Amotor, dAMotorEuler); | 1141 | SafeNativeMethods.JointSetAMotorMode(Amotor, dAMotorEuler); |
1142 | d.JointSetAMotorNumAxes(Amotor, 3); | 1142 | SafeNativeMethods.JointSetAMotorNumAxes(Amotor, 3); |
1143 | d.JointSetAMotorAxis(Amotor, 0, 0, 1, 0, 0); | 1143 | SafeNativeMethods.JointSetAMotorAxis(Amotor, 0, 0, 1, 0, 0); |
1144 | d.JointSetAMotorAxis(Amotor, 1, 0, 0, 1, 0); | 1144 | SafeNativeMethods.JointSetAMotorAxis(Amotor, 1, 0, 0, 1, 0); |
1145 | d.JointSetAMotorAxis(Amotor, 2, 0, 0, 0, 1); | 1145 | SafeNativeMethods.JointSetAMotorAxis(Amotor, 2, 0, 0, 0, 1); |
1146 | d.JointSetAMotorAngle(Amotor, 0, 0); | 1146 | SafeNativeMethods.JointSetAMotorAngle(Amotor, 0, 0); |
1147 | d.JointSetAMotorAngle(Amotor, 1, 0); | 1147 | SafeNativeMethods.JointSetAMotorAngle(Amotor, 1, 0); |
1148 | d.JointSetAMotorAngle(Amotor, 2, 0); | 1148 | SafeNativeMethods.JointSetAMotorAngle(Amotor, 2, 0); |
1149 | 1149 | ||
1150 | // These lowstops and high stops are effectively (no wiggle room) | 1150 | // These lowstops and high stops are effectively (no wiggle room) |
1151 | if (_parent_scene.IsAvCapsuleTilted) | 1151 | if (_parent_scene.IsAvCapsuleTilted) |
1152 | { | 1152 | { |
1153 | d.JointSetAMotorParam(Amotor, (int)dParam.LowStop, -0.000000000001f); | 1153 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.LowStop, -0.000000000001f); |
1154 | d.JointSetAMotorParam(Amotor, (int)dParam.LoStop3, -0.000000000001f); | 1154 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.LoStop3, -0.000000000001f); |
1155 | d.JointSetAMotorParam(Amotor, (int)dParam.LoStop2, -0.000000000001f); | 1155 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.LoStop2, -0.000000000001f); |
1156 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop, 0.000000000001f); | 1156 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.HiStop, 0.000000000001f); |
1157 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop3, 0.000000000001f); | 1157 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.HiStop3, 0.000000000001f); |
1158 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop2, 0.000000000001f); | 1158 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.HiStop2, 0.000000000001f); |
1159 | } | 1159 | } |
1160 | else | 1160 | else |
1161 | { | 1161 | { |
@@ -1167,18 +1167,18 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1167 | // to be comprehended in their entirety. | 1167 | // to be comprehended in their entirety. |
1168 | #endregion | 1168 | #endregion |
1169 | AlignAvatarTiltWithCurrentDirectionOfMovement(Vector3.Zero); | 1169 | AlignAvatarTiltWithCurrentDirectionOfMovement(Vector3.Zero); |
1170 | d.JointSetAMotorParam(Amotor, (int)dParam.LowStop, 0.08f); | 1170 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.LowStop, 0.08f); |
1171 | d.JointSetAMotorParam(Amotor, (int)dParam.LoStop3, -0f); | 1171 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.LoStop3, -0f); |
1172 | d.JointSetAMotorParam(Amotor, (int)dParam.LoStop2, 0.08f); | 1172 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.LoStop2, 0.08f); |
1173 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop, 0.08f); // must be same as lowstop, else a different, spurious tilt is introduced | 1173 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.HiStop, 0.08f); // must be same as lowstop, else a different, spurious tilt is introduced |
1174 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop3, 0f); // same as lowstop | 1174 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.HiStop3, 0f); // same as lowstop |
1175 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop2, 0.08f); // same as lowstop | 1175 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.HiStop2, 0.08f); // same as lowstop |
1176 | } | 1176 | } |
1177 | 1177 | ||
1178 | // Fudge factor is 1f by default, we're setting it to 0. We don't want it to Fudge or the | 1178 | // Fudge factor is 1f by default, we're setting it to 0. We don't want it to Fudge or the |
1179 | // capped cyllinder will fall over | 1179 | // capped cyllinder will fall over |
1180 | d.JointSetAMotorParam(Amotor, (int)dParam.FudgeFactor, 0f); | 1180 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.FudgeFactor, 0f); |
1181 | d.JointSetAMotorParam(Amotor, (int)dParam.FMax, tensor); | 1181 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)dParam.FMax, tensor); |
1182 | 1182 | ||
1183 | //d.Matrix3 bodyrotation = d.BodyGetRotation(Body); | 1183 | //d.Matrix3 bodyrotation = d.BodyGetRotation(Body); |
1184 | //d.QfromR( | 1184 | //d.QfromR( |
@@ -1217,7 +1217,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1217 | if (Amotor != IntPtr.Zero) | 1217 | if (Amotor != IntPtr.Zero) |
1218 | { | 1218 | { |
1219 | // Kill the Amotor | 1219 | // Kill the Amotor |
1220 | d.JointDestroy(Amotor); | 1220 | SafeNativeMethods.JointDestroy(Amotor); |
1221 | Amotor = IntPtr.Zero; | 1221 | Amotor = IntPtr.Zero; |
1222 | } | 1222 | } |
1223 | 1223 | ||
@@ -1227,14 +1227,14 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1227 | if (Body != IntPtr.Zero) | 1227 | if (Body != IntPtr.Zero) |
1228 | { | 1228 | { |
1229 | //kill the body | 1229 | //kill the body |
1230 | d.BodyDestroy(Body); | 1230 | SafeNativeMethods.BodyDestroy(Body); |
1231 | Body = IntPtr.Zero; | 1231 | Body = IntPtr.Zero; |
1232 | } | 1232 | } |
1233 | 1233 | ||
1234 | if (Shell != IntPtr.Zero) | 1234 | if (Shell != IntPtr.Zero) |
1235 | { | 1235 | { |
1236 | // lock (OdeScene.UniversalColliderSyncObject) | 1236 | // lock (OdeScene.UniversalColliderSyncObject) |
1237 | d.GeomDestroy(Shell); | 1237 | SafeNativeMethods.GeomDestroy(Shell); |
1238 | 1238 | ||
1239 | _parent_scene.geom_name_map.Remove(Shell); | 1239 | _parent_scene.geom_name_map.Remove(Shell); |
1240 | _parent_scene.actor_name_map.Remove(Shell); | 1240 | _parent_scene.actor_name_map.Remove(Shell); |
@@ -1325,7 +1325,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1325 | { | 1325 | { |
1326 | if (Body != IntPtr.Zero) | 1326 | if (Body != IntPtr.Zero) |
1327 | { | 1327 | { |
1328 | d.BodySetPosition(Body, m_taintPosition.X, m_taintPosition.Y, m_taintPosition.Z); | 1328 | SafeNativeMethods.BodySetPosition(Body, m_taintPosition.X, m_taintPosition.Y, m_taintPosition.Z); |
1329 | _position = m_taintPosition; | 1329 | _position = m_taintPosition; |
1330 | } | 1330 | } |
1331 | } | 1331 | } |
@@ -1337,7 +1337,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1337 | // FIXME: This is not a good solution since it's subject to a race condition if a force is another | 1337 | // FIXME: This is not a good solution since it's subject to a race condition if a force is another |
1338 | // thread sets a new force while we're in this loop (since it could be obliterated by | 1338 | // thread sets a new force while we're in this loop (since it could be obliterated by |
1339 | // m_taintForce = Vector3.Zero. Need to lock ProcessTaints() when we set a new tainted force. | 1339 | // m_taintForce = Vector3.Zero. Need to lock ProcessTaints() when we set a new tainted force. |
1340 | d.BodyAddForce(Body, m_taintForce.X, m_taintForce.Y, m_taintForce.Z); | 1340 | SafeNativeMethods.BodyAddForce(Body, m_taintForce.X, m_taintForce.Y, m_taintForce.Z); |
1341 | } | 1341 | } |
1342 | 1342 | ||
1343 | m_taintForce = Vector3.Zero; | 1343 | m_taintForce = Vector3.Zero; |
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs b/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs index 7e95d7f..39aea59 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs | |||
@@ -93,7 +93,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
93 | private float m_linearMotorDecayTimescale = 0; | 93 | private float m_linearMotorDecayTimescale = 0; |
94 | private float m_linearMotorTimescale = 0; | 94 | private float m_linearMotorTimescale = 0; |
95 | private Vector3 m_lastLinearVelocityVector = Vector3.Zero; | 95 | private Vector3 m_lastLinearVelocityVector = Vector3.Zero; |
96 | private d.Vector3 m_lastPositionVector = new d.Vector3(); | 96 | private SafeNativeMethods.Vector3 m_lastPositionVector = new SafeNativeMethods.Vector3(); |
97 | // private bool m_LinearMotorSetLastFrame = false; | 97 | // private bool m_LinearMotorSetLastFrame = false; |
98 | // private Vector3 m_linearMotorOffset = Vector3.Zero; | 98 | // private Vector3 m_linearMotorOffset = Vector3.Zero; |
99 | 99 | ||
@@ -611,7 +611,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
611 | { | 611 | { |
612 | m_lastLinearVelocityVector = Vector3.Zero; | 612 | m_lastLinearVelocityVector = Vector3.Zero; |
613 | m_lastAngularVelocity = Vector3.Zero; | 613 | m_lastAngularVelocity = Vector3.Zero; |
614 | m_lastPositionVector = d.BodyGetPosition(Body); | 614 | m_lastPositionVector = SafeNativeMethods.BodyGetPosition(Body); |
615 | } | 615 | } |
616 | 616 | ||
617 | internal void Step(float pTimestep, OdeScene pParentScene) | 617 | internal void Step(float pTimestep, OdeScene pParentScene) |
@@ -631,8 +631,8 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
631 | { | 631 | { |
632 | if (!m_linearMotorDirection.ApproxEquals(Vector3.Zero, 0.01f)) // requested m_linearMotorDirection is significant | 632 | if (!m_linearMotorDirection.ApproxEquals(Vector3.Zero, 0.01f)) // requested m_linearMotorDirection is significant |
633 | { | 633 | { |
634 | if (!d.BodyIsEnabled(Body)) | 634 | if (!SafeNativeMethods.BodyIsEnabled(Body)) |
635 | d.BodyEnable(Body); | 635 | SafeNativeMethods.BodyEnable(Body); |
636 | 636 | ||
637 | // add drive to body | 637 | // add drive to body |
638 | Vector3 addAmount = m_linearMotorDirection/(m_linearMotorTimescale/pTimestep); | 638 | Vector3 addAmount = m_linearMotorDirection/(m_linearMotorTimescale/pTimestep); |
@@ -662,7 +662,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
662 | 662 | ||
663 | // convert requested object velocity to world-referenced vector | 663 | // convert requested object velocity to world-referenced vector |
664 | m_dir = m_lastLinearVelocityVector; | 664 | m_dir = m_lastLinearVelocityVector; |
665 | d.Quaternion rot = d.BodyGetQuaternion(Body); | 665 | SafeNativeMethods.Quaternion rot = SafeNativeMethods.BodyGetQuaternion(Body); |
666 | Quaternion rotq = new Quaternion(rot.X, rot.Y, rot.Z, rot.W); // rotq = rotation of object | 666 | Quaternion rotq = new Quaternion(rot.X, rot.Y, rot.Z, rot.W); // rotq = rotation of object |
667 | m_dir *= rotq; // apply obj rotation to velocity vector | 667 | m_dir *= rotq; // apply obj rotation to velocity vector |
668 | 668 | ||
@@ -673,15 +673,15 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
673 | Vector3 grav = Vector3.Zero; | 673 | Vector3 grav = Vector3.Zero; |
674 | // There is some gravity, make a gravity force vector | 674 | // There is some gravity, make a gravity force vector |
675 | // that is applied after object velocity. | 675 | // that is applied after object velocity. |
676 | d.Mass objMass; | 676 | SafeNativeMethods.Mass objMass; |
677 | d.BodyGetMass(Body, out objMass); | 677 | SafeNativeMethods.BodyGetMass(Body, out objMass); |
678 | // m_VehicleBuoyancy: -1=2g; 0=1g; 1=0g; | 678 | // m_VehicleBuoyancy: -1=2g; 0=1g; 1=0g; |
679 | grav.Z = _pParentScene.gravityz * objMass.mass * (1f - m_VehicleBuoyancy); | 679 | grav.Z = _pParentScene.gravityz * objMass.mass * (1f - m_VehicleBuoyancy); |
680 | // Preserve the current Z velocity | 680 | // Preserve the current Z velocity |
681 | d.Vector3 vel_now = d.BodyGetLinearVel(Body); | 681 | SafeNativeMethods.Vector3 vel_now = SafeNativeMethods.BodyGetLinearVel(Body); |
682 | m_dir.Z = vel_now.Z; // Preserve the accumulated falling velocity | 682 | m_dir.Z = vel_now.Z; // Preserve the accumulated falling velocity |
683 | 683 | ||
684 | d.Vector3 pos = d.BodyGetPosition(Body); | 684 | SafeNativeMethods.Vector3 pos = SafeNativeMethods.BodyGetPosition(Body); |
685 | // Vector3 accel = new Vector3(-(m_dir.X - m_lastLinearVelocityVector.X / 0.1f), -(m_dir.Y - m_lastLinearVelocityVector.Y / 0.1f), m_dir.Z - m_lastLinearVelocityVector.Z / 0.1f); | 685 | // Vector3 accel = new Vector3(-(m_dir.X - m_lastLinearVelocityVector.X / 0.1f), -(m_dir.Y - m_lastLinearVelocityVector.Y / 0.1f), m_dir.Z - m_lastLinearVelocityVector.Z / 0.1f); |
686 | Vector3 posChange = new Vector3(); | 686 | Vector3 posChange = new Vector3(); |
687 | posChange.X = pos.X - m_lastPositionVector.X; | 687 | posChange.X = pos.X - m_lastPositionVector.X; |
@@ -693,33 +693,33 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
693 | if (pos.X >= (m_BlockingEndPoint.X - (float)1)) | 693 | if (pos.X >= (m_BlockingEndPoint.X - (float)1)) |
694 | { | 694 | { |
695 | pos.X -= posChange.X + 1; | 695 | pos.X -= posChange.X + 1; |
696 | d.BodySetPosition(Body, pos.X, pos.Y, pos.Z); | 696 | SafeNativeMethods.BodySetPosition(Body, pos.X, pos.Y, pos.Z); |
697 | } | 697 | } |
698 | if (pos.Y >= (m_BlockingEndPoint.Y - (float)1)) | 698 | if (pos.Y >= (m_BlockingEndPoint.Y - (float)1)) |
699 | { | 699 | { |
700 | pos.Y -= posChange.Y + 1; | 700 | pos.Y -= posChange.Y + 1; |
701 | d.BodySetPosition(Body, pos.X, pos.Y, pos.Z); | 701 | SafeNativeMethods.BodySetPosition(Body, pos.X, pos.Y, pos.Z); |
702 | } | 702 | } |
703 | if (pos.Z >= (m_BlockingEndPoint.Z - (float)1)) | 703 | if (pos.Z >= (m_BlockingEndPoint.Z - (float)1)) |
704 | { | 704 | { |
705 | pos.Z -= posChange.Z + 1; | 705 | pos.Z -= posChange.Z + 1; |
706 | d.BodySetPosition(Body, pos.X, pos.Y, pos.Z); | 706 | SafeNativeMethods.BodySetPosition(Body, pos.X, pos.Y, pos.Z); |
707 | } | 707 | } |
708 | if (pos.X <= 0) | 708 | if (pos.X <= 0) |
709 | { | 709 | { |
710 | pos.X += posChange.X + 1; | 710 | pos.X += posChange.X + 1; |
711 | d.BodySetPosition(Body, pos.X, pos.Y, pos.Z); | 711 | SafeNativeMethods.BodySetPosition(Body, pos.X, pos.Y, pos.Z); |
712 | } | 712 | } |
713 | if (pos.Y <= 0) | 713 | if (pos.Y <= 0) |
714 | { | 714 | { |
715 | pos.Y += posChange.Y + 1; | 715 | pos.Y += posChange.Y + 1; |
716 | d.BodySetPosition(Body, pos.X, pos.Y, pos.Z); | 716 | SafeNativeMethods.BodySetPosition(Body, pos.X, pos.Y, pos.Z); |
717 | } | 717 | } |
718 | } | 718 | } |
719 | if (pos.Z < _pParentScene.GetTerrainHeightAtXY(pos.X, pos.Y)) | 719 | if (pos.Z < _pParentScene.GetTerrainHeightAtXY(pos.X, pos.Y)) |
720 | { | 720 | { |
721 | pos.Z = _pParentScene.GetTerrainHeightAtXY(pos.X, pos.Y) + 2; | 721 | pos.Z = _pParentScene.GetTerrainHeightAtXY(pos.X, pos.Y) + 2; |
722 | d.BodySetPosition(Body, pos.X, pos.Y, pos.Z); | 722 | SafeNativeMethods.BodySetPosition(Body, pos.X, pos.Y, pos.Z); |
723 | } | 723 | } |
724 | 724 | ||
725 | // Check if hovering | 725 | // Check if hovering |
@@ -748,7 +748,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
748 | { | 748 | { |
749 | if ((pos.Z - m_VhoverTargetHeight) > .2 || (pos.Z - m_VhoverTargetHeight) < -.2) | 749 | if ((pos.Z - m_VhoverTargetHeight) > .2 || (pos.Z - m_VhoverTargetHeight) < -.2) |
750 | { | 750 | { |
751 | d.BodySetPosition(Body, pos.X, pos.Y, m_VhoverTargetHeight); | 751 | SafeNativeMethods.BodySetPosition(Body, pos.X, pos.Y, m_VhoverTargetHeight); |
752 | } | 752 | } |
753 | } | 753 | } |
754 | else | 754 | else |
@@ -815,12 +815,12 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
815 | m_dir.Z = 0; | 815 | m_dir.Z = 0; |
816 | } | 816 | } |
817 | 817 | ||
818 | m_lastPositionVector = d.BodyGetPosition(Body); | 818 | m_lastPositionVector = SafeNativeMethods.BodyGetPosition(Body); |
819 | 819 | ||
820 | // Apply velocity | 820 | // Apply velocity |
821 | d.BodySetLinearVel(Body, m_dir.X, m_dir.Y, m_dir.Z); | 821 | SafeNativeMethods.BodySetLinearVel(Body, m_dir.X, m_dir.Y, m_dir.Z); |
822 | // apply gravity force | 822 | // apply gravity force |
823 | d.BodyAddForce(Body, grav.X, grav.Y, grav.Z); | 823 | SafeNativeMethods.BodyAddForce(Body, grav.X, grav.Y, grav.Z); |
824 | 824 | ||
825 | 825 | ||
826 | // apply friction | 826 | // apply friction |
@@ -841,7 +841,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
841 | */ | 841 | */ |
842 | 842 | ||
843 | // Get what the body is doing, this includes 'external' influences | 843 | // Get what the body is doing, this includes 'external' influences |
844 | d.Vector3 angularVelocity = d.BodyGetAngularVel(Body); | 844 | SafeNativeMethods.Vector3 angularVelocity = SafeNativeMethods.BodyGetAngularVel(Body); |
845 | // Vector3 angularVelocity = Vector3.Zero; | 845 | // Vector3 angularVelocity = Vector3.Zero; |
846 | 846 | ||
847 | if (m_angularMotorApply > 0) | 847 | if (m_angularMotorApply > 0) |
@@ -874,7 +874,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
874 | { | 874 | { |
875 | float VAservo = 0.2f / (m_verticalAttractionTimescale * pTimestep); | 875 | float VAservo = 0.2f / (m_verticalAttractionTimescale * pTimestep); |
876 | // get present body rotation | 876 | // get present body rotation |
877 | d.Quaternion rot = d.BodyGetQuaternion(Body); | 877 | SafeNativeMethods.Quaternion rot = SafeNativeMethods.BodyGetQuaternion(Body); |
878 | Quaternion rotq = new Quaternion(rot.X, rot.Y, rot.Z, rot.W); | 878 | Quaternion rotq = new Quaternion(rot.X, rot.Y, rot.Z, rot.W); |
879 | // make a vector pointing up | 879 | // make a vector pointing up |
880 | Vector3 verterr = Vector3.Zero; | 880 | Vector3 verterr = Vector3.Zero; |
@@ -923,7 +923,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
923 | 923 | ||
924 | if (!m_lastAngularVelocity.ApproxEquals(Vector3.Zero, 0.01f)) | 924 | if (!m_lastAngularVelocity.ApproxEquals(Vector3.Zero, 0.01f)) |
925 | { | 925 | { |
926 | if (!d.BodyIsEnabled (Body)) d.BodyEnable (Body); | 926 | if (!SafeNativeMethods.BodyIsEnabled (Body)) SafeNativeMethods.BodyEnable (Body); |
927 | } | 927 | } |
928 | else | 928 | else |
929 | { | 929 | { |
@@ -935,14 +935,14 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
935 | m_lastAngularVelocity -= m_lastAngularVelocity * decayamount; | 935 | m_lastAngularVelocity -= m_lastAngularVelocity * decayamount; |
936 | 936 | ||
937 | // Apply to the body | 937 | // Apply to the body |
938 | d.BodySetAngularVel (Body, m_lastAngularVelocity.X, m_lastAngularVelocity.Y, m_lastAngularVelocity.Z); | 938 | SafeNativeMethods.BodySetAngularVel (Body, m_lastAngularVelocity.X, m_lastAngularVelocity.Y, m_lastAngularVelocity.Z); |
939 | 939 | ||
940 | } //end MoveAngular | 940 | } //end MoveAngular |
941 | internal void LimitRotation(float timestep) | 941 | internal void LimitRotation(float timestep) |
942 | { | 942 | { |
943 | d.Quaternion rot = d.BodyGetQuaternion(Body); | 943 | SafeNativeMethods.Quaternion rot = SafeNativeMethods.BodyGetQuaternion(Body); |
944 | Quaternion rotq = new Quaternion(rot.X, rot.Y, rot.Z, rot.W); // rotq = rotation of object | 944 | Quaternion rotq = new Quaternion(rot.X, rot.Y, rot.Z, rot.W); // rotq = rotation of object |
945 | d.Quaternion m_rot = new d.Quaternion(); | 945 | SafeNativeMethods.Quaternion m_rot = new SafeNativeMethods.Quaternion(); |
946 | bool changed = false; | 946 | bool changed = false; |
947 | m_rot.X = rotq.X; | 947 | m_rot.X = rotq.X; |
948 | m_rot.Y = rotq.Y; | 948 | m_rot.Y = rotq.Y; |
@@ -975,7 +975,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
975 | changed = true; | 975 | changed = true; |
976 | } | 976 | } |
977 | if (changed) | 977 | if (changed) |
978 | d.BodySetQuaternion(Body, ref m_rot); | 978 | SafeNativeMethods.BodySetQuaternion(Body, ref m_rot); |
979 | } | 979 | } |
980 | } | 980 | } |
981 | } | 981 | } |
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEModule.cs b/OpenSim/Region/PhysicsModules/Ode/ODEModule.cs index 22fc84d..2cf7baa 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODEModule.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODEModule.cs | |||
@@ -63,7 +63,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
63 | 63 | ||
64 | // Initializing ODE only when a scene is created allows alternative ODE plugins to co-habit (according to | 64 | // Initializing ODE only when a scene is created allows alternative ODE plugins to co-habit (according to |
65 | // http://opensimulator.org/mantis/view.php?id=2750). | 65 | // http://opensimulator.org/mantis/view.php?id=2750). |
66 | d.InitODE(); | 66 | SafeNativeMethods.InitODE(); |
67 | 67 | ||
68 | m_scene = new OdeScene(scene, m_config, Name, Version); | 68 | m_scene = new OdeScene(scene, m_config, Name, Version); |
69 | } | 69 | } |
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs index 8934330..b1c3b7c 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs | |||
@@ -212,7 +212,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
212 | 212 | ||
213 | public IntPtr Body = IntPtr.Zero; | 213 | public IntPtr Body = IntPtr.Zero; |
214 | private Vector3 _target_velocity; | 214 | private Vector3 _target_velocity; |
215 | private d.Mass pMass; | 215 | private SafeNativeMethods.Mass pMass; |
216 | 216 | ||
217 | private int m_eventsubscription; | 217 | private int m_eventsubscription; |
218 | private CollisionEventUpdate CollisionEventsThisFrame = new CollisionEventUpdate(); | 218 | private CollisionEventUpdate CollisionEventsThisFrame = new CollisionEventUpdate(); |
@@ -356,13 +356,13 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
356 | 356 | ||
357 | if (m_assetFailed) | 357 | if (m_assetFailed) |
358 | { | 358 | { |
359 | d.GeomSetCategoryBits(prim_geom, 0); | 359 | SafeNativeMethods.GeomSetCategoryBits(prim_geom, 0); |
360 | d.GeomSetCollideBits(prim_geom, (uint)BadMeshAssetCollideBits); | 360 | SafeNativeMethods.GeomSetCollideBits(prim_geom, (uint)BadMeshAssetCollideBits); |
361 | } | 361 | } |
362 | else | 362 | else |
363 | { | 363 | { |
364 | d.GeomSetCategoryBits(prim_geom, (uint)m_collisionCategories); | 364 | SafeNativeMethods.GeomSetCategoryBits(prim_geom, (uint)m_collisionCategories); |
365 | d.GeomSetCollideBits(prim_geom, (uint)m_collisionFlags); | 365 | SafeNativeMethods.GeomSetCollideBits(prim_geom, (uint)m_collisionFlags); |
366 | } | 366 | } |
367 | 367 | ||
368 | _parent_scene.geom_name_map[prim_geom] = Name; | 368 | _parent_scene.geom_name_map[prim_geom] = Name; |
@@ -386,7 +386,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
386 | { | 386 | { |
387 | if (IsPhysical && Body != IntPtr.Zero) | 387 | if (IsPhysical && Body != IntPtr.Zero) |
388 | { | 388 | { |
389 | d.BodyEnable(Body); | 389 | SafeNativeMethods.BodyEnable(Body); |
390 | if (m_vehicle.Type != Vehicle.TYPE_NONE) | 390 | if (m_vehicle.Type != Vehicle.TYPE_NONE) |
391 | m_vehicle.Enable(Body, _parent_scene); | 391 | m_vehicle.Enable(Body, _parent_scene); |
392 | } | 392 | } |
@@ -401,7 +401,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
401 | 401 | ||
402 | if (IsPhysical && Body != IntPtr.Zero) | 402 | if (IsPhysical && Body != IntPtr.Zero) |
403 | { | 403 | { |
404 | d.BodyDisable(Body); | 404 | SafeNativeMethods.BodyDisable(Body); |
405 | } | 405 | } |
406 | } | 406 | } |
407 | 407 | ||
@@ -415,22 +415,22 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
415 | if (!childPrim) | 415 | if (!childPrim) |
416 | { | 416 | { |
417 | // Sets the geom to a body | 417 | // Sets the geom to a body |
418 | Body = d.BodyCreate(_parent_scene.world); | 418 | Body = SafeNativeMethods.BodyCreate(_parent_scene.world); |
419 | 419 | ||
420 | setMass(); | 420 | setMass(); |
421 | d.BodySetPosition(Body, _position.X, _position.Y, _position.Z); | 421 | SafeNativeMethods.BodySetPosition(Body, _position.X, _position.Y, _position.Z); |
422 | d.Quaternion myrot = new d.Quaternion(); | 422 | SafeNativeMethods.Quaternion myrot = new SafeNativeMethods.Quaternion(); |
423 | myrot.X = _orientation.X; | 423 | myrot.X = _orientation.X; |
424 | myrot.Y = _orientation.Y; | 424 | myrot.Y = _orientation.Y; |
425 | myrot.Z = _orientation.Z; | 425 | myrot.Z = _orientation.Z; |
426 | myrot.W = _orientation.W; | 426 | myrot.W = _orientation.W; |
427 | d.BodySetQuaternion(Body, ref myrot); | 427 | SafeNativeMethods.BodySetQuaternion(Body, ref myrot); |
428 | d.GeomSetBody(prim_geom, Body); | 428 | SafeNativeMethods.GeomSetBody(prim_geom, Body); |
429 | 429 | ||
430 | if (m_assetFailed) | 430 | if (m_assetFailed) |
431 | { | 431 | { |
432 | d.GeomSetCategoryBits(prim_geom, 0); | 432 | SafeNativeMethods.GeomSetCategoryBits(prim_geom, 0); |
433 | d.GeomSetCollideBits(prim_geom, (uint)BadMeshAssetCollideBits); | 433 | SafeNativeMethods.GeomSetCollideBits(prim_geom, (uint)BadMeshAssetCollideBits); |
434 | } | 434 | } |
435 | else | 435 | else |
436 | { | 436 | { |
@@ -438,14 +438,14 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
438 | m_collisionFlags |= (CollisionCategories.Land | CollisionCategories.Wind); | 438 | m_collisionFlags |= (CollisionCategories.Land | CollisionCategories.Wind); |
439 | } | 439 | } |
440 | 440 | ||
441 | d.GeomSetCategoryBits(prim_geom, (uint)m_collisionCategories); | 441 | SafeNativeMethods.GeomSetCategoryBits(prim_geom, (uint)m_collisionCategories); |
442 | d.GeomSetCollideBits(prim_geom, (uint)m_collisionFlags); | 442 | SafeNativeMethods.GeomSetCollideBits(prim_geom, (uint)m_collisionFlags); |
443 | 443 | ||
444 | d.BodySetAutoDisableFlag(Body, true); | 444 | SafeNativeMethods.BodySetAutoDisableFlag(Body, true); |
445 | d.BodySetAutoDisableSteps(Body, body_autodisable_frames); | 445 | SafeNativeMethods.BodySetAutoDisableSteps(Body, body_autodisable_frames); |
446 | 446 | ||
447 | // disconnect from world gravity so we can apply buoyancy | 447 | // disconnect from world gravity so we can apply buoyancy |
448 | d.BodySetGravityMode (Body, false); | 448 | SafeNativeMethods.BodySetGravityMode (Body, false); |
449 | 449 | ||
450 | m_interpenetrationcount = 0; | 450 | m_interpenetrationcount = 0; |
451 | m_collisionscore = 0; | 451 | m_collisionscore = 0; |
@@ -787,8 +787,8 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
787 | 787 | ||
788 | //m_log.Info("[PHYSICS]: New Mass: " + newmass.ToString()); | 788 | //m_log.Info("[PHYSICS]: New Mass: " + newmass.ToString()); |
789 | 789 | ||
790 | d.MassSetBoxTotal(out pMass, newmass, _size.X, _size.Y, _size.Z); | 790 | SafeNativeMethods.MassSetBoxTotal(out pMass, newmass, _size.X, _size.Y, _size.Z); |
791 | d.BodySetMass(Body, ref pMass); | 791 | SafeNativeMethods.BodySetMass(Body, ref pMass); |
792 | } | 792 | } |
793 | } | 793 | } |
794 | 794 | ||
@@ -796,7 +796,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
796 | { | 796 | { |
797 | if (Body != (IntPtr)0) | 797 | if (Body != (IntPtr)0) |
798 | { | 798 | { |
799 | d.BodySetAngularVel(Body, x, y, z); | 799 | SafeNativeMethods.BodySetAngularVel(Body, x, y, z); |
800 | } | 800 | } |
801 | } | 801 | } |
802 | 802 | ||
@@ -818,16 +818,16 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
818 | 818 | ||
819 | if (m_assetFailed) | 819 | if (m_assetFailed) |
820 | { | 820 | { |
821 | d.GeomSetCategoryBits(prim_geom, 0); | 821 | SafeNativeMethods.GeomSetCategoryBits(prim_geom, 0); |
822 | d.GeomSetCollideBits(prim_geom, 0); | 822 | SafeNativeMethods.GeomSetCollideBits(prim_geom, 0); |
823 | } | 823 | } |
824 | else | 824 | else |
825 | { | 825 | { |
826 | d.GeomSetCategoryBits(prim_geom, (uint)m_collisionCategories); | 826 | SafeNativeMethods.GeomSetCategoryBits(prim_geom, (uint)m_collisionCategories); |
827 | d.GeomSetCollideBits(prim_geom, (uint)m_collisionFlags); | 827 | SafeNativeMethods.GeomSetCollideBits(prim_geom, (uint)m_collisionFlags); |
828 | } | 828 | } |
829 | 829 | ||
830 | d.BodyDestroy(Body); | 830 | SafeNativeMethods.BodyDestroy(Body); |
831 | lock (childrenPrim) | 831 | lock (childrenPrim) |
832 | { | 832 | { |
833 | if (childrenPrim.Count > 0) | 833 | if (childrenPrim.Count > 0) |
@@ -851,14 +851,14 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
851 | 851 | ||
852 | if (m_assetFailed) | 852 | if (m_assetFailed) |
853 | { | 853 | { |
854 | d.GeomSetCategoryBits(prim_geom, 0); | 854 | SafeNativeMethods.GeomSetCategoryBits(prim_geom, 0); |
855 | d.GeomSetCollideBits(prim_geom, 0); | 855 | SafeNativeMethods.GeomSetCollideBits(prim_geom, 0); |
856 | } | 856 | } |
857 | else | 857 | else |
858 | { | 858 | { |
859 | 859 | ||
860 | d.GeomSetCategoryBits(prim_geom, (uint)m_collisionCategories); | 860 | SafeNativeMethods.GeomSetCategoryBits(prim_geom, (uint)m_collisionCategories); |
861 | d.GeomSetCollideBits(prim_geom, (uint)m_collisionFlags); | 861 | SafeNativeMethods.GeomSetCollideBits(prim_geom, (uint)m_collisionFlags); |
862 | } | 862 | } |
863 | 863 | ||
864 | Body = IntPtr.Zero; | 864 | Body = IntPtr.Zero; |
@@ -915,10 +915,10 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
915 | } | 915 | } |
916 | else | 916 | else |
917 | { | 917 | { |
918 | _triMeshData = d.GeomTriMeshDataCreate(); | 918 | _triMeshData = SafeNativeMethods.GeomTriMeshDataCreate(); |
919 | 919 | ||
920 | d.GeomTriMeshDataBuildSimple(_triMeshData, vertices, vertexStride, vertexCount, indices, indexCount, triStride); | 920 | SafeNativeMethods.GeomTriMeshDataBuildSimple(_triMeshData, vertices, vertexStride, vertexCount, indices, indexCount, triStride); |
921 | d.GeomTriMeshDataPreprocess(_triMeshData); | 921 | SafeNativeMethods.GeomTriMeshDataPreprocess(_triMeshData); |
922 | m_MeshToTriMeshMap[mesh] = _triMeshData; | 922 | m_MeshToTriMeshMap[mesh] = _triMeshData; |
923 | } | 923 | } |
924 | } | 924 | } |
@@ -926,7 +926,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
926 | // _parent_scene.waitForSpaceUnlock(m_targetSpace); | 926 | // _parent_scene.waitForSpaceUnlock(m_targetSpace); |
927 | try | 927 | try |
928 | { | 928 | { |
929 | SetGeom(d.CreateTriMesh(m_targetSpace, _triMeshData, null, null, null)); | 929 | SetGeom(SafeNativeMethods.CreateTriMesh(m_targetSpace, _triMeshData, null, null, null)); |
930 | } | 930 | } |
931 | catch (AccessViolationException) | 931 | catch (AccessViolationException) |
932 | { | 932 | { |
@@ -1032,7 +1032,7 @@ Console.WriteLine("ZProcessTaints for " + Name); | |||
1032 | { | 1032 | { |
1033 | if (Amotor != IntPtr.Zero) | 1033 | if (Amotor != IntPtr.Zero) |
1034 | { | 1034 | { |
1035 | d.JointDestroy(Amotor); | 1035 | SafeNativeMethods.JointDestroy(Amotor); |
1036 | Amotor = IntPtr.Zero; | 1036 | Amotor = IntPtr.Zero; |
1037 | } | 1037 | } |
1038 | } | 1038 | } |
@@ -1107,7 +1107,7 @@ Console.WriteLine("ZProcessTaints for " + Name); | |||
1107 | 1107 | ||
1108 | if (Body == IntPtr.Zero) | 1108 | if (Body == IntPtr.Zero) |
1109 | { | 1109 | { |
1110 | Body = d.BodyCreate(_parent_scene.world); | 1110 | Body = SafeNativeMethods.BodyCreate(_parent_scene.world); |
1111 | setMass(); | 1111 | setMass(); |
1112 | } | 1112 | } |
1113 | 1113 | ||
@@ -1123,21 +1123,21 @@ Console.WriteLine("ZProcessTaints for " + Name); | |||
1123 | 1123 | ||
1124 | foreach (OdePrim prm in childrenPrim) | 1124 | foreach (OdePrim prm in childrenPrim) |
1125 | { | 1125 | { |
1126 | d.Mass m2; | 1126 | SafeNativeMethods.Mass m2; |
1127 | d.MassSetZero(out m2); | 1127 | SafeNativeMethods.MassSetZero(out m2); |
1128 | d.MassSetBoxTotal(out m2, prm.CalculateMass(), prm._size.X, prm._size.Y, prm._size.Z); | 1128 | SafeNativeMethods.MassSetBoxTotal(out m2, prm.CalculateMass(), prm._size.X, prm._size.Y, prm._size.Z); |
1129 | 1129 | ||
1130 | d.Quaternion quat = new d.Quaternion(); | 1130 | SafeNativeMethods.Quaternion quat = new SafeNativeMethods.Quaternion(); |
1131 | quat.W = prm._orientation.W; | 1131 | quat.W = prm._orientation.W; |
1132 | quat.X = prm._orientation.X; | 1132 | quat.X = prm._orientation.X; |
1133 | quat.Y = prm._orientation.Y; | 1133 | quat.Y = prm._orientation.Y; |
1134 | quat.Z = prm._orientation.Z; | 1134 | quat.Z = prm._orientation.Z; |
1135 | 1135 | ||
1136 | d.Matrix3 mat = new d.Matrix3(); | 1136 | SafeNativeMethods.Matrix3 mat = new SafeNativeMethods.Matrix3(); |
1137 | d.RfromQ(out mat, ref quat); | 1137 | SafeNativeMethods.RfromQ(out mat, ref quat); |
1138 | d.MassRotate(ref m2, ref mat); | 1138 | SafeNativeMethods.MassRotate(ref m2, ref mat); |
1139 | d.MassTranslate(ref m2, Position.X - prm.Position.X, Position.Y - prm.Position.Y, Position.Z - prm.Position.Z); | 1139 | SafeNativeMethods.MassTranslate(ref m2, Position.X - prm.Position.X, Position.Y - prm.Position.Y, Position.Z - prm.Position.Z); |
1140 | d.MassAdd(ref pMass, ref m2); | 1140 | SafeNativeMethods.MassAdd(ref pMass, ref m2); |
1141 | } | 1141 | } |
1142 | 1142 | ||
1143 | foreach (OdePrim prm in childrenPrim) | 1143 | foreach (OdePrim prm in childrenPrim) |
@@ -1148,36 +1148,36 @@ Console.WriteLine("ZProcessTaints for " + Name); | |||
1148 | //Console.WriteLine(" GeomSetCategoryBits 1: " + prm.prim_geom + " - " + (int)prm.m_collisionCategories + " for " + Name); | 1148 | //Console.WriteLine(" GeomSetCategoryBits 1: " + prm.prim_geom + " - " + (int)prm.m_collisionCategories + " for " + Name); |
1149 | if (prm.m_assetFailed) | 1149 | if (prm.m_assetFailed) |
1150 | { | 1150 | { |
1151 | d.GeomSetCategoryBits(prm.prim_geom, 0); | 1151 | SafeNativeMethods.GeomSetCategoryBits(prm.prim_geom, 0); |
1152 | d.GeomSetCollideBits(prm.prim_geom, (uint)prm.BadMeshAssetCollideBits); | 1152 | SafeNativeMethods.GeomSetCollideBits(prm.prim_geom, (uint)prm.BadMeshAssetCollideBits); |
1153 | } | 1153 | } |
1154 | else | 1154 | else |
1155 | { | 1155 | { |
1156 | d.GeomSetCategoryBits(prm.prim_geom, (uint)prm.m_collisionCategories); | 1156 | SafeNativeMethods.GeomSetCategoryBits(prm.prim_geom, (uint)prm.m_collisionCategories); |
1157 | d.GeomSetCollideBits(prm.prim_geom, (uint)prm.m_collisionFlags); | 1157 | SafeNativeMethods.GeomSetCollideBits(prm.prim_geom, (uint)prm.m_collisionFlags); |
1158 | } | 1158 | } |
1159 | 1159 | ||
1160 | d.Quaternion quat = new d.Quaternion(); | 1160 | SafeNativeMethods.Quaternion quat = new SafeNativeMethods.Quaternion(); |
1161 | quat.W = prm._orientation.W; | 1161 | quat.W = prm._orientation.W; |
1162 | quat.X = prm._orientation.X; | 1162 | quat.X = prm._orientation.X; |
1163 | quat.Y = prm._orientation.Y; | 1163 | quat.Y = prm._orientation.Y; |
1164 | quat.Z = prm._orientation.Z; | 1164 | quat.Z = prm._orientation.Z; |
1165 | 1165 | ||
1166 | d.Matrix3 mat = new d.Matrix3(); | 1166 | SafeNativeMethods.Matrix3 mat = new SafeNativeMethods.Matrix3(); |
1167 | d.RfromQ(out mat, ref quat); | 1167 | SafeNativeMethods.RfromQ(out mat, ref quat); |
1168 | if (Body != IntPtr.Zero) | 1168 | if (Body != IntPtr.Zero) |
1169 | { | 1169 | { |
1170 | d.GeomSetBody(prm.prim_geom, Body); | 1170 | SafeNativeMethods.GeomSetBody(prm.prim_geom, Body); |
1171 | prm.childPrim = true; | 1171 | prm.childPrim = true; |
1172 | d.GeomSetOffsetWorldPosition(prm.prim_geom, prm.Position.X , prm.Position.Y, prm.Position.Z); | 1172 | SafeNativeMethods.GeomSetOffsetWorldPosition(prm.prim_geom, prm.Position.X , prm.Position.Y, prm.Position.Z); |
1173 | //d.GeomSetOffsetPosition(prim.prim_geom, | 1173 | //d.GeomSetOffsetPosition(prim.prim_geom, |
1174 | // (Position.X - prm.Position.X) - pMass.c.X, | 1174 | // (Position.X - prm.Position.X) - pMass.c.X, |
1175 | // (Position.Y - prm.Position.Y) - pMass.c.Y, | 1175 | // (Position.Y - prm.Position.Y) - pMass.c.Y, |
1176 | // (Position.Z - prm.Position.Z) - pMass.c.Z); | 1176 | // (Position.Z - prm.Position.Z) - pMass.c.Z); |
1177 | d.GeomSetOffsetWorldRotation(prm.prim_geom, ref mat); | 1177 | SafeNativeMethods.GeomSetOffsetWorldRotation(prm.prim_geom, ref mat); |
1178 | //d.GeomSetOffsetRotation(prm.prim_geom, ref mat); | 1178 | //d.GeomSetOffsetRotation(prm.prim_geom, ref mat); |
1179 | d.MassTranslate(ref pMass, -pMass.c.X, -pMass.c.Y, -pMass.c.Z); | 1179 | SafeNativeMethods.MassTranslate(ref pMass, -pMass.c.X, -pMass.c.Y, -pMass.c.Z); |
1180 | d.BodySetMass(Body, ref pMass); | 1180 | SafeNativeMethods.BodySetMass(Body, ref pMass); |
1181 | } | 1181 | } |
1182 | else | 1182 | else |
1183 | { | 1183 | { |
@@ -1197,37 +1197,37 @@ Console.WriteLine("ZProcessTaints for " + Name); | |||
1197 | 1197 | ||
1198 | if (m_assetFailed) | 1198 | if (m_assetFailed) |
1199 | { | 1199 | { |
1200 | d.GeomSetCategoryBits(prim_geom, 0); | 1200 | SafeNativeMethods.GeomSetCategoryBits(prim_geom, 0); |
1201 | d.GeomSetCollideBits(prim_geom, (uint)BadMeshAssetCollideBits); | 1201 | SafeNativeMethods.GeomSetCollideBits(prim_geom, (uint)BadMeshAssetCollideBits); |
1202 | } | 1202 | } |
1203 | else | 1203 | else |
1204 | { | 1204 | { |
1205 | //Console.WriteLine("GeomSetCategoryBits 2: " + prim_geom + " - " + (int)m_collisionCategories + " for " + Name); | 1205 | //Console.WriteLine("GeomSetCategoryBits 2: " + prim_geom + " - " + (int)m_collisionCategories + " for " + Name); |
1206 | d.GeomSetCategoryBits(prim_geom, (uint)m_collisionCategories); | 1206 | SafeNativeMethods.GeomSetCategoryBits(prim_geom, (uint)m_collisionCategories); |
1207 | //Console.WriteLine(" Post GeomSetCategoryBits 2"); | 1207 | //Console.WriteLine(" Post GeomSetCategoryBits 2"); |
1208 | d.GeomSetCollideBits(prim_geom, (uint)m_collisionFlags); | 1208 | SafeNativeMethods.GeomSetCollideBits(prim_geom, (uint)m_collisionFlags); |
1209 | } | 1209 | } |
1210 | 1210 | ||
1211 | d.Quaternion quat2 = new d.Quaternion(); | 1211 | SafeNativeMethods.Quaternion quat2 = new SafeNativeMethods.Quaternion(); |
1212 | quat2.W = _orientation.W; | 1212 | quat2.W = _orientation.W; |
1213 | quat2.X = _orientation.X; | 1213 | quat2.X = _orientation.X; |
1214 | quat2.Y = _orientation.Y; | 1214 | quat2.Y = _orientation.Y; |
1215 | quat2.Z = _orientation.Z; | 1215 | quat2.Z = _orientation.Z; |
1216 | 1216 | ||
1217 | d.Matrix3 mat2 = new d.Matrix3(); | 1217 | SafeNativeMethods.Matrix3 mat2 = new SafeNativeMethods.Matrix3(); |
1218 | d.RfromQ(out mat2, ref quat2); | 1218 | SafeNativeMethods.RfromQ(out mat2, ref quat2); |
1219 | d.GeomSetBody(prim_geom, Body); | 1219 | SafeNativeMethods.GeomSetBody(prim_geom, Body); |
1220 | d.GeomSetOffsetWorldPosition(prim_geom, Position.X - pMass.c.X, Position.Y - pMass.c.Y, Position.Z - pMass.c.Z); | 1220 | SafeNativeMethods.GeomSetOffsetWorldPosition(prim_geom, Position.X - pMass.c.X, Position.Y - pMass.c.Y, Position.Z - pMass.c.Z); |
1221 | //d.GeomSetOffsetPosition(prim.prim_geom, | 1221 | //d.GeomSetOffsetPosition(prim.prim_geom, |
1222 | // (Position.X - prm.Position.X) - pMass.c.X, | 1222 | // (Position.X - prm.Position.X) - pMass.c.X, |
1223 | // (Position.Y - prm.Position.Y) - pMass.c.Y, | 1223 | // (Position.Y - prm.Position.Y) - pMass.c.Y, |
1224 | // (Position.Z - prm.Position.Z) - pMass.c.Z); | 1224 | // (Position.Z - prm.Position.Z) - pMass.c.Z); |
1225 | //d.GeomSetOffsetRotation(prim_geom, ref mat2); | 1225 | //d.GeomSetOffsetRotation(prim_geom, ref mat2); |
1226 | d.MassTranslate(ref pMass, -pMass.c.X, -pMass.c.Y, -pMass.c.Z); | 1226 | SafeNativeMethods.MassTranslate(ref pMass, -pMass.c.X, -pMass.c.Y, -pMass.c.Z); |
1227 | d.BodySetMass(Body, ref pMass); | 1227 | SafeNativeMethods.BodySetMass(Body, ref pMass); |
1228 | 1228 | ||
1229 | d.BodySetAutoDisableFlag(Body, true); | 1229 | SafeNativeMethods.BodySetAutoDisableFlag(Body, true); |
1230 | d.BodySetAutoDisableSteps(Body, body_autodisable_frames); | 1230 | SafeNativeMethods.BodySetAutoDisableSteps(Body, body_autodisable_frames); |
1231 | 1231 | ||
1232 | m_interpenetrationcount = 0; | 1232 | m_interpenetrationcount = 0; |
1233 | m_collisionscore = 0; | 1233 | m_collisionscore = 0; |
@@ -1240,7 +1240,7 @@ Console.WriteLine("ZProcessTaints for " + Name); | |||
1240 | createAMotor(m_angularlock); | 1240 | createAMotor(m_angularlock); |
1241 | } | 1241 | } |
1242 | 1242 | ||
1243 | d.BodySetPosition(Body, Position.X, Position.Y, Position.Z); | 1243 | SafeNativeMethods.BodySetPosition(Body, Position.X, Position.Y, Position.Z); |
1244 | 1244 | ||
1245 | if (m_vehicle.Type != Vehicle.TYPE_NONE) | 1245 | if (m_vehicle.Type != Vehicle.TYPE_NONE) |
1246 | m_vehicle.Enable(Body, _parent_scene); | 1246 | m_vehicle.Enable(Body, _parent_scene); |
@@ -1370,13 +1370,13 @@ Console.WriteLine("ZProcessTaints for " + Name); | |||
1370 | 1370 | ||
1371 | if (m_assetFailed) | 1371 | if (m_assetFailed) |
1372 | { | 1372 | { |
1373 | d.GeomSetCategoryBits(prim_geom, 0); | 1373 | SafeNativeMethods.GeomSetCategoryBits(prim_geom, 0); |
1374 | d.GeomSetCollideBits(prim_geom, 0); | 1374 | SafeNativeMethods.GeomSetCollideBits(prim_geom, 0); |
1375 | } | 1375 | } |
1376 | else | 1376 | else |
1377 | { | 1377 | { |
1378 | d.GeomSetCategoryBits(prim_geom, (uint)m_collisionCategories); | 1378 | SafeNativeMethods.GeomSetCategoryBits(prim_geom, (uint)m_collisionCategories); |
1379 | d.GeomSetCollideBits(prim_geom, (uint)m_collisionFlags); | 1379 | SafeNativeMethods.GeomSetCollideBits(prim_geom, (uint)m_collisionFlags); |
1380 | } | 1380 | } |
1381 | 1381 | ||
1382 | if (IsPhysical) | 1382 | if (IsPhysical) |
@@ -1400,21 +1400,21 @@ Console.WriteLine("ZProcessTaints for " + Name); | |||
1400 | 1400 | ||
1401 | if (m_assetFailed) | 1401 | if (m_assetFailed) |
1402 | { | 1402 | { |
1403 | d.GeomSetCategoryBits(prim_geom, 0); | 1403 | SafeNativeMethods.GeomSetCategoryBits(prim_geom, 0); |
1404 | d.GeomSetCollideBits(prim_geom, (uint)BadMeshAssetCollideBits); | 1404 | SafeNativeMethods.GeomSetCollideBits(prim_geom, (uint)BadMeshAssetCollideBits); |
1405 | } | 1405 | } |
1406 | else | 1406 | else |
1407 | { | 1407 | { |
1408 | d.GeomSetCategoryBits(prim_geom, (uint)m_collisionCategories); | 1408 | SafeNativeMethods.GeomSetCategoryBits(prim_geom, (uint)m_collisionCategories); |
1409 | d.GeomSetCollideBits(prim_geom, (uint)m_collisionFlags); | 1409 | SafeNativeMethods.GeomSetCollideBits(prim_geom, (uint)m_collisionFlags); |
1410 | } | 1410 | } |
1411 | 1411 | ||
1412 | if (IsPhysical) | 1412 | if (IsPhysical) |
1413 | { | 1413 | { |
1414 | if (Body != IntPtr.Zero) | 1414 | if (Body != IntPtr.Zero) |
1415 | { | 1415 | { |
1416 | d.BodySetLinearVel(Body, 0f, 0f, 0f); | 1416 | SafeNativeMethods.BodySetLinearVel(Body, 0f, 0f, 0f); |
1417 | d.BodySetForce(Body, 0, 0, 0); | 1417 | SafeNativeMethods.BodySetForce(Body, 0, 0, 0); |
1418 | enableBodySoft(); | 1418 | enableBodySoft(); |
1419 | } | 1419 | } |
1420 | } | 1420 | } |
@@ -1463,7 +1463,7 @@ Console.WriteLine("CreateGeom:"); | |||
1463 | try | 1463 | try |
1464 | { | 1464 | { |
1465 | //Console.WriteLine(" CreateGeom 1"); | 1465 | //Console.WriteLine(" CreateGeom 1"); |
1466 | SetGeom(d.CreateSphere(m_targetSpace, _size.X / 2)); | 1466 | SetGeom(SafeNativeMethods.CreateSphere(m_targetSpace, _size.X / 2)); |
1467 | m_expectedCollisionContacts = 3; | 1467 | m_expectedCollisionContacts = 3; |
1468 | } | 1468 | } |
1469 | catch (AccessViolationException) | 1469 | catch (AccessViolationException) |
@@ -1478,7 +1478,7 @@ Console.WriteLine("CreateGeom:"); | |||
1478 | try | 1478 | try |
1479 | { | 1479 | { |
1480 | //Console.WriteLine(" CreateGeom 2"); | 1480 | //Console.WriteLine(" CreateGeom 2"); |
1481 | SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); | 1481 | SetGeom(SafeNativeMethods.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); |
1482 | m_expectedCollisionContacts = 4; | 1482 | m_expectedCollisionContacts = 4; |
1483 | } | 1483 | } |
1484 | catch (AccessViolationException) | 1484 | catch (AccessViolationException) |
@@ -1494,7 +1494,7 @@ Console.WriteLine("CreateGeom:"); | |||
1494 | try | 1494 | try |
1495 | { | 1495 | { |
1496 | //Console.WriteLine(" CreateGeom 3"); | 1496 | //Console.WriteLine(" CreateGeom 3"); |
1497 | SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); | 1497 | SetGeom(SafeNativeMethods.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); |
1498 | m_expectedCollisionContacts = 4; | 1498 | m_expectedCollisionContacts = 4; |
1499 | } | 1499 | } |
1500 | catch (AccessViolationException) | 1500 | catch (AccessViolationException) |
@@ -1510,7 +1510,7 @@ Console.WriteLine("CreateGeom:"); | |||
1510 | try | 1510 | try |
1511 | { | 1511 | { |
1512 | //Console.WriteLine(" CreateGeom 4"); | 1512 | //Console.WriteLine(" CreateGeom 4"); |
1513 | SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); | 1513 | SetGeom(SafeNativeMethods.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); |
1514 | m_expectedCollisionContacts = 4; | 1514 | m_expectedCollisionContacts = 4; |
1515 | } | 1515 | } |
1516 | catch (AccessViolationException) | 1516 | catch (AccessViolationException) |
@@ -1536,7 +1536,7 @@ Console.WriteLine("CreateGeom:"); | |||
1536 | { | 1536 | { |
1537 | _parent_scene.geom_name_map.Remove(prim_geom); | 1537 | _parent_scene.geom_name_map.Remove(prim_geom); |
1538 | _parent_scene.actor_name_map.Remove(prim_geom); | 1538 | _parent_scene.actor_name_map.Remove(prim_geom); |
1539 | d.GeomDestroy(prim_geom); | 1539 | SafeNativeMethods.GeomDestroy(prim_geom); |
1540 | m_expectedCollisionContacts = 0; | 1540 | m_expectedCollisionContacts = 0; |
1541 | prim_geom = IntPtr.Zero; | 1541 | prim_geom = IntPtr.Zero; |
1542 | } | 1542 | } |
@@ -1593,13 +1593,13 @@ Console.WriteLine("changeadd 1"); | |||
1593 | #endif | 1593 | #endif |
1594 | CreateGeom(m_targetSpace, mesh); | 1594 | CreateGeom(m_targetSpace, mesh); |
1595 | 1595 | ||
1596 | d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); | 1596 | SafeNativeMethods.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); |
1597 | d.Quaternion myrot = new d.Quaternion(); | 1597 | SafeNativeMethods.Quaternion myrot = new SafeNativeMethods.Quaternion(); |
1598 | myrot.X = _orientation.X; | 1598 | myrot.X = _orientation.X; |
1599 | myrot.Y = _orientation.Y; | 1599 | myrot.Y = _orientation.Y; |
1600 | myrot.Z = _orientation.Z; | 1600 | myrot.Z = _orientation.Z; |
1601 | myrot.W = _orientation.W; | 1601 | myrot.W = _orientation.W; |
1602 | d.GeomSetQuaternion(prim_geom, ref myrot); | 1602 | SafeNativeMethods.GeomSetQuaternion(prim_geom, ref myrot); |
1603 | 1603 | ||
1604 | if (IsPhysical && Body == IntPtr.Zero) | 1604 | if (IsPhysical && Body == IntPtr.Zero) |
1605 | enableBody(); | 1605 | enableBody(); |
@@ -1627,14 +1627,14 @@ Console.WriteLine("changeadd 1"); | |||
1627 | { | 1627 | { |
1628 | if (m_linkJoint != IntPtr.Zero) | 1628 | if (m_linkJoint != IntPtr.Zero) |
1629 | { | 1629 | { |
1630 | d.JointDestroy(m_linkJoint); | 1630 | SafeNativeMethods.JointDestroy(m_linkJoint); |
1631 | m_linkJoint = IntPtr.Zero; | 1631 | m_linkJoint = IntPtr.Zero; |
1632 | } | 1632 | } |
1633 | } | 1633 | } |
1634 | 1634 | ||
1635 | if (Body != IntPtr.Zero) | 1635 | if (Body != IntPtr.Zero) |
1636 | { | 1636 | { |
1637 | d.BodySetPosition(Body, _position.X, _position.Y, _position.Z); | 1637 | SafeNativeMethods.BodySetPosition(Body, _position.X, _position.Y, _position.Z); |
1638 | 1638 | ||
1639 | if (_parent != null) | 1639 | if (_parent != null) |
1640 | { | 1640 | { |
@@ -1643,12 +1643,12 @@ Console.WriteLine("changeadd 1"); | |||
1643 | { | 1643 | { |
1644 | // KF: Fixed Joints were removed? Anyway - this Console.WriteLine does not show up, so routine is not used?? | 1644 | // KF: Fixed Joints were removed? Anyway - this Console.WriteLine does not show up, so routine is not used?? |
1645 | Console.WriteLine(" JointCreateFixed"); | 1645 | Console.WriteLine(" JointCreateFixed"); |
1646 | m_linkJoint = d.JointCreateFixed(_parent_scene.world, _linkJointGroup); | 1646 | m_linkJoint = SafeNativeMethods.JointCreateFixed(_parent_scene.world, _linkJointGroup); |
1647 | d.JointAttach(m_linkJoint, Body, odParent.Body); | 1647 | SafeNativeMethods.JointAttach(m_linkJoint, Body, odParent.Body); |
1648 | d.JointSetFixed(m_linkJoint); | 1648 | SafeNativeMethods.JointSetFixed(m_linkJoint); |
1649 | } | 1649 | } |
1650 | } | 1650 | } |
1651 | d.BodyEnable(Body); | 1651 | SafeNativeMethods.BodyEnable(Body); |
1652 | if (m_vehicle.Type != Vehicle.TYPE_NONE) | 1652 | if (m_vehicle.Type != Vehicle.TYPE_NONE) |
1653 | { | 1653 | { |
1654 | m_vehicle.Enable(Body, _parent_scene); | 1654 | m_vehicle.Enable(Body, _parent_scene); |
@@ -1674,10 +1674,10 @@ Console.WriteLine(" JointCreateFixed"); | |||
1674 | 1674 | ||
1675 | // _parent_scene.waitForSpaceUnlock(m_targetSpace); | 1675 | // _parent_scene.waitForSpaceUnlock(m_targetSpace); |
1676 | 1676 | ||
1677 | d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); | 1677 | SafeNativeMethods.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); |
1678 | 1678 | ||
1679 | // _parent_scene.waitForSpaceUnlock(m_targetSpace); | 1679 | // _parent_scene.waitForSpaceUnlock(m_targetSpace); |
1680 | d.SpaceAdd(m_targetSpace, prim_geom); | 1680 | SafeNativeMethods.SpaceAdd(m_targetSpace, prim_geom); |
1681 | 1681 | ||
1682 | changeSelectedStatus(); | 1682 | changeSelectedStatus(); |
1683 | 1683 | ||
@@ -1704,7 +1704,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
1704 | else | 1704 | else |
1705 | { | 1705 | { |
1706 | //Console.WriteLine("Move " + Name); | 1706 | //Console.WriteLine("Move " + Name); |
1707 | if (!d.BodyIsEnabled (Body)) d.BodyEnable (Body); // KF add 161009 | 1707 | if (!SafeNativeMethods.BodyIsEnabled (Body)) SafeNativeMethods.BodyEnable (Body); // KF add 161009 |
1708 | 1708 | ||
1709 | float m_mass = CalculateMass(); | 1709 | float m_mass = CalculateMass(); |
1710 | 1710 | ||
@@ -1746,9 +1746,9 @@ Console.WriteLine(" JointCreateFixed"); | |||
1746 | //PidStatus = true; | 1746 | //PidStatus = true; |
1747 | 1747 | ||
1748 | // PhysicsVector vec = new PhysicsVector(); | 1748 | // PhysicsVector vec = new PhysicsVector(); |
1749 | d.Vector3 vel = d.BodyGetLinearVel(Body); | 1749 | SafeNativeMethods.Vector3 vel = SafeNativeMethods.BodyGetLinearVel(Body); |
1750 | 1750 | ||
1751 | d.Vector3 pos = d.BodyGetPosition(Body); | 1751 | SafeNativeMethods.Vector3 pos = SafeNativeMethods.BodyGetPosition(Body); |
1752 | _target_velocity = | 1752 | _target_velocity = |
1753 | new Vector3( | 1753 | new Vector3( |
1754 | (m_PIDTarget.X - pos.X) * ((PID_G - m_PIDTau) * timestep), | 1754 | (m_PIDTarget.X - pos.X) * ((PID_G - m_PIDTau) * timestep), |
@@ -1770,9 +1770,9 @@ Console.WriteLine(" JointCreateFixed"); | |||
1770 | //fx = (_target_velocity.X - vel.X) * (PID_D) + (_zeroPosition.X - pos.X) * (PID_P * 2); | 1770 | //fx = (_target_velocity.X - vel.X) * (PID_D) + (_zeroPosition.X - pos.X) * (PID_P * 2); |
1771 | //fy = (_target_velocity.Y - vel.Y) * (PID_D) + (_zeroPosition.Y - pos.Y) * (PID_P * 2); | 1771 | //fy = (_target_velocity.Y - vel.Y) * (PID_D) + (_zeroPosition.Y - pos.Y) * (PID_P * 2); |
1772 | //fz = fz + (_target_velocity.Z - vel.Z) * (PID_D) + (_zeroPosition.Z - pos.Z) * PID_P; | 1772 | //fz = fz + (_target_velocity.Z - vel.Z) * (PID_D) + (_zeroPosition.Z - pos.Z) * PID_P; |
1773 | d.BodySetPosition(Body, m_PIDTarget.X, m_PIDTarget.Y, m_PIDTarget.Z); | 1773 | SafeNativeMethods.BodySetPosition(Body, m_PIDTarget.X, m_PIDTarget.Y, m_PIDTarget.Z); |
1774 | d.BodySetLinearVel(Body, 0, 0, 0); | 1774 | SafeNativeMethods.BodySetLinearVel(Body, 0, 0, 0); |
1775 | d.BodyAddForce(Body, 0, 0, fz); | 1775 | SafeNativeMethods.BodyAddForce(Body, 0, 0, fz); |
1776 | return; | 1776 | return; |
1777 | } | 1777 | } |
1778 | else | 1778 | else |
@@ -1813,8 +1813,8 @@ Console.WriteLine(" JointCreateFixed"); | |||
1813 | } | 1813 | } |
1814 | 1814 | ||
1815 | // Where are we, and where are we headed? | 1815 | // Where are we, and where are we headed? |
1816 | d.Vector3 pos = d.BodyGetPosition(Body); | 1816 | SafeNativeMethods.Vector3 pos = SafeNativeMethods.BodyGetPosition(Body); |
1817 | d.Vector3 vel = d.BodyGetLinearVel(Body); | 1817 | SafeNativeMethods.Vector3 vel = SafeNativeMethods.BodyGetLinearVel(Body); |
1818 | 1818 | ||
1819 | // Non-Vehicles have a limited set of Hover options. | 1819 | // Non-Vehicles have a limited set of Hover options. |
1820 | // determine what our target height really is based on HoverType | 1820 | // determine what our target height really is based on HoverType |
@@ -1856,9 +1856,9 @@ Console.WriteLine(" JointCreateFixed"); | |||
1856 | // Avatar to Avatar collisions | 1856 | // Avatar to Avatar collisions |
1857 | // Prim to avatar collisions | 1857 | // Prim to avatar collisions |
1858 | 1858 | ||
1859 | d.BodySetPosition(Body, pos.X, pos.Y, m_targetHoverHeight); | 1859 | SafeNativeMethods.BodySetPosition(Body, pos.X, pos.Y, m_targetHoverHeight); |
1860 | d.BodySetLinearVel(Body, vel.X, vel.Y, 0); | 1860 | SafeNativeMethods.BodySetLinearVel(Body, vel.X, vel.Y, 0); |
1861 | d.BodyAddForce(Body, 0, 0, fz); | 1861 | SafeNativeMethods.BodyAddForce(Body, 0, 0, fz); |
1862 | return; | 1862 | return; |
1863 | } | 1863 | } |
1864 | else | 1864 | else |
@@ -1884,13 +1884,13 @@ Console.WriteLine(" JointCreateFixed"); | |||
1884 | //m_taintdisable = true; | 1884 | //m_taintdisable = true; |
1885 | //base.RaiseOutOfBounds(Position); | 1885 | //base.RaiseOutOfBounds(Position); |
1886 | //d.BodySetLinearVel(Body, fx, fy, 0f); | 1886 | //d.BodySetLinearVel(Body, fx, fy, 0f); |
1887 | if (!d.BodyIsEnabled(Body)) | 1887 | if (!SafeNativeMethods.BodyIsEnabled(Body)) |
1888 | { | 1888 | { |
1889 | // A physical body at rest on a surface will auto-disable after a while, | 1889 | // A physical body at rest on a surface will auto-disable after a while, |
1890 | // this appears to re-enable it incase the surface it is upon vanishes, | 1890 | // this appears to re-enable it incase the surface it is upon vanishes, |
1891 | // and the body should fall again. | 1891 | // and the body should fall again. |
1892 | d.BodySetLinearVel(Body, 0f, 0f, 0f); | 1892 | SafeNativeMethods.BodySetLinearVel(Body, 0f, 0f, 0f); |
1893 | d.BodySetForce(Body, 0, 0, 0); | 1893 | SafeNativeMethods.BodySetForce(Body, 0, 0, 0); |
1894 | enableBodySoft(); | 1894 | enableBodySoft(); |
1895 | } | 1895 | } |
1896 | 1896 | ||
@@ -1906,7 +1906,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
1906 | fy = nmax; | 1906 | fy = nmax; |
1907 | if (fy < nmin) | 1907 | if (fy < nmin) |
1908 | fy = nmin; | 1908 | fy = nmin; |
1909 | d.BodyAddForce(Body, fx, fy, fz); | 1909 | SafeNativeMethods.BodyAddForce(Body, fx, fy, fz); |
1910 | //Console.WriteLine("AddForce " + fx + "," + fy + "," + fz); | 1910 | //Console.WriteLine("AddForce " + fx + "," + fy + "," + fz); |
1911 | } | 1911 | } |
1912 | } | 1912 | } |
@@ -1922,7 +1922,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
1922 | 1922 | ||
1923 | private void rotate() | 1923 | private void rotate() |
1924 | { | 1924 | { |
1925 | d.Quaternion myrot = new d.Quaternion(); | 1925 | SafeNativeMethods.Quaternion myrot = new SafeNativeMethods.Quaternion(); |
1926 | myrot.X = _orientation.X; | 1926 | myrot.X = _orientation.X; |
1927 | myrot.Y = _orientation.Y; | 1927 | myrot.Y = _orientation.Y; |
1928 | myrot.Z = _orientation.Z; | 1928 | myrot.Z = _orientation.Z; |
@@ -1930,7 +1930,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
1930 | if (Body != IntPtr.Zero) | 1930 | if (Body != IntPtr.Zero) |
1931 | { | 1931 | { |
1932 | // KF: If this is a root prim do BodySet | 1932 | // KF: If this is a root prim do BodySet |
1933 | d.BodySetQuaternion(Body, ref myrot); | 1933 | SafeNativeMethods.BodySetQuaternion(Body, ref myrot); |
1934 | if (IsPhysical) | 1934 | if (IsPhysical) |
1935 | { | 1935 | { |
1936 | // create or remove locks | 1936 | // create or remove locks |
@@ -1940,7 +1940,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
1940 | else | 1940 | else |
1941 | { | 1941 | { |
1942 | // daughter prim, do Geom set | 1942 | // daughter prim, do Geom set |
1943 | d.GeomSetQuaternion(prim_geom, ref myrot); | 1943 | SafeNativeMethods.GeomSetQuaternion(prim_geom, ref myrot); |
1944 | } | 1944 | } |
1945 | 1945 | ||
1946 | resetCollisionAccounting(); | 1946 | resetCollisionAccounting(); |
@@ -1962,7 +1962,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
1962 | m_disabled = true; | 1962 | m_disabled = true; |
1963 | if (Body != IntPtr.Zero) | 1963 | if (Body != IntPtr.Zero) |
1964 | { | 1964 | { |
1965 | d.BodyDisable(Body); | 1965 | SafeNativeMethods.BodyDisable(Body); |
1966 | Body = IntPtr.Zero; | 1966 | Body = IntPtr.Zero; |
1967 | } | 1967 | } |
1968 | 1968 | ||
@@ -2051,10 +2051,10 @@ Console.WriteLine(" JointCreateFixed"); | |||
2051 | } | 2051 | } |
2052 | } | 2052 | } |
2053 | 2053 | ||
2054 | if (d.SpaceQuery(m_targetSpace, prim_geom)) | 2054 | if (SafeNativeMethods.SpaceQuery(m_targetSpace, prim_geom)) |
2055 | { | 2055 | { |
2056 | // _parent_scene.waitForSpaceUnlock(m_targetSpace); | 2056 | // _parent_scene.waitForSpaceUnlock(m_targetSpace); |
2057 | d.SpaceRemove(m_targetSpace, prim_geom); | 2057 | SafeNativeMethods.SpaceRemove(m_targetSpace, prim_geom); |
2058 | } | 2058 | } |
2059 | 2059 | ||
2060 | RemoveGeom(); | 2060 | RemoveGeom(); |
@@ -2084,13 +2084,13 @@ Console.WriteLine(" JointCreateFixed"); | |||
2084 | } | 2084 | } |
2085 | 2085 | ||
2086 | CreateGeom(m_targetSpace, mesh); | 2086 | CreateGeom(m_targetSpace, mesh); |
2087 | d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); | 2087 | SafeNativeMethods.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); |
2088 | d.Quaternion myrot = new d.Quaternion(); | 2088 | SafeNativeMethods.Quaternion myrot = new SafeNativeMethods.Quaternion(); |
2089 | myrot.X = _orientation.X; | 2089 | myrot.X = _orientation.X; |
2090 | myrot.Y = _orientation.Y; | 2090 | myrot.Y = _orientation.Y; |
2091 | myrot.Z = _orientation.Z; | 2091 | myrot.Z = _orientation.Z; |
2092 | myrot.W = _orientation.W; | 2092 | myrot.W = _orientation.W; |
2093 | d.GeomSetQuaternion(prim_geom, ref myrot); | 2093 | SafeNativeMethods.GeomSetQuaternion(prim_geom, ref myrot); |
2094 | 2094 | ||
2095 | //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z); | 2095 | //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z); |
2096 | if (IsPhysical && Body == IntPtr.Zero && !childPrim) | 2096 | if (IsPhysical && Body == IntPtr.Zero && !childPrim) |
@@ -2098,7 +2098,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
2098 | // Re creates body on size. | 2098 | // Re creates body on size. |
2099 | // EnableBody also does setMass() | 2099 | // EnableBody also does setMass() |
2100 | enableBody(); | 2100 | enableBody(); |
2101 | d.BodyEnable(Body); | 2101 | SafeNativeMethods.BodyEnable(Body); |
2102 | } | 2102 | } |
2103 | 2103 | ||
2104 | changeSelectedStatus(); | 2104 | changeSelectedStatus(); |
@@ -2133,10 +2133,10 @@ Console.WriteLine(" JointCreateFixed"); | |||
2133 | } | 2133 | } |
2134 | 2134 | ||
2135 | if (m_assetFailed) | 2135 | if (m_assetFailed) |
2136 | d.GeomSetCollideBits(prim_geom, (uint)BadMeshAssetCollideBits); | 2136 | SafeNativeMethods.GeomSetCollideBits(prim_geom, (uint)BadMeshAssetCollideBits); |
2137 | else | 2137 | else |
2138 | 2138 | ||
2139 | d.GeomSetCollideBits(prim_geom, (uint)m_collisionFlags); | 2139 | SafeNativeMethods.GeomSetCollideBits(prim_geom, (uint)m_collisionFlags); |
2140 | } | 2140 | } |
2141 | /// <summary> | 2141 | /// <summary> |
2142 | /// Change prim in response to a shape taint. | 2142 | /// Change prim in response to a shape taint. |
@@ -2190,14 +2190,14 @@ Console.WriteLine(" JointCreateFixed"); | |||
2190 | } | 2190 | } |
2191 | 2191 | ||
2192 | CreateGeom(m_targetSpace, mesh); | 2192 | CreateGeom(m_targetSpace, mesh); |
2193 | d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); | 2193 | SafeNativeMethods.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); |
2194 | d.Quaternion myrot = new d.Quaternion(); | 2194 | SafeNativeMethods.Quaternion myrot = new SafeNativeMethods.Quaternion(); |
2195 | //myrot.W = _orientation.w; | 2195 | //myrot.W = _orientation.w; |
2196 | myrot.W = _orientation.W; | 2196 | myrot.W = _orientation.W; |
2197 | myrot.X = _orientation.X; | 2197 | myrot.X = _orientation.X; |
2198 | myrot.Y = _orientation.Y; | 2198 | myrot.Y = _orientation.Y; |
2199 | myrot.Z = _orientation.Z; | 2199 | myrot.Z = _orientation.Z; |
2200 | d.GeomSetQuaternion(prim_geom, ref myrot); | 2200 | SafeNativeMethods.GeomSetQuaternion(prim_geom, ref myrot); |
2201 | 2201 | ||
2202 | //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z); | 2202 | //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z); |
2203 | if (IsPhysical && Body == IntPtr.Zero) | 2203 | if (IsPhysical && Body == IntPtr.Zero) |
@@ -2207,7 +2207,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
2207 | enableBody(); | 2207 | enableBody(); |
2208 | if (Body != IntPtr.Zero) | 2208 | if (Body != IntPtr.Zero) |
2209 | { | 2209 | { |
2210 | d.BodyEnable(Body); | 2210 | SafeNativeMethods.BodyEnable(Body); |
2211 | } | 2211 | } |
2212 | } | 2212 | } |
2213 | 2213 | ||
@@ -2264,8 +2264,8 @@ Console.WriteLine(" JointCreateFixed"); | |||
2264 | m_taintforce = false; | 2264 | m_taintforce = false; |
2265 | return; | 2265 | return; |
2266 | } | 2266 | } |
2267 | d.BodyEnable(Body); | 2267 | SafeNativeMethods.BodyEnable(Body); |
2268 | d.BodyAddForce(Body, iforce.X, iforce.Y, iforce.Z); | 2268 | SafeNativeMethods.BodyAddForce(Body, iforce.X, iforce.Y, iforce.Z); |
2269 | } | 2269 | } |
2270 | m_forcelist.Clear(); | 2270 | m_forcelist.Clear(); |
2271 | } | 2271 | } |
@@ -2286,7 +2286,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
2286 | { | 2286 | { |
2287 | if (IsPhysical && Body != IntPtr.Zero) | 2287 | if (IsPhysical && Body != IntPtr.Zero) |
2288 | { | 2288 | { |
2289 | d.BodySetTorque(Body, m_taintTorque.X, m_taintTorque.Y, m_taintTorque.Z); | 2289 | SafeNativeMethods.BodySetTorque(Body, m_taintTorque.X, m_taintTorque.Y, m_taintTorque.Z); |
2290 | } | 2290 | } |
2291 | } | 2291 | } |
2292 | 2292 | ||
@@ -2310,8 +2310,8 @@ Console.WriteLine(" JointCreateFixed"); | |||
2310 | { | 2310 | { |
2311 | iforce = iforce + (m_angularforcelist[i] * 100); | 2311 | iforce = iforce + (m_angularforcelist[i] * 100); |
2312 | } | 2312 | } |
2313 | d.BodyEnable(Body); | 2313 | SafeNativeMethods.BodyEnable(Body); |
2314 | d.BodyAddTorque(Body, iforce.X, iforce.Y, iforce.Z); | 2314 | SafeNativeMethods.BodyAddTorque(Body, iforce.X, iforce.Y, iforce.Z); |
2315 | 2315 | ||
2316 | } | 2316 | } |
2317 | m_angularforcelist.Clear(); | 2317 | m_angularforcelist.Clear(); |
@@ -2339,7 +2339,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
2339 | { | 2339 | { |
2340 | if (Body != IntPtr.Zero) | 2340 | if (Body != IntPtr.Zero) |
2341 | { | 2341 | { |
2342 | d.BodySetLinearVel(Body, m_taintVelocity.X, m_taintVelocity.Y, m_taintVelocity.Z); | 2342 | SafeNativeMethods.BodySetLinearVel(Body, m_taintVelocity.X, m_taintVelocity.Y, m_taintVelocity.Z); |
2343 | } | 2343 | } |
2344 | } | 2344 | } |
2345 | 2345 | ||
@@ -2665,7 +2665,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
2665 | } | 2665 | } |
2666 | */ | 2666 | */ |
2667 | 2667 | ||
2668 | d.AllocateODEDataForThread(0U); | 2668 | SafeNativeMethods.AllocateODEDataForThread(0U); |
2669 | 2669 | ||
2670 | _position.X = Util.Clip(_position.X, 0.5f, _parent_scene.WorldExtents.X - 0.5f); | 2670 | _position.X = Util.Clip(_position.X, 0.5f, _parent_scene.WorldExtents.X - 0.5f); |
2671 | _position.Y = Util.Clip(_position.Y, 0.5f, _parent_scene.WorldExtents.Y - 0.5f); | 2671 | _position.Y = Util.Clip(_position.Y, 0.5f, _parent_scene.WorldExtents.Y - 0.5f); |
@@ -2680,8 +2680,8 @@ Console.WriteLine(" JointCreateFixed"); | |||
2680 | 2680 | ||
2681 | if (Body != IntPtr.Zero) | 2681 | if (Body != IntPtr.Zero) |
2682 | { | 2682 | { |
2683 | d.BodySetLinearVel(Body, 0, 0, 0); // stop it | 2683 | SafeNativeMethods.BodySetLinearVel(Body, 0, 0, 0); // stop it |
2684 | d.BodySetPosition(Body, _position.X, _position.Y, _position.Z); | 2684 | SafeNativeMethods.BodySetPosition(Body, _position.X, _position.Y, _position.Z); |
2685 | } | 2685 | } |
2686 | 2686 | ||
2687 | if(m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) | 2687 | if(m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) |
@@ -2728,11 +2728,11 @@ Console.WriteLine(" JointCreateFixed"); | |||
2728 | float m_minvelocity = 0; | 2728 | float m_minvelocity = 0; |
2729 | if (Body != IntPtr.Zero) // FIXME -> or if it is a joint | 2729 | if (Body != IntPtr.Zero) // FIXME -> or if it is a joint |
2730 | { | 2730 | { |
2731 | d.Vector3 vec = d.BodyGetPosition(Body); | 2731 | SafeNativeMethods.Vector3 vec = SafeNativeMethods.BodyGetPosition(Body); |
2732 | d.Quaternion ori = d.BodyGetQuaternion(Body); | 2732 | SafeNativeMethods.Quaternion ori = SafeNativeMethods.BodyGetQuaternion(Body); |
2733 | d.Vector3 vel = d.BodyGetLinearVel(Body); | 2733 | SafeNativeMethods.Vector3 vel = SafeNativeMethods.BodyGetLinearVel(Body); |
2734 | d.Vector3 rotvel = d.BodyGetAngularVel(Body); | 2734 | SafeNativeMethods.Vector3 rotvel = SafeNativeMethods.BodyGetAngularVel(Body); |
2735 | d.Vector3 torque = d.BodyGetTorque(Body); | 2735 | SafeNativeMethods.Vector3 torque = SafeNativeMethods.BodyGetTorque(Body); |
2736 | _torque = new Vector3(torque.X, torque.Y, torque.Z); | 2736 | _torque = new Vector3(torque.X, torque.Y, torque.Z); |
2737 | Vector3 l_position = Vector3.Zero; | 2737 | Vector3 l_position = Vector3.Zero; |
2738 | Quaternion l_orientation = Quaternion.Identity; | 2738 | Quaternion l_orientation = Quaternion.Identity; |
@@ -2812,11 +2812,11 @@ Console.WriteLine(" JointCreateFixed"); | |||
2812 | else | 2812 | else |
2813 | Util.Clamp(l_position.Y, _parent_scene.WorldExtents.Y + 0.1f, _parent_scene.WorldExtents.Y + 2f); | 2813 | Util.Clamp(l_position.Y, _parent_scene.WorldExtents.Y + 0.1f, _parent_scene.WorldExtents.Y + 2f); |
2814 | 2814 | ||
2815 | d.BodySetPosition(Body, l_position.X, l_position.Y, l_position.Z); | 2815 | SafeNativeMethods.BodySetPosition(Body, l_position.X, l_position.Y, l_position.Z); |
2816 | 2816 | ||
2817 | // stop it | 2817 | // stop it |
2818 | d.BodySetAngularVel(Body, 0, 0, 0); | 2818 | SafeNativeMethods.BodySetAngularVel(Body, 0, 0, 0); |
2819 | d.BodySetLinearVel(Body, 0, 0, 0); | 2819 | SafeNativeMethods.BodySetLinearVel(Body, 0, 0, 0); |
2820 | disableBodySoft(); | 2820 | disableBodySoft(); |
2821 | 2821 | ||
2822 | _position = l_position; | 2822 | _position = l_position; |
@@ -3009,7 +3009,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
3009 | 3009 | ||
3010 | if (Amotor != IntPtr.Zero) | 3010 | if (Amotor != IntPtr.Zero) |
3011 | { | 3011 | { |
3012 | d.JointDestroy(Amotor); | 3012 | SafeNativeMethods.JointDestroy(Amotor); |
3013 | Amotor = IntPtr.Zero; | 3013 | Amotor = IntPtr.Zero; |
3014 | } | 3014 | } |
3015 | 3015 | ||
@@ -3039,19 +3039,19 @@ Console.WriteLine(" JointCreateFixed"); | |||
3039 | if(axisnum == 0) | 3039 | if(axisnum == 0) |
3040 | return; | 3040 | return; |
3041 | // stop it | 3041 | // stop it |
3042 | d.BodySetTorque(Body, 0, 0, 0); | 3042 | SafeNativeMethods.BodySetTorque(Body, 0, 0, 0); |
3043 | d.BodySetAngularVel(Body, 0, 0, 0); | 3043 | SafeNativeMethods.BodySetAngularVel(Body, 0, 0, 0); |
3044 | 3044 | ||
3045 | Amotor = d.JointCreateAMotor(_parent_scene.world, IntPtr.Zero); | 3045 | Amotor = SafeNativeMethods.JointCreateAMotor(_parent_scene.world, IntPtr.Zero); |
3046 | d.JointAttach(Amotor, Body, IntPtr.Zero); | 3046 | SafeNativeMethods.JointAttach(Amotor, Body, IntPtr.Zero); |
3047 | 3047 | ||
3048 | d.JointSetAMotorMode(Amotor, 0); | 3048 | SafeNativeMethods.JointSetAMotorMode(Amotor, 0); |
3049 | 3049 | ||
3050 | d.JointSetAMotorNumAxes(Amotor, axisnum); | 3050 | SafeNativeMethods.JointSetAMotorNumAxes(Amotor, axisnum); |
3051 | 3051 | ||
3052 | // get current orientation to lock | 3052 | // get current orientation to lock |
3053 | 3053 | ||
3054 | d.Quaternion dcur = d.BodyGetQuaternion(Body); | 3054 | SafeNativeMethods.Quaternion dcur = SafeNativeMethods.BodyGetQuaternion(Body); |
3055 | Quaternion curr; // crap convertion between identical things | 3055 | Quaternion curr; // crap convertion between identical things |
3056 | curr.X = dcur.X; | 3056 | curr.X = dcur.X; |
3057 | curr.Y = dcur.Y; | 3057 | curr.Y = dcur.Y; |
@@ -3064,17 +3064,17 @@ Console.WriteLine(" JointCreateFixed"); | |||
3064 | if (axisX) | 3064 | if (axisX) |
3065 | { | 3065 | { |
3066 | ax = (new Vector3(1, 0, 0)) * curr; // rotate world X to current local X | 3066 | ax = (new Vector3(1, 0, 0)) * curr; // rotate world X to current local X |
3067 | d.JointSetAMotorAxis(Amotor, 0, 0, ax.X, ax.Y, ax.Z); | 3067 | SafeNativeMethods.JointSetAMotorAxis(Amotor, 0, 0, ax.X, ax.Y, ax.Z); |
3068 | d.JointSetAMotorAngle(Amotor, 0, 0); | 3068 | SafeNativeMethods.JointSetAMotorAngle(Amotor, 0, 0); |
3069 | d.JointSetAMotorParam(Amotor, (int)d.JointParam.LoStop, 0f); | 3069 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)SafeNativeMethods.JointParam.LoStop, 0f); |
3070 | d.JointSetAMotorParam(Amotor, (int)d.JointParam.HiStop, 0f); | 3070 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)SafeNativeMethods.JointParam.HiStop, 0f); |
3071 | d.JointSetAMotorParam(Amotor, (int)d.JointParam.Vel, 0); | 3071 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)SafeNativeMethods.JointParam.Vel, 0); |
3072 | d.JointSetAMotorParam(Amotor, (int)d.JointParam.FudgeFactor, 0.0001f); | 3072 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)SafeNativeMethods.JointParam.FudgeFactor, 0.0001f); |
3073 | d.JointSetAMotorParam(Amotor, (int)d.JointParam.Bounce, 0f); | 3073 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)SafeNativeMethods.JointParam.Bounce, 0f); |
3074 | d.JointSetAMotorParam(Amotor, (int)d.JointParam.CFM, 0f); | 3074 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)SafeNativeMethods.JointParam.CFM, 0f); |
3075 | d.JointSetAMotorParam(Amotor, (int)d.JointParam.FMax, 5e8f); | 3075 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)SafeNativeMethods.JointParam.FMax, 5e8f); |
3076 | d.JointSetAMotorParam(Amotor, (int)d.JointParam.StopCFM, 0f); | 3076 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)SafeNativeMethods.JointParam.StopCFM, 0f); |
3077 | d.JointSetAMotorParam(Amotor, (int)d.JointParam.StopERP, 0.8f); | 3077 | SafeNativeMethods.JointSetAMotorParam(Amotor, (int)SafeNativeMethods.JointParam.StopERP, 0.8f); |
3078 | i++; | 3078 | i++; |
3079 | j = 256; // move to next axis set | 3079 | j = 256; // move to next axis set |
3080 | } | 3080 | } |
@@ -3082,17 +3082,17 @@ Console.WriteLine(" JointCreateFixed"); | |||
3082 | if (axisY) | 3082 | if (axisY) |
3083 | { | 3083 | { |
3084 | ax = (new Vector3(0, 1, 0)) * curr; | 3084 | ax = (new Vector3(0, 1, 0)) * curr; |
3085 | d.JointSetAMotorAxis(Amotor, i, 0, ax.X, ax.Y, ax.Z); | 3085 | SafeNativeMethods.JointSetAMotorAxis(Amotor, i, 0, ax.X, ax.Y, ax.Z); |
3086 | d.JointSetAMotorAngle(Amotor, i, 0); | 3086 | SafeNativeMethods.JointSetAMotorAngle(Amotor, i, 0); |
3087 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.LoStop, 0f); | 3087 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.LoStop, 0f); |
3088 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.HiStop, 0f); | 3088 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.HiStop, 0f); |
3089 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.Vel, 0); | 3089 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.Vel, 0); |
3090 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.FudgeFactor, 0.0001f); | 3090 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.FudgeFactor, 0.0001f); |
3091 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.Bounce, 0f); | 3091 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.Bounce, 0f); |
3092 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.CFM, 0f); | 3092 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.CFM, 0f); |
3093 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.FMax, 5e8f); | 3093 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.FMax, 5e8f); |
3094 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.StopCFM, 0f); | 3094 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.StopCFM, 0f); |
3095 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.StopERP, 0.8f); | 3095 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.StopERP, 0.8f); |
3096 | i++; | 3096 | i++; |
3097 | j += 256; | 3097 | j += 256; |
3098 | } | 3098 | } |
@@ -3100,17 +3100,17 @@ Console.WriteLine(" JointCreateFixed"); | |||
3100 | if (axisZ) | 3100 | if (axisZ) |
3101 | { | 3101 | { |
3102 | ax = (new Vector3(0, 0, 1)) * curr; | 3102 | ax = (new Vector3(0, 0, 1)) * curr; |
3103 | d.JointSetAMotorAxis(Amotor, i, 0, ax.X, ax.Y, ax.Z); | 3103 | SafeNativeMethods.JointSetAMotorAxis(Amotor, i, 0, ax.X, ax.Y, ax.Z); |
3104 | d.JointSetAMotorAngle(Amotor, i, 0); | 3104 | SafeNativeMethods.JointSetAMotorAngle(Amotor, i, 0); |
3105 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.LoStop, 0f); | 3105 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.LoStop, 0f); |
3106 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.HiStop, 0f); | 3106 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.HiStop, 0f); |
3107 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.Vel, 0); | 3107 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.Vel, 0); |
3108 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.FudgeFactor, 0.0001f); | 3108 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.FudgeFactor, 0.0001f); |
3109 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.Bounce, 0f); | 3109 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.Bounce, 0f); |
3110 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.CFM, 0f); | 3110 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.CFM, 0f); |
3111 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.FMax, 5e8f); | 3111 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.FMax, 5e8f); |
3112 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.StopCFM, 0f); | 3112 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.StopCFM, 0f); |
3113 | d.JointSetAMotorParam(Amotor, j + (int)d.JointParam.StopERP, 0.8f); | 3113 | SafeNativeMethods.JointSetAMotorParam(Amotor, j + (int)SafeNativeMethods.JointParam.StopERP, 0.8f); |
3114 | } | 3114 | } |
3115 | } | 3115 | } |
3116 | 3116 | ||
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs index 78dd7de..c731c6c 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs | |||
@@ -61,12 +61,12 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
61 | /// <summary> | 61 | /// <summary> |
62 | /// ODE contact array to be filled by the collision testing | 62 | /// ODE contact array to be filled by the collision testing |
63 | /// </summary> | 63 | /// </summary> |
64 | d.ContactGeom[] contacts = new d.ContactGeom[5]; | 64 | SafeNativeMethods.ContactGeom[] contacts = new SafeNativeMethods.ContactGeom[5]; |
65 | 65 | ||
66 | /// <summary> | 66 | /// <summary> |
67 | /// ODE near callback delegate | 67 | /// ODE near callback delegate |
68 | /// </summary> | 68 | /// </summary> |
69 | private d.NearCallback nearCallback; | 69 | private SafeNativeMethods.NearCallback nearCallback; |
70 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 70 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
71 | private List<ContactResult> m_contactResults = new List<ContactResult>(); | 71 | private List<ContactResult> m_contactResults = new List<ContactResult>(); |
72 | 72 | ||
@@ -179,14 +179,14 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
179 | len = 100f; | 179 | len = 100f; |
180 | 180 | ||
181 | // Create the ray | 181 | // Create the ray |
182 | IntPtr ray = d.CreateRay(m_scene.space, len); | 182 | IntPtr ray = SafeNativeMethods.CreateRay(m_scene.space, len); |
183 | d.GeomRaySet(ray, req.Origin.X, req.Origin.Y, req.Origin.Z, req.Normal.X, req.Normal.Y, req.Normal.Z); | 183 | SafeNativeMethods.GeomRaySet(ray, req.Origin.X, req.Origin.Y, req.Origin.Z, req.Normal.X, req.Normal.Y, req.Normal.Z); |
184 | 184 | ||
185 | // Collide test | 185 | // Collide test |
186 | d.SpaceCollide2(m_scene.space, ray, IntPtr.Zero, nearCallback); | 186 | SafeNativeMethods.SpaceCollide2(m_scene.space, ray, IntPtr.Zero, nearCallback); |
187 | 187 | ||
188 | // Remove Ray | 188 | // Remove Ray |
189 | d.GeomDestroy(ray); | 189 | SafeNativeMethods.GeomDestroy(ray); |
190 | 190 | ||
191 | // Define default results | 191 | // Define default results |
192 | bool hitYN = false; | 192 | bool hitYN = false; |
@@ -230,14 +230,14 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
230 | len = 100f; | 230 | len = 100f; |
231 | 231 | ||
232 | // Create the ray | 232 | // Create the ray |
233 | IntPtr ray = d.CreateRay(m_scene.space, len); | 233 | IntPtr ray = SafeNativeMethods.CreateRay(m_scene.space, len); |
234 | d.GeomRaySet(ray, req.Origin.X, req.Origin.Y, req.Origin.Z, req.Normal.X, req.Normal.Y, req.Normal.Z); | 234 | SafeNativeMethods.GeomRaySet(ray, req.Origin.X, req.Origin.Y, req.Origin.Z, req.Normal.X, req.Normal.Y, req.Normal.Z); |
235 | 235 | ||
236 | // Collide test | 236 | // Collide test |
237 | d.SpaceCollide2(m_scene.space, ray, IntPtr.Zero, nearCallback); | 237 | SafeNativeMethods.SpaceCollide2(m_scene.space, ray, IntPtr.Zero, nearCallback); |
238 | 238 | ||
239 | // Remove Ray | 239 | // Remove Ray |
240 | d.GeomDestroy(ray); | 240 | SafeNativeMethods.GeomDestroy(ray); |
241 | 241 | ||
242 | // Find closest contact and object. | 242 | // Find closest contact and object. |
243 | lock (m_contactResults) | 243 | lock (m_contactResults) |
@@ -258,7 +258,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
258 | // return; | 258 | // return; |
259 | 259 | ||
260 | // Raytest against AABBs of spaces first, then dig into the spaces it hits for actual geoms. | 260 | // Raytest against AABBs of spaces first, then dig into the spaces it hits for actual geoms. |
261 | if (d.GeomIsSpace(g1) || d.GeomIsSpace(g2)) | 261 | if (SafeNativeMethods.GeomIsSpace(g1) || SafeNativeMethods.GeomIsSpace(g2)) |
262 | { | 262 | { |
263 | if (g1 == IntPtr.Zero || g2 == IntPtr.Zero) | 263 | if (g1 == IntPtr.Zero || g2 == IntPtr.Zero) |
264 | return; | 264 | return; |
@@ -269,7 +269,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
269 | // contact points in the space | 269 | // contact points in the space |
270 | try | 270 | try |
271 | { | 271 | { |
272 | d.SpaceCollide2(g1, g2, IntPtr.Zero, nearCallback); | 272 | SafeNativeMethods.SpaceCollide2(g1, g2, IntPtr.Zero, nearCallback); |
273 | } | 273 | } |
274 | catch (AccessViolationException) | 274 | catch (AccessViolationException) |
275 | { | 275 | { |
@@ -296,7 +296,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
296 | 296 | ||
297 | lock (contacts) | 297 | lock (contacts) |
298 | { | 298 | { |
299 | count = d.Collide(g1, g2, contacts.GetLength(0), contacts, d.ContactGeom.unmanagedSizeOf); | 299 | count = SafeNativeMethods.Collide(g1, g2, contacts.GetLength(0), contacts, SafeNativeMethods.ContactGeom.unmanagedSizeOf); |
300 | } | 300 | } |
301 | } | 301 | } |
302 | catch (SEHException) | 302 | catch (SEHException) |
diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs index d15568e..e760fa2 100644 --- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs +++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | |||
@@ -336,9 +336,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
336 | 336 | ||
337 | private bool m_filterCollisions = true; | 337 | private bool m_filterCollisions = true; |
338 | 338 | ||
339 | private d.NearCallback nearCallback; | 339 | private SafeNativeMethods.NearCallback nearCallback; |
340 | public d.TriCallback triCallback; | ||
341 | public d.TriArrayCallback triArrayCallback; | ||
342 | 340 | ||
343 | /// <summary> | 341 | /// <summary> |
344 | /// Avatars in the physics scene. | 342 | /// Avatars in the physics scene. |
@@ -368,7 +366,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
368 | /// <summary> | 366 | /// <summary> |
369 | /// Keep record of contacts in the physics loop so that we can remove duplicates. | 367 | /// Keep record of contacts in the physics loop so that we can remove duplicates. |
370 | /// </summary> | 368 | /// </summary> |
371 | private readonly List<d.ContactGeom> _perloopContact = new List<d.ContactGeom>(); | 369 | private readonly List<SafeNativeMethods.ContactGeom> _perloopContact = new List<SafeNativeMethods.ContactGeom>(); |
372 | 370 | ||
373 | /// <summary> | 371 | /// <summary> |
374 | /// A dictionary of actors that should receive collision events. | 372 | /// A dictionary of actors that should receive collision events. |
@@ -409,7 +407,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
409 | private bool m_NINJA_physics_joints_enabled = false; | 407 | private bool m_NINJA_physics_joints_enabled = false; |
410 | //private Dictionary<String, IntPtr> jointpart_name_map = new Dictionary<String,IntPtr>(); | 408 | //private Dictionary<String, IntPtr> jointpart_name_map = new Dictionary<String,IntPtr>(); |
411 | private readonly Dictionary<String, List<PhysicsJoint>> joints_connecting_actor = new Dictionary<String, List<PhysicsJoint>>(); | 409 | private readonly Dictionary<String, List<PhysicsJoint>> joints_connecting_actor = new Dictionary<String, List<PhysicsJoint>>(); |
412 | private d.ContactGeom[] contacts; | 410 | private SafeNativeMethods.ContactGeom[] contacts; |
413 | 411 | ||
414 | /// <summary> | 412 | /// <summary> |
415 | /// Lock only briefly. accessed by external code (to request new joints) and by OdeScene.Simulate() to move those joints into pending/active | 413 | /// Lock only briefly. accessed by external code (to request new joints) and by OdeScene.Simulate() to move those joints into pending/active |
@@ -437,12 +435,12 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
437 | private readonly DoubleDictionary<Vector3, IntPtr, IntPtr> RegionTerrain = new DoubleDictionary<Vector3, IntPtr, IntPtr>(); | 435 | private readonly DoubleDictionary<Vector3, IntPtr, IntPtr> RegionTerrain = new DoubleDictionary<Vector3, IntPtr, IntPtr>(); |
438 | private readonly Dictionary<IntPtr,float[]> TerrainHeightFieldHeights = new Dictionary<IntPtr, float[]>(); | 436 | private readonly Dictionary<IntPtr,float[]> TerrainHeightFieldHeights = new Dictionary<IntPtr, float[]>(); |
439 | 437 | ||
440 | private d.Contact contact; | 438 | private SafeNativeMethods.Contact contact; |
441 | private d.Contact TerrainContact; | 439 | private SafeNativeMethods.Contact TerrainContact; |
442 | private d.Contact AvatarMovementprimContact; | 440 | private SafeNativeMethods.Contact AvatarMovementprimContact; |
443 | private d.Contact AvatarMovementTerrainContact; | 441 | private SafeNativeMethods.Contact AvatarMovementTerrainContact; |
444 | private d.Contact WaterContact; | 442 | private SafeNativeMethods.Contact WaterContact; |
445 | private d.Contact[,] m_materialContacts; | 443 | private SafeNativeMethods.Contact[,] m_materialContacts; |
446 | 444 | ||
447 | private int m_physicsiterations = 10; | 445 | private int m_physicsiterations = 10; |
448 | private const float m_SkipFramesAtms = 0.40f; // Drop frames gracefully at a 400 ms lag | 446 | private const float m_SkipFramesAtms = 0.40f; // Drop frames gracefully at a 400 ms lag |
@@ -480,8 +478,8 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
480 | private bool avplanted = false; | 478 | private bool avplanted = false; |
481 | private bool av_av_collisions_off = false; | 479 | private bool av_av_collisions_off = false; |
482 | 480 | ||
483 | public d.Vector3 xyz = new d.Vector3(128.1640f, 128.3079f, 25.7600f); | 481 | internal SafeNativeMethods.Vector3 xyz = new SafeNativeMethods.Vector3(128.1640f, 128.3079f, 25.7600f); |
484 | public d.Vector3 hpr = new d.Vector3(125.5000f, -17.0000f, 0.0000f); | 482 | internal SafeNativeMethods.Vector3 hpr = new SafeNativeMethods.Vector3(125.5000f, -17.0000f, 0.0000f); |
485 | 483 | ||
486 | private volatile int m_global_contactcount = 0; | 484 | private volatile int m_global_contactcount = 0; |
487 | 485 | ||
@@ -544,12 +542,11 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
544 | m_rayCastManager = new ODERayCastRequestManager(this); | 542 | m_rayCastManager = new ODERayCastRequestManager(this); |
545 | 543 | ||
546 | // Create the world and the first space | 544 | // Create the world and the first space |
547 | world = d.WorldCreate(); | 545 | world = SafeNativeMethods.WorldCreate(); |
548 | space = d.HashSpaceCreate(IntPtr.Zero); | 546 | space = SafeNativeMethods.HashSpaceCreate(IntPtr.Zero); |
547 | contactgroup = SafeNativeMethods.JointGroupCreate(0); | ||
549 | 548 | ||
550 | contactgroup = d.JointGroupCreate(0); | 549 | SafeNativeMethods.WorldSetAutoDisableFlag(world, false); |
551 | |||
552 | d.WorldSetAutoDisableFlag(world, false); | ||
553 | } | 550 | } |
554 | 551 | ||
555 | // Initialize from configs | 552 | // Initialize from configs |
@@ -651,7 +648,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
651 | } | 648 | } |
652 | } | 649 | } |
653 | 650 | ||
654 | contacts = new d.ContactGeom[contactsPerCollision]; | 651 | contacts = new SafeNativeMethods.ContactGeom[contactsPerCollision]; |
655 | 652 | ||
656 | spacesPerMeterX = 1.0f / metersInSpace; | 653 | spacesPerMeterX = 1.0f / metersInSpace; |
657 | spacesPerMeterY = 1.0f / metersInSpace; | 654 | spacesPerMeterY = 1.0f / metersInSpace; |
@@ -680,7 +677,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
680 | // Centeral contact friction and bounce | 677 | // Centeral contact friction and bounce |
681 | // ckrinke 11/10/08 Enabling soft_erp but not soft_cfm until I figure out why | 678 | // ckrinke 11/10/08 Enabling soft_erp but not soft_cfm until I figure out why |
682 | // an avatar falls through in Z but not in X or Y when walking on a prim. | 679 | // an avatar falls through in Z but not in X or Y when walking on a prim. |
683 | contact.surface.mode |= d.ContactFlags.SoftERP; | 680 | contact.surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
684 | contact.surface.mu = nmAvatarObjectContactFriction; | 681 | contact.surface.mu = nmAvatarObjectContactFriction; |
685 | contact.surface.bounce = nmAvatarObjectContactBounce; | 682 | contact.surface.bounce = nmAvatarObjectContactBounce; |
686 | contact.surface.soft_cfm = 0.010f; | 683 | contact.surface.soft_cfm = 0.010f; |
@@ -689,12 +686,12 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
689 | // Terrain contact friction and Bounce | 686 | // Terrain contact friction and Bounce |
690 | // This is the *non* moving version. Use this when an avatar | 687 | // This is the *non* moving version. Use this when an avatar |
691 | // isn't moving to keep it in place better | 688 | // isn't moving to keep it in place better |
692 | TerrainContact.surface.mode |= d.ContactFlags.SoftERP; | 689 | TerrainContact.surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
693 | TerrainContact.surface.mu = nmTerrainContactFriction; | 690 | TerrainContact.surface.mu = nmTerrainContactFriction; |
694 | TerrainContact.surface.bounce = nmTerrainContactBounce; | 691 | TerrainContact.surface.bounce = nmTerrainContactBounce; |
695 | TerrainContact.surface.soft_erp = nmTerrainContactERP; | 692 | TerrainContact.surface.soft_erp = nmTerrainContactERP; |
696 | 693 | ||
697 | WaterContact.surface.mode |= (d.ContactFlags.SoftERP | d.ContactFlags.SoftCFM); | 694 | WaterContact.surface.mode |= (SafeNativeMethods.ContactFlags.SoftERP | SafeNativeMethods.ContactFlags.SoftCFM); |
698 | WaterContact.surface.mu = 0f; // No friction | 695 | WaterContact.surface.mu = 0f; // No friction |
699 | WaterContact.surface.bounce = 0.0f; // No bounce | 696 | WaterContact.surface.bounce = 0.0f; // No bounce |
700 | WaterContact.surface.soft_cfm = 0.010f; | 697 | WaterContact.surface.soft_cfm = 0.010f; |
@@ -709,7 +706,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
709 | 706 | ||
710 | // Terrain contact friction bounce and various error correcting calculations | 707 | // Terrain contact friction bounce and various error correcting calculations |
711 | // Use this when an avatar is in contact with the terrain and moving. | 708 | // Use this when an avatar is in contact with the terrain and moving. |
712 | AvatarMovementTerrainContact.surface.mode |= d.ContactFlags.SoftERP; | 709 | AvatarMovementTerrainContact.surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
713 | AvatarMovementTerrainContact.surface.mu = mTerrainContactFriction; | 710 | AvatarMovementTerrainContact.surface.mu = mTerrainContactFriction; |
714 | AvatarMovementTerrainContact.surface.bounce = mTerrainContactBounce; | 711 | AvatarMovementTerrainContact.surface.bounce = mTerrainContactBounce; |
715 | AvatarMovementTerrainContact.surface.soft_erp = mTerrainContactERP; | 712 | AvatarMovementTerrainContact.surface.soft_erp = mTerrainContactERP; |
@@ -731,38 +728,38 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
731 | Rubber = 6 | 728 | Rubber = 6 |
732 | */ | 729 | */ |
733 | 730 | ||
734 | m_materialContacts = new d.Contact[7,2]; | 731 | m_materialContacts = new SafeNativeMethods.Contact[7,2]; |
735 | 732 | ||
736 | m_materialContacts[(int)Material.Stone, 0] = new d.Contact(); | 733 | m_materialContacts[(int)Material.Stone, 0] = new SafeNativeMethods.Contact(); |
737 | m_materialContacts[(int)Material.Stone, 0].surface.mode |= d.ContactFlags.SoftERP; | 734 | m_materialContacts[(int)Material.Stone, 0].surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
738 | m_materialContacts[(int)Material.Stone, 0].surface.mu = nmAvatarObjectContactFriction; | 735 | m_materialContacts[(int)Material.Stone, 0].surface.mu = nmAvatarObjectContactFriction; |
739 | m_materialContacts[(int)Material.Stone, 0].surface.bounce = nmAvatarObjectContactBounce; | 736 | m_materialContacts[(int)Material.Stone, 0].surface.bounce = nmAvatarObjectContactBounce; |
740 | m_materialContacts[(int)Material.Stone, 0].surface.soft_cfm = 0.010f; | 737 | m_materialContacts[(int)Material.Stone, 0].surface.soft_cfm = 0.010f; |
741 | m_materialContacts[(int)Material.Stone, 0].surface.soft_erp = 0.010f; | 738 | m_materialContacts[(int)Material.Stone, 0].surface.soft_erp = 0.010f; |
742 | 739 | ||
743 | m_materialContacts[(int)Material.Stone, 1] = new d.Contact(); | 740 | m_materialContacts[(int)Material.Stone, 1] = new SafeNativeMethods.Contact(); |
744 | m_materialContacts[(int)Material.Stone, 1].surface.mode |= d.ContactFlags.SoftERP; | 741 | m_materialContacts[(int)Material.Stone, 1].surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
745 | m_materialContacts[(int)Material.Stone, 1].surface.mu = mAvatarObjectContactFriction; | 742 | m_materialContacts[(int)Material.Stone, 1].surface.mu = mAvatarObjectContactFriction; |
746 | m_materialContacts[(int)Material.Stone, 1].surface.bounce = mAvatarObjectContactBounce; | 743 | m_materialContacts[(int)Material.Stone, 1].surface.bounce = mAvatarObjectContactBounce; |
747 | m_materialContacts[(int)Material.Stone, 1].surface.soft_cfm = 0.010f; | 744 | m_materialContacts[(int)Material.Stone, 1].surface.soft_cfm = 0.010f; |
748 | m_materialContacts[(int)Material.Stone, 1].surface.soft_erp = 0.010f; | 745 | m_materialContacts[(int)Material.Stone, 1].surface.soft_erp = 0.010f; |
749 | 746 | ||
750 | m_materialContacts[(int)Material.Metal, 0] = new d.Contact(); | 747 | m_materialContacts[(int)Material.Metal, 0] = new SafeNativeMethods.Contact(); |
751 | m_materialContacts[(int)Material.Metal, 0].surface.mode |= d.ContactFlags.SoftERP; | 748 | m_materialContacts[(int)Material.Metal, 0].surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
752 | m_materialContacts[(int)Material.Metal, 0].surface.mu = nmAvatarObjectContactFriction; | 749 | m_materialContacts[(int)Material.Metal, 0].surface.mu = nmAvatarObjectContactFriction; |
753 | m_materialContacts[(int)Material.Metal, 0].surface.bounce = nmAvatarObjectContactBounce; | 750 | m_materialContacts[(int)Material.Metal, 0].surface.bounce = nmAvatarObjectContactBounce; |
754 | m_materialContacts[(int)Material.Metal, 0].surface.soft_cfm = 0.010f; | 751 | m_materialContacts[(int)Material.Metal, 0].surface.soft_cfm = 0.010f; |
755 | m_materialContacts[(int)Material.Metal, 0].surface.soft_erp = 0.010f; | 752 | m_materialContacts[(int)Material.Metal, 0].surface.soft_erp = 0.010f; |
756 | 753 | ||
757 | m_materialContacts[(int)Material.Metal, 1] = new d.Contact(); | 754 | m_materialContacts[(int)Material.Metal, 1] = new SafeNativeMethods.Contact(); |
758 | m_materialContacts[(int)Material.Metal, 1].surface.mode |= d.ContactFlags.SoftERP; | 755 | m_materialContacts[(int)Material.Metal, 1].surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
759 | m_materialContacts[(int)Material.Metal, 1].surface.mu = mAvatarObjectContactFriction; | 756 | m_materialContacts[(int)Material.Metal, 1].surface.mu = mAvatarObjectContactFriction; |
760 | m_materialContacts[(int)Material.Metal, 1].surface.bounce = mAvatarObjectContactBounce; | 757 | m_materialContacts[(int)Material.Metal, 1].surface.bounce = mAvatarObjectContactBounce; |
761 | m_materialContacts[(int)Material.Metal, 1].surface.soft_cfm = 0.010f; | 758 | m_materialContacts[(int)Material.Metal, 1].surface.soft_cfm = 0.010f; |
762 | m_materialContacts[(int)Material.Metal, 1].surface.soft_erp = 0.010f; | 759 | m_materialContacts[(int)Material.Metal, 1].surface.soft_erp = 0.010f; |
763 | 760 | ||
764 | m_materialContacts[(int)Material.Glass, 0] = new d.Contact(); | 761 | m_materialContacts[(int)Material.Glass, 0] = new SafeNativeMethods.Contact(); |
765 | m_materialContacts[(int)Material.Glass, 0].surface.mode |= d.ContactFlags.SoftERP; | 762 | m_materialContacts[(int)Material.Glass, 0].surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
766 | m_materialContacts[(int)Material.Glass, 0].surface.mu = 1f; | 763 | m_materialContacts[(int)Material.Glass, 0].surface.mu = 1f; |
767 | m_materialContacts[(int)Material.Glass, 0].surface.bounce = 0.5f; | 764 | m_materialContacts[(int)Material.Glass, 0].surface.bounce = 0.5f; |
768 | m_materialContacts[(int)Material.Glass, 0].surface.soft_cfm = 0.010f; | 765 | m_materialContacts[(int)Material.Glass, 0].surface.soft_cfm = 0.010f; |
@@ -775,83 +772,83 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
775 | private float mAvatarObjectContactFriction = 75f; | 772 | private float mAvatarObjectContactFriction = 75f; |
776 | private float mAvatarObjectContactBounce = 0.1f; | 773 | private float mAvatarObjectContactBounce = 0.1f; |
777 | */ | 774 | */ |
778 | m_materialContacts[(int)Material.Glass, 1] = new d.Contact(); | 775 | m_materialContacts[(int)Material.Glass, 1] = new SafeNativeMethods.Contact(); |
779 | m_materialContacts[(int)Material.Glass, 1].surface.mode |= d.ContactFlags.SoftERP; | 776 | m_materialContacts[(int)Material.Glass, 1].surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
780 | m_materialContacts[(int)Material.Glass, 1].surface.mu = 1f; | 777 | m_materialContacts[(int)Material.Glass, 1].surface.mu = 1f; |
781 | m_materialContacts[(int)Material.Glass, 1].surface.bounce = 0.5f; | 778 | m_materialContacts[(int)Material.Glass, 1].surface.bounce = 0.5f; |
782 | m_materialContacts[(int)Material.Glass, 1].surface.soft_cfm = 0.010f; | 779 | m_materialContacts[(int)Material.Glass, 1].surface.soft_cfm = 0.010f; |
783 | m_materialContacts[(int)Material.Glass, 1].surface.soft_erp = 0.010f; | 780 | m_materialContacts[(int)Material.Glass, 1].surface.soft_erp = 0.010f; |
784 | 781 | ||
785 | m_materialContacts[(int)Material.Wood, 0] = new d.Contact(); | 782 | m_materialContacts[(int)Material.Wood, 0] = new SafeNativeMethods.Contact(); |
786 | m_materialContacts[(int)Material.Wood, 0].surface.mode |= d.ContactFlags.SoftERP; | 783 | m_materialContacts[(int)Material.Wood, 0].surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
787 | m_materialContacts[(int)Material.Wood, 0].surface.mu = nmAvatarObjectContactFriction; | 784 | m_materialContacts[(int)Material.Wood, 0].surface.mu = nmAvatarObjectContactFriction; |
788 | m_materialContacts[(int)Material.Wood, 0].surface.bounce = nmAvatarObjectContactBounce; | 785 | m_materialContacts[(int)Material.Wood, 0].surface.bounce = nmAvatarObjectContactBounce; |
789 | m_materialContacts[(int)Material.Wood, 0].surface.soft_cfm = 0.010f; | 786 | m_materialContacts[(int)Material.Wood, 0].surface.soft_cfm = 0.010f; |
790 | m_materialContacts[(int)Material.Wood, 0].surface.soft_erp = 0.010f; | 787 | m_materialContacts[(int)Material.Wood, 0].surface.soft_erp = 0.010f; |
791 | 788 | ||
792 | m_materialContacts[(int)Material.Wood, 1] = new d.Contact(); | 789 | m_materialContacts[(int)Material.Wood, 1] = new SafeNativeMethods.Contact(); |
793 | m_materialContacts[(int)Material.Wood, 1].surface.mode |= d.ContactFlags.SoftERP; | 790 | m_materialContacts[(int)Material.Wood, 1].surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
794 | m_materialContacts[(int)Material.Wood, 1].surface.mu = mAvatarObjectContactFriction; | 791 | m_materialContacts[(int)Material.Wood, 1].surface.mu = mAvatarObjectContactFriction; |
795 | m_materialContacts[(int)Material.Wood, 1].surface.bounce = mAvatarObjectContactBounce; | 792 | m_materialContacts[(int)Material.Wood, 1].surface.bounce = mAvatarObjectContactBounce; |
796 | m_materialContacts[(int)Material.Wood, 1].surface.soft_cfm = 0.010f; | 793 | m_materialContacts[(int)Material.Wood, 1].surface.soft_cfm = 0.010f; |
797 | m_materialContacts[(int)Material.Wood, 1].surface.soft_erp = 0.010f; | 794 | m_materialContacts[(int)Material.Wood, 1].surface.soft_erp = 0.010f; |
798 | 795 | ||
799 | m_materialContacts[(int)Material.Flesh, 0] = new d.Contact(); | 796 | m_materialContacts[(int)Material.Flesh, 0] = new SafeNativeMethods.Contact(); |
800 | m_materialContacts[(int)Material.Flesh, 0].surface.mode |= d.ContactFlags.SoftERP; | 797 | m_materialContacts[(int)Material.Flesh, 0].surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
801 | m_materialContacts[(int)Material.Flesh, 0].surface.mu = nmAvatarObjectContactFriction; | 798 | m_materialContacts[(int)Material.Flesh, 0].surface.mu = nmAvatarObjectContactFriction; |
802 | m_materialContacts[(int)Material.Flesh, 0].surface.bounce = nmAvatarObjectContactBounce; | 799 | m_materialContacts[(int)Material.Flesh, 0].surface.bounce = nmAvatarObjectContactBounce; |
803 | m_materialContacts[(int)Material.Flesh, 0].surface.soft_cfm = 0.010f; | 800 | m_materialContacts[(int)Material.Flesh, 0].surface.soft_cfm = 0.010f; |
804 | m_materialContacts[(int)Material.Flesh, 0].surface.soft_erp = 0.010f; | 801 | m_materialContacts[(int)Material.Flesh, 0].surface.soft_erp = 0.010f; |
805 | 802 | ||
806 | m_materialContacts[(int)Material.Flesh, 1] = new d.Contact(); | 803 | m_materialContacts[(int)Material.Flesh, 1] = new SafeNativeMethods.Contact(); |
807 | m_materialContacts[(int)Material.Flesh, 1].surface.mode |= d.ContactFlags.SoftERP; | 804 | m_materialContacts[(int)Material.Flesh, 1].surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
808 | m_materialContacts[(int)Material.Flesh, 1].surface.mu = mAvatarObjectContactFriction; | 805 | m_materialContacts[(int)Material.Flesh, 1].surface.mu = mAvatarObjectContactFriction; |
809 | m_materialContacts[(int)Material.Flesh, 1].surface.bounce = mAvatarObjectContactBounce; | 806 | m_materialContacts[(int)Material.Flesh, 1].surface.bounce = mAvatarObjectContactBounce; |
810 | m_materialContacts[(int)Material.Flesh, 1].surface.soft_cfm = 0.010f; | 807 | m_materialContacts[(int)Material.Flesh, 1].surface.soft_cfm = 0.010f; |
811 | m_materialContacts[(int)Material.Flesh, 1].surface.soft_erp = 0.010f; | 808 | m_materialContacts[(int)Material.Flesh, 1].surface.soft_erp = 0.010f; |
812 | 809 | ||
813 | m_materialContacts[(int)Material.Plastic, 0] = new d.Contact(); | 810 | m_materialContacts[(int)Material.Plastic, 0] = new SafeNativeMethods.Contact(); |
814 | m_materialContacts[(int)Material.Plastic, 0].surface.mode |= d.ContactFlags.SoftERP; | 811 | m_materialContacts[(int)Material.Plastic, 0].surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
815 | m_materialContacts[(int)Material.Plastic, 0].surface.mu = nmAvatarObjectContactFriction; | 812 | m_materialContacts[(int)Material.Plastic, 0].surface.mu = nmAvatarObjectContactFriction; |
816 | m_materialContacts[(int)Material.Plastic, 0].surface.bounce = nmAvatarObjectContactBounce; | 813 | m_materialContacts[(int)Material.Plastic, 0].surface.bounce = nmAvatarObjectContactBounce; |
817 | m_materialContacts[(int)Material.Plastic, 0].surface.soft_cfm = 0.010f; | 814 | m_materialContacts[(int)Material.Plastic, 0].surface.soft_cfm = 0.010f; |
818 | m_materialContacts[(int)Material.Plastic, 0].surface.soft_erp = 0.010f; | 815 | m_materialContacts[(int)Material.Plastic, 0].surface.soft_erp = 0.010f; |
819 | 816 | ||
820 | m_materialContacts[(int)Material.Plastic, 1] = new d.Contact(); | 817 | m_materialContacts[(int)Material.Plastic, 1] = new SafeNativeMethods.Contact(); |
821 | m_materialContacts[(int)Material.Plastic, 1].surface.mode |= d.ContactFlags.SoftERP; | 818 | m_materialContacts[(int)Material.Plastic, 1].surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
822 | m_materialContacts[(int)Material.Plastic, 1].surface.mu = mAvatarObjectContactFriction; | 819 | m_materialContacts[(int)Material.Plastic, 1].surface.mu = mAvatarObjectContactFriction; |
823 | m_materialContacts[(int)Material.Plastic, 1].surface.bounce = mAvatarObjectContactBounce; | 820 | m_materialContacts[(int)Material.Plastic, 1].surface.bounce = mAvatarObjectContactBounce; |
824 | m_materialContacts[(int)Material.Plastic, 1].surface.soft_cfm = 0.010f; | 821 | m_materialContacts[(int)Material.Plastic, 1].surface.soft_cfm = 0.010f; |
825 | m_materialContacts[(int)Material.Plastic, 1].surface.soft_erp = 0.010f; | 822 | m_materialContacts[(int)Material.Plastic, 1].surface.soft_erp = 0.010f; |
826 | 823 | ||
827 | m_materialContacts[(int)Material.Rubber, 0] = new d.Contact(); | 824 | m_materialContacts[(int)Material.Rubber, 0] = new SafeNativeMethods.Contact(); |
828 | m_materialContacts[(int)Material.Rubber, 0].surface.mode |= d.ContactFlags.SoftERP; | 825 | m_materialContacts[(int)Material.Rubber, 0].surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
829 | m_materialContacts[(int)Material.Rubber, 0].surface.mu = nmAvatarObjectContactFriction; | 826 | m_materialContacts[(int)Material.Rubber, 0].surface.mu = nmAvatarObjectContactFriction; |
830 | m_materialContacts[(int)Material.Rubber, 0].surface.bounce = nmAvatarObjectContactBounce; | 827 | m_materialContacts[(int)Material.Rubber, 0].surface.bounce = nmAvatarObjectContactBounce; |
831 | m_materialContacts[(int)Material.Rubber, 0].surface.soft_cfm = 0.010f; | 828 | m_materialContacts[(int)Material.Rubber, 0].surface.soft_cfm = 0.010f; |
832 | m_materialContacts[(int)Material.Rubber, 0].surface.soft_erp = 0.010f; | 829 | m_materialContacts[(int)Material.Rubber, 0].surface.soft_erp = 0.010f; |
833 | 830 | ||
834 | m_materialContacts[(int)Material.Rubber, 1] = new d.Contact(); | 831 | m_materialContacts[(int)Material.Rubber, 1] = new SafeNativeMethods.Contact(); |
835 | m_materialContacts[(int)Material.Rubber, 1].surface.mode |= d.ContactFlags.SoftERP; | 832 | m_materialContacts[(int)Material.Rubber, 1].surface.mode |= SafeNativeMethods.ContactFlags.SoftERP; |
836 | m_materialContacts[(int)Material.Rubber, 1].surface.mu = mAvatarObjectContactFriction; | 833 | m_materialContacts[(int)Material.Rubber, 1].surface.mu = mAvatarObjectContactFriction; |
837 | m_materialContacts[(int)Material.Rubber, 1].surface.bounce = mAvatarObjectContactBounce; | 834 | m_materialContacts[(int)Material.Rubber, 1].surface.bounce = mAvatarObjectContactBounce; |
838 | m_materialContacts[(int)Material.Rubber, 1].surface.soft_cfm = 0.010f; | 835 | m_materialContacts[(int)Material.Rubber, 1].surface.soft_cfm = 0.010f; |
839 | m_materialContacts[(int)Material.Rubber, 1].surface.soft_erp = 0.010f; | 836 | m_materialContacts[(int)Material.Rubber, 1].surface.soft_erp = 0.010f; |
840 | 837 | ||
841 | d.HashSpaceSetLevels(space, HashspaceLow, HashspaceHigh); | 838 | SafeNativeMethods.HashSpaceSetLevels(space, HashspaceLow, HashspaceHigh); |
842 | 839 | ||
843 | // Set the gravity,, don't disable things automatically (we set it explicitly on some things) | 840 | // Set the gravity,, don't disable things automatically (we set it explicitly on some things) |
844 | 841 | ||
845 | d.WorldSetGravity(world, gravityx, gravityy, gravityz); | 842 | SafeNativeMethods.WorldSetGravity(world, gravityx, gravityy, gravityz); |
846 | d.WorldSetContactSurfaceLayer(world, contactsurfacelayer); | 843 | SafeNativeMethods.WorldSetContactSurfaceLayer(world, contactsurfacelayer); |
847 | 844 | ||
848 | d.WorldSetLinearDamping(world, 256f); | 845 | SafeNativeMethods.WorldSetLinearDamping(world, 256f); |
849 | d.WorldSetAngularDamping(world, 256f); | 846 | SafeNativeMethods.WorldSetAngularDamping(world, 256f); |
850 | d.WorldSetAngularDampingThreshold(world, 256f); | 847 | SafeNativeMethods.WorldSetAngularDampingThreshold(world, 256f); |
851 | d.WorldSetLinearDampingThreshold(world, 256f); | 848 | SafeNativeMethods.WorldSetLinearDampingThreshold(world, 256f); |
852 | d.WorldSetMaxAngularSpeed(world, 256f); | 849 | SafeNativeMethods.WorldSetMaxAngularSpeed(world, 256f); |
853 | 850 | ||
854 | d.WorldSetQuickStepNumIterations(world, m_physicsiterations); | 851 | SafeNativeMethods.WorldSetQuickStepNumIterations(world, m_physicsiterations); |
855 | //d.WorldSetContactMaxCorrectingVel(world, 1000.0f); | 852 | //d.WorldSetContactMaxCorrectingVel(world, 1000.0f); |
856 | 853 | ||
857 | for (int i = 0; i < staticPrimspace.GetLength(0); i++) | 854 | for (int i = 0; i < staticPrimspace.GetLength(0); i++) |
@@ -877,7 +874,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
877 | /// <param name='contactsArray'></param> | 874 | /// <param name='contactsArray'></param> |
878 | /// <param name='contactGeomSize'></param> | 875 | /// <param name='contactGeomSize'></param> |
879 | private int CollideGeoms( | 876 | private int CollideGeoms( |
880 | IntPtr geom1, IntPtr geom2, int maxContacts, d.ContactGeom[] contactsArray, int contactGeomSize) | 877 | IntPtr geom1, IntPtr geom2, int maxContacts, SafeNativeMethods.ContactGeom[] contactsArray, int contactGeomSize) |
881 | { | 878 | { |
882 | int count; | 879 | int count; |
883 | 880 | ||
@@ -887,7 +884,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
887 | if (CollectStats) | 884 | if (CollectStats) |
888 | m_nativeCollisionStartTick = Util.EnvironmentTickCount(); | 885 | m_nativeCollisionStartTick = Util.EnvironmentTickCount(); |
889 | 886 | ||
890 | count = d.Collide(geom1, geom2, maxContacts, contactsArray, contactGeomSize); | 887 | count = SafeNativeMethods.Collide(geom1, geom2, maxContacts, contactsArray, contactGeomSize); |
891 | } | 888 | } |
892 | 889 | ||
893 | // We do this outside the lock so that any waiting threads aren't held up, though the effect is probably | 890 | // We do this outside the lock so that any waiting threads aren't held up, though the effect is probably |
@@ -913,7 +910,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
913 | m_nativeCollisionStartTick = Util.EnvironmentTickCount(); | 910 | m_nativeCollisionStartTick = Util.EnvironmentTickCount(); |
914 | } | 911 | } |
915 | 912 | ||
916 | d.SpaceCollide2(space1, space2, data, nearCallback); | 913 | SafeNativeMethods.SpaceCollide2(space1, space2, data, nearCallback); |
917 | 914 | ||
918 | if (CollectStats && m_inCollisionTiming) | 915 | if (CollectStats && m_inCollisionTiming) |
919 | { | 916 | { |
@@ -944,7 +941,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
944 | // Test if we're colliding a geom with a space. | 941 | // Test if we're colliding a geom with a space. |
945 | // If so we have to drill down into the space recursively | 942 | // If so we have to drill down into the space recursively |
946 | 943 | ||
947 | if (d.GeomIsSpace(g1) || d.GeomIsSpace(g2)) | 944 | if (SafeNativeMethods.GeomIsSpace(g1) || SafeNativeMethods.GeomIsSpace(g2)) |
948 | { | 945 | { |
949 | if (g1 == IntPtr.Zero || g2 == IntPtr.Zero) | 946 | if (g1 == IntPtr.Zero || g2 == IntPtr.Zero) |
950 | return; | 947 | return; |
@@ -973,8 +970,8 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
973 | if (g1 == IntPtr.Zero || g2 == IntPtr.Zero) | 970 | if (g1 == IntPtr.Zero || g2 == IntPtr.Zero) |
974 | return; | 971 | return; |
975 | 972 | ||
976 | IntPtr b1 = d.GeomGetBody(g1); | 973 | IntPtr b1 = SafeNativeMethods.GeomGetBody(g1); |
977 | IntPtr b2 = d.GeomGetBody(g2); | 974 | IntPtr b2 = SafeNativeMethods.GeomGetBody(g2); |
978 | 975 | ||
979 | // d.GeomClassID id = d.GeomGetClass(g1); | 976 | // d.GeomClassID id = d.GeomGetClass(g1); |
980 | 977 | ||
@@ -1001,10 +998,10 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1001 | if (g1 == g2) | 998 | if (g1 == g2) |
1002 | return; // Can't collide with yourself | 999 | return; // Can't collide with yourself |
1003 | 1000 | ||
1004 | if (b1 != IntPtr.Zero && b2 != IntPtr.Zero && d.AreConnectedExcluding(b1, b2, d.JointType.Contact)) | 1001 | if (b1 != IntPtr.Zero && b2 != IntPtr.Zero && SafeNativeMethods.AreConnectedExcluding(b1, b2, SafeNativeMethods.JointType.Contact)) |
1005 | return; | 1002 | return; |
1006 | 1003 | ||
1007 | count = CollideGeoms(g1, g2, contacts.Length, contacts, d.ContactGeom.unmanagedSizeOf); | 1004 | count = CollideGeoms(g1, g2, contacts.Length, contacts, SafeNativeMethods.ContactGeom.unmanagedSizeOf); |
1008 | 1005 | ||
1009 | // All code after this is only relevant if we have any collisions | 1006 | // All code after this is only relevant if we have any collisions |
1010 | if (count <= 0) | 1007 | if (count <= 0) |
@@ -1052,7 +1049,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1052 | 1049 | ||
1053 | for (int i = 0; i < count; i++) | 1050 | for (int i = 0; i < count; i++) |
1054 | { | 1051 | { |
1055 | d.ContactGeom curContact = contacts[i]; | 1052 | SafeNativeMethods.ContactGeom curContact = contacts[i]; |
1056 | 1053 | ||
1057 | if (curContact.depth > maxDepthContact.PenetrationDepth) | 1054 | if (curContact.depth > maxDepthContact.PenetrationDepth) |
1058 | { | 1055 | { |
@@ -1129,7 +1126,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1129 | curContact.depth = 0.00000003f; | 1126 | curContact.depth = 0.00000003f; |
1130 | p2.Velocity = p2.Velocity + new Vector3(0f, 0f, 0.5f); | 1127 | p2.Velocity = p2.Velocity + new Vector3(0f, 0f, 0.5f); |
1131 | curContact.pos = | 1128 | curContact.pos = |
1132 | new d.Vector3(curContact.pos.X + (p1.Size.X/2), | 1129 | new SafeNativeMethods.Vector3(curContact.pos.X + (p1.Size.X/2), |
1133 | curContact.pos.Y + (p1.Size.Y/2), | 1130 | curContact.pos.Y + (p1.Size.Y/2), |
1134 | curContact.pos.Z + (p1.Size.Z/2)); | 1131 | curContact.pos.Z + (p1.Size.Z/2)); |
1135 | character.SetPidStatus(true); | 1132 | character.SetPidStatus(true); |
@@ -1146,7 +1143,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1146 | curContact.depth = 0.00000003f; | 1143 | curContact.depth = 0.00000003f; |
1147 | p1.Velocity = p1.Velocity + new Vector3(0f, 0f, 0.5f); | 1144 | p1.Velocity = p1.Velocity + new Vector3(0f, 0f, 0.5f); |
1148 | curContact.pos = | 1145 | curContact.pos = |
1149 | new d.Vector3(curContact.pos.X + (p1.Size.X/2), | 1146 | new SafeNativeMethods.Vector3(curContact.pos.X + (p1.Size.X/2), |
1150 | curContact.pos.Y + (p1.Size.Y/2), | 1147 | curContact.pos.Y + (p1.Size.Y/2), |
1151 | curContact.pos.Z + (p1.Size.Z/2)); | 1148 | curContact.pos.Z + (p1.Size.Z/2)); |
1152 | character.SetPidStatus(true); | 1149 | character.SetPidStatus(true); |
@@ -1198,7 +1195,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1198 | 1195 | ||
1199 | if (m_global_contactcount < maxContactsbeforedeath) | 1196 | if (m_global_contactcount < maxContactsbeforedeath) |
1200 | { | 1197 | { |
1201 | joint = d.JointCreateContact(world, contactgroup, ref AvatarMovementTerrainContact); | 1198 | joint = SafeNativeMethods.JointCreateContact(world, contactgroup, ref AvatarMovementTerrainContact); |
1202 | m_global_contactcount++; | 1199 | m_global_contactcount++; |
1203 | } | 1200 | } |
1204 | } | 1201 | } |
@@ -1212,7 +1209,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1212 | 1209 | ||
1213 | if (m_global_contactcount < maxContactsbeforedeath) | 1210 | if (m_global_contactcount < maxContactsbeforedeath) |
1214 | { | 1211 | { |
1215 | joint = d.JointCreateContact(world, contactgroup, ref TerrainContact); | 1212 | joint = SafeNativeMethods.JointCreateContact(world, contactgroup, ref TerrainContact); |
1216 | m_global_contactcount++; | 1213 | m_global_contactcount++; |
1217 | } | 1214 | } |
1218 | } | 1215 | } |
@@ -1247,7 +1244,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1247 | 1244 | ||
1248 | if (m_global_contactcount < maxContactsbeforedeath) | 1245 | if (m_global_contactcount < maxContactsbeforedeath) |
1249 | { | 1246 | { |
1250 | joint = d.JointCreateContact(world, contactgroup, ref m_materialContacts[material, movintYN]); | 1247 | joint = SafeNativeMethods.JointCreateContact(world, contactgroup, ref m_materialContacts[material, movintYN]); |
1251 | m_global_contactcount++; | 1248 | m_global_contactcount++; |
1252 | } | 1249 | } |
1253 | } | 1250 | } |
@@ -1273,7 +1270,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1273 | 1270 | ||
1274 | if (m_global_contactcount < maxContactsbeforedeath) | 1271 | if (m_global_contactcount < maxContactsbeforedeath) |
1275 | { | 1272 | { |
1276 | joint = d.JointCreateContact(world, contactgroup, ref m_materialContacts[material, movintYN]); | 1273 | joint = SafeNativeMethods.JointCreateContact(world, contactgroup, ref m_materialContacts[material, movintYN]); |
1277 | m_global_contactcount++; | 1274 | m_global_contactcount++; |
1278 | } | 1275 | } |
1279 | } | 1276 | } |
@@ -1307,7 +1304,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1307 | 1304 | ||
1308 | if (m_global_contactcount < maxContactsbeforedeath) | 1305 | if (m_global_contactcount < maxContactsbeforedeath) |
1309 | { | 1306 | { |
1310 | joint = d.JointCreateContact(world, contactgroup, ref WaterContact); | 1307 | joint = SafeNativeMethods.JointCreateContact(world, contactgroup, ref WaterContact); |
1311 | m_global_contactcount++; | 1308 | m_global_contactcount++; |
1312 | } | 1309 | } |
1313 | //m_log.Info("[PHYSICS]: Prim Water Contact" + contact.depth); | 1310 | //m_log.Info("[PHYSICS]: Prim Water Contact" + contact.depth); |
@@ -1324,7 +1321,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1324 | 1321 | ||
1325 | if (m_global_contactcount < maxContactsbeforedeath) | 1322 | if (m_global_contactcount < maxContactsbeforedeath) |
1326 | { | 1323 | { |
1327 | joint = d.JointCreateContact(world, contactgroup, ref AvatarMovementprimContact); | 1324 | joint = SafeNativeMethods.JointCreateContact(world, contactgroup, ref AvatarMovementprimContact); |
1328 | m_global_contactcount++; | 1325 | m_global_contactcount++; |
1329 | } | 1326 | } |
1330 | } | 1327 | } |
@@ -1335,7 +1332,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1335 | 1332 | ||
1336 | if (m_global_contactcount < maxContactsbeforedeath) | 1333 | if (m_global_contactcount < maxContactsbeforedeath) |
1337 | { | 1334 | { |
1338 | joint = d.JointCreateContact(world, contactgroup, ref contact); | 1335 | joint = SafeNativeMethods.JointCreateContact(world, contactgroup, ref contact); |
1339 | m_global_contactcount++; | 1336 | m_global_contactcount++; |
1340 | } | 1337 | } |
1341 | } | 1338 | } |
@@ -1356,7 +1353,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1356 | 1353 | ||
1357 | if (m_global_contactcount < maxContactsbeforedeath) | 1354 | if (m_global_contactcount < maxContactsbeforedeath) |
1358 | { | 1355 | { |
1359 | joint = d.JointCreateContact(world, contactgroup, ref m_materialContacts[material, 0]); | 1356 | joint = SafeNativeMethods.JointCreateContact(world, contactgroup, ref m_materialContacts[material, 0]); |
1360 | m_global_contactcount++; | 1357 | m_global_contactcount++; |
1361 | } | 1358 | } |
1362 | } | 1359 | } |
@@ -1364,7 +1361,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1364 | 1361 | ||
1365 | if (m_global_contactcount < maxContactsbeforedeath && joint != IntPtr.Zero) // stack collide! | 1362 | if (m_global_contactcount < maxContactsbeforedeath && joint != IntPtr.Zero) // stack collide! |
1366 | { | 1363 | { |
1367 | d.JointAttach(joint, b1, b2); | 1364 | SafeNativeMethods.JointAttach(joint, b1, b2); |
1368 | m_global_contactcount++; | 1365 | m_global_contactcount++; |
1369 | } | 1366 | } |
1370 | } | 1367 | } |
@@ -1384,7 +1381,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1384 | } | 1381 | } |
1385 | } | 1382 | } |
1386 | 1383 | ||
1387 | private bool checkDupe(d.ContactGeom contactGeom, int atype) | 1384 | private bool checkDupe(SafeNativeMethods.ContactGeom contactGeom, int atype) |
1388 | { | 1385 | { |
1389 | if (!m_filterCollisions) | 1386 | if (!m_filterCollisions) |
1390 | return false; | 1387 | return false; |
@@ -1393,7 +1390,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1393 | 1390 | ||
1394 | ActorTypes at = (ActorTypes)atype; | 1391 | ActorTypes at = (ActorTypes)atype; |
1395 | 1392 | ||
1396 | foreach (d.ContactGeom contact in _perloopContact) | 1393 | foreach (SafeNativeMethods.ContactGeom contact in _perloopContact) |
1397 | { | 1394 | { |
1398 | //if ((contact.g1 == contactGeom.g1 && contact.g2 == contactGeom.g2)) | 1395 | //if ((contact.g1 == contactGeom.g1 && contact.g2 == contactGeom.g2)) |
1399 | //{ | 1396 | //{ |
@@ -1580,7 +1577,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1580 | List<OdePrim> removeprims = null; | 1577 | List<OdePrim> removeprims = null; |
1581 | foreach (OdePrim chr in _activeprims) | 1578 | foreach (OdePrim chr in _activeprims) |
1582 | { | 1579 | { |
1583 | if (chr.Body != IntPtr.Zero && d.BodyIsEnabled(chr.Body) && (!chr.m_disabled)) | 1580 | if (chr.Body != IntPtr.Zero && SafeNativeMethods.BodyIsEnabled(chr.Body) && (!chr.m_disabled)) |
1584 | { | 1581 | { |
1585 | try | 1582 | try |
1586 | { | 1583 | { |
@@ -1706,7 +1703,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1706 | 1703 | ||
1707 | public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 velocity, Vector3 size, bool isFlying) | 1704 | public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 velocity, Vector3 size, bool isFlying) |
1708 | { | 1705 | { |
1709 | d.AllocateODEDataForThread(0); | 1706 | SafeNativeMethods.AllocateODEDataForThread(0); |
1710 | 1707 | ||
1711 | OdeCharacter newAv | 1708 | OdeCharacter newAv |
1712 | = new OdeCharacter( | 1709 | = new OdeCharacter( |
@@ -1729,7 +1726,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1729 | 1726 | ||
1730 | lock (OdeLock) | 1727 | lock (OdeLock) |
1731 | { | 1728 | { |
1732 | d.AllocateODEDataForThread(0); | 1729 | SafeNativeMethods.AllocateODEDataForThread(0); |
1733 | 1730 | ||
1734 | ((OdeCharacter) actor).Destroy(); | 1731 | ((OdeCharacter) actor).Destroy(); |
1735 | } | 1732 | } |
@@ -1786,7 +1783,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1786 | OdePrim newPrim; | 1783 | OdePrim newPrim; |
1787 | lock (OdeLock) | 1784 | lock (OdeLock) |
1788 | { | 1785 | { |
1789 | d.AllocateODEDataForThread(0); | 1786 | SafeNativeMethods.AllocateODEDataForThread(0); |
1790 | newPrim = new OdePrim(name, this, pos, siz, rot, pbs, isphysical); | 1787 | newPrim = new OdePrim(name, this, pos, siz, rot, pbs, isphysical); |
1791 | 1788 | ||
1792 | lock (_prims) | 1789 | lock (_prims) |
@@ -1950,7 +1947,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
1950 | DoJointDeactivated(joint); | 1947 | DoJointDeactivated(joint); |
1951 | if (joint.jointID != IntPtr.Zero) | 1948 | if (joint.jointID != IntPtr.Zero) |
1952 | { | 1949 | { |
1953 | d.JointDestroy(joint.jointID); | 1950 | SafeNativeMethods.JointDestroy(joint.jointID); |
1954 | joint.jointID = IntPtr.Zero; | 1951 | joint.jointID = IntPtr.Zero; |
1955 | //DoJointErrorMessage(joint, "successfully destroyed joint " + jointName); | 1952 | //DoJointErrorMessage(joint, "successfully destroyed joint " + jointName); |
1956 | } | 1953 | } |
@@ -2115,7 +2112,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2115 | public override Vector3 GetJointAnchor(PhysicsJoint joint) | 2112 | public override Vector3 GetJointAnchor(PhysicsJoint joint) |
2116 | { | 2113 | { |
2117 | Debug.Assert(joint.IsInPhysicsEngine); | 2114 | Debug.Assert(joint.IsInPhysicsEngine); |
2118 | d.Vector3 pos = new d.Vector3(); | 2115 | SafeNativeMethods.Vector3 pos = new SafeNativeMethods.Vector3(); |
2119 | 2116 | ||
2120 | if (!(joint is OdePhysicsJoint)) | 2117 | if (!(joint is OdePhysicsJoint)) |
2121 | { | 2118 | { |
@@ -2127,10 +2124,10 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2127 | switch (odeJoint.Type) | 2124 | switch (odeJoint.Type) |
2128 | { | 2125 | { |
2129 | case PhysicsJointType.Ball: | 2126 | case PhysicsJointType.Ball: |
2130 | d.JointGetBallAnchor(odeJoint.jointID, out pos); | 2127 | SafeNativeMethods.JointGetBallAnchor(odeJoint.jointID, out pos); |
2131 | break; | 2128 | break; |
2132 | case PhysicsJointType.Hinge: | 2129 | case PhysicsJointType.Hinge: |
2133 | d.JointGetHingeAnchor(odeJoint.jointID, out pos); | 2130 | SafeNativeMethods.JointGetHingeAnchor(odeJoint.jointID, out pos); |
2134 | break; | 2131 | break; |
2135 | } | 2132 | } |
2136 | } | 2133 | } |
@@ -2151,7 +2148,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2151 | public override Vector3 GetJointAxis(PhysicsJoint joint) | 2148 | public override Vector3 GetJointAxis(PhysicsJoint joint) |
2152 | { | 2149 | { |
2153 | Debug.Assert(joint.IsInPhysicsEngine); | 2150 | Debug.Assert(joint.IsInPhysicsEngine); |
2154 | d.Vector3 axis = new d.Vector3(); | 2151 | SafeNativeMethods.Vector3 axis = new SafeNativeMethods.Vector3(); |
2155 | 2152 | ||
2156 | if (!(joint is OdePhysicsJoint)) | 2153 | if (!(joint is OdePhysicsJoint)) |
2157 | { | 2154 | { |
@@ -2166,7 +2163,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2166 | DoJointErrorMessage(joint, "warning - axis requested for ball joint: " + joint.ObjectNameInScene); | 2163 | DoJointErrorMessage(joint, "warning - axis requested for ball joint: " + joint.ObjectNameInScene); |
2167 | break; | 2164 | break; |
2168 | case PhysicsJointType.Hinge: | 2165 | case PhysicsJointType.Hinge: |
2169 | d.JointGetHingeAxis(odeJoint.jointID, out axis); | 2166 | SafeNativeMethods.JointGetHingeAxis(odeJoint.jointID, out axis); |
2170 | break; | 2167 | break; |
2171 | } | 2168 | } |
2172 | } | 2169 | } |
@@ -2299,12 +2296,12 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2299 | //{ | 2296 | //{ |
2300 | //int adfadf = 0; | 2297 | //int adfadf = 0; |
2301 | //} | 2298 | //} |
2302 | if (d.SpaceQuery(currentspace, geom) && currentspace != IntPtr.Zero) | 2299 | if (SafeNativeMethods.SpaceQuery(currentspace, geom) && currentspace != IntPtr.Zero) |
2303 | { | 2300 | { |
2304 | if (d.GeomIsSpace(currentspace)) | 2301 | if (SafeNativeMethods.GeomIsSpace(currentspace)) |
2305 | { | 2302 | { |
2306 | // waitForSpaceUnlock(currentspace); | 2303 | // waitForSpaceUnlock(currentspace); |
2307 | d.SpaceRemove(currentspace, geom); | 2304 | SafeNativeMethods.SpaceRemove(currentspace, geom); |
2308 | } | 2305 | } |
2309 | else | 2306 | else |
2310 | { | 2307 | { |
@@ -2314,13 +2311,13 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2314 | } | 2311 | } |
2315 | else | 2312 | else |
2316 | { | 2313 | { |
2317 | IntPtr sGeomIsIn = d.GeomGetSpace(geom); | 2314 | IntPtr sGeomIsIn = SafeNativeMethods.GeomGetSpace(geom); |
2318 | if (sGeomIsIn != IntPtr.Zero) | 2315 | if (sGeomIsIn != IntPtr.Zero) |
2319 | { | 2316 | { |
2320 | if (d.GeomIsSpace(currentspace)) | 2317 | if (SafeNativeMethods.GeomIsSpace(currentspace)) |
2321 | { | 2318 | { |
2322 | // waitForSpaceUnlock(sGeomIsIn); | 2319 | // waitForSpaceUnlock(sGeomIsIn); |
2323 | d.SpaceRemove(sGeomIsIn, geom); | 2320 | SafeNativeMethods.SpaceRemove(sGeomIsIn, geom); |
2324 | } | 2321 | } |
2325 | else | 2322 | else |
2326 | { | 2323 | { |
@@ -2331,13 +2328,13 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2331 | } | 2328 | } |
2332 | 2329 | ||
2333 | //If there are no more geometries in the sub-space, we don't need it in the main space anymore | 2330 | //If there are no more geometries in the sub-space, we don't need it in the main space anymore |
2334 | if (d.SpaceGetNumGeoms(currentspace) == 0) | 2331 | if (SafeNativeMethods.SpaceGetNumGeoms(currentspace) == 0) |
2335 | { | 2332 | { |
2336 | if (currentspace != IntPtr.Zero) | 2333 | if (currentspace != IntPtr.Zero) |
2337 | { | 2334 | { |
2338 | if (d.GeomIsSpace(currentspace)) | 2335 | if (SafeNativeMethods.GeomIsSpace(currentspace)) |
2339 | { | 2336 | { |
2340 | d.SpaceRemove(space, currentspace); | 2337 | SafeNativeMethods.SpaceRemove(space, currentspace); |
2341 | // free up memory used by the space. | 2338 | // free up memory used by the space. |
2342 | 2339 | ||
2343 | resetSpaceArrayItemToZero(currentspace); | 2340 | resetSpaceArrayItemToZero(currentspace); |
@@ -2355,12 +2352,12 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2355 | // this is a physical object that got disabled. ;.; | 2352 | // this is a physical object that got disabled. ;.; |
2356 | if (currentspace != IntPtr.Zero && geom != IntPtr.Zero) | 2353 | if (currentspace != IntPtr.Zero && geom != IntPtr.Zero) |
2357 | { | 2354 | { |
2358 | if (d.SpaceQuery(currentspace, geom)) | 2355 | if (SafeNativeMethods.SpaceQuery(currentspace, geom)) |
2359 | { | 2356 | { |
2360 | if (d.GeomIsSpace(currentspace)) | 2357 | if (SafeNativeMethods.GeomIsSpace(currentspace)) |
2361 | { | 2358 | { |
2362 | // waitForSpaceUnlock(currentspace); | 2359 | // waitForSpaceUnlock(currentspace); |
2363 | d.SpaceRemove(currentspace, geom); | 2360 | SafeNativeMethods.SpaceRemove(currentspace, geom); |
2364 | } | 2361 | } |
2365 | else | 2362 | else |
2366 | { | 2363 | { |
@@ -2370,13 +2367,13 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2370 | } | 2367 | } |
2371 | else | 2368 | else |
2372 | { | 2369 | { |
2373 | IntPtr sGeomIsIn = d.GeomGetSpace(geom); | 2370 | IntPtr sGeomIsIn = SafeNativeMethods.GeomGetSpace(geom); |
2374 | if (sGeomIsIn != IntPtr.Zero) | 2371 | if (sGeomIsIn != IntPtr.Zero) |
2375 | { | 2372 | { |
2376 | if (d.GeomIsSpace(sGeomIsIn)) | 2373 | if (SafeNativeMethods.GeomIsSpace(sGeomIsIn)) |
2377 | { | 2374 | { |
2378 | // waitForSpaceUnlock(sGeomIsIn); | 2375 | // waitForSpaceUnlock(sGeomIsIn); |
2379 | d.SpaceRemove(sGeomIsIn, geom); | 2376 | SafeNativeMethods.SpaceRemove(sGeomIsIn, geom); |
2380 | } | 2377 | } |
2381 | else | 2378 | else |
2382 | { | 2379 | { |
@@ -2397,7 +2394,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2397 | if (newspace == IntPtr.Zero) | 2394 | if (newspace == IntPtr.Zero) |
2398 | { | 2395 | { |
2399 | newspace = createprimspace(iprimspaceArrItem[0], iprimspaceArrItem[1]); | 2396 | newspace = createprimspace(iprimspaceArrItem[0], iprimspaceArrItem[1]); |
2400 | d.HashSpaceSetLevels(newspace, HashspaceLow, HashspaceHigh); | 2397 | SafeNativeMethods.HashSpaceSetLevels(newspace, HashspaceLow, HashspaceHigh); |
2401 | } | 2398 | } |
2402 | 2399 | ||
2403 | return newspace; | 2400 | return newspace; |
@@ -2412,11 +2409,11 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2412 | internal IntPtr createprimspace(int iprimspaceArrItemX, int iprimspaceArrItemY) | 2409 | internal IntPtr createprimspace(int iprimspaceArrItemX, int iprimspaceArrItemY) |
2413 | { | 2410 | { |
2414 | // creating a new space for prim and inserting it into main space. | 2411 | // creating a new space for prim and inserting it into main space. |
2415 | staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY] = d.HashSpaceCreate(IntPtr.Zero); | 2412 | staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY] = SafeNativeMethods.HashSpaceCreate(IntPtr.Zero); |
2416 | d.GeomSetCategoryBits(staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY], (int)CollisionCategories.Space); | 2413 | SafeNativeMethods.GeomSetCategoryBits(staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY], (int)CollisionCategories.Space); |
2417 | // waitForSpaceUnlock(space); | 2414 | // waitForSpaceUnlock(space); |
2418 | d.SpaceSetSublevel(space, 1); | 2415 | SafeNativeMethods.SpaceSetSublevel(space, 1); |
2419 | d.SpaceAdd(space, staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]); | 2416 | SafeNativeMethods.SpaceAdd(space, staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]); |
2420 | 2417 | ||
2421 | return staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]; | 2418 | return staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]; |
2422 | } | 2419 | } |
@@ -2636,7 +2633,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2636 | m_log.InfoFormat("[Ode] start processing pending actor operations"); | 2633 | m_log.InfoFormat("[Ode] start processing pending actor operations"); |
2637 | int tstart = Util.EnvironmentTickCount(); | 2634 | int tstart = Util.EnvironmentTickCount(); |
2638 | 2635 | ||
2639 | d.AllocateODEDataForThread(0); | 2636 | SafeNativeMethods.AllocateODEDataForThread(0); |
2640 | 2637 | ||
2641 | lock (_taintedPrims) | 2638 | lock (_taintedPrims) |
2642 | { | 2639 | { |
@@ -2719,7 +2716,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2719 | 2716 | ||
2720 | lock (OdeLock) | 2717 | lock (OdeLock) |
2721 | { | 2718 | { |
2722 | d.AllocateODEDataForThread(~0U); | 2719 | SafeNativeMethods.AllocateODEDataForThread(~0U); |
2723 | 2720 | ||
2724 | while (step_time > HalfOdeStep) | 2721 | while (step_time > HalfOdeStep) |
2725 | { | 2722 | { |
@@ -2871,12 +2868,12 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2871 | } | 2868 | } |
2872 | 2869 | ||
2873 | lock(SimulationLock) | 2870 | lock(SimulationLock) |
2874 | d.WorldQuickStep(world, ODE_STEPSIZE); | 2871 | SafeNativeMethods.WorldQuickStep(world, ODE_STEPSIZE); |
2875 | 2872 | ||
2876 | if (CollectStats) | 2873 | if (CollectStats) |
2877 | m_stats[ODENativeStepFrameMsStatName] += Util.EnvironmentTickCountSubtract(tempTick); | 2874 | m_stats[ODENativeStepFrameMsStatName] += Util.EnvironmentTickCountSubtract(tempTick); |
2878 | 2875 | ||
2879 | d.JointGroupEmpty(contactgroup); | 2876 | SafeNativeMethods.JointGroupEmpty(contactgroup); |
2880 | } | 2877 | } |
2881 | catch (Exception e) | 2878 | catch (Exception e) |
2882 | { | 2879 | { |
@@ -2924,7 +2921,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2924 | 2921 | ||
2925 | foreach (OdePrim prim in _activeprims) | 2922 | foreach (OdePrim prim in _activeprims) |
2926 | { | 2923 | { |
2927 | if (prim.IsPhysical && (d.BodyIsEnabled(prim.Body) || !prim._zeroFlag)) | 2924 | if (prim.IsPhysical && (SafeNativeMethods.BodyIsEnabled(prim.Body) || !prim._zeroFlag)) |
2928 | { | 2925 | { |
2929 | prim.UpdatePositionAndVelocity(); | 2926 | prim.UpdatePositionAndVelocity(); |
2930 | 2927 | ||
@@ -2954,7 +2951,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2954 | fwriter.Close(); | 2951 | fwriter.Close(); |
2955 | } | 2952 | } |
2956 | 2953 | ||
2957 | d.WorldExportDIF(world, fname, physics_logging_append_existing_logfile, prefix); | 2954 | SafeNativeMethods.WorldExportDIF(world, fname, physics_logging_append_existing_logfile, prefix); |
2958 | } | 2955 | } |
2959 | 2956 | ||
2960 | latertickcount = Util.EnvironmentTickCountSubtract(tickCountFrameRun); | 2957 | latertickcount = Util.EnvironmentTickCountSubtract(tickCountFrameRun); |
@@ -3069,11 +3066,11 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
3069 | { | 3066 | { |
3070 | IntPtr odeJoint; | 3067 | IntPtr odeJoint; |
3071 | //DoJointErrorMessage(joint, "ODE creating ball joint "); | 3068 | //DoJointErrorMessage(joint, "ODE creating ball joint "); |
3072 | odeJoint = d.JointCreateBall(world, IntPtr.Zero); | 3069 | odeJoint = SafeNativeMethods.JointCreateBall(world, IntPtr.Zero); |
3073 | //DoJointErrorMessage(joint, "ODE attaching ball joint: " + odeJoint + " with b1:" + jointBodies[0] + " b2:" + jointBodies[1]); | 3070 | //DoJointErrorMessage(joint, "ODE attaching ball joint: " + odeJoint + " with b1:" + jointBodies[0] + " b2:" + jointBodies[1]); |
3074 | d.JointAttach(odeJoint, jointBodies[0], jointBodies[1]); | 3071 | SafeNativeMethods.JointAttach(odeJoint, jointBodies[0], jointBodies[1]); |
3075 | //DoJointErrorMessage(joint, "ODE setting ball anchor: " + odeJoint + " to vec:" + joint.Position); | 3072 | //DoJointErrorMessage(joint, "ODE setting ball anchor: " + odeJoint + " to vec:" + joint.Position); |
3076 | d.JointSetBallAnchor(odeJoint, | 3073 | SafeNativeMethods.JointSetBallAnchor(odeJoint, |
3077 | joint.Position.X, | 3074 | joint.Position.X, |
3078 | joint.Position.Y, | 3075 | joint.Position.Y, |
3079 | joint.Position.Z); | 3076 | joint.Position.Z); |
@@ -3097,11 +3094,11 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
3097 | { | 3094 | { |
3098 | IntPtr odeJoint; | 3095 | IntPtr odeJoint; |
3099 | //DoJointErrorMessage(joint, "ODE creating hinge joint "); | 3096 | //DoJointErrorMessage(joint, "ODE creating hinge joint "); |
3100 | odeJoint = d.JointCreateHinge(world, IntPtr.Zero); | 3097 | odeJoint = SafeNativeMethods.JointCreateHinge(world, IntPtr.Zero); |
3101 | //DoJointErrorMessage(joint, "ODE attaching hinge joint: " + odeJoint + " with b1:" + jointBodies[0] + " b2:" + jointBodies[1]); | 3098 | //DoJointErrorMessage(joint, "ODE attaching hinge joint: " + odeJoint + " with b1:" + jointBodies[0] + " b2:" + jointBodies[1]); |
3102 | d.JointAttach(odeJoint, jointBodies[0], jointBodies[1]); | 3099 | SafeNativeMethods.JointAttach(odeJoint, jointBodies[0], jointBodies[1]); |
3103 | //DoJointErrorMessage(joint, "ODE setting hinge anchor: " + odeJoint + " to vec:" + joint.Position); | 3100 | //DoJointErrorMessage(joint, "ODE setting hinge anchor: " + odeJoint + " to vec:" + joint.Position); |
3104 | d.JointSetHingeAnchor(odeJoint, | 3101 | SafeNativeMethods.JointSetHingeAnchor(odeJoint, |
3105 | joint.Position.X, | 3102 | joint.Position.X, |
3106 | joint.Position.Y, | 3103 | joint.Position.Y, |
3107 | joint.Position.Z); | 3104 | joint.Position.Z); |
@@ -3137,7 +3134,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
3137 | Vector3 jointAxis = Vector3.Transform(Vector3.UnitX, proxyFrame); | 3134 | Vector3 jointAxis = Vector3.Transform(Vector3.UnitX, proxyFrame); |
3138 | //m_log.Debug("PHY: making axis: hinge joint axis is " + jointAxis); | 3135 | //m_log.Debug("PHY: making axis: hinge joint axis is " + jointAxis); |
3139 | //DoJointErrorMessage(joint, "ODE setting hinge axis: " + odeJoint + " to vec:" + jointAxis); | 3136 | //DoJointErrorMessage(joint, "ODE setting hinge axis: " + odeJoint + " to vec:" + jointAxis); |
3140 | d.JointSetHingeAxis(odeJoint, | 3137 | SafeNativeMethods.JointSetHingeAxis(odeJoint, |
3141 | jointAxis.X, | 3138 | jointAxis.X, |
3142 | jointAxis.Y, | 3139 | jointAxis.Y, |
3143 | jointAxis.Z); | 3140 | jointAxis.Z); |
@@ -3299,7 +3296,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
3299 | 3296 | ||
3300 | lock (OdeLock) | 3297 | lock (OdeLock) |
3301 | { | 3298 | { |
3302 | d.AllocateODEDataForThread(~0U); | 3299 | SafeNativeMethods.AllocateODEDataForThread(~0U); |
3303 | 3300 | ||
3304 | IntPtr GroundGeom = IntPtr.Zero; | 3301 | IntPtr GroundGeom = IntPtr.Zero; |
3305 | if (RegionTerrain.TryGetValue(pOffset, out GroundGeom)) | 3302 | if (RegionTerrain.TryGetValue(pOffset, out GroundGeom)) |
@@ -3311,29 +3308,29 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
3311 | { | 3308 | { |
3312 | TerrainHeightFieldHeights.Remove(GroundGeom); | 3309 | TerrainHeightFieldHeights.Remove(GroundGeom); |
3313 | } | 3310 | } |
3314 | d.SpaceRemove(space, GroundGeom); | 3311 | SafeNativeMethods.SpaceRemove(space, GroundGeom); |
3315 | d.GeomDestroy(GroundGeom); | 3312 | SafeNativeMethods.GeomDestroy(GroundGeom); |
3316 | } | 3313 | } |
3317 | 3314 | ||
3318 | } | 3315 | } |
3319 | IntPtr HeightmapData = d.GeomHeightfieldDataCreate(); | 3316 | IntPtr HeightmapData = SafeNativeMethods.GeomHeightfieldDataCreate(); |
3320 | d.GeomHeightfieldDataBuildSingle(HeightmapData, _heightmap, 0, | 3317 | SafeNativeMethods.GeomHeightfieldDataBuildSingle(HeightmapData, _heightmap, 0, |
3321 | heightmapWidth, heightmapHeight, | 3318 | heightmapWidth, heightmapHeight, |
3322 | (int)heightmapWidthSamples, | 3319 | (int)heightmapWidthSamples, |
3323 | (int)heightmapHeightSamples, | 3320 | (int)heightmapHeightSamples, |
3324 | scale, offset, thickness, wrap); | 3321 | scale, offset, thickness, wrap); |
3325 | 3322 | ||
3326 | d.GeomHeightfieldDataSetBounds(HeightmapData, hfmin - 1, hfmax + 1); | 3323 | SafeNativeMethods.GeomHeightfieldDataSetBounds(HeightmapData, hfmin - 1, hfmax + 1); |
3327 | GroundGeom = d.CreateHeightfield(space, HeightmapData, 1); | 3324 | GroundGeom = SafeNativeMethods.CreateHeightfield(space, HeightmapData, 1); |
3328 | if (GroundGeom != IntPtr.Zero) | 3325 | if (GroundGeom != IntPtr.Zero) |
3329 | { | 3326 | { |
3330 | d.GeomSetCategoryBits(GroundGeom, (int)(CollisionCategories.Land)); | 3327 | SafeNativeMethods.GeomSetCategoryBits(GroundGeom, (int)(CollisionCategories.Land)); |
3331 | d.GeomSetCollideBits(GroundGeom, (int)(CollisionCategories.Space)); | 3328 | SafeNativeMethods.GeomSetCollideBits(GroundGeom, (int)(CollisionCategories.Space)); |
3332 | 3329 | ||
3333 | } | 3330 | } |
3334 | geom_name_map[GroundGeom] = "Terrain"; | 3331 | geom_name_map[GroundGeom] = "Terrain"; |
3335 | 3332 | ||
3336 | d.Matrix3 R = new d.Matrix3(); | 3333 | SafeNativeMethods.Matrix3 R = new SafeNativeMethods.Matrix3(); |
3337 | 3334 | ||
3338 | Quaternion q1 = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), 1.5707f); | 3335 | Quaternion q1 = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), 1.5707f); |
3339 | Quaternion q2 = Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), 1.5707f); | 3336 | Quaternion q2 = Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), 1.5707f); |
@@ -3343,9 +3340,9 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
3343 | float angle; | 3340 | float angle; |
3344 | q1.GetAxisAngle(out v3, out angle); | 3341 | q1.GetAxisAngle(out v3, out angle); |
3345 | 3342 | ||
3346 | d.RFromAxisAndAngle(out R, v3.X, v3.Y, v3.Z, angle); | 3343 | SafeNativeMethods.RFromAxisAndAngle(out R, v3.X, v3.Y, v3.Z, angle); |
3347 | d.GeomSetRotation(GroundGeom, ref R); | 3344 | SafeNativeMethods.GeomSetRotation(GroundGeom, ref R); |
3348 | d.GeomSetPosition(GroundGeom, pOffset.X + regionsizeX * 0.5f, pOffset.Y + regionsizeY * 0.5f, 0.0f); | 3345 | SafeNativeMethods.GeomSetPosition(GroundGeom, pOffset.X + regionsizeX * 0.5f, pOffset.Y + regionsizeY * 0.5f, 0.0f); |
3349 | IntPtr testGround = IntPtr.Zero; | 3346 | IntPtr testGround = IntPtr.Zero; |
3350 | if (RegionTerrain.TryGetValue(pOffset, out testGround)) | 3347 | if (RegionTerrain.TryGetValue(pOffset, out testGround)) |
3351 | { | 3348 | { |
@@ -3384,7 +3381,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
3384 | 3381 | ||
3385 | _worldInitialized = false; | 3382 | _worldInitialized = false; |
3386 | 3383 | ||
3387 | d.AllocateODEDataForThread(~0U); | 3384 | SafeNativeMethods.AllocateODEDataForThread(~0U); |
3388 | 3385 | ||
3389 | if (m_rayCastManager != null) | 3386 | if (m_rayCastManager != null) |
3390 | { | 3387 | { |
@@ -3412,13 +3409,13 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
3412 | { | 3409 | { |
3413 | if (TerrainHeightFieldHeights.ContainsKey(GroundGeom)) | 3410 | if (TerrainHeightFieldHeights.ContainsKey(GroundGeom)) |
3414 | TerrainHeightFieldHeights.Remove(GroundGeom); | 3411 | TerrainHeightFieldHeights.Remove(GroundGeom); |
3415 | d.GeomDestroy(GroundGeom); | 3412 | SafeNativeMethods.GeomDestroy(GroundGeom); |
3416 | } | 3413 | } |
3417 | } | 3414 | } |
3418 | 3415 | ||
3419 | try | 3416 | try |
3420 | { | 3417 | { |
3421 | d.WorldDestroy(world); | 3418 | SafeNativeMethods.WorldDestroy(world); |
3422 | world = IntPtr.Zero; | 3419 | world = IntPtr.Zero; |
3423 | } | 3420 | } |
3424 | catch (AccessViolationException e) | 3421 | catch (AccessViolationException e) |