aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSScene.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index f72bd74..cf5bb57 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -188,6 +188,8 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
188 private bool m_physicsLoggingDoFlush; 188 private bool m_physicsLoggingDoFlush;
189 // 'true' of the vehicle code is to log lots of details 189 // 'true' of the vehicle code is to log lots of details
190 public bool VehicleLoggingEnabled { get; private set; } 190 public bool VehicleLoggingEnabled { get; private set; }
191 public bool VehiclePhysicalLoggingEnabled { get; private set; }
192 public bool VehicleScaleAngularVelocityByTimestep { get; private set; }
191 193
192 #region Construction and Initialization 194 #region Construction and Initialization
193 public BSScene(string identifier) 195 public BSScene(string identifier)
@@ -297,6 +299,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
297 m_physicsLoggingDoFlush = pConfig.GetBoolean("PhysicsLoggingDoFlush", false); 299 m_physicsLoggingDoFlush = pConfig.GetBoolean("PhysicsLoggingDoFlush", false);
298 // Very detailed logging for vehicle debugging 300 // Very detailed logging for vehicle debugging
299 VehicleLoggingEnabled = pConfig.GetBoolean("VehicleLoggingEnabled", false); 301 VehicleLoggingEnabled = pConfig.GetBoolean("VehicleLoggingEnabled", false);
302 VehiclePhysicalLoggingEnabled = pConfig.GetBoolean("VehiclePhysicalLoggingEnabled", false);
300 303
301 // Do any replacements in the parameters 304 // Do any replacements in the parameters
302 m_physicsLoggingPrefix = m_physicsLoggingPrefix.Replace("%REGIONNAME%", RegionName); 305 m_physicsLoggingPrefix = m_physicsLoggingPrefix.Replace("%REGIONNAME%", RegionName);
@@ -306,6 +309,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
306 BSMaterials.InitializeFromDefaults(Params); 309 BSMaterials.InitializeFromDefaults(Params);
307 if (pConfig != null) 310 if (pConfig != null)
308 { 311 {
312 // Let the user add new and interesting material property values.
309 BSMaterials.InitializefromParameters(pConfig); 313 BSMaterials.InitializefromParameters(pConfig);
310 } 314 }
311 } 315 }
@@ -501,7 +505,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
501 505
502 try 506 try
503 { 507 {
504 if (VehicleLoggingEnabled) DumpVehicles(); // DEBUG 508 if (VehiclePhysicalLoggingEnabled) DumpVehicles(); // DEBUG
505 if (PhysicsLogging.Enabled) beforeTime = Util.EnvironmentTickCount(); 509 if (PhysicsLogging.Enabled) beforeTime = Util.EnvironmentTickCount();
506 510
507 numSubSteps = BulletSimAPI.PhysicsStep2(World.ptr, timeStep, m_maxSubSteps, m_fixedTimeStep, 511 numSubSteps = BulletSimAPI.PhysicsStep2(World.ptr, timeStep, m_maxSubSteps, m_fixedTimeStep,
@@ -510,7 +514,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
510 if (PhysicsLogging.Enabled) simTime = Util.EnvironmentTickCountSubtract(beforeTime); 514 if (PhysicsLogging.Enabled) simTime = Util.EnvironmentTickCountSubtract(beforeTime);
511 DetailLog("{0},Simulate,call, frame={1}, nTaints={2}, simTime={3}, substeps={4}, updates={5}, colliders={6}", 515 DetailLog("{0},Simulate,call, frame={1}, nTaints={2}, simTime={3}, substeps={4}, updates={5}, colliders={6}",
512 DetailLogZero, m_simulationStep, numTaints, simTime, numSubSteps, updatedEntityCount, collidersCount); 516 DetailLogZero, m_simulationStep, numTaints, simTime, numSubSteps, updatedEntityCount, collidersCount);
513 if (VehicleLoggingEnabled) DumpVehicles(); // DEBUG 517 if (VehiclePhysicalLoggingEnabled) DumpVehicles(); // DEBUG
514 } 518 }
515 catch (Exception e) 519 catch (Exception e)
516 { 520 {
@@ -1226,6 +1230,11 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
1226 (s,cf,p,v) => { s.m_params[0].vehicleAngularDamping = cf.GetFloat(p, v); }, 1230 (s,cf,p,v) => { s.m_params[0].vehicleAngularDamping = cf.GetFloat(p, v); },
1227 (s) => { return s.m_params[0].vehicleAngularDamping; }, 1231 (s) => { return s.m_params[0].vehicleAngularDamping; },
1228 (s,p,l,v) => { s.m_params[0].vehicleAngularDamping = v; } ), 1232 (s,p,l,v) => { s.m_params[0].vehicleAngularDamping = v; } ),
1233 new ParameterDefn("VehicleScaleAngularVelocityByTimestep", "If true, scale angular turning by timestep",
1234 ConfigurationParameters.numericFalse,
1235 (s,cf,p,v) => { s.VehicleScaleAngularVelocityByTimestep = cf.GetBoolean(p, s.BoolNumeric(v)); },
1236 (s) => { return s.NumericBool(s.VehicleScaleAngularVelocityByTimestep); },
1237 (s,p,l,v) => { s.VehicleScaleAngularVelocityByTimestep = s.BoolNumeric(v); } ),
1229 1238
1230 new ParameterDefn("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default of 4096)", 1239 new ParameterDefn("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default of 4096)",
1231 0f, 1240 0f,