aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
diff options
context:
space:
mode:
authorUbitUmarov2015-10-22 16:20:19 +0100
committerUbitUmarov2015-10-22 16:20:19 +0100
commit7aaa84515fef4ba6138cb568a08b9b02502142f6 (patch)
treed6b2420fb0b4cc325f4974c660d25c4e215be2be /OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
parentMark XAssetService obsolete and warn users. (diff)
downloadopensim-SC_OLD-7aaa84515fef4ba6138cb568a08b9b02502142f6.zip
opensim-SC_OLD-7aaa84515fef4ba6138cb568a08b9b02502142f6.tar.gz
opensim-SC_OLD-7aaa84515fef4ba6138cb568a08b9b02502142f6.tar.bz2
opensim-SC_OLD-7aaa84515fef4ba6138cb568a08b9b02502142f6.tar.xz
rename terrain for opensim and respective configuration flag that a future costumized ODE library may have
Diffstat (limited to 'OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs')
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs27
1 files changed, 15 insertions, 12 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
index 5adf374..103304d 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
@@ -169,7 +169,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
169 { 169 {
170 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 170 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
171 171
172 public bool m_ubOdeLib = false; 172 public bool m_OSOdeLib = false;
173 public bool m_suportCombine = false; // mega suport not tested 173 public bool m_suportCombine = false; // mega suport not tested
174 public Scene m_frameWorkScene = null; 174 public Scene m_frameWorkScene = null;
175 175
@@ -322,7 +322,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
322 322
323 IConfig physicsconfig = null; 323 IConfig physicsconfig = null;
324 324
325 public ODEScene(Scene pscene, IConfigSource psourceconfig, string pname, bool pubOdeLib) 325 public ODEScene(Scene pscene, IConfigSource psourceconfig, string pname, bool pOSOdeLib)
326 { 326 {
327 OdeLock = new Object(); 327 OdeLock = new Object();
328 328
@@ -330,7 +330,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde
330 PhysicsSceneName = EngineType + "/" + pscene.RegionInfo.RegionName; 330 PhysicsSceneName = EngineType + "/" + pscene.RegionInfo.RegionName;
331 331
332 m_config = psourceconfig; 332 m_config = psourceconfig;
333 m_ubOdeLib = pubOdeLib; 333 m_OSOdeLib = pOSOdeLib;
334
335// m_OSOdeLib = false; //debug
336
334 m_frameWorkScene = pscene; 337 m_frameWorkScene = pscene;
335 338
336 m_frameWorkScene.RegisterModuleInterface<PhysicsScene>(this); 339 m_frameWorkScene.RegisterModuleInterface<PhysicsScene>(this);
@@ -1920,7 +1923,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1920 int regsizeY = (int)m_regionHeight + 3; // map size see setterrain number of samples 1923 int regsizeY = (int)m_regionHeight + 3; // map size see setterrain number of samples
1921 int regsize = regsizeX; 1924 int regsize = regsizeX;
1922 1925
1923 if (m_ubOdeLib) 1926 if (m_OSOdeLib)
1924 { 1927 {
1925 if (x < regsizeX - 1) 1928 if (x < regsizeX - 1)
1926 { 1929 {
@@ -2064,7 +2067,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2064 int ystep = regsizeX; 2067 int ystep = regsizeX;
2065 bool firstTri = false; 2068 bool firstTri = false;
2066 2069
2067 if (m_ubOdeLib) 2070 if (m_OSOdeLib)
2068 { 2071 {
2069 if (x < regsizeX - 1) 2072 if (x < regsizeX - 1)
2070 { 2073 {
@@ -2176,8 +2179,8 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2176 2179
2177 public void SetTerrain(float[] heightMap, Vector3 pOffset) 2180 public void SetTerrain(float[] heightMap, Vector3 pOffset)
2178 { 2181 {
2179 if (m_ubOdeLib) 2182 if (m_OSOdeLib)
2180 ubSetTerrain(heightMap, pOffset); 2183 OSSetTerrain(heightMap, pOffset);
2181 else 2184 else
2182 OriSetTerrain(heightMap, pOffset); 2185 OriSetTerrain(heightMap, pOffset);
2183 } 2186 }
@@ -2302,7 +2305,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2302 } 2305 }
2303 } 2306 }
2304 2307
2305 public void ubSetTerrain(float[] heightMap, Vector3 pOffset) 2308 public void OSSetTerrain(float[] heightMap, Vector3 pOffset)
2306 { 2309 {
2307 // assumes 1m size grid and constante size square regions 2310 // assumes 1m size grid and constante size square regions
2308 // needs to know about sims around in future 2311 // needs to know about sims around in future
@@ -2376,7 +2379,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2376 } 2379 }
2377 } 2380 }
2378 } 2381 }
2379 IntPtr HeightmapData = d.GeomubTerrainDataCreate(); 2382 IntPtr HeightmapData = d.GeomOSTerrainDataCreate();
2380 2383
2381 const int wrap = 0; 2384 const int wrap = 0;
2382 float thickness = hfmin; 2385 float thickness = hfmin;
@@ -2385,12 +2388,12 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2385 2388
2386 GCHandle _heightmaphandler = GCHandle.Alloc(_heightmap, GCHandleType.Pinned); 2389 GCHandle _heightmaphandler = GCHandle.Alloc(_heightmap, GCHandleType.Pinned);
2387 2390
2388 d.GeomubTerrainDataBuild(HeightmapData, _heightmaphandler.AddrOfPinnedObject(), 0, 1.0f, 2391 d.GeomOSTerrainDataBuild(HeightmapData, _heightmaphandler.AddrOfPinnedObject(), 0, 1.0f,
2389 (int)heightmapWidthSamples, (int)heightmapHeightSamples, 2392 (int)heightmapWidthSamples, (int)heightmapHeightSamples,
2390 thickness, wrap); 2393 thickness, wrap);
2391 2394
2392// d.GeomubTerrainDataSetBounds(HeightmapData, hfmin - 1, hfmax + 1); 2395// d.GeomOSTerrainDataSetBounds(HeightmapData, hfmin - 1, hfmax + 1);
2393 GroundGeom = d.CreateubTerrain(GroundSpace, HeightmapData, 1); 2396 GroundGeom = d.CreateOSTerrain(GroundSpace, HeightmapData, 1);
2394 if (GroundGeom != IntPtr.Zero) 2397 if (GroundGeom != IntPtr.Zero)
2395 { 2398 {
2396 d.GeomSetCategoryBits(GroundGeom, (uint)(CollisionCategories.Land)); 2399 d.GeomSetCategoryBits(GroundGeom, (uint)(CollisionCategories.Land));