aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
diff options
context:
space:
mode:
authorBlueWall2012-11-25 17:03:14 -0500
committerBlueWall2012-11-25 17:03:14 -0500
commitc754003944d0166bf50b4f94b0c0eea642503bb0 (patch)
treedfa1c2020d5500d510519d5b2b3236600692f277 /OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
parentMerge branch 'master' into connector_plugin (diff)
parentCombine TestDeleteSceneObjectAsync() with TestDeRezSceneObject() as they are ... (diff)
downloadopensim-SC-c754003944d0166bf50b4f94b0c0eea642503bb0.zip
opensim-SC-c754003944d0166bf50b4f94b0c0eea642503bb0.tar.gz
opensim-SC-c754003944d0166bf50b4f94b0c0eea642503bb0.tar.bz2
opensim-SC-c754003944d0166bf50b4f94b0c0eea642503bb0.tar.xz
Merge branch 'master' into connector_plugin
Conflicts: OpenSim/Server/Base/ServicesServerBase.cs
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs242
1 files changed, 67 insertions, 175 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
index 5ffd591..e60a760 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
@@ -88,11 +88,11 @@ public struct BulletShape
88 public BulletShape(IntPtr xx) 88 public BulletShape(IntPtr xx)
89 { 89 {
90 ptr = xx; 90 ptr = xx;
91 type=ShapeData.PhysicsShapeType.SHAPE_UNKNOWN; 91 type=BSPhysicsShapeType.SHAPE_UNKNOWN;
92 shapeKey = 0; 92 shapeKey = (System.UInt64)FixedShapeKey.KEY_NONE;
93 isNativeShape = false; 93 isNativeShape = false;
94 } 94 }
95 public BulletShape(IntPtr xx, ShapeData.PhysicsShapeType typ) 95 public BulletShape(IntPtr xx, BSPhysicsShapeType typ)
96 { 96 {
97 ptr = xx; 97 ptr = xx;
98 type = typ; 98 type = typ;
@@ -100,7 +100,7 @@ public struct BulletShape
100 isNativeShape = false; 100 isNativeShape = false;
101 } 101 }
102 public IntPtr ptr; 102 public IntPtr ptr;
103 public ShapeData.PhysicsShapeType type; 103 public BSPhysicsShapeType type;
104 public System.UInt64 shapeKey; 104 public System.UInt64 shapeKey;
105 public bool isNativeShape; 105 public bool isNativeShape;
106 public override string ToString() 106 public override string ToString()
@@ -152,7 +152,7 @@ public class BulletHeightMapInfo
152 ID = id; 152 ID = id;
153 Ptr = xx; 153 Ptr = xx;
154 heightMap = hm; 154 heightMap = hm;
155 terrainRegionBase = new Vector2(0f, 0f); 155 terrainRegionBase = Vector3.Zero;
156 minCoords = new Vector3(100f, 100f, 25f); 156 minCoords = new Vector3(100f, 100f, 25f);
157 maxCoords = new Vector3(101f, 101f, 26f); 157 maxCoords = new Vector3(101f, 101f, 26f);
158 minZ = maxZ = 0f; 158 minZ = maxZ = 0f;
@@ -161,7 +161,7 @@ public class BulletHeightMapInfo
161 public uint ID; 161 public uint ID;
162 public IntPtr Ptr; 162 public IntPtr Ptr;
163 public float[] heightMap; 163 public float[] heightMap;
164 public Vector2 terrainRegionBase; 164 public Vector3 terrainRegionBase;
165 public Vector3 minCoords; 165 public Vector3 minCoords;
166 public Vector3 maxCoords; 166 public Vector3 maxCoords;
167 public float sizeX, sizeY; 167 public float sizeX, sizeY;
@@ -178,25 +178,39 @@ public struct ConvexHull
178 int VertexCount; 178 int VertexCount;
179 Vector3[] Vertices; 179 Vector3[] Vertices;
180} 180}
181public enum BSPhysicsShapeType
182{
183 SHAPE_UNKNOWN = 0,
184 SHAPE_CAPSULE = 1,
185 SHAPE_BOX = 2,
186 SHAPE_CONE = 3,
187 SHAPE_CYLINDER = 4,
188 SHAPE_SPHERE = 5,
189 SHAPE_MESH = 6,
190 SHAPE_HULL = 7,
191 // following defined by BulletSim
192 SHAPE_GROUNDPLANE = 20,
193 SHAPE_TERRAIN = 21,
194 SHAPE_COMPOUND = 22,
195 SHAPE_HEIGHTMAP = 23,
196};
197
198// The native shapes have predefined shape hash keys
199public enum FixedShapeKey : ulong
200{
201 KEY_NONE = 0,
202 KEY_BOX = 1,
203 KEY_SPHERE = 2,
204 KEY_CONE = 3,
205 KEY_CYLINDER = 4,
206 KEY_CAPSULE = 5,
207}
208
181[StructLayout(LayoutKind.Sequential)] 209[StructLayout(LayoutKind.Sequential)]
182public struct ShapeData 210public struct ShapeData
183{ 211{
184 public enum PhysicsShapeType
185 {
186 SHAPE_UNKNOWN = 0,
187 SHAPE_AVATAR = 1,
188 SHAPE_BOX = 2,
189 SHAPE_CONE = 3,
190 SHAPE_CYLINDER = 4,
191 SHAPE_SPHERE = 5,
192 SHAPE_MESH = 6,
193 SHAPE_HULL = 7,
194 // following defined by BulletSim
195 SHAPE_GROUNDPLANE = 20,
196 SHAPE_TERRAIN = 21,
197 };
198 public uint ID; 212 public uint ID;
199 public PhysicsShapeType Type; 213 public BSPhysicsShapeType Type;
200 public Vector3 Position; 214 public Vector3 Position;
201 public Quaternion Rotation; 215 public Quaternion Rotation;
202 public Vector3 Velocity; 216 public Vector3 Velocity;
@@ -215,16 +229,6 @@ public struct ShapeData
215 // note that bools are passed as floats since bool size changes by language and architecture 229 // note that bools are passed as floats since bool size changes by language and architecture
216 public const float numericTrue = 1f; 230 public const float numericTrue = 1f;
217 public const float numericFalse = 0f; 231 public const float numericFalse = 0f;
218
219 // The native shapes have predefined shape hash keys
220 public enum FixedShapeKey : ulong
221 {
222 KEY_BOX = 1,
223 KEY_SPHERE = 2,
224 KEY_CONE = 3,
225 KEY_CYLINDER = 4,
226 KEY_CAPSULE = 5,
227 }
228} 232}
229[StructLayout(LayoutKind.Sequential)] 233[StructLayout(LayoutKind.Sequential)]
230public struct SweepHit 234public struct SweepHit
@@ -279,6 +283,7 @@ public struct ConfigurationParameters
279 public float ccdSweptSphereRadius; 283 public float ccdSweptSphereRadius;
280 public float contactProcessingThreshold; 284 public float contactProcessingThreshold;
281 285
286 public float terrainImplementation;
282 public float terrainFriction; 287 public float terrainFriction;
283 public float terrainHitFraction; 288 public float terrainHitFraction;
284 public float terrainRestitution; 289 public float terrainRestitution;
@@ -286,7 +291,8 @@ public struct ConfigurationParameters
286 public float avatarStandingFriction; 291 public float avatarStandingFriction;
287 public float avatarDensity; 292 public float avatarDensity;
288 public float avatarRestitution; 293 public float avatarRestitution;
289 public float avatarCapsuleRadius; 294 public float avatarCapsuleWidth;
295 public float avatarCapsuleDepth;
290 public float avatarCapsuleHeight; 296 public float avatarCapsuleHeight;
291 public float avatarContactProcessingThreshold; 297 public float avatarContactProcessingThreshold;
292 298
@@ -299,6 +305,7 @@ public struct ConfigurationParameters
299 public float shouldEnableFrictionCaching; 305 public float shouldEnableFrictionCaching;
300 public float numberOfSolverIterations; 306 public float numberOfSolverIterations;
301 307
308 public float linksetImplementation;
302 public float linkConstraintUseFrameOffset; 309 public float linkConstraintUseFrameOffset;
303 public float linkConstraintEnableTransMotor; 310 public float linkConstraintEnableTransMotor;
304 public float linkConstraintTransMotorMaxVel; 311 public float linkConstraintTransMotorMaxVel;
@@ -378,6 +385,7 @@ public enum CollisionFilterGroups : uint
378 BTerrainFilter = 1 << 11, 385 BTerrainFilter = 1 << 11,
379 BRaycastFilter = 1 << 12, 386 BRaycastFilter = 1 << 12,
380 BSolidFilter = 1 << 13, 387 BSolidFilter = 1 << 13,
388 BLinksetFilter = 1 << 14,
381 389
382 // The collsion filters and masked are defined in one place -- don't want them scattered 390 // The collsion filters and masked are defined in one place -- don't want them scattered
383 AvatarFilter = BCharacterFilter, 391 AvatarFilter = BCharacterFilter,
@@ -385,18 +393,18 @@ public enum CollisionFilterGroups : uint
385 ObjectFilter = BSolidFilter, 393 ObjectFilter = BSolidFilter,
386 ObjectMask = BAllFilter, 394 ObjectMask = BAllFilter,
387 StaticObjectFilter = BStaticFilter, 395 StaticObjectFilter = BStaticFilter,
388 StaticObjectMask = BAllFilter, 396 StaticObjectMask = BAllFilter & ~BStaticFilter, // static objects don't collide with each other
397 LinksetFilter = BLinksetFilter,
398 LinksetMask = BAllFilter & ~BLinksetFilter, // linkset objects don't collide with each other
389 VolumeDetectFilter = BSensorTrigger, 399 VolumeDetectFilter = BSensorTrigger,
390 VolumeDetectMask = ~BSensorTrigger, 400 VolumeDetectMask = ~BSensorTrigger,
391 TerrainFilter = BTerrainFilter, 401 TerrainFilter = BTerrainFilter,
392 TerrainMask = BAllFilter & ~BStaticFilter, 402 TerrainMask = BAllFilter & ~BStaticFilter, // static objects on the ground don't collide
393 GroundPlaneFilter = BGroundPlaneFilter, 403 GroundPlaneFilter = BGroundPlaneFilter,
394 GroundPlaneMask = BAllFilter 404 GroundPlaneMask = BAllFilter
395 405
396}; 406};
397 407
398
399
400// CFM controls the 'hardness' of the constraint. 0=fixed, 0..1=violatable. Default=0 408// CFM controls the 'hardness' of the constraint. 0=fixed, 0..1=violatable. Default=0
401// ERP controls amount of correction per tick. Usable range=0.1..0.8. Default=0.2. 409// ERP controls amount of correction per tick. Usable range=0.1..0.8. Default=0.2.
402public enum ConstraintParams : int 410public enum ConstraintParams : int
@@ -426,140 +434,6 @@ static class BulletSimAPI {
426[UnmanagedFunctionPointer(CallingConvention.Cdecl)] 434[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
427public delegate void DebugLogCallback([MarshalAs(UnmanagedType.LPStr)]string msg); 435public delegate void DebugLogCallback([MarshalAs(UnmanagedType.LPStr)]string msg);
428 436
429[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
430[return: MarshalAs(UnmanagedType.LPStr)]
431public static extern string GetVersion();
432
433/* Remove the linkage to the old api methods
434[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
435public static extern uint Initialize(Vector3 maxPosition, IntPtr parms,
436 int maxCollisions, IntPtr collisionArray,
437 int maxUpdates, IntPtr updateArray,
438 DebugLogCallback logRoutine);
439
440[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
441public static extern void CreateInitialGroundPlaneAndTerrain(uint worldID);
442
443[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
444public static extern void SetHeightmap(uint worldID, [MarshalAs(UnmanagedType.LPArray)] float[] heightMap);
445
446[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
447public static extern void Shutdown(uint worldID);
448
449[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
450public static extern bool UpdateParameter(uint worldID, uint localID,
451 [MarshalAs(UnmanagedType.LPStr)]string paramCode, float value);
452
453// ===============================================================================
454[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
455public static extern int PhysicsStep(uint worldID, float timeStep, int maxSubSteps, float fixedTimeStep,
456 out int updatedEntityCount,
457 out IntPtr updatedEntitiesPtr,
458 out int collidersCount,
459 out IntPtr collidersPtr);
460
461[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
462public static extern bool CreateHull(uint worldID, System.UInt64 meshKey,
463 int hullCount, [MarshalAs(UnmanagedType.LPArray)] float[] hulls
464 );
465
466[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
467public static extern bool CreateMesh(uint worldID, System.UInt64 meshKey,
468 int indexCount, [MarshalAs(UnmanagedType.LPArray)] int[] indices,
469 int verticesCount, [MarshalAs(UnmanagedType.LPArray)] float[] vertices
470 );
471
472[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
473public static extern bool DestroyHull(uint worldID, System.UInt64 meshKey);
474
475[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
476public static extern bool DestroyMesh(uint worldID, System.UInt64 meshKey);
477
478[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
479public static extern bool CreateObject(uint worldID, ShapeData shapeData);
480
481[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
482public static extern Vector3 GetObjectPosition(uint WorldID, uint id);
483
484[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
485public static extern Quaternion GetObjectOrientation(uint WorldID, uint id);
486
487[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
488public static extern bool SetObjectTranslation(uint worldID, uint id, Vector3 position, Quaternion rotation);
489
490[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
491public static extern bool SetObjectVelocity(uint worldID, uint id, Vector3 velocity);
492
493[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
494public static extern bool SetObjectAngularVelocity(uint worldID, uint id, Vector3 angularVelocity);
495
496// Set the current force acting on the object
497[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
498public static extern bool SetObjectForce(uint worldID, uint id, Vector3 force);
499
500[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
501public static extern bool SetObjectScaleMass(uint worldID, uint id, Vector3 scale, float mass, bool isDynamic);
502
503[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
504public static extern bool SetObjectCollidable(uint worldID, uint id, bool phantom);
505
506[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
507public static extern bool SetObjectDynamic(uint worldID, uint id, bool isDynamic, float mass);
508
509[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
510public static extern bool SetObjectGhost(uint worldID, uint id, bool ghostly);
511
512[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
513public static extern bool SetObjectProperties(uint worldID, uint id, bool isStatic, bool isSolid, bool genCollisions, float mass);
514
515[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
516public static extern bool SetObjectBuoyancy(uint worldID, uint id, float buoyancy);
517
518[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
519public static extern bool HasObject(uint worldID, uint id);
520
521[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
522public static extern bool DestroyObject(uint worldID, uint id);
523
524// ===============================================================================
525[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
526public static extern SweepHit ConvexSweepTest(uint worldID, uint id, Vector3 to, float extraMargin);
527
528[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
529public static extern RaycastHit RayTest(uint worldID, uint id, Vector3 from, Vector3 to);
530
531[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
532public static extern Vector3 RecoverFromPenetration(uint worldID, uint id);
533
534// ===============================================================================
535[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
536public static extern void DumpBulletStatistics();
537*/
538// Log a debug message
539[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
540public static extern void SetDebugLogCallback(DebugLogCallback callback);
541
542// ===============================================================================
543// ===============================================================================
544// ===============================================================================
545// A new version of the API that enables moving all the logic out of the C++ code and into
546// the C# code. This will make modifications easier for the next person.
547// This interface passes the actual pointers to the objects in the unmanaged
548// address space. All the management (calls for creation/destruction/lookup)
549// is done in the C# code.
550// The names have a "2" tacked on. This will be removed as the C# code gets rebuilt
551// and the old code is removed.
552
553// Functions use while converting from API1 to API2. Can be removed when totally converted.
554[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
555public static extern IntPtr GetSimHandle2(uint worldID);
556
557[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
558public static extern IntPtr GetBodyHandleWorldID2(uint worldID, uint id);
559
560[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
561public static extern IntPtr GetBodyHandle2(IntPtr world, uint id);
562
563// =============================================================================== 437// ===============================================================================
564// Initialization and simulation 438// Initialization and simulation
565[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 439[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
@@ -611,13 +485,25 @@ public static extern bool IsNativeShape2(IntPtr shape);
611public static extern IntPtr BuildCapsuleShape2(IntPtr world, float radius, float height, Vector3 scale); 485public static extern IntPtr BuildCapsuleShape2(IntPtr world, float radius, float height, Vector3 scale);
612 486
613[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 487[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
614public static extern IntPtr CreateCompoundShape2(IntPtr sim); 488public static extern IntPtr CreateCompoundShape2(IntPtr sim, bool enableDynamicAabbTree);
615 489
616[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 490[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
617public static extern void AddChildToCompoundShape2(IntPtr cShape, IntPtr addShape, Vector3 pos, Quaternion rot); 491public static extern int GetNumberOfCompoundChildren2(IntPtr cShape);
618 492
619[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 493[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
620public static extern void RemoveChildFromCompoundShape2(IntPtr cShape, IntPtr removeShape); 494public static extern void AddChildShapeToCompoundShape2(IntPtr cShape, IntPtr addShape, Vector3 pos, Quaternion rot);
495
496[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
497public static extern IntPtr GetChildShapeFromCompoundShapeIndex2(IntPtr cShape, int indx);
498
499[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
500public static extern IntPtr RemoveChildShapeFromCompoundShapeIndex2(IntPtr cShape, int indx);
501
502[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
503public static extern void RemoveChildShapeFromCompoundShape2(IntPtr cShape, IntPtr removeShape);
504
505[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
506public static extern void RecalculateCompoundShapeLocalAabb2(IntPtr cShape);
621 507
622[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 508[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
623public static extern IntPtr DuplicateCollisionShape2(IntPtr sim, IntPtr srcShape, uint id); 509public static extern IntPtr DuplicateCollisionShape2(IntPtr sim, IntPtr srcShape, uint id);
@@ -881,10 +767,10 @@ public static extern float GetCcdMotionThreshold2(IntPtr obj);
881public static extern void SetCcdMotionThreshold2(IntPtr obj, float val); 767public static extern void SetCcdMotionThreshold2(IntPtr obj, float val);
882 768
883[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 769[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
884public static extern float GetCcdSweepSphereRadius2(IntPtr obj); 770public static extern float GetCcdSweptSphereRadius2(IntPtr obj);
885 771
886[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 772[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
887public static extern void SetCcdSweepSphereRadius2(IntPtr obj, float val); 773public static extern void SetCcdSweptSphereRadius2(IntPtr obj, float val);
888 774
889[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 775[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
890public static extern IntPtr GetUserPointer2(IntPtr obj); 776public static extern IntPtr GetUserPointer2(IntPtr obj);
@@ -907,6 +793,12 @@ public static extern Vector3 GetGravity2(IntPtr obj);
907public static extern void SetDamping2(IntPtr obj, float lin_damping, float ang_damping); 793public static extern void SetDamping2(IntPtr obj, float lin_damping, float ang_damping);
908 794
909[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 795[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
796public static extern void SetLinearDamping2(IntPtr obj, float lin_damping);
797
798[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
799public static extern void SetAngularDamping2(IntPtr obj, float ang_damping);
800
801[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
910public static extern float GetLinearDamping2(IntPtr obj); 802public static extern float GetLinearDamping2(IntPtr obj);
911 803
912[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 804[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]