aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs2
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs4
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs4
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSConstraintHinge.cs2
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs4
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs6
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs392
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs4
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt7
9 files changed, 412 insertions, 13 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
index e77fb50..59584b2 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
@@ -36,7 +36,7 @@ public abstract class BSConstraint : IDisposable
36{ 36{
37 private static string LogHeader = "[BULLETSIM CONSTRAINT]"; 37 private static string LogHeader = "[BULLETSIM CONSTRAINT]";
38 38
39 protected BulletSim m_world; 39 protected BulletWorld m_world;
40 protected BulletBody m_body1; 40 protected BulletBody m_body1;
41 protected BulletBody m_body2; 41 protected BulletBody m_body2;
42 protected BulletConstraint m_constraint; 42 protected BulletConstraint m_constraint;
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs
index b073555..b946870 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs
@@ -39,7 +39,7 @@ public sealed class BSConstraint6Dof : BSConstraint
39 public override ConstraintType Type { get { return ConstraintType.D6_CONSTRAINT_TYPE; } } 39 public override ConstraintType Type { get { return ConstraintType.D6_CONSTRAINT_TYPE; } }
40 40
41 // Create a btGeneric6DofConstraint 41 // Create a btGeneric6DofConstraint
42 public BSConstraint6Dof(BulletSim world, BulletBody obj1, BulletBody obj2, 42 public BSConstraint6Dof(BulletWorld world, BulletBody obj1, BulletBody obj2,
43 Vector3 frame1, Quaternion frame1rot, 43 Vector3 frame1, Quaternion frame1rot,
44 Vector3 frame2, Quaternion frame2rot, 44 Vector3 frame2, Quaternion frame2rot,
45 bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies) 45 bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies)
@@ -58,7 +58,7 @@ public sealed class BSConstraint6Dof : BSConstraint
58 obj1.ID, obj1.ptr.ToString("X"), obj2.ID, obj2.ptr.ToString("X")); 58 obj1.ID, obj1.ptr.ToString("X"), obj2.ID, obj2.ptr.ToString("X"));
59 } 59 }
60 60
61 public BSConstraint6Dof(BulletSim world, BulletBody obj1, BulletBody obj2, 61 public BSConstraint6Dof(BulletWorld world, BulletBody obj1, BulletBody obj2,
62 Vector3 joinPoint, 62 Vector3 joinPoint,
63 bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies) 63 bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies)
64 { 64 {
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs
index a9fd826..2aeff25 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs
@@ -41,9 +41,9 @@ public sealed class BSConstraintCollection : IDisposable
41 delegate bool ConstraintAction(BSConstraint constrain); 41 delegate bool ConstraintAction(BSConstraint constrain);
42 42
43 private List<BSConstraint> m_constraints; 43 private List<BSConstraint> m_constraints;
44 private BulletSim m_world; 44 private BulletWorld m_world;
45 45
46 public BSConstraintCollection(BulletSim world) 46 public BSConstraintCollection(BulletWorld world)
47 { 47 {
48 m_world = world; 48 m_world = world;
49 m_constraints = new List<BSConstraint>(); 49 m_constraints = new List<BSConstraint>();
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintHinge.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraintHinge.cs
index ed3ffa7..a5378b9 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintHinge.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraintHinge.cs
@@ -36,7 +36,7 @@ public sealed class BSConstraintHinge : BSConstraint
36{ 36{
37 public override ConstraintType Type { get { return ConstraintType.HINGE_CONSTRAINT_TYPE; } } 37 public override ConstraintType Type { get { return ConstraintType.HINGE_CONSTRAINT_TYPE; } }
38 38
39 public BSConstraintHinge(BulletSim world, BulletBody obj1, BulletBody obj2, 39 public BSConstraintHinge(BulletWorld world, BulletBody obj1, BulletBody obj2,
40 Vector3 pivotInA, Vector3 pivotInB, 40 Vector3 pivotInA, Vector3 pivotInB,
41 Vector3 axisInA, Vector3 axisInB, 41 Vector3 axisInA, Vector3 axisInB,
42 bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies) 42 bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies)
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index e8e0d50..0022e45 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -74,7 +74,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
74 74
75 public IMesher mesher; 75 public IMesher mesher;
76 public uint WorldID { get; private set; } 76 public uint WorldID { get; private set; }
77 public BulletSim World { get; private set; } 77 public BulletWorld World { get; private set; }
78 78
79 // All the constraints that have been allocated in this instance. 79 // All the constraints that have been allocated in this instance.
80 public BSConstraintCollection Constraints { get; private set; } 80 public BSConstraintCollection Constraints { get; private set; }
@@ -242,7 +242,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
242 Vector3 worldExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight); 242 Vector3 worldExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight);
243 243
244 // m_log.DebugFormat("{0}: Initialize: Calling BulletSimAPI.Initialize.", LogHeader); 244 // m_log.DebugFormat("{0}: Initialize: Calling BulletSimAPI.Initialize.", LogHeader);
245 World = new BulletSim(0, this, BulletSimAPI.Initialize2(worldExtent, m_paramsHandle.AddrOfPinnedObject(), 245 World = new BulletWorld(0, this, BulletSimAPI.Initialize2(worldExtent, m_paramsHandle.AddrOfPinnedObject(),
246 m_maxCollisionsPerFrame, m_collisionArrayPinnedHandle.AddrOfPinnedObject(), 246 m_maxCollisionsPerFrame, m_collisionArrayPinnedHandle.AddrOfPinnedObject(),
247 m_maxUpdatesPerFrame, m_updateArrayPinnedHandle.AddrOfPinnedObject(), 247 m_maxUpdatesPerFrame, m_updateArrayPinnedHandle.AddrOfPinnedObject(),
248 m_DebugLogCallbackHandle)); 248 m_DebugLogCallbackHandle));
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
index 939d5e9..65ebcaa 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
@@ -98,7 +98,7 @@ public sealed class BSShapeCollection : IDisposable
98 // higher level dependencies on the shape or body. Mostly used for LinkSets to 98 // higher level dependencies on the shape or body. Mostly used for LinkSets to
99 // remove the physical constraints before the body is destroyed. 99 // remove the physical constraints before the body is destroyed.
100 // Called at taint-time!! 100 // Called at taint-time!!
101 public bool GetBodyAndShape(bool forceRebuild, BulletSim sim, BSPhysObject prim, 101 public bool GetBodyAndShape(bool forceRebuild, BulletWorld sim, BSPhysObject prim,
102 ShapeDestructionCallback shapeCallback, BodyDestructionCallback bodyCallback) 102 ShapeDestructionCallback shapeCallback, BodyDestructionCallback bodyCallback)
103 { 103 {
104 PhysicsScene.AssertInTaintTime("BSShapeCollection.GetBodyAndShape"); 104 PhysicsScene.AssertInTaintTime("BSShapeCollection.GetBodyAndShape");
@@ -126,7 +126,7 @@ public sealed class BSShapeCollection : IDisposable
126 return ret; 126 return ret;
127 } 127 }
128 128
129 public bool GetBodyAndShape(bool forceRebuild, BulletSim sim, BSPhysObject prim) 129 public bool GetBodyAndShape(bool forceRebuild, BulletWorld sim, BSPhysObject prim)
130 { 130 {
131 return GetBodyAndShape(forceRebuild, sim, prim, null, null); 131 return GetBodyAndShape(forceRebuild, sim, prim, null, null);
132 } 132 }
@@ -918,7 +918,7 @@ public sealed class BSShapeCollection : IDisposable
918 // Updates prim.BSBody with the information about the new body if one is created. 918 // Updates prim.BSBody with the information about the new body if one is created.
919 // Returns 'true' if an object was actually created. 919 // Returns 'true' if an object was actually created.
920 // Called at taint-time. 920 // Called at taint-time.
921 private bool CreateBody(bool forceRebuild, BSPhysObject prim, BulletSim sim, BulletShape shape, 921 private bool CreateBody(bool forceRebuild, BSPhysObject prim, BulletWorld sim, BulletShape shape,
922 BodyDestructionCallback bodyCallback) 922 BodyDestructionCallback bodyCallback)
923 { 923 {
924 bool ret = false; 924 bool ret = false;
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
index 7857eaa..afe5bca 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
@@ -288,6 +288,398 @@ public enum ConstraintParamAxis : int
288 AXIS_ALL 288 AXIS_ALL
289}; 289};
290 290
291public abstract class BulletSimAPITemplate
292{
293// Initialization and simulation
294public abstract BulletWorld Initialize2(Vector3 maxPosition, IntPtr parms,
295 int maxCollisions, IntPtr collisionArray,
296 int maxUpdates, IntPtr updateArray
297 );
298
299public abstract bool UpdateParameter2(BulletWorld world, uint localID, String parm, float value);
300
301public abstract void SetHeightMap2(BulletWorld world, float[] heightmap);
302
303public abstract void Shutdown2(BulletWorld sim);
304
305public abstract int PhysicsStep2(BulletWorld world, float timeStep, int maxSubSteps, float fixedTimeStep,
306 out int updatedEntityCount,
307 out IntPtr updatedEntitiesPtr,
308 out int collidersCount,
309 out IntPtr collidersPtr);
310
311public abstract bool PushUpdate2(BulletBody obj);
312
313// =====================================================================================
314// Mesh, hull, shape and body creation helper routines
315public abstract BulletShape CreateMeshShape2(BulletWorld world,
316 int indicesCount, [MarshalAs(UnmanagedType.LPArray)] int[] indices,
317 int verticesCount, [MarshalAs(UnmanagedType.LPArray)] float[] vertices );
318
319public abstract BulletShape CreateHullShape2(BulletWorld world,
320 int hullCount, [MarshalAs(UnmanagedType.LPArray)] float[] hulls);
321
322public abstract BulletShape BuildHullShapeFromMesh2(BulletWorld world, BulletShape meshShape);
323
324public abstract BulletShape BuildNativeShape2(BulletWorld world, ShapeData shapeData);
325
326public abstract bool IsNativeShape2(BulletShape shape);
327
328public abstract void SetShapeCollisionMargin(BulletShape shape, float margin);
329
330public abstract BulletShape BuildCapsuleShape2(BulletWorld world, float radius, float height, Vector3 scale);
331
332public abstract BulletShape CreateCompoundShape2(BulletWorld sim, bool enableDynamicAabbTree);
333
334public abstract int GetNumberOfCompoundChildren2(BulletShape cShape);
335
336public abstract void AddChildShapeToCompoundShape2(BulletShape cShape, BulletShape addShape, Vector3 pos, Quaternion rot);
337
338public abstract BulletShape GetChildShapeFromCompoundShapeIndex2(BulletShape cShape, int indx);
339
340public abstract BulletShape RemoveChildShapeFromCompoundShapeIndex2(BulletShape cShape, int indx);
341
342public abstract void RemoveChildShapeFromCompoundShape2(BulletShape cShape, BulletShape removeShape);
343
344public abstract void RecalculateCompoundShapeLocalAabb2(BulletShape cShape);
345
346public abstract BulletShape DuplicateCollisionShape2(BulletWorld sim, BulletShape srcShape, uint id);
347
348public abstract BulletBody CreateBodyFromShapeAndInfo2(BulletWorld sim, BulletShape shape, uint id, IntPtr constructionInfo);
349
350public abstract bool DeleteCollisionShape2(BulletWorld world, BulletShape shape);
351
352public abstract int GetBodyType2(BulletBody obj);
353
354public abstract BulletBody CreateBodyFromShape2(BulletWorld sim, BulletShape shape, uint id, Vector3 pos, Quaternion rot);
355
356public abstract BulletBody CreateBodyWithDefaultMotionState2(BulletShape shape, uint id, Vector3 pos, Quaternion rot);
357
358public abstract BulletBody CreateGhostFromShape2(BulletWorld sim, BulletShape shape, uint id, Vector3 pos, Quaternion rot);
359
360public abstract IntPtr AllocateBodyInfo2(BulletBody obj);
361
362public abstract void ReleaseBodyInfo2(IntPtr obj);
363
364public abstract void DestroyObject2(BulletWorld sim, BulletBody obj);
365
366// =====================================================================================
367// Terrain creation and helper routines
368public abstract IntPtr CreateHeightMapInfo2(BulletWorld sim, uint id, Vector3 minCoords, Vector3 maxCoords,
369 [MarshalAs(UnmanagedType.LPArray)] float[] heightMap, float collisionMargin);
370
371public abstract IntPtr FillHeightMapInfo2(BulletWorld sim, IntPtr mapInfo, uint id, Vector3 minCoords, Vector3 maxCoords,
372 [MarshalAs(UnmanagedType.LPArray)] float[] heightMap, float collisionMargin);
373
374public abstract bool ReleaseHeightMapInfo2(IntPtr heightMapInfo);
375
376public abstract BulletBody CreateGroundPlaneShape2(uint id, float height, float collisionMargin);
377
378public abstract BulletBody CreateTerrainShape2(IntPtr mapInfo);
379
380// =====================================================================================
381// Constraint creation and helper routines
382public abstract BulletConstraint Create6DofConstraint2(BulletWorld world, BulletBody obj1, BulletBody obj2,
383 Vector3 frame1loc, Quaternion frame1rot,
384 Vector3 frame2loc, Quaternion frame2rot,
385 bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies);
386
387public abstract BulletConstraint Create6DofConstraintToPoint2(BulletWorld world, BulletBody obj1, BulletBody obj2,
388 Vector3 joinPoint,
389 bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies);
390
391public abstract BulletConstraint CreateHingeConstraint2(BulletWorld world, BulletBody obj1, BulletBody obj2,
392 Vector3 pivotinA, Vector3 pivotinB,
393 Vector3 axisInA, Vector3 axisInB,
394 bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies);
395
396public abstract void SetConstraintEnable2(BulletConstraint constrain, float numericTrueFalse);
397
398public abstract void SetConstraintNumSolverIterations2(BulletConstraint constrain, float iterations);
399
400public abstract bool SetFrames2(BulletConstraint constrain,
401 Vector3 frameA, Quaternion frameArot, Vector3 frameB, Quaternion frameBrot);
402
403public abstract bool SetLinearLimits2(BulletConstraint constrain, Vector3 low, Vector3 hi);
404
405public abstract bool SetAngularLimits2(BulletConstraint constrain, Vector3 low, Vector3 hi);
406
407public abstract bool UseFrameOffset2(BulletConstraint constrain, float enable);
408
409public abstract bool TranslationalLimitMotor2(BulletConstraint constrain, float enable, float targetVel, float maxMotorForce);
410
411public abstract bool SetBreakingImpulseThreshold2(BulletConstraint constrain, float threshold);
412
413public abstract bool CalculateTransforms2(BulletConstraint constrain);
414
415public abstract bool SetConstraintParam2(BulletConstraint constrain, ConstraintParams paramIndex, float value, ConstraintParamAxis axis);
416
417public abstract bool DestroyConstraint2(BulletWorld world, BulletConstraint constrain);
418
419// =====================================================================================
420// btCollisionWorld entries
421public abstract void UpdateSingleAabb2(BulletWorld world, BulletBody obj);
422
423public abstract void UpdateAabbs2(BulletWorld world);
424
425public abstract bool GetForceUpdateAllAabbs2(BulletWorld world);
426
427public abstract void SetForceUpdateAllAabbs2(BulletWorld world, bool force);
428
429// =====================================================================================
430// btDynamicsWorld entries
431public abstract bool AddObjectToWorld2(BulletWorld world, BulletBody obj);
432
433public abstract bool RemoveObjectFromWorld2(BulletWorld world, BulletBody obj);
434
435public abstract bool AddConstraintToWorld2(BulletWorld world, BulletConstraint constrain, bool disableCollisionsBetweenLinkedObjects);
436
437public abstract bool RemoveConstraintFromWorld2(BulletWorld world, BulletConstraint constrain);
438// =====================================================================================
439// btCollisionObject entries
440public abstract Vector3 GetAnisotripicFriction2(BulletConstraint constrain);
441
442public abstract Vector3 SetAnisotripicFriction2(BulletConstraint constrain, Vector3 frict);
443
444public abstract bool HasAnisotripicFriction2(BulletConstraint constrain);
445
446public abstract void SetContactProcessingThreshold2(BulletBody obj, float val);
447
448public abstract float GetContactProcessingThreshold2(BulletBody obj);
449
450public abstract bool IsStaticObject2(BulletBody obj);
451
452public abstract bool IsKinematicObject2(BulletBody obj);
453
454public abstract bool IsStaticOrKinematicObject2(BulletBody obj);
455
456public abstract bool HasContactResponse2(BulletBody obj);
457
458public abstract void SetCollisionShape2(BulletWorld sim, BulletBody obj, BulletBody shape);
459
460public abstract BulletShape GetCollisionShape2(BulletBody obj);
461
462public abstract int GetActivationState2(BulletBody obj);
463
464public abstract void SetActivationState2(BulletBody obj, int state);
465
466public abstract void SetDeactivationTime2(BulletBody obj, float dtime);
467
468public abstract float GetDeactivationTime2(BulletBody obj);
469
470public abstract void ForceActivationState2(BulletBody obj, ActivationState state);
471
472public abstract void Activate2(BulletBody obj, bool forceActivation);
473
474public abstract bool IsActive2(BulletBody obj);
475
476public abstract void SetRestitution2(BulletBody obj, float val);
477
478public abstract float GetRestitution2(BulletBody obj);
479
480public abstract void SetFriction2(BulletBody obj, float val);
481
482public abstract float GetFriction2(BulletBody obj);
483
484 /* Haven't defined the type 'Transform'
485public abstract Transform GetWorldTransform2(BulletBody obj);
486
487public abstract void setWorldTransform2(BulletBody obj, Transform trans);
488 */
489
490public abstract Vector3 GetPosition2(BulletBody obj);
491
492public abstract Quaternion GetOrientation2(BulletBody obj);
493
494public abstract void SetTranslation2(BulletBody obj, Vector3 position, Quaternion rotation);
495
496public abstract IntPtr GetBroadphaseHandle2(BulletBody obj);
497
498public abstract void SetBroadphaseHandle2(BulletBody obj, IntPtr handle);
499
500 /*
501public abstract Transform GetInterpolationWorldTransform2(IntPtr obj);
502
503public abstract void SetInterpolationWorldTransform2(IntPtr obj, Transform trans);
504 */
505
506public abstract void SetInterpolationLinearVelocity2(BulletBody obj, Vector3 vel);
507
508public abstract void SetInterpolationAngularVelocity2(BulletBody obj, Vector3 vel);
509
510public abstract void SetInterpolationVelocity2(BulletBody obj, Vector3 linearVel, Vector3 angularVel);
511
512public abstract float GetHitFraction2(BulletBody obj);
513
514public abstract void SetHitFraction2(BulletBody obj, float val);
515
516public abstract CollisionFlags GetCollisionFlags2(BulletBody obj);
517
518public abstract CollisionFlags SetCollisionFlags2(BulletBody obj, CollisionFlags flags);
519
520public abstract CollisionFlags AddToCollisionFlags2(BulletBody obj, CollisionFlags flags);
521
522public abstract CollisionFlags RemoveFromCollisionFlags2(BulletBody obj, CollisionFlags flags);
523
524public abstract float GetCcdMotionThreshold2(BulletBody obj);
525
526public abstract void SetCcdMotionThreshold2(BulletBody obj, float val);
527
528public abstract float GetCcdSweptSphereRadius2(BulletBody obj);
529
530public abstract void SetCcdSweptSphereRadius2(BulletBody obj, float val);
531
532public abstract IntPtr GetUserPointer2(BulletBody obj);
533
534public abstract void SetUserPointer2(BulletBody obj, IntPtr val);
535
536// =====================================================================================
537// btRigidBody entries
538public abstract void ApplyGravity2(BulletBody obj);
539
540public abstract void SetGravity2(BulletBody obj, Vector3 val);
541
542public abstract Vector3 GetGravity2(BulletBody obj);
543
544public abstract void SetDamping2(BulletBody obj, float lin_damping, float ang_damping);
545
546public abstract void SetLinearDamping2(BulletBody obj, float lin_damping);
547
548public abstract void SetAngularDamping2(BulletBody obj, float ang_damping);
549
550public abstract float GetLinearDamping2(BulletBody obj);
551
552public abstract float GetAngularDamping2(BulletBody obj);
553
554public abstract float GetLinearSleepingThreshold2(BulletBody obj);
555
556
557public abstract void ApplyDamping2(BulletBody obj, float timeStep);
558
559public abstract void SetMassProps2(BulletBody obj, float mass, Vector3 inertia);
560
561public abstract Vector3 GetLinearFactor2(BulletBody obj);
562
563public abstract void SetLinearFactor2(BulletBody obj, Vector3 factor);
564
565 /*
566public abstract void SetCenterOfMassTransform2(BulletBody obj, Transform trans);
567 */
568
569public abstract void SetCenterOfMassByPosRot2(BulletBody obj, Vector3 pos, Quaternion rot);
570
571// Add a force to the object as if its mass is one.
572public abstract void ApplyCentralForce2(BulletBody obj, Vector3 force);
573
574// Set the force being applied to the object as if its mass is one.
575public abstract void SetObjectForce2(BulletBody obj, Vector3 force);
576
577public abstract Vector3 GetTotalForce2(BulletBody obj);
578
579public abstract Vector3 GetTotalTorque2(BulletBody obj);
580
581public abstract Vector3 GetInvInertiaDiagLocal2(BulletBody obj);
582
583public abstract void SetInvInertiaDiagLocal2(BulletBody obj, Vector3 inert);
584
585public abstract void SetSleepingThresholds2(BulletBody obj, float lin_threshold, float ang_threshold);
586
587public abstract void ApplyTorque2(BulletBody obj, Vector3 torque);
588
589// Apply force at the given point. Will add torque to the object.
590public abstract void ApplyForce2(BulletBody obj, Vector3 force, Vector3 pos);
591
592// Apply impulse to the object. Same as "ApplycentralForce" but force scaled by object's mass.
593public abstract void ApplyCentralImpulse2(BulletBody obj, Vector3 imp);
594
595// Apply impulse to the object's torque. Force is scaled by object's mass.
596public abstract void ApplyTorqueImpulse2(BulletBody obj, Vector3 imp);
597
598// Apply impulse at the point given. For is scaled by object's mass and effects both linear and angular forces.
599public abstract void ApplyImpulse2(BulletBody obj, Vector3 imp, Vector3 pos);
600
601public abstract void ClearForces2(BulletBody obj);
602
603public abstract void ClearAllForces2(BulletBody obj);
604
605public abstract void UpdateInertiaTensor2(BulletBody obj);
606
607
608 /*
609public abstract Transform GetCenterOfMassTransform2(BulletBody obj);
610 */
611
612public abstract Vector3 GetLinearVelocity2(BulletBody obj);
613
614public abstract Vector3 GetAngularVelocity2(BulletBody obj);
615
616public abstract void SetLinearVelocity2(BulletBody obj, Vector3 val);
617
618public abstract void SetAngularVelocity2(BulletBody obj, Vector3 angularVelocity);
619
620public abstract Vector3 GetVelocityInLocalPoint2(BulletBody obj, Vector3 pos);
621
622public abstract void Translate2(BulletBody obj, Vector3 trans);
623
624public abstract void UpdateDeactivation2(BulletBody obj, float timeStep);
625
626public abstract bool WantsSleeping2(BulletBody obj);
627
628public abstract void SetAngularFactor2(BulletBody obj, float factor);
629
630public abstract void SetAngularFactorV2(BulletBody obj, Vector3 factor);
631
632public abstract Vector3 GetAngularFactor2(BulletBody obj);
633
634public abstract bool IsInWorld2(BulletBody obj);
635
636public abstract void AddConstraintRef2(BulletBody obj, BulletConstraint constrain);
637
638public abstract void RemoveConstraintRef2(BulletBody obj, BulletConstraint constrain);
639
640public abstract BulletConstraint GetConstraintRef2(BulletBody obj, int index);
641
642public abstract int GetNumConstraintRefs2(BulletBody obj);
643
644public abstract bool SetCollisionGroupMask2(BulletBody body, uint filter, uint mask);
645
646// =====================================================================================
647// btCollisionShape entries
648
649public abstract float GetAngularMotionDisc2(BulletShape shape);
650
651public abstract float GetContactBreakingThreshold2(BulletShape shape, float defaultFactor);
652
653public abstract bool IsPolyhedral2(BulletShape shape);
654
655public abstract bool IsConvex2d2(BulletShape shape);
656
657public abstract bool IsConvex2(BulletShape shape);
658
659public abstract bool IsNonMoving2(BulletShape shape);
660
661public abstract bool IsConcave2(BulletShape shape);
662
663public abstract bool IsCompound2(BulletShape shape);
664
665public abstract bool IsSoftBody2(BulletShape shape);
666
667public abstract bool IsInfinite2(BulletShape shape);
668
669public abstract void SetLocalScaling2(BulletShape shape, Vector3 scale);
670
671public abstract Vector3 GetLocalScaling2(BulletShape shape);
672
673public abstract Vector3 CalculateLocalInertia2(BulletShape shape, float mass);
674
675public abstract int GetShapeType2(BulletShape shape);
676
677public abstract void SetMargin2(BulletShape shape, float val);
678
679public abstract float GetMargin2(BulletShape shape);
680
681};
682
291// =============================================================================== 683// ===============================================================================
292static class BulletSimAPI { 684static class BulletSimAPI {
293// =============================================================================== 685// ===============================================================================
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs
index 662177f..36d38d4 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs
@@ -35,9 +35,9 @@ namespace OpenSim.Region.Physics.BulletSPlugin
35// These hold pointers to allocated objects in the unmanaged space. 35// These hold pointers to allocated objects in the unmanaged space.
36 36
37// The physics engine controller class created at initialization 37// The physics engine controller class created at initialization
38public struct BulletSim 38public struct BulletWorld
39{ 39{
40 public BulletSim(uint worldId, BSScene bss, IntPtr xx) 40 public BulletWorld(uint worldId, BSScene bss, IntPtr xx)
41 { 41 {
42 ptr = xx; 42 ptr = xx;
43 worldID = worldId; 43 worldID = worldId;
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt b/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt
index 0f27d67..35cb8f3 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt
@@ -146,6 +146,13 @@ Is there are more efficient method of implementing pre and post step actions?
146 See http://www.codeproject.com/Articles/29922/Weak-Events-in-C 146 See http://www.codeproject.com/Articles/29922/Weak-Events-in-C
147 147
148Physics Arena central pyramid: why is one side permiable? 148Physics Arena central pyramid: why is one side permiable?
149Enforce physical parameter min/max:
150 Gravity: [-1, 28]
151 Friction: [0, 255]
152 Density: [1, 22587]
153 Restitution [0, 1]
154 http://wiki.secondlife.com/wiki/Physics_Material_Settings_test
155Avatar attachments have no mass? http://forums-archive.secondlife.com/54/f0/31796/1.html
149 156
150INTERNAL IMPROVEMENT/CLEANUP 157INTERNAL IMPROVEMENT/CLEANUP
151================================================= 158=================================================