BulletSim: move over and port the interface for BulletXNA.

Copied BulletSNPlugin.BulletSimAPI to a new
BulletSPlugin.BSAPIXNA.cs and then modifyed the latter to
comply with the BSAPITemplate definition. Not totally debugged
but the code is all there for an INI variable to select either
unmanaged C++ Bullet or the C# version of Bullet.
This commit is contained in:
Robert Adams
2013-01-01 16:49:38 -08:00
parent 0662d109c2
commit 9d840fd2ee
7 changed files with 628 additions and 320 deletions

View File

@@ -141,7 +141,7 @@ public sealed class BSShapeCollection : IDisposable
if (DDetail) DetailLog("{0},BSShapeCollection.ReferenceBody,newBody,body={1}", body.ID, body);
PhysicsScene.TaintedObject(inTaintTime, "BSShapeCollection.ReferenceBody", delegate()
{
if (!PhysicsScene.PE.IsInWorld(body))
if (!PhysicsScene.PE.IsInWorld(PhysicsScene.World, body))
{
PhysicsScene.PE.AddObjectToWorld(PhysicsScene.World, body);
if (DDetail) DetailLog("{0},BSShapeCollection.ReferenceBody,addedToWorld,ref={1}", body.ID, body);
@@ -166,7 +166,7 @@ public sealed class BSShapeCollection : IDisposable
// If the caller needs to know the old body is going away, pass the event up.
if (bodyCallback != null) bodyCallback(body);
if (PhysicsScene.PE.IsInWorld(body))
if (PhysicsScene.PE.IsInWorld(PhysicsScene.World, body))
{
PhysicsScene.PE.RemoveObjectFromWorld(PhysicsScene.World, body);
if (DDetail) DetailLog("{0},BSShapeCollection.DereferenceBody,removingFromWorld. Body={1}", body.ID, body);