aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs
diff options
context:
space:
mode:
authorRobert Adams2013-07-22 12:09:17 -0700
committerRobert Adams2013-07-22 12:09:17 -0700
commitc45659863d8821a48a32e5b687c7b2a6d90b0300 (patch)
treeab9dcd8912dd1b339e70e6de22784d1db90fb9f3 /OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs
parentRevert "BulletSim: only create vehicle prim actor when vehicles are enabled." (diff)
downloadopensim-SC-c45659863d8821a48a32e5b687c7b2a6d90b0300.zip
opensim-SC-c45659863d8821a48a32e5b687c7b2a6d90b0300.tar.gz
opensim-SC-c45659863d8821a48a32e5b687c7b2a6d90b0300.tar.bz2
opensim-SC-c45659863d8821a48a32e5b687c7b2a6d90b0300.tar.xz
Revert "BulletSim: move collision processing for linksets from BSPrimLinkable"
The changes don't seem to be ready for prime time. This reverts commit b4c3a791aa55390bff071b3fe4bbe70c1d252703.
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs32
1 files changed, 7 insertions, 25 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs
index 2f392da..1fbcfcc 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs
@@ -200,38 +200,20 @@ public class BSPrimLinkable : BSPrimDisplaced
200 } 200 }
201 201
202 // Called after a simulation step to post a collision with this object. 202 // Called after a simulation step to post a collision with this object.
203 // This returns 'true' if the collision has been queued and the SendCollisions call must
204 // be made at the end of the simulation step.
205 public override bool Collide(uint collidingWith, BSPhysObject collidee, 203 public override bool Collide(uint collidingWith, BSPhysObject collidee,
206 OMV.Vector3 contactPoint, OMV.Vector3 contactNormal, float pentrationDepth) 204 OMV.Vector3 contactPoint, OMV.Vector3 contactNormal, float pentrationDepth)
207 { 205 {
208 bool ret = false; 206 // prims in the same linkset cannot collide with each other
209 // Ask the linkset if it wants to handle the collision 207 BSPrimLinkable convCollidee = collidee as BSPrimLinkable;
210 if (!Linkset.HandleCollide(collidingWith, collidee, contactPoint, contactNormal, pentrationDepth)) 208 if (convCollidee != null && (this.Linkset.LinksetID == convCollidee.Linkset.LinksetID))
211 { 209 {
212 // The linkset didn't handle it so pass the collision through normal processing 210 return false;
213 ret = base.Collide(collidingWith, collidee, contactPoint, contactNormal, pentrationDepth);
214 } 211 }
215 return ret;
216 }
217 212
218 // A linkset reports any collision on any part of the linkset. 213 // TODO: handle collisions of other objects with with children of linkset.
219 public long SomeCollisionSimulationStep = 0; 214 // This is a problem for LinksetCompound since the children are packed into the root.
220 public override bool HasSomeCollision
221 {
222 get
223 {
224 return (SomeCollisionSimulationStep == PhysScene.SimulationStep) || base.IsColliding;
225 }
226 set
227 {
228 if (value)
229 SomeCollisionSimulationStep = PhysScene.SimulationStep;
230 else
231 SomeCollisionSimulationStep = 0;
232 215
233 base.HasSomeCollision = value; 216 return base.Collide(collidingWith, collidee, contactPoint, contactNormal, pentrationDepth);
234 }
235 } 217 }
236} 218}
237} 219}