aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/POS/POSScene.cs
diff options
context:
space:
mode:
authorRobert Adams2015-09-08 04:54:16 -0700
committerRobert Adams2015-09-08 04:54:16 -0700
commite5367d822be9b05e74c859afe2d2956a3e95aa33 (patch)
treee904050a30715df587aa527d7f313755177726a7 /OpenSim/Region/PhysicsModules/POS/POSScene.cs
parentadd lost admin_reset_land method (diff)
parentDeleted access control spec from [LoginService] section of standalone config.... (diff)
downloadopensim-SC-e5367d822be9b05e74c859afe2d2956a3e95aa33.zip
opensim-SC-e5367d822be9b05e74c859afe2d2956a3e95aa33.tar.gz
opensim-SC-e5367d822be9b05e74c859afe2d2956a3e95aa33.tar.bz2
opensim-SC-e5367d822be9b05e74c859afe2d2956a3e95aa33.tar.xz
Merge of ubitworkvarnew with opensim/master as of 20150905.
This integrates the OpenSim refactoring to make physics, etc into modules. AVN physics hasn't been moved to new location. Does not compile yet. Merge branch 'osmaster' into mbworknew1
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/PhysicsModules/POS/POSScene.cs (renamed from OpenSim/Region/Physics/POSPlugin/POSScene.cs)66
1 files changed, 58 insertions, 8 deletions
diff --git a/OpenSim/Region/Physics/POSPlugin/POSScene.cs b/OpenSim/Region/PhysicsModules/POS/POSScene.cs
index 061304a..e6bcbf2 100644
--- a/OpenSim/Region/Physics/POSPlugin/POSScene.cs
+++ b/OpenSim/Region/PhysicsModules/POS/POSScene.cs
@@ -29,31 +29,81 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using Nini.Config; 30using Nini.Config;
31using OpenMetaverse; 31using OpenMetaverse;
32using Mono.Addins;
32using OpenSim.Framework; 33using OpenSim.Framework;
33using OpenSim.Region.Physics.Manager; 34using OpenSim.Region.PhysicsModules.SharedBase;
35using OpenSim.Region.Framework.Scenes;
36using OpenSim.Region.Framework.Interfaces;
34 37
35namespace OpenSim.Region.Physics.POSPlugin 38namespace OpenSim.Region.PhysicsModule.POS
36{ 39{
37 public class POSScene : PhysicsScene 40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "POSPhysicsScene")]
41 public class POSScene : PhysicsScene, INonSharedRegionModule
38 { 42 {
39 private List<POSCharacter> _characters = new List<POSCharacter>(); 43 private List<POSCharacter> _characters = new List<POSCharacter>();
40 private List<POSPrim> _prims = new List<POSPrim>(); 44 private List<POSPrim> _prims = new List<POSPrim>();
41 private float[] _heightMap; 45 private float[] _heightMap;
42 private const float gravity = -9.8f; 46 private const float gravity = -9.8f;
43 47
48 private bool m_Enabled = false;
44 //protected internal string sceneIdentifier; 49 //protected internal string sceneIdentifier;
45 50
46 public POSScene(string engineType, String _sceneIdentifier) 51 #region INonSharedRegionModule
52 public string Name
47 { 53 {
48 EngineType = engineType; 54 get { return "POS"; }
49 Name = EngineType + "/" + _sceneIdentifier;
50 //sceneIdentifier = _sceneIdentifier;
51 } 55 }
52 56
53 public override void Initialise(IMesher meshmerizer, IConfigSource config) 57 public Type ReplaceableInterface
54 { 58 {
59 get { return null; }
55 } 60 }
56 61
62 public void Initialise(IConfigSource source)
63 {
64 // TODO: Move this out of Startup
65 IConfig config = source.Configs["Startup"];
66 if (config != null)
67 {
68 string physics = config.GetString("physics", string.Empty);
69 if (physics == Name)
70 m_Enabled = true;
71 }
72
73 }
74
75 public void Close()
76 {
77 }
78
79 public void AddRegion(Scene scene)
80 {
81 if (!m_Enabled)
82 return;
83
84 EngineType = Name;
85 PhysicsSceneName = EngineType + "/" + scene.RegionInfo.RegionName;
86
87 scene.RegisterModuleInterface<PhysicsScene>(this);
88 base.Initialise(scene.PhysicsRequestAsset,
89 (scene.Heightmap != null ? scene.Heightmap.GetFloatsSerialised() : new float[Constants.RegionSize * Constants.RegionSize]),
90 (float)scene.RegionInfo.RegionSettings.WaterHeight);
91
92 }
93
94 public void RemoveRegion(Scene scene)
95 {
96 if (!m_Enabled)
97 return;
98 }
99
100 public void RegionLoaded(Scene scene)
101 {
102 if (!m_Enabled)
103 return;
104 }
105 #endregion
106
57 public override void Dispose() 107 public override void Dispose()
58 { 108 {
59 } 109 }