aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
diff options
context:
space:
mode:
authorRobert Adams2012-11-02 09:53:41 -0700
committerRobert Adams2012-11-03 21:15:30 -0700
commitb0eccd5044b1a20b995a62d6fb76fdd73b712f9a (patch)
tree877464740b99169d2e8f38bc8c75a33b37e9d475 /OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
parentBulletSim: Add RawPosition and RawOrientation to BSPhysObject and rename Mass... (diff)
downloadopensim-SC_OLD-b0eccd5044b1a20b995a62d6fb76fdd73b712f9a.zip
opensim-SC_OLD-b0eccd5044b1a20b995a62d6fb76fdd73b712f9a.tar.gz
opensim-SC_OLD-b0eccd5044b1a20b995a62d6fb76fdd73b712f9a.tar.bz2
opensim-SC_OLD-b0eccd5044b1a20b995a62d6fb76fdd73b712f9a.tar.xz
BulletSim: debugging of compound shape implementation of linksets.
Add compound shape creation and freeing in shape manager. Add optional taint-time execution method and update code to use it. Add API2 linkage for more compound shape methods (get num, get/remove by index, ...) Modify perferred shape return so linkset children can have differet shapes than root. Add Position and Orientation calls to linksets so children can be moved around by the linkset by its own calculation. Allows for very general linkset implementations.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs13
1 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index 9e1206a..2a5397e 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -200,7 +200,9 @@ public sealed class BSCharacter : BSPhysObject
200 } 200 }
201 // I want the physics engine to make an avatar capsule 201 // I want the physics engine to make an avatar capsule
202 public override ShapeData.PhysicsShapeType PreferredPhysicalShape 202 public override ShapeData.PhysicsShapeType PreferredPhysicalShape
203 { get { return ShapeData.PhysicsShapeType.SHAPE_AVATAR; } } 203 {
204 get {return ShapeData.PhysicsShapeType.SHAPE_AVATAR; }
205 }
204 206
205 public override bool Grabbed { 207 public override bool Grabbed {
206 set { _grabbed = value; } 208 set { _grabbed = value; }
@@ -238,6 +240,7 @@ public sealed class BSCharacter : BSPhysObject
238 } 240 }
239 public override OMV.Vector3 Position { 241 public override OMV.Vector3 Position {
240 get { 242 get {
243 // Don't refetch the position because this function is called a zillion times
241 // _position = BulletSimAPI.GetObjectPosition2(Scene.World.ptr, LocalID); 244 // _position = BulletSimAPI.GetObjectPosition2(Scene.World.ptr, LocalID);
242 return _position; 245 return _position;
243 } 246 }
@@ -304,15 +307,11 @@ public sealed class BSCharacter : BSPhysObject
304 { 307 {
305 // The new position value must be pushed into the physics engine but we can't 308 // The new position value must be pushed into the physics engine but we can't
306 // just assign to "Position" because of potential call loops. 309 // just assign to "Position" because of potential call loops.
307 BSScene.TaintCallback sanityOperation = delegate() 310 PhysicsScene.TaintedObject(inTaintTime, "BSCharacter.PositionSanityCheck", delegate()
308 { 311 {
309 DetailLog("{0},BSCharacter.PositionSanityCheck,taint,pos={1},orient={2}", LocalID, _position, _orientation); 312 DetailLog("{0},BSCharacter.PositionSanityCheck,taint,pos={1},orient={2}", LocalID, _position, _orientation);
310 BulletSimAPI.SetTranslation2(PhysBody.ptr, _position, _orientation); 313 BulletSimAPI.SetTranslation2(PhysBody.ptr, _position, _orientation);
311 }; 314 });
312 if (inTaintTime)
313 sanityOperation();
314 else
315 PhysicsScene.TaintedObject("BSCharacter.PositionSanityCheck", sanityOperation);
316 ret = true; 315 ret = true;
317 } 316 }
318 return ret; 317 return ret;