aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
diff options
context:
space:
mode:
authorRobert Adams2012-11-01 10:53:55 -0700
committerRobert Adams2012-11-03 21:15:22 -0700
commitf53b4e7a21f62a84e237c4ce8d2806124c3a76d2 (patch)
tree1a815eafa4cec6e930b527fe81985b37f25f006a /OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
parentBulletSim: Remove use of shapeData in ShapeCollection and rely on the availab... (diff)
downloadopensim-SC_OLD-f53b4e7a21f62a84e237c4ce8d2806124c3a76d2.zip
opensim-SC_OLD-f53b4e7a21f62a84e237c4ce8d2806124c3a76d2.tar.gz
opensim-SC_OLD-f53b4e7a21f62a84e237c4ce8d2806124c3a76d2.tar.bz2
opensim-SC_OLD-f53b4e7a21f62a84e237c4ce8d2806124c3a76d2.tar.xz
BulletSim: Add RawPosition and RawOrientation to BSPhysObject and rename MassRaw to RawMass. Fix BSShapeCollection to use Raw* for creating the body to eliminate exception from referencing the physical body before it has been created.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index 8ce960d..1754be6 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -256,6 +256,11 @@ public sealed class BSPrim : BSPhysObject
256 return; 256 return;
257 } 257 }
258 258
259 public override OMV.Vector3 RawPosition
260 {
261 get { return _position; }
262 set { _position = value; }
263 }
259 public override OMV.Vector3 Position { 264 public override OMV.Vector3 Position {
260 get { 265 get {
261 if (!Linkset.IsRoot(this)) 266 if (!Linkset.IsRoot(this))
@@ -366,7 +371,7 @@ public sealed class BSPrim : BSPhysObject
366 } 371 }
367 372
368 // used when we only want this prim's mass and not the linkset thing 373 // used when we only want this prim's mass and not the linkset thing
369 public override float MassRaw { 374 public override float RawMass {
370 get { return _mass; } 375 get { return _mass; }
371 } 376 }
372 // Set the physical mass to the passed mass. 377 // Set the physical mass to the passed mass.
@@ -530,6 +535,11 @@ public sealed class BSPrim : BSPhysObject
530 get { return _acceleration; } 535 get { return _acceleration; }
531 set { _acceleration = value; } 536 set { _acceleration = value; }
532 } 537 }
538 public override OMV.Quaternion RawOrientation
539 {
540 get { return _orientation; }
541 set { _orientation = value; }
542 }
533 public override OMV.Quaternion Orientation { 543 public override OMV.Quaternion Orientation {
534 get { 544 get {
535 if (!Linkset.IsRoot(this)) 545 if (!Linkset.IsRoot(this))
@@ -703,7 +713,7 @@ public sealed class BSPrim : BSPhysObject
703 BulletSimAPI.SetTranslation2(PhysBody.ptr, _position, _orientation); 713 BulletSimAPI.SetTranslation2(PhysBody.ptr, _position, _orientation);
704 714
705 // A dynamic object has mass 715 // A dynamic object has mass
706 UpdatePhysicalMassProperties(MassRaw); 716 UpdatePhysicalMassProperties(RawMass);
707 717
708 // Set collision detection parameters 718 // Set collision detection parameters
709 if (PhysicsScene.Params.ccdMotionThreshold > 0f) 719 if (PhysicsScene.Params.ccdMotionThreshold > 0f)