aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
diff options
context:
space:
mode:
authorRobert Adams2012-11-28 08:05:01 -0800
committerRobert Adams2012-11-28 09:48:33 -0800
commit0a66317fa6414dff9a7a4ab5bae10802e1e6693f (patch)
treea0705a43191649f43c80d43ee8537f5ab6581e94 /OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-0a66317fa6414dff9a7a4ab5bae10802e1e6693f.zip
opensim-SC-0a66317fa6414dff9a7a4ab5bae10802e1e6693f.tar.gz
opensim-SC-0a66317fa6414dff9a7a4ab5bae10802e1e6693f.tar.bz2
opensim-SC-0a66317fa6414dff9a7a4ab5bae10802e1e6693f.tar.xz
BulletSim: move GetWaterLevelAtXYZ from BSScene to BSPhysTerrain.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSScene.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs17
1 files changed, 7 insertions, 10 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index 09b1423..0c80611 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -127,7 +127,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
127 public const uint GROUNDPLANE_ID = 1; 127 public const uint GROUNDPLANE_ID = 1;
128 public const uint CHILDTERRAIN_ID = 2; // Terrain allocated based on our mega-prim childre start here 128 public const uint CHILDTERRAIN_ID = 2; // Terrain allocated based on our mega-prim childre start here
129 129
130 private float m_waterLevel; 130 public float SimpleWaterLevel { get; set; }
131 public BSTerrainManager TerrainManager { get; private set; } 131 public BSTerrainManager TerrainManager { get; private set; }
132 132
133 public ConfigurationParameters Params 133 public ConfigurationParameters Params
@@ -182,6 +182,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
182 private string m_physicsLoggingDir; 182 private string m_physicsLoggingDir;
183 private string m_physicsLoggingPrefix; 183 private string m_physicsLoggingPrefix;
184 private int m_physicsLoggingFileMinutes; 184 private int m_physicsLoggingFileMinutes;
185 private bool m_physicsLoggingDoFlush;
185 // 'true' of the vehicle code is to log lots of details 186 // 'true' of the vehicle code is to log lots of details
186 public bool VehicleLoggingEnabled { get; private set; } 187 public bool VehicleLoggingEnabled { get; private set; }
187 188
@@ -290,6 +291,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
290 m_physicsLoggingDir = pConfig.GetString("PhysicsLoggingDir", "."); 291 m_physicsLoggingDir = pConfig.GetString("PhysicsLoggingDir", ".");
291 m_physicsLoggingPrefix = pConfig.GetString("PhysicsLoggingPrefix", "physics-%REGIONNAME%-"); 292 m_physicsLoggingPrefix = pConfig.GetString("PhysicsLoggingPrefix", "physics-%REGIONNAME%-");
292 m_physicsLoggingFileMinutes = pConfig.GetInt("PhysicsLoggingFileMinutes", 5); 293 m_physicsLoggingFileMinutes = pConfig.GetInt("PhysicsLoggingFileMinutes", 5);
294 m_physicsLoggingDoFlush = pConfig.GetBoolean("PhysicsLoggingDoFlush", false);
293 // Very detailed logging for vehicle debugging 295 // Very detailed logging for vehicle debugging
294 VehicleLoggingEnabled = pConfig.GetBoolean("VehicleLoggingEnabled", false); 296 VehicleLoggingEnabled = pConfig.GetBoolean("VehicleLoggingEnabled", false);
295 297
@@ -494,7 +496,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
494 496
495 try 497 try
496 { 498 {
497 if (VehicleLoggingEnabled) DumpVehicles(); // DEBUG 499 // if (VehicleLoggingEnabled) DumpVehicles(); // DEBUG
498 if (PhysicsLogging.Enabled) beforeTime = Util.EnvironmentTickCount(); 500 if (PhysicsLogging.Enabled) beforeTime = Util.EnvironmentTickCount();
499 501
500 numSubSteps = BulletSimAPI.PhysicsStep2(World.ptr, timeStep, m_maxSubSteps, m_fixedTimeStep, 502 numSubSteps = BulletSimAPI.PhysicsStep2(World.ptr, timeStep, m_maxSubSteps, m_fixedTimeStep,
@@ -503,7 +505,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
503 if (PhysicsLogging.Enabled) simTime = Util.EnvironmentTickCountSubtract(beforeTime); 505 if (PhysicsLogging.Enabled) simTime = Util.EnvironmentTickCountSubtract(beforeTime);
504 DetailLog("{0},Simulate,call, frame={1}, nTaints={2}, simTime={3}, substeps={4}, updates={5}, colliders={6}", 506 DetailLog("{0},Simulate,call, frame={1}, nTaints={2}, simTime={3}, substeps={4}, updates={5}, colliders={6}",
505 DetailLogZero, m_simulationStep, numTaints, simTime, numSubSteps, updatedEntityCount, collidersCount); 507 DetailLogZero, m_simulationStep, numTaints, simTime, numSubSteps, updatedEntityCount, collidersCount);
506 if (VehicleLoggingEnabled) DumpVehicles(); // DEBUG 508 // if (VehicleLoggingEnabled) DumpVehicles(); // DEBUG
507 } 509 }
508 catch (Exception e) 510 catch (Exception e)
509 { 511 {
@@ -634,12 +636,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
634 636
635 public override void SetWaterLevel(float baseheight) 637 public override void SetWaterLevel(float baseheight)
636 { 638 {
637 m_waterLevel = baseheight; 639 SimpleWaterLevel = baseheight;
638 }
639 // Someday....
640 public float GetWaterLevelAtXYZ(Vector3 loc)
641 {
642 return m_waterLevel;
643 } 640 }
644 641
645 public override void DeleteTerrain() 642 public override void DeleteTerrain()
@@ -1493,7 +1490,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
1493 { 1490 {
1494 PhysicsLogging.Write(msg, args); 1491 PhysicsLogging.Write(msg, args);
1495 // Add the Flush() if debugging crashes. Gets all the messages written out. 1492 // Add the Flush() if debugging crashes. Gets all the messages written out.
1496 // PhysicsLogging.Flush(); 1493 if (m_physicsLoggingDoFlush) PhysicsLogging.Flush();
1497 } 1494 }
1498 // Used to fill in the LocalID when there isn't one. It's the correct number of characters. 1495 // Used to fill in the LocalID when there isn't one. It's the correct number of characters.
1499 public const string DetailLogZero = "0000000000"; 1496 public const string DetailLogZero = "0000000000";