From 203588e3c0374505a6aa564d8f7a655d968653d7 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sat, 29 Dec 2012 18:34:46 -0800 Subject: BulletSim: change physical data structures to classes. Add default instantiations for PhysBody and PhysShape when BSPhysObject is created to account for them being classes and not structures. Update TODO list. --- OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs index 5ad6746..cd5d170 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs @@ -35,7 +35,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin // These hold pointers to allocated objects in the unmanaged space. // The physics engine controller class created at initialization -public struct BulletWorld +public class BulletWorld { public BulletWorld(uint worldId, BSScene bss, IntPtr xx) { @@ -50,7 +50,7 @@ public struct BulletWorld } // An allocated Bullet btRigidBody -public struct BulletBody +public class BulletBody { public BulletBody(uint id) : this(id, IntPtr.Zero) { @@ -96,9 +96,14 @@ public struct BulletBody } } -public struct BulletShape +public class BulletShape { - public BulletShape(IntPtr xx) : this(xx, BSPhysicsShapeType.SHAPE_UNKNOWN) + public BulletShape() + : this(IntPtr.Zero, BSPhysicsShapeType.SHAPE_UNKNOWN) + { + } + public BulletShape(IntPtr xx) + : this(xx, BSPhysicsShapeType.SHAPE_UNKNOWN) { } public BulletShape(IntPtr xx, BSPhysicsShapeType typ) @@ -136,7 +141,7 @@ public struct BulletShape } // An allocated Bullet btConstraint -public struct BulletConstraint +public class BulletConstraint { public BulletConstraint(IntPtr xx) { -- cgit v1.1