diff options
author | Robert Adams | 2013-07-24 10:52:54 -0700 |
---|---|---|
committer | Robert Adams | 2013-07-30 07:22:43 -0700 |
commit | 5a7784a0e6c3f549d0e7b59380ad05729cb93a4f (patch) | |
tree | 99b327c183b30b613da2368237fe6726d112623f /OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |
parent | minor: Add timeout secs to connection timeout message. Change message to ref... (diff) | |
download | opensim-SC-5a7784a0e6c3f549d0e7b59380ad05729cb93a4f.zip opensim-SC-5a7784a0e6c3f549d0e7b59380ad05729cb93a4f.tar.gz opensim-SC-5a7784a0e6c3f549d0e7b59380ad05729cb93a4f.tar.bz2 opensim-SC-5a7784a0e6c3f549d0e7b59380ad05729cb93a4f.tar.xz |
BulletSim: make density display and return value consistant with how
the simulator expects it (scaled to 100kg/m^3).
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs index d34b797..0704591 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |||
@@ -187,10 +187,23 @@ public abstract class BSPhysObject : PhysicsActor | |||
187 | MaterialAttributes matAttrib = BSMaterials.GetAttributes(Material, false); | 187 | MaterialAttributes matAttrib = BSMaterials.GetAttributes(Material, false); |
188 | Friction = matAttrib.friction; | 188 | Friction = matAttrib.friction; |
189 | Restitution = matAttrib.restitution; | 189 | Restitution = matAttrib.restitution; |
190 | Density = matAttrib.density / BSParam.DensityScaleFactor; | 190 | Density = matAttrib.density; |
191 | // DetailLog("{0},{1}.SetMaterial,Mat={2},frict={3},rest={4},den={5}", LocalID, TypeName, Material, Friction, Restitution, Density); | 191 | // DetailLog("{0},{1}.SetMaterial,Mat={2},frict={3},rest={4},den={5}", LocalID, TypeName, Material, Friction, Restitution, Density); |
192 | } | 192 | } |
193 | 193 | ||
194 | public override float Density | ||
195 | { | ||
196 | get | ||
197 | { | ||
198 | return base.Density; | ||
199 | } | ||
200 | set | ||
201 | { | ||
202 | DetailLog("{0},BSPhysObject.Density,set,den={1}", LocalID, value); | ||
203 | base.Density = value; | ||
204 | } | ||
205 | } | ||
206 | |||
194 | // Stop all physical motion. | 207 | // Stop all physical motion. |
195 | public abstract void ZeroMotion(bool inTaintTime); | 208 | public abstract void ZeroMotion(bool inTaintTime); |
196 | public abstract void ZeroAngularMotion(bool inTaintTime); | 209 | public abstract void ZeroAngularMotion(bool inTaintTime); |