diff options
author | Justin Clark-Casey (justincc) | 2012-11-22 03:01:26 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-11-22 03:01:26 +0000 |
commit | 33a4f07c4e4e071abe64694ac0e95681807dc57f (patch) | |
tree | 376c5038385b21164955bf1331646bd47db552df /OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | |
parent | Add regression test for a good request made to the asset service post handler. (diff) | |
parent | BulletSim: update DLLs and SOs. No functional changes. Only the parameter blo... (diff) | |
download | opensim-SC_OLD-33a4f07c4e4e071abe64694ac0e95681807dc57f.zip opensim-SC_OLD-33a4f07c4e4e071abe64694ac0e95681807dc57f.tar.gz opensim-SC_OLD-33a4f07c4e4e071abe64694ac0e95681807dc57f.tar.bz2 opensim-SC_OLD-33a4f07c4e4e071abe64694ac0e95681807dc57f.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index 2fee95e..27a78d1 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | |||
@@ -712,7 +712,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
712 | // here just before the physics engine is called to step the simulation. | 712 | // here just before the physics engine is called to step the simulation. |
713 | public void ProcessTaints() | 713 | public void ProcessTaints() |
714 | { | 714 | { |
715 | InTaintTime = true; | 715 | InTaintTime = true; // Only used for debugging so locking is not necessary. |
716 | ProcessRegularTaints(); | 716 | ProcessRegularTaints(); |
717 | ProcessPostTaintTaints(); | 717 | ProcessPostTaintTaints(); |
718 | InTaintTime = false; | 718 | InTaintTime = false; |
@@ -758,6 +758,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
758 | DetailLog("{0},BSScene.ProcessTaints,leftTaintsOnList,numNotProcessed={1}", DetailLogZero, _taintOperations.Count); | 758 | DetailLog("{0},BSScene.ProcessTaints,leftTaintsOnList,numNotProcessed={1}", DetailLogZero, _taintOperations.Count); |
759 | } | 759 | } |
760 | */ | 760 | */ |
761 | |||
761 | // swizzle a new list into the list location so we can process what's there | 762 | // swizzle a new list into the list location so we can process what's there |
762 | List<TaintCallbackEntry> oldList; | 763 | List<TaintCallbackEntry> oldList; |
763 | lock (_taintLock) | 764 | lock (_taintLock) |
@@ -787,8 +788,6 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
787 | // will replace any previous operation by the same object. | 788 | // will replace any previous operation by the same object. |
788 | public void PostTaintObject(String ident, uint ID, TaintCallback callback) | 789 | public void PostTaintObject(String ident, uint ID, TaintCallback callback) |
789 | { | 790 | { |
790 | if (!m_initialized) return; | ||
791 | |||
792 | string uniqueIdent = ident + "-" + ID.ToString(); | 791 | string uniqueIdent = ident + "-" + ID.ToString(); |
793 | lock (_taintLock) | 792 | lock (_taintLock) |
794 | { | 793 | { |
@@ -864,13 +863,14 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
864 | } | 863 | } |
865 | } | 864 | } |
866 | 865 | ||
866 | // Only used for debugging. Does not change state of anything so locking is not necessary. | ||
867 | public bool AssertInTaintTime(string whereFrom) | 867 | public bool AssertInTaintTime(string whereFrom) |
868 | { | 868 | { |
869 | if (!InTaintTime) | 869 | if (!InTaintTime) |
870 | { | 870 | { |
871 | DetailLog("{0},BSScene.AssertInTaintTime,NOT IN TAINT TIME,Region={1},Where={2}", DetailLogZero, RegionName, whereFrom); | 871 | DetailLog("{0},BSScene.AssertInTaintTime,NOT IN TAINT TIME,Region={1},Where={2}", DetailLogZero, RegionName, whereFrom); |
872 | m_log.ErrorFormat("{0} NOT IN TAINT TIME!! Region={1}, Where={2}", LogHeader, RegionName, whereFrom); | 872 | m_log.ErrorFormat("{0} NOT IN TAINT TIME!! Region={1}, Where={2}", LogHeader, RegionName, whereFrom); |
873 | Util.PrintCallStack(); | 873 | Util.PrintCallStack(); // Prints the stack into the DEBUG log file. |
874 | } | 874 | } |
875 | return InTaintTime; | 875 | return InTaintTime; |
876 | } | 876 | } |
@@ -1145,6 +1145,11 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
1145 | (s,p,l,v) => { s.UpdateParameterObject(ref s.m_params[0].contactProcessingThreshold, p, l, v); }, | 1145 | (s,p,l,v) => { s.UpdateParameterObject(ref s.m_params[0].contactProcessingThreshold, p, l, v); }, |
1146 | (s,o,v) => { BulletSimAPI.SetContactProcessingThreshold2(o.PhysBody.ptr, v); } ), | 1146 | (s,o,v) => { BulletSimAPI.SetContactProcessingThreshold2(o.PhysBody.ptr, v); } ), |
1147 | 1147 | ||
1148 | new ParameterDefn("TerrainImplementation", "Type of shape to use for terrain (0=heightmap, 1=mesh)", | ||
1149 | (float)BSTerrainPhys.TerrainImplementation.Mesh, | ||
1150 | (s,cf,p,v) => { s.m_params[0].terrainImplementation = cf.GetFloat(p,v); }, | ||
1151 | (s) => { return s.m_params[0].terrainImplementation; }, | ||
1152 | (s,p,l,v) => { s.m_params[0].terrainImplementation = v; } ), | ||
1148 | new ParameterDefn("TerrainFriction", "Factor to reduce movement against terrain surface" , | 1153 | new ParameterDefn("TerrainFriction", "Factor to reduce movement against terrain surface" , |
1149 | 0.5f, | 1154 | 0.5f, |
1150 | (s,cf,p,v) => { s.m_params[0].terrainFriction = cf.GetFloat(p, v); }, | 1155 | (s,cf,p,v) => { s.m_params[0].terrainFriction = cf.GetFloat(p, v); }, |
@@ -1180,11 +1185,16 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
1180 | (s,cf,p,v) => { s.m_params[0].avatarRestitution = cf.GetFloat(p, v); }, | 1185 | (s,cf,p,v) => { s.m_params[0].avatarRestitution = cf.GetFloat(p, v); }, |
1181 | (s) => { return s.m_params[0].avatarRestitution; }, | 1186 | (s) => { return s.m_params[0].avatarRestitution; }, |
1182 | (s,p,l,v) => { s.UpdateParameterObject(ref s.m_params[0].avatarRestitution, p, l, v); } ), | 1187 | (s,p,l,v) => { s.UpdateParameterObject(ref s.m_params[0].avatarRestitution, p, l, v); } ), |
1183 | new ParameterDefn("AvatarCapsuleRadius", "Radius of space around an avatar", | 1188 | new ParameterDefn("AvatarCapsuleWidth", "The distance between the sides of the avatar capsule", |
1184 | 0.37f, | 1189 | 0.6f, |
1185 | (s,cf,p,v) => { s.m_params[0].avatarCapsuleRadius = cf.GetFloat(p, v); }, | 1190 | (s,cf,p,v) => { s.m_params[0].avatarCapsuleWidth = cf.GetFloat(p, v); }, |
1186 | (s) => { return s.m_params[0].avatarCapsuleRadius; }, | 1191 | (s) => { return s.m_params[0].avatarCapsuleWidth; }, |
1187 | (s,p,l,v) => { s.UpdateParameterObject(ref s.m_params[0].avatarCapsuleRadius, p, l, v); } ), | 1192 | (s,p,l,v) => { s.UpdateParameterObject(ref s.m_params[0].avatarCapsuleWidth, p, l, v); } ), |
1193 | new ParameterDefn("AvatarCapsuleDepth", "The distance between the front and back of the avatar capsule", | ||
1194 | 0.45f, | ||
1195 | (s,cf,p,v) => { s.m_params[0].avatarCapsuleDepth = cf.GetFloat(p, v); }, | ||
1196 | (s) => { return s.m_params[0].avatarCapsuleDepth; }, | ||
1197 | (s,p,l,v) => { s.UpdateParameterObject(ref s.m_params[0].avatarCapsuleDepth, p, l, v); } ), | ||
1188 | new ParameterDefn("AvatarCapsuleHeight", "Default height of space around avatar", | 1198 | new ParameterDefn("AvatarCapsuleHeight", "Default height of space around avatar", |
1189 | 1.5f, | 1199 | 1.5f, |
1190 | (s,cf,p,v) => { s.m_params[0].avatarCapsuleHeight = cf.GetFloat(p, v); }, | 1200 | (s,cf,p,v) => { s.m_params[0].avatarCapsuleHeight = cf.GetFloat(p, v); }, |