diff options
author | Robert Adams | 2012-12-30 10:37:37 -0800 |
---|---|---|
committer | Robert Adams | 2012-12-31 19:57:22 -0800 |
commit | 5379d6d112a8027c8f0f62ba77303e8b69e24332 (patch) | |
tree | 5c8200326768218d59745da8cb6aab658ad6b311 /OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs | |
parent | BulletSim: another round of conversion: dynamics world and collision object f... (diff) | |
download | opensim-SC_OLD-5379d6d112a8027c8f0f62ba77303e8b69e24332.zip opensim-SC_OLD-5379d6d112a8027c8f0f62ba77303e8b69e24332.tar.gz opensim-SC_OLD-5379d6d112a8027c8f0f62ba77303e8b69e24332.tar.bz2 opensim-SC_OLD-5379d6d112a8027c8f0f62ba77303e8b69e24332.tar.xz |
BulletSim: remove all the debug printing of pointer formatting (.ToString(X)) and replace it with a method on BulletBody, BulletShape, ...
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs index cd5d170..c10d75e 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs | |||
@@ -82,13 +82,22 @@ public class BulletBody | |||
82 | BulletSimData.CollisionTypeMasks[collisionType].mask); | 82 | BulletSimData.CollisionTypeMasks[collisionType].mask); |
83 | } | 83 | } |
84 | 84 | ||
85 | // Used for log messages for a unique display of the memory/object allocated to this instance | ||
86 | public string AddrString | ||
87 | { | ||
88 | get | ||
89 | { | ||
90 | return ptr.ToString("X"); | ||
91 | } | ||
92 | } | ||
93 | |||
85 | public override string ToString() | 94 | public override string ToString() |
86 | { | 95 | { |
87 | StringBuilder buff = new StringBuilder(); | 96 | StringBuilder buff = new StringBuilder(); |
88 | buff.Append("<id="); | 97 | buff.Append("<id="); |
89 | buff.Append(ID.ToString()); | 98 | buff.Append(ID.ToString()); |
90 | buff.Append(",p="); | 99 | buff.Append(",p="); |
91 | buff.Append(ptr.ToString("X")); | 100 | buff.Append(AddrString); |
92 | buff.Append(",c="); | 101 | buff.Append(",c="); |
93 | buff.Append(collisionType); | 102 | buff.Append(collisionType); |
94 | buff.Append(">"); | 103 | buff.Append(">"); |
@@ -124,11 +133,20 @@ public class BulletShape | |||
124 | } | 133 | } |
125 | public bool HasPhysicalShape { get { return ptr != IntPtr.Zero; } } | 134 | public bool HasPhysicalShape { get { return ptr != IntPtr.Zero; } } |
126 | 135 | ||
136 | // Used for log messages for a unique display of the memory/object allocated to this instance | ||
137 | public string AddrString | ||
138 | { | ||
139 | get | ||
140 | { | ||
141 | return ptr.ToString("X"); | ||
142 | } | ||
143 | } | ||
144 | |||
127 | public override string ToString() | 145 | public override string ToString() |
128 | { | 146 | { |
129 | StringBuilder buff = new StringBuilder(); | 147 | StringBuilder buff = new StringBuilder(); |
130 | buff.Append("<p="); | 148 | buff.Append("<p="); |
131 | buff.Append(ptr.ToString("X")); | 149 | buff.Append(AddrString); |
132 | buff.Append(",s="); | 150 | buff.Append(",s="); |
133 | buff.Append(type.ToString()); | 151 | buff.Append(type.ToString()); |
134 | buff.Append(",k="); | 152 | buff.Append(",k="); |
@@ -154,6 +172,15 @@ public class BulletConstraint | |||
154 | ptr = IntPtr.Zero; | 172 | ptr = IntPtr.Zero; |
155 | } | 173 | } |
156 | public bool HasPhysicalConstraint { get { return ptr != IntPtr.Zero; } } | 174 | public bool HasPhysicalConstraint { get { return ptr != IntPtr.Zero; } } |
175 | |||
176 | // Used for log messages for a unique display of the memory/object allocated to this instance | ||
177 | public string AddrString | ||
178 | { | ||
179 | get | ||
180 | { | ||
181 | return ptr.ToString("X"); | ||
182 | } | ||
183 | } | ||
157 | } | 184 | } |
158 | 185 | ||
159 | // An allocated HeightMapThing which holds various heightmap info. | 186 | // An allocated HeightMapThing which holds various heightmap info. |