aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Manager
diff options
context:
space:
mode:
authorUbitUmarov2015-08-19 08:48:50 +0100
committerUbitUmarov2015-08-19 08:48:50 +0100
commit0b105da626ae8c2fb519a817b827f90534ed7d08 (patch)
tree509e6d091fb12f38fd09528335e51aeedbe59c08 /OpenSim/Region/Physics/Manager
parentMerge branch 'master' into ubitworkmaster (diff)
parentvarregion: update MapImageServiceModule to upload multiple map tiles for larg... (diff)
downloadopensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.zip
opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.tar.gz
opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.tar.bz2
opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.tar.xz
Merge branch 'mbworkvar2' into ubitvar
Diffstat (limited to 'OpenSim/Region/Physics/Manager')
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs14
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs9
2 files changed, 21 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs
index 8ccfda5..d14edfd 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs
@@ -32,6 +32,7 @@ using System.Reflection;
32using Nini.Config; 32using Nini.Config;
33using log4net; 33using log4net;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenMetaverse;
35 36
36namespace OpenSim.Region.Physics.Manager 37namespace OpenSim.Region.Physics.Manager
37{ 38{
@@ -59,6 +60,14 @@ namespace OpenSim.Region.Physics.Manager
59 m_log.Info("[PHYSICS]: Added meshing engine: " + plugHard.GetName()); 60 m_log.Info("[PHYSICS]: Added meshing engine: " + plugHard.GetName());
60 } 61 }
61 62
63 // Legacy method for simulators before extent was passed
64 public PhysicsScene GetPhysicsScene(string physEngineName, string meshEngineName,
65 IConfigSource config, string regionName)
66 {
67 Vector3 extent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight);
68 return GetPhysicsScene(physEngineName, meshEngineName, config, regionName, extent);
69 }
70
62 /// <summary> 71 /// <summary>
63 /// Get a physics scene for the given physics engine and mesher. 72 /// Get a physics scene for the given physics engine and mesher.
64 /// </summary> 73 /// </summary>
@@ -66,7 +75,8 @@ namespace OpenSim.Region.Physics.Manager
66 /// <param name="meshEngineName"></param> 75 /// <param name="meshEngineName"></param>
67 /// <param name="config"></param> 76 /// <param name="config"></param>
68 /// <returns></returns> 77 /// <returns></returns>
69 public PhysicsScene GetPhysicsScene(string physEngineName, string meshEngineName, IConfigSource config, string regionName) 78 public PhysicsScene GetPhysicsScene(string physEngineName, string meshEngineName,
79 IConfigSource config, string regionName, Vector3 regionExtent)
70 { 80 {
71 if (String.IsNullOrEmpty(physEngineName)) 81 if (String.IsNullOrEmpty(physEngineName))
72 { 82 {
@@ -94,7 +104,7 @@ namespace OpenSim.Region.Physics.Manager
94 { 104 {
95 m_log.Info("[PHYSICS]: creating " + physEngineName); 105 m_log.Info("[PHYSICS]: creating " + physEngineName);
96 PhysicsScene result = _PhysPlugins[physEngineName].GetScene(regionName); 106 PhysicsScene result = _PhysPlugins[physEngineName].GetScene(regionName);
97 result.Initialise(meshEngine, config); 107 result.Initialise(meshEngine, config, regionExtent);
98 return result; 108 return result;
99 } 109 }
100 else 110 else
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index dd9bbc1..4f4ff07 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -132,8 +132,17 @@ namespace OpenSim.Region.Physics.Manager
132 } 132 }
133 } 133 }
134 134
135 // Deprecated. Do not use this for new physics engines.
135 public abstract void Initialise(IMesher meshmerizer, IConfigSource config); 136 public abstract void Initialise(IMesher meshmerizer, IConfigSource config);
136 137
138 // For older physics engines that do not implement non-legacy region sizes.
139 // If the physics engine handles the region extent feature, it overrides this function.
140 public virtual void Initialise(IMesher meshmerizer, IConfigSource config, Vector3 regionExtent)
141 {
142 // If not overridden, call the old initialization entry.
143 Initialise(meshmerizer, config);
144 }
145
137 /// <summary> 146 /// <summary>
138 /// Add an avatar 147 /// Add an avatar
139 /// </summary> 148 /// </summary>