aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs10
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs2
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs10
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs10
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs6
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs10
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs4
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs20
8 files changed, 36 insertions, 36 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index 623ac8f..07dd613 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -165,7 +165,7 @@ public class BSCharacter : BSPhysObject
165 165
166 // Do this after the object has been added to the world 166 // Do this after the object has been added to the world
167 BulletSimAPI.SetCollisionFilterMask2(BSBody.ptr, 167 BulletSimAPI.SetCollisionFilterMask2(BSBody.ptr,
168 (uint)CollisionFilterGroups.AvatarFilter, 168 (uint)CollisionFilterGroups.AvatarFilter,
169 (uint)CollisionFilterGroups.AvatarMask); 169 (uint)CollisionFilterGroups.AvatarMask);
170 } 170 }
171 171
@@ -269,7 +269,7 @@ public class BSCharacter : BSPhysObject
269 private bool PositionSanityCheck() 269 private bool PositionSanityCheck()
270 { 270 {
271 bool ret = false; 271 bool ret = false;
272 272
273 // If below the ground, move the avatar up 273 // If below the ground, move the avatar up
274 float terrainHeight = PhysicsScene.TerrainManager.GetTerrainHeightAtXYZ(_position); 274 float terrainHeight = PhysicsScene.TerrainManager.GetTerrainHeightAtXYZ(_position);
275 if (Position.Z < terrainHeight) 275 if (Position.Z < terrainHeight)
@@ -413,7 +413,7 @@ public class BSCharacter : BSPhysObject
413 }); 413 });
414 } 414 }
415 } 415 }
416 // Go directly to Bullet to get/set the value. 416 // Go directly to Bullet to get/set the value.
417 public override OMV.Quaternion ForceOrientation 417 public override OMV.Quaternion ForceOrientation
418 { 418 {
419 get 419 get
@@ -478,7 +478,7 @@ public class BSCharacter : BSPhysObject
478 set { _collidingObj = value; } 478 set { _collidingObj = value; }
479 } 479 }
480 public override bool FloatOnWater { 480 public override bool FloatOnWater {
481 set { 481 set {
482 _floatOnWater = value; 482 _floatOnWater = value;
483 PhysicsScene.TaintedObject("BSCharacter.setFloatOnWater", delegate() 483 PhysicsScene.TaintedObject("BSCharacter.setFloatOnWater", delegate()
484 { 484 {
@@ -588,7 +588,7 @@ public class BSCharacter : BSPhysObject
588 newScale.X = PhysicsScene.Params.avatarCapsuleRadius; 588 newScale.X = PhysicsScene.Params.avatarCapsuleRadius;
589 newScale.Y = PhysicsScene.Params.avatarCapsuleRadius; 589 newScale.Y = PhysicsScene.Params.avatarCapsuleRadius;
590 590
591 // From the total height, remote the capsule half spheres that are at each end 591 // From the total height, remote the capsule half spheres that are at each end
592 newScale.Z = (size.Z * 2f) - Math.Min(newScale.X, newScale.Y); 592 newScale.Z = (size.Z * 2f) - Math.Min(newScale.X, newScale.Y);
593 // newScale.Z = (size.Z * 2f); 593 // newScale.Z = (size.Z * 2f);
594 Scale = newScale; 594 Scale = newScale;
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
index a20be3a..b58745a 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
@@ -53,7 +53,7 @@ public abstract class BSConstraint : IDisposable
53 { 53 {
54 bool success = BulletSimAPI.DestroyConstraint2(m_world.ptr, m_constraint.ptr); 54 bool success = BulletSimAPI.DestroyConstraint2(m_world.ptr, m_constraint.ptr);
55 m_world.physicsScene.DetailLog("{0},BSConstraint.Dispose,taint,id1={1},body1={2},id2={3},body2={4},success={5}", 55 m_world.physicsScene.DetailLog("{0},BSConstraint.Dispose,taint,id1={1},body1={2},id2={3},body2={4},success={5}",
56 BSScene.DetailLogZero, 56 BSScene.DetailLogZero,
57 m_body1.ID, m_body1.ptr.ToString("X"), 57 m_body1.ID, m_body1.ptr.ToString("X"),
58 m_body2.ID, m_body2.ptr.ToString("X"), 58 m_body2.ID, m_body2.ptr.ToString("X"),
59 success); 59 success);
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
index 56342b8..f71f3b0 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
@@ -23,7 +23,7 @@
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 *
27 27
28/* RA: June 14, 2011. Copied from ODEDynamics.cs and converted to 28/* RA: June 14, 2011. Copied from ODEDynamics.cs and converted to
29 * call the BulletSim system. 29 * call the BulletSim system.
@@ -352,7 +352,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
352 // m_bankingMix = 1; 352 // m_bankingMix = 1;
353 // m_bankingTimescale = 1; 353 // m_bankingTimescale = 1;
354 // m_referenceFrame = Quaternion.Identity; 354 // m_referenceFrame = Quaternion.Identity;
355 m_flags |= (VehicleFlag.NO_DEFLECTION_UP 355 m_flags |= (VehicleFlag.NO_DEFLECTION_UP
356 | VehicleFlag.LIMIT_ROLL_ONLY 356 | VehicleFlag.LIMIT_ROLL_ONLY
357 | VehicleFlag.LIMIT_MOTOR_UP); 357 | VehicleFlag.LIMIT_MOTOR_UP);
358 m_flags &= ~(VehicleFlag.HOVER_WATER_ONLY | VehicleFlag.HOVER_TERRAIN_ONLY | VehicleFlag.HOVER_GLOBAL_HEIGHT); 358 m_flags &= ~(VehicleFlag.HOVER_WATER_ONLY | VehicleFlag.HOVER_TERRAIN_ONLY | VehicleFlag.HOVER_GLOBAL_HEIGHT);
@@ -382,7 +382,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
382 // m_bankingTimescale = 1; 382 // m_bankingTimescale = 1;
383 // m_referenceFrame = Quaternion.Identity; 383 // m_referenceFrame = Quaternion.Identity;
384 m_flags &= ~(VehicleFlag.HOVER_TERRAIN_ONLY 384 m_flags &= ~(VehicleFlag.HOVER_TERRAIN_ONLY
385 | VehicleFlag.HOVER_GLOBAL_HEIGHT 385 | VehicleFlag.HOVER_GLOBAL_HEIGHT
386 | VehicleFlag.LIMIT_ROLL_ONLY 386 | VehicleFlag.LIMIT_ROLL_ONLY
387 | VehicleFlag.HOVER_UP_ONLY); 387 | VehicleFlag.HOVER_UP_ONLY);
388 m_flags |= (VehicleFlag.NO_DEFLECTION_UP 388 m_flags |= (VehicleFlag.NO_DEFLECTION_UP
@@ -458,7 +458,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
458 // Do any updating needed for a vehicle 458 // Do any updating needed for a vehicle
459 public void Refresh() 459 public void Refresh()
460 { 460 {
461 if (!IsActive) 461 if (!IsActive)
462 return; 462 return;
463 463
464 // Set the prim's inertia to zero. The vehicle code handles that and this 464 // Set the prim's inertia to zero. The vehicle code handles that and this
@@ -791,7 +791,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
791 791
792 // Sum velocities 792 // Sum velocities
793 m_lastAngularVelocity = m_angularMotorVelocity + vertattr; // + bank + deflection 793 m_lastAngularVelocity = m_angularMotorVelocity + vertattr; // + bank + deflection
794 794
795 if ((m_flags & (VehicleFlag.NO_DEFLECTION_UP)) != 0) 795 if ((m_flags & (VehicleFlag.NO_DEFLECTION_UP)) != 0)
796 { 796 {
797 m_lastAngularVelocity.X = 0; 797 m_lastAngularVelocity.X = 0;
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
index ee53d92..8eeeb73 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
@@ -54,7 +54,7 @@ public class BSLinksetConstraints : BSLinkset
54 BSScene.TaintCallback refreshOperation = delegate() 54 BSScene.TaintCallback refreshOperation = delegate()
55 { 55 {
56 RecomputeLinksetConstraintVariables(); 56 RecomputeLinksetConstraintVariables();
57 DetailLog("{0},BSLinkset.Refresh,complete,rBody={1}", 57 DetailLog("{0},BSLinkset.Refresh,complete,rBody={1}",
58 LinksetRoot.LocalID, LinksetRoot.BSBody.ptr.ToString("X")); 58 LinksetRoot.LocalID, LinksetRoot.BSBody.ptr.ToString("X"));
59 }; 59 };
60 if (inTaintTime) 60 if (inTaintTime)
@@ -179,7 +179,7 @@ public class BSLinksetConstraints : BSLinkset
179 179
180 PhysicsScene.TaintedObject("AddChildToLinkset", delegate() 180 PhysicsScene.TaintedObject("AddChildToLinkset", delegate()
181 { 181 {
182 DetailLog("{0},AddChildToLinkset,taint,rID={1},rBody={2},cID={3},cBody={4}", 182 DetailLog("{0},AddChildToLinkset,taint,rID={1},rBody={2},cID={3},cBody={4}",
183 rootx.LocalID, 183 rootx.LocalID,
184 rootx.LocalID, rootx.BSBody.ptr.ToString("X"), 184 rootx.LocalID, rootx.BSBody.ptr.ToString("X"),
185 childx.LocalID, childx.BSBody.ptr.ToString("X")); 185 childx.LocalID, childx.BSBody.ptr.ToString("X"));
@@ -213,7 +213,7 @@ public class BSLinksetConstraints : BSLinkset
213 BSPhysObject rootx = LinksetRoot; // capture the root and body as of now 213 BSPhysObject rootx = LinksetRoot; // capture the root and body as of now
214 BSPhysObject childx = child; 214 BSPhysObject childx = child;
215 215
216 DetailLog("{0},RemoveChildFromLinkset,call,rID={1},rBody={2},cID={3},cBody={4}", 216 DetailLog("{0},RemoveChildFromLinkset,call,rID={1},rBody={2},cID={3},cBody={4}",
217 childx.LocalID, 217 childx.LocalID,
218 rootx.LocalID, rootx.BSBody.ptr.ToString("X"), 218 rootx.LocalID, rootx.BSBody.ptr.ToString("X"),
219 childx.LocalID, childx.BSBody.ptr.ToString("X")); 219 childx.LocalID, childx.BSBody.ptr.ToString("X"));
@@ -378,13 +378,13 @@ public class BSLinksetConstraints : BSLinkset
378 { 378 {
379 // If this is a multiple object linkset, set everybody's center of mass to the set's center of mass 379 // If this is a multiple object linkset, set everybody's center of mass to the set's center of mass
380 OMV.Vector3 centerOfMass = ComputeLinksetCenterOfMass(); 380 OMV.Vector3 centerOfMass = ComputeLinksetCenterOfMass();
381 BulletSimAPI.SetCenterOfMassByPosRot2(LinksetRoot.BSBody.ptr, 381 BulletSimAPI.SetCenterOfMassByPosRot2(LinksetRoot.BSBody.ptr,
382 centerOfMass, OMV.Quaternion.Identity); 382 centerOfMass, OMV.Quaternion.Identity);
383 DetailLog("{0},BSLinkset.RecomputeLinksetConstraintVariables,setCenterOfMass,COM={1},rBody={2}", 383 DetailLog("{0},BSLinkset.RecomputeLinksetConstraintVariables,setCenterOfMass,COM={1},rBody={2}",
384 LinksetRoot.LocalID, centerOfMass, LinksetRoot.BSBody.ptr.ToString("X")); 384 LinksetRoot.LocalID, centerOfMass, LinksetRoot.BSBody.ptr.ToString("X"));
385 foreach (BSPhysObject child in m_taintChildren) 385 foreach (BSPhysObject child in m_taintChildren)
386 { 386 {
387 BulletSimAPI.SetCenterOfMassByPosRot2(child.BSBody.ptr, 387 BulletSimAPI.SetCenterOfMassByPosRot2(child.BSBody.ptr,
388 centerOfMass, OMV.Quaternion.Identity); 388 centerOfMass, OMV.Quaternion.Identity);
389 } 389 }
390 390
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
index 51b9196..538f905 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
@@ -78,7 +78,7 @@ public abstract class BSPhysObject : PhysicsActor
78 public PrimitiveBaseShape BaseShape { get; protected set; } 78 public PrimitiveBaseShape BaseShape { get; protected set; }
79 79
80 // When the physical properties are updated, an EntityProperty holds the update values. 80 // When the physical properties are updated, an EntityProperty holds the update values.
81 // Keep the current and last EntityProperties to enable computation of differences 81 // Keep the current and last EntityProperties to enable computation of differences
82 // between the current update and the previous values. 82 // between the current update and the previous values.
83 public EntityProperties CurrentEntityProperties { get; set; } 83 public EntityProperties CurrentEntityProperties { get; set; }
84 public EntityProperties LastEntityProperties { get; set; } 84 public EntityProperties LastEntityProperties { get; set; }
@@ -213,7 +213,7 @@ public abstract class BSPhysObject : PhysicsActor
213 UnSubscribeEvents(); 213 UnSubscribeEvents();
214 } 214 }
215 } 215 }
216 public override void UnSubscribeEvents() { 216 public override void UnSubscribeEvents() {
217 // DetailLog("{0},{1}.UnSubscribeEvents,unsubscribing", LocalID, TypeName); 217 // DetailLog("{0},{1}.UnSubscribeEvents,unsubscribing", LocalID, TypeName);
218 SubscribedEventsMs = 0; 218 SubscribedEventsMs = 0;
219 PhysicsScene.TaintedObject(TypeName+".UnSubscribeEvents", delegate() 219 PhysicsScene.TaintedObject(TypeName+".UnSubscribeEvents", delegate()
@@ -222,7 +222,7 @@ public abstract class BSPhysObject : PhysicsActor
222 }); 222 });
223 } 223 }
224 // Return 'true' if the simulator wants collision events 224 // Return 'true' if the simulator wants collision events
225 public override bool SubscribedEvents() { 225 public override bool SubscribedEvents() {
226 return (SubscribedEventsMs > 0); 226 return (SubscribedEventsMs > 0);
227 } 227 }
228 228
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index aeeb4dd..7b211fa 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -295,7 +295,7 @@ public sealed class BSPrim : BSPhysObject
295 private bool PositionSanityCheck() 295 private bool PositionSanityCheck()
296 { 296 {
297 bool ret = false; 297 bool ret = false;
298 298
299 // If totally below the ground, move the prim up 299 // If totally below the ground, move the prim up
300 // TODO: figure out the right solution for this... only for dynamic objects? 300 // TODO: figure out the right solution for this... only for dynamic objects?
301 /* 301 /*
@@ -510,7 +510,7 @@ public sealed class BSPrim : BSPhysObject
510 }); 510 });
511 } 511 }
512 } 512 }
513 // Go directly to Bullet to get/set the value. 513 // Go directly to Bullet to get/set the value.
514 public override OMV.Quaternion ForceOrientation 514 public override OMV.Quaternion ForceOrientation
515 { 515 {
516 get 516 get
@@ -768,7 +768,7 @@ public sealed class BSPrim : BSPhysObject
768 } 768 }
769 } 769 }
770 public override bool FloatOnWater { 770 public override bool FloatOnWater {
771 set { 771 set {
772 _floatOnWater = value; 772 _floatOnWater = value;
773 PhysicsScene.TaintedObject("BSPrim.setFloatOnWater", delegate() 773 PhysicsScene.TaintedObject("BSPrim.setFloatOnWater", delegate()
774 { 774 {
@@ -971,7 +971,7 @@ public sealed class BSPrim : BSPhysObject
971 if (hollowAmount > 0.0) 971 if (hollowAmount > 0.0)
972 { 972 {
973 hollowVolume *= hollowAmount; 973 hollowVolume *= hollowAmount;
974 974
975 switch (BaseShape.HollowShape) 975 switch (BaseShape.HollowShape)
976 { 976 {
977 case HollowShape.Square: 977 case HollowShape.Square:
@@ -1251,7 +1251,7 @@ public sealed class BSPrim : BSPhysObject
1251 // Create the correct physical representation for this type of object. 1251 // Create the correct physical representation for this type of object.
1252 // Updates BSBody and BSShape with the new information. 1252 // Updates BSBody and BSShape with the new information.
1253 // Ignore 'forceRebuild'. This routine makes the right choices and changes of necessary. 1253 // Ignore 'forceRebuild'. This routine makes the right choices and changes of necessary.
1254 PhysicsScene.Shapes.GetBodyAndShape(false, PhysicsScene.World, this, shapeData, BaseShape, 1254 PhysicsScene.Shapes.GetBodyAndShape(false, PhysicsScene.World, this, shapeData, BaseShape,
1255 null, delegate(BulletBody dBody) 1255 null, delegate(BulletBody dBody)
1256 { 1256 {
1257 // Called if the current prim body is about to be destroyed. 1257 // Called if the current prim body is about to be destroyed.
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index 6621d39..233f1ca 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -320,7 +320,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters
320 { 320 {
321 m_log.Debug("[BULLETS UNMANAGED]:" + msg); 321 m_log.Debug("[BULLETS UNMANAGED]:" + msg);
322 } 322 }
323 323
324 // Called directly from unmanaged code so don't do much 324 // Called directly from unmanaged code so don't do much
325 private void BulletLoggerPhysLog(string msg) 325 private void BulletLoggerPhysLog(string msg)
326 { 326 {
@@ -545,7 +545,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters
545 } 545 }
546 546
547 // This is a kludge to get avatar movement updates. 547 // This is a kludge to get avatar movement updates.
548 // The simulator expects collisions for avatars even if there are have been no collisions. 548 // The simulator expects collisions for avatars even if there are have been no collisions.
549 // The event updates avatar animations and stuff. 549 // The event updates avatar animations and stuff.
550 // If you fix avatar animation updates, remove this overhead and let normal collision processing happen. 550 // If you fix avatar animation updates, remove this overhead and let normal collision processing happen.
551 foreach (BSPhysObject bsp in m_avatars) 551 foreach (BSPhysObject bsp in m_avatars)
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
index 7b808eb..86bbf46 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
@@ -89,7 +89,7 @@ public class BSShapeCollection : IDisposable
89 // higher level dependencies on the shape or body. Mostly used for LinkSets to 89 // higher level dependencies on the shape or body. Mostly used for LinkSets to
90 // remove the physical constraints before the body is destroyed. 90 // remove the physical constraints before the body is destroyed.
91 // Called at taint-time!! 91 // Called at taint-time!!
92 public bool GetBodyAndShape(bool forceRebuild, BulletSim sim, BSPhysObject prim, 92 public bool GetBodyAndShape(bool forceRebuild, BulletSim sim, BSPhysObject prim,
93 ShapeData shapeData, PrimitiveBaseShape pbs, 93 ShapeData shapeData, PrimitiveBaseShape pbs,
94 ShapeDestructionCallback shapeCallback, BodyDestructionCallback bodyCallback) 94 ShapeDestructionCallback shapeCallback, BodyDestructionCallback bodyCallback)
95 { 95 {
@@ -105,7 +105,7 @@ public class BSShapeCollection : IDisposable
105 // If we had to select a new shape geometry for the object, 105 // If we had to select a new shape geometry for the object,
106 // rebuild the body around it. 106 // rebuild the body around it.
107 // Updates prim.BSBody with information/pointers to requested body 107 // Updates prim.BSBody with information/pointers to requested body
108 bool newBody = CreateBody((newGeom || forceRebuild), prim, PhysicsScene.World, 108 bool newBody = CreateBody((newGeom || forceRebuild), prim, PhysicsScene.World,
109 prim.BSShape, shapeData, bodyCallback); 109 prim.BSShape, shapeData, bodyCallback);
110 ret = newGeom || newBody; 110 ret = newGeom || newBody;
111 } 111 }
@@ -325,7 +325,7 @@ public class BSShapeCollection : IDisposable
325 // Info in prim.BSShape is updated to the new shape. 325 // Info in prim.BSShape is updated to the new shape.
326 // Returns 'true' if the geometry was rebuilt. 326 // Returns 'true' if the geometry was rebuilt.
327 // Called at taint-time! 327 // Called at taint-time!
328 private bool CreateGeom(bool forceRebuild, BSPhysObject prim, ShapeData shapeData, 328 private bool CreateGeom(bool forceRebuild, BSPhysObject prim, ShapeData shapeData,
329 PrimitiveBaseShape pbs, ShapeDestructionCallback shapeCallback) 329 PrimitiveBaseShape pbs, ShapeDestructionCallback shapeCallback)
330 { 330 {
331 bool ret = false; 331 bool ret = false;
@@ -335,7 +335,7 @@ public class BSShapeCollection : IDisposable
335 if (shapeData.Type == ShapeData.PhysicsShapeType.SHAPE_AVATAR) 335 if (shapeData.Type == ShapeData.PhysicsShapeType.SHAPE_AVATAR)
336 { 336 {
337 // an avatar capsule is close to a native shape (it is not shared) 337 // an avatar capsule is close to a native shape (it is not shared)
338 ret = GetReferenceToNativeShape(prim, shapeData, ShapeData.PhysicsShapeType.SHAPE_AVATAR, 338 ret = GetReferenceToNativeShape(prim, shapeData, ShapeData.PhysicsShapeType.SHAPE_AVATAR,
339 ShapeData.FixedShapeKey.KEY_CAPSULE, shapeCallback); 339 ShapeData.FixedShapeKey.KEY_CAPSULE, shapeCallback);
340 DetailLog("{0},BSShapeCollection.CreateGeom,avatarCapsule,shape={1}", prim.LocalID, prim.BSShape); 340 DetailLog("{0},BSShapeCollection.CreateGeom,avatarCapsule,shape={1}", prim.LocalID, prim.BSShape);
341 haveShape = true; 341 haveShape = true;
@@ -362,7 +362,7 @@ public class BSShapeCollection : IDisposable
362 || prim.BSShape.type != ShapeData.PhysicsShapeType.SHAPE_SPHERE 362 || prim.BSShape.type != ShapeData.PhysicsShapeType.SHAPE_SPHERE
363 ) 363 )
364 { 364 {
365 ret = GetReferenceToNativeShape(prim, shapeData, ShapeData.PhysicsShapeType.SHAPE_SPHERE, 365 ret = GetReferenceToNativeShape(prim, shapeData, ShapeData.PhysicsShapeType.SHAPE_SPHERE,
366 ShapeData.FixedShapeKey.KEY_SPHERE, shapeCallback); 366 ShapeData.FixedShapeKey.KEY_SPHERE, shapeCallback);
367 DetailLog("{0},BSShapeCollection.CreateGeom,sphere,force={1},shape={2}", 367 DetailLog("{0},BSShapeCollection.CreateGeom,sphere,force={1},shape={2}",
368 prim.LocalID, forceRebuild, prim.BSShape); 368 prim.LocalID, forceRebuild, prim.BSShape);
@@ -376,7 +376,7 @@ public class BSShapeCollection : IDisposable
376 || prim.BSShape.type != ShapeData.PhysicsShapeType.SHAPE_BOX 376 || prim.BSShape.type != ShapeData.PhysicsShapeType.SHAPE_BOX
377 ) 377 )
378 { 378 {
379 ret = GetReferenceToNativeShape( prim, shapeData, ShapeData.PhysicsShapeType.SHAPE_BOX, 379 ret = GetReferenceToNativeShape( prim, shapeData, ShapeData.PhysicsShapeType.SHAPE_BOX,
380 ShapeData.FixedShapeKey.KEY_BOX, shapeCallback); 380 ShapeData.FixedShapeKey.KEY_BOX, shapeCallback);
381 DetailLog("{0},BSShapeCollection.CreateGeom,box,force={1},shape={2}", 381 DetailLog("{0},BSShapeCollection.CreateGeom,box,force={1},shape={2}",
382 prim.LocalID, forceRebuild, prim.BSShape); 382 prim.LocalID, forceRebuild, prim.BSShape);
@@ -423,14 +423,14 @@ public class BSShapeCollection : IDisposable
423 BulletShape newShape = BuildPhysicalNativeShape(shapeType, shapeData, shapeKey); 423 BulletShape newShape = BuildPhysicalNativeShape(shapeType, shapeData, shapeKey);
424 424
425 // Don't need to do a 'ReferenceShape()' here because native shapes are not shared. 425 // Don't need to do a 'ReferenceShape()' here because native shapes are not shared.
426 DetailLog("{0},BSShapeCollection.AddNativeShapeToPrim,create,newshape={1},scale={2}", 426 DetailLog("{0},BSShapeCollection.AddNativeShapeToPrim,create,newshape={1},scale={2}",
427 shapeData.ID, newShape, shapeData.Scale); 427 shapeData.ID, newShape, shapeData.Scale);
428 428
429 prim.BSShape = newShape; 429 prim.BSShape = newShape;
430 return true; 430 return true;
431 } 431 }
432 432
433 private BulletShape BuildPhysicalNativeShape(ShapeData.PhysicsShapeType shapeType, 433 private BulletShape BuildPhysicalNativeShape(ShapeData.PhysicsShapeType shapeType,
434 ShapeData shapeData, ShapeData.FixedShapeKey shapeKey) 434 ShapeData shapeData, ShapeData.FixedShapeKey shapeKey)
435 { 435 {
436 BulletShape newShape; 436 BulletShape newShape;
@@ -438,7 +438,7 @@ public class BSShapeCollection : IDisposable
438 if (shapeType == ShapeData.PhysicsShapeType.SHAPE_AVATAR) 438 if (shapeType == ShapeData.PhysicsShapeType.SHAPE_AVATAR)
439 { 439 {
440 newShape = new BulletShape( 440 newShape = new BulletShape(
441 BulletSimAPI.BuildCapsuleShape2(PhysicsScene.World.ptr, 1.0f, 1.0f, shapeData.Scale), 441 BulletSimAPI.BuildCapsuleShape2(PhysicsScene.World.ptr, 1.0f, 1.0f, shapeData.Scale),
442 shapeType); 442 shapeType);
443 } 443 }
444 else 444 else
@@ -745,7 +745,7 @@ public class BSShapeCollection : IDisposable
745 // Updates prim.BSBody with the information about the new body if one is created. 745 // Updates prim.BSBody with the information about the new body if one is created.
746 // Returns 'true' if an object was actually created. 746 // Returns 'true' if an object was actually created.
747 // Called at taint-time. 747 // Called at taint-time.
748 private bool CreateBody(bool forceRebuild, BSPhysObject prim, BulletSim sim, BulletShape shape, 748 private bool CreateBody(bool forceRebuild, BSPhysObject prim, BulletSim sim, BulletShape shape,
749 ShapeData shapeData, BodyDestructionCallback bodyCallback) 749 ShapeData shapeData, BodyDestructionCallback bodyCallback)
750 { 750 {
751 bool ret = false; 751 bool ret = false;