aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
index 2671995..1559025 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
@@ -53,6 +53,9 @@ public struct BulletSim
53// An allocated Bullet btRigidBody 53// An allocated Bullet btRigidBody
54public struct BulletBody 54public struct BulletBody
55{ 55{
56 public BulletBody(uint id) : this(id, IntPtr.Zero)
57 {
58 }
56 public BulletBody(uint id, IntPtr xx) 59 public BulletBody(uint id, IntPtr xx)
57 { 60 {
58 ID = id; 61 ID = id;
@@ -64,6 +67,13 @@ public struct BulletBody
64 public uint ID; 67 public uint ID;
65 public CollisionFilterGroups collisionGroup; 68 public CollisionFilterGroups collisionGroup;
66 public CollisionFilterGroups collisionMask; 69 public CollisionFilterGroups collisionMask;
70
71 public void Clear()
72 {
73 ptr = IntPtr.Zero;
74 }
75 public bool HasPhysicalBody { get { return ptr != IntPtr.Zero; } }
76
67 public override string ToString() 77 public override string ToString()
68 { 78 {
69 StringBuilder buff = new StringBuilder(); 79 StringBuilder buff = new StringBuilder();
@@ -103,6 +113,13 @@ public struct BulletShape
103 public BSPhysicsShapeType type; 113 public BSPhysicsShapeType type;
104 public System.UInt64 shapeKey; 114 public System.UInt64 shapeKey;
105 public bool isNativeShape; 115 public bool isNativeShape;
116
117 public void Clear()
118 {
119 ptr = IntPtr.Zero;
120 }
121 public bool HasPhysicalShape { get { return ptr != IntPtr.Zero; } }
122
106 public override string ToString() 123 public override string ToString()
107 { 124 {
108 StringBuilder buff = new StringBuilder(); 125 StringBuilder buff = new StringBuilder();
@@ -140,6 +157,12 @@ public struct BulletConstraint
140 ptr = xx; 157 ptr = xx;
141 } 158 }
142 public IntPtr ptr; 159 public IntPtr ptr;
160
161 public void Clear()
162 {
163 ptr = IntPtr.Zero;
164 }
165 public bool HasPhysicalConstraint { get { return ptr != IntPtr.Zero; } }
143} 166}
144 167
145// An allocated HeightMapThing which holds various heightmap info. 168// An allocated HeightMapThing which holds various heightmap info.