aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs27
1 files changed, 11 insertions, 16 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
index 19ce62b..bd03d31 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
@@ -131,10 +131,10 @@ public sealed class BSLinksetCompound : BSLinkset
131 { 131 {
132 // The origional prims are removed from the world as the shape of the root compound 132 // The origional prims are removed from the world as the shape of the root compound
133 // shape takes over. 133 // shape takes over.
134 BulletSimAPI.AddToCollisionFlags2(child.PhysBody.ptr, CollisionFlags.CF_NO_CONTACT_RESPONSE); 134 PhysicsScene.PE.AddToCollisionFlags(child.PhysBody, CollisionFlags.CF_NO_CONTACT_RESPONSE);
135 BulletSimAPI.ForceActivationState2(child.PhysBody.ptr, ActivationState.DISABLE_SIMULATION); 135 PhysicsScene.PE.ForceActivationState(child.PhysBody, ActivationState.DISABLE_SIMULATION);
136 // We don't want collisions from the old linkset children. 136 // We don't want collisions from the old linkset children.
137 BulletSimAPI.RemoveFromCollisionFlags2(child.PhysBody.ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS); 137 PhysicsScene.PE.RemoveFromCollisionFlags(child.PhysBody, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS);
138 138
139 child.PhysBody.collisionType = CollisionType.LinksetChild; 139 child.PhysBody.collisionType = CollisionType.LinksetChild;
140 140
@@ -159,12 +159,12 @@ public sealed class BSLinksetCompound : BSLinkset
159 else 159 else
160 { 160 {
161 // The non-physical children can come back to life. 161 // The non-physical children can come back to life.
162 BulletSimAPI.RemoveFromCollisionFlags2(child.PhysBody.ptr, CollisionFlags.CF_NO_CONTACT_RESPONSE); 162 PhysicsScene.PE.RemoveFromCollisionFlags(child.PhysBody, CollisionFlags.CF_NO_CONTACT_RESPONSE);
163 163
164 child.PhysBody.collisionType = CollisionType.LinksetChild; 164 child.PhysBody.collisionType = CollisionType.LinksetChild;
165 165
166 // Don't force activation so setting of DISABLE_SIMULATION can stay if used. 166 // Don't force activation so setting of DISABLE_SIMULATION can stay if used.
167 BulletSimAPI.Activate2(child.PhysBody.ptr, false); 167 PhysicsScene.PE.Activate(child.PhysBody, false);
168 ret = true; 168 ret = true;
169 } 169 }
170 return ret; 170 return ret;
@@ -196,7 +196,7 @@ public sealed class BSLinksetCompound : BSLinkset
196 bool ret = false; 196 bool ret = false;
197 197
198 DetailLog("{0},BSLinksetCompound.RemoveBodyDependencies,refreshIfChild,rID={1},rBody={2},isRoot={3}", 198 DetailLog("{0},BSLinksetCompound.RemoveBodyDependencies,refreshIfChild,rID={1},rBody={2},isRoot={3}",
199 child.LocalID, LinksetRoot.LocalID, LinksetRoot.PhysBody.ptr.ToString("X"), IsRoot(child)); 199 child.LocalID, LinksetRoot.LocalID, LinksetRoot.PhysBody.AddrString, IsRoot(child));
200 200
201 if (!IsRoot(child)) 201 if (!IsRoot(child))
202 { 202 {
@@ -280,8 +280,8 @@ public sealed class BSLinksetCompound : BSLinkset
280 { 280 {
281 DetailLog("{0},BSLinksetCompound.RemoveChildFromLinkset,call,rID={1},rBody={2},cID={3},cBody={4}", 281 DetailLog("{0},BSLinksetCompound.RemoveChildFromLinkset,call,rID={1},rBody={2},cID={3},cBody={4}",
282 child.LocalID, 282 child.LocalID,
283 LinksetRoot.LocalID, LinksetRoot.PhysBody.ptr.ToString("X"), 283 LinksetRoot.LocalID, LinksetRoot.PhysBody.AddrString,
284 child.LocalID, child.PhysBody.ptr.ToString("X")); 284 child.LocalID, child.PhysBody.AddrString);
285 285
286 // Cause the child's body to be rebuilt and thus restored to normal operation 286 // Cause the child's body to be rebuilt and thus restored to normal operation
287 RecomputeChildWorldPosition(child, false); 287 RecomputeChildWorldPosition(child, false);
@@ -359,7 +359,7 @@ public sealed class BSLinksetCompound : BSLinkset
359 PhysicsScene.Shapes.CreateGeomMeshOrHull(cPrim, null); 359 PhysicsScene.Shapes.CreateGeomMeshOrHull(cPrim, null);
360 BulletShape newShape = cPrim.PhysShape; 360 BulletShape newShape = cPrim.PhysShape;
361 cPrim.PhysShape = saveShape; 361 cPrim.PhysShape = saveShape;
362 BulletSimAPI.AddChildShapeToCompoundShape2(LinksetRoot.PhysShape.ptr, newShape.ptr, lci.OffsetPos, lci.OffsetRot); 362 PhysicsScene.PE.AddChildShapeToCompoundShape(LinksetRoot.PhysShape, newShape, lci.OffsetPos, lci.OffsetRot);
363 } 363 }
364 else 364 else
365 { 365 {
@@ -371,7 +371,7 @@ public sealed class BSLinksetCompound : BSLinkset
371 PhysicsScene.Logger.ErrorFormat("{0} Rebuilt sharable shape when building linkset! Region={1}, primID={2}, shape={3}", 371 PhysicsScene.Logger.ErrorFormat("{0} Rebuilt sharable shape when building linkset! Region={1}, primID={2}, shape={3}",
372 LogHeader, PhysicsScene.RegionName, cPrim.LocalID, cPrim.PhysShape); 372 LogHeader, PhysicsScene.RegionName, cPrim.LocalID, cPrim.PhysShape);
373 } 373 }
374 BulletSimAPI.AddChildShapeToCompoundShape2(LinksetRoot.PhysShape.ptr, cPrim.PhysShape.ptr, lci.OffsetPos, lci.OffsetRot); 374 PhysicsScene.PE.AddChildShapeToCompoundShape(LinksetRoot.PhysShape, cPrim.PhysShape, lci.OffsetPos, lci.OffsetRot);
375 } 375 }
376 } 376 }
377 return false; // 'false' says to move onto the next child in the list 377 return false; // 'false' says to move onto the next child in the list
@@ -386,12 +386,7 @@ public sealed class BSLinksetCompound : BSLinkset
386 Rebuilding = false; 386 Rebuilding = false;
387 } 387 }
388 388
389 BulletSimAPI.RecalculateCompoundShapeLocalAabb2(LinksetRoot.PhysShape.ptr); 389 PhysicsScene.PE.RecalculateCompoundShapeLocalAabb(LinksetRoot.PhysShape);
390
391 // DEBUG: see of inter-linkset collisions are causing problems for constraint linksets.
392 // BulletSimAPI.SetCollisionFilterMask2(LinksetRoot.BSBody.ptr,
393 // (uint)CollisionFilterGroups.LinksetFilter, (uint)CollisionFilterGroups.LinksetMask);
394
395 } 390 }
396} 391}
397} \ No newline at end of file 392} \ No newline at end of file