aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
diff options
context:
space:
mode:
authorRobert Adams2012-10-17 08:30:10 -0700
committerRobert Adams2012-10-19 10:52:23 -0700
commite87a179c893ef246dae8338e0f56c3fe20458fbc (patch)
tree1699e1fc26a47ba000bbd2392df894dc3247f956 /OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
parentBulletSim: remove code in ShapeCollection that hinted at shape sharing. (diff)
downloadopensim-SC_OLD-e87a179c893ef246dae8338e0f56c3fe20458fbc.zip
opensim-SC_OLD-e87a179c893ef246dae8338e0f56c3fe20458fbc.tar.gz
opensim-SC_OLD-e87a179c893ef246dae8338e0f56c3fe20458fbc.tar.bz2
opensim-SC_OLD-e87a179c893ef246dae8338e0f56c3fe20458fbc.tar.xz
BulletSim: change nonimal physics frame rate to 55 to give same numbers as ODE.
Change character scaling to represent size of capsule (diameter rather than radius) Modify create capsule call to pass radius and height. Eliminate errors when calculating shape inertia (should have some type checking).
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index b9e1908..8013e68 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -48,10 +48,10 @@ public sealed class BSPrim : BSPhysObject
48 48
49 private PrimitiveBaseShape _pbs; 49 private PrimitiveBaseShape _pbs;
50 50
51 // _size is what the user passed. _scale is what we pass to the physics engine with the mesh. 51 // _size is what the user passed. Scale is what we pass to the physics engine with the mesh.
52 // Often _scale is unity because the meshmerizer will apply _size when creating the mesh. 52 // Often Scale is unity because the meshmerizer will apply _size when creating the mesh.
53 private OMV.Vector3 _size; // the multiplier for each mesh dimension as passed by the user 53 private OMV.Vector3 _size; // the multiplier for each mesh dimension as passed by the user
54 private OMV.Vector3 _scale; // the multiplier for each mesh dimension for the mesh as created by the meshmerizer 54 // private OMV.Vector3 _scale; // the multiplier for each mesh dimension for the mesh as created by the meshmerizer
55 55
56 private bool _grabbed; 56 private bool _grabbed;
57 private bool _isSelected; 57 private bool _isSelected;
@@ -98,7 +98,7 @@ public sealed class BSPrim : BSPhysObject
98 _physicsActorType = (int)ActorTypes.Prim; 98 _physicsActorType = (int)ActorTypes.Prim;
99 _position = pos; 99 _position = pos;
100 _size = size; 100 _size = size;
101 _scale = new OMV.Vector3(1f, 1f, 1f); // the scale will be set by CreateGeom depending on object type 101 Scale = new OMV.Vector3(1f, 1f, 1f); // the scale will be set by CreateGeom depending on object type
102 _orientation = rotation; 102 _orientation = rotation;
103 _buoyancy = 1f; 103 _buoyancy = 1f;
104 _velocity = OMV.Vector3.Zero; 104 _velocity = OMV.Vector3.Zero;
@@ -166,7 +166,7 @@ public sealed class BSPrim : BSPhysObject
166 // Since _size changed, the mesh needs to be rebuilt. If rebuilt, all the correct 166 // Since _size changed, the mesh needs to be rebuilt. If rebuilt, all the correct
167 // scale and margins are set. 167 // scale and margins are set.
168 CreateGeomAndObject(true); 168 CreateGeomAndObject(true);
169 // DetailLog("{0},BSPrim.setSize,size={1},scale={2},mass={3},physical={4}", LocalID, _size, _scale, _mass, IsPhysical); 169 // DetailLog("{0},BSPrim.setSize,size={1},scale={2},mass={3},physical={4}", LocalID, _size, Scale, _mass, IsPhysical);
170 }); 170 });
171 } 171 }
172 } 172 }
@@ -1224,7 +1224,8 @@ public sealed class BSPrim : BSPhysObject
1224 shape.Position = _position; 1224 shape.Position = _position;
1225 shape.Rotation = _orientation; 1225 shape.Rotation = _orientation;
1226 shape.Velocity = _velocity; 1226 shape.Velocity = _velocity;
1227 shape.Scale = _scale; 1227 shape.Size = _size;
1228 shape.Scale = Scale;
1228 shape.Mass = _isPhysical ? _mass : 0f; 1229 shape.Mass = _isPhysical ? _mass : 0f;
1229 shape.Buoyancy = _buoyancy; 1230 shape.Buoyancy = _buoyancy;
1230 shape.HullKey = 0; 1231 shape.HullKey = 0;
@@ -1234,7 +1235,6 @@ public sealed class BSPrim : BSPhysObject
1234 shape.Collidable = (!IsPhantom) ? ShapeData.numericTrue : ShapeData.numericFalse; 1235 shape.Collidable = (!IsPhantom) ? ShapeData.numericTrue : ShapeData.numericFalse;
1235 shape.Static = _isPhysical ? ShapeData.numericFalse : ShapeData.numericTrue; 1236 shape.Static = _isPhysical ? ShapeData.numericFalse : ShapeData.numericTrue;
1236 shape.Solid = IsSolid ? ShapeData.numericFalse : ShapeData.numericTrue; 1237 shape.Solid = IsSolid ? ShapeData.numericFalse : ShapeData.numericTrue;
1237 shape.Size = _size;
1238 } 1238 }
1239 // Rebuild the geometry and object. 1239 // Rebuild the geometry and object.
1240 // This is called when the shape changes so we need to recreate the mesh/hull. 1240 // This is called when the shape changes so we need to recreate the mesh/hull.