diff options
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/ZeroMesher.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/Tests/ODETestClass.cs | 6 | ||||
-rw-r--r-- | bin/OpenSimDefaults.ini | 6 |
5 files changed, 18 insertions, 14 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs index 7130a3e..3763696 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs | |||
@@ -81,7 +81,7 @@ namespace OpenSim.Region.Physics.Manager | |||
81 | if (_MeshPlugins.ContainsKey(meshEngineName)) | 81 | if (_MeshPlugins.ContainsKey(meshEngineName)) |
82 | { | 82 | { |
83 | m_log.Info("[PHYSICS]: creating meshing engine " + meshEngineName); | 83 | m_log.Info("[PHYSICS]: creating meshing engine " + meshEngineName); |
84 | meshEngine = _MeshPlugins[meshEngineName].GetMesher(); | 84 | meshEngine = _MeshPlugins[meshEngineName].GetMesher(config); |
85 | } | 85 | } |
86 | else | 86 | else |
87 | { | 87 | { |
@@ -234,6 +234,6 @@ namespace OpenSim.Region.Physics.Manager | |||
234 | public interface IMeshingPlugin | 234 | public interface IMeshingPlugin |
235 | { | 235 | { |
236 | string GetName(); | 236 | string GetName(); |
237 | IMesher GetMesher(); | 237 | IMesher GetMesher(IConfigSource config); |
238 | } | 238 | } |
239 | } | 239 | } |
diff --git a/OpenSim/Region/Physics/Manager/ZeroMesher.cs b/OpenSim/Region/Physics/Manager/ZeroMesher.cs index e6e75f9..ba19db6 100644 --- a/OpenSim/Region/Physics/Manager/ZeroMesher.cs +++ b/OpenSim/Region/Physics/Manager/ZeroMesher.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using OpenSim.Framework; | 29 | using OpenSim.Framework; |
30 | using OpenMetaverse; | 30 | using OpenMetaverse; |
31 | using Nini.Config; | ||
31 | 32 | ||
32 | /* | 33 | /* |
33 | * This is the zero mesher. | 34 | * This is the zero mesher. |
@@ -53,7 +54,7 @@ namespace OpenSim.Region.Physics.Manager | |||
53 | return "ZeroMesher"; | 54 | return "ZeroMesher"; |
54 | } | 55 | } |
55 | 56 | ||
56 | public IMesher GetMesher() | 57 | public IMesher GetMesher(IConfigSource config) |
57 | { | 58 | { |
58 | return new ZeroMesher(); | 59 | return new ZeroMesher(); |
59 | } | 60 | } |
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index fded95e..62f947c 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -35,6 +35,7 @@ using System.Drawing; | |||
35 | using System.Drawing.Imaging; | 35 | using System.Drawing.Imaging; |
36 | using PrimMesher; | 36 | using PrimMesher; |
37 | using log4net; | 37 | using log4net; |
38 | using Nini.Config; | ||
38 | using System.Reflection; | 39 | using System.Reflection; |
39 | using System.IO; | 40 | using System.IO; |
40 | 41 | ||
@@ -51,9 +52,9 @@ namespace OpenSim.Region.Physics.Meshing | |||
51 | return "Meshmerizer"; | 52 | return "Meshmerizer"; |
52 | } | 53 | } |
53 | 54 | ||
54 | public IMesher GetMesher() | 55 | public IMesher GetMesher(IConfigSource config) |
55 | { | 56 | { |
56 | return new Meshmerizer(); | 57 | return new Meshmerizer(config); |
57 | } | 58 | } |
58 | } | 59 | } |
59 | 60 | ||
@@ -70,14 +71,18 @@ namespace OpenSim.Region.Physics.Meshing | |||
70 | #endif | 71 | #endif |
71 | 72 | ||
72 | private bool cacheSculptMaps = true; | 73 | private bool cacheSculptMaps = true; |
73 | private string decodedScultMapPath = "j2kDecodeCache"; | 74 | private string decodedScultMapPath = null; |
74 | 75 | ||
75 | private float minSizeForComplexMesh = 0.2f; // prims with all dimensions smaller than this will have a bounding box mesh | 76 | private float minSizeForComplexMesh = 0.2f; // prims with all dimensions smaller than this will have a bounding box mesh |
76 | 77 | ||
77 | private Dictionary<ulong, Mesh> m_uniqueMeshes = new Dictionary<ulong, Mesh>(); | 78 | private Dictionary<ulong, Mesh> m_uniqueMeshes = new Dictionary<ulong, Mesh>(); |
78 | 79 | ||
79 | public Meshmerizer() | 80 | public Meshmerizer(IConfigSource config) |
80 | { | 81 | { |
82 | IConfig start_config = config.Configs["Startup"]; | ||
83 | |||
84 | decodedScultMapPath = start_config.GetString("DecodedSculpMapPath","j2kDecodeCache"); | ||
85 | |||
81 | try | 86 | try |
82 | { | 87 | { |
83 | if (!Directory.Exists(decodedScultMapPath)) | 88 | if (!Directory.Exists(decodedScultMapPath)) |
diff --git a/OpenSim/Region/Physics/OdePlugin/Tests/ODETestClass.cs b/OpenSim/Region/Physics/OdePlugin/Tests/ODETestClass.cs index 69e2d03..ab8f8bf 100644 --- a/OpenSim/Region/Physics/OdePlugin/Tests/ODETestClass.cs +++ b/OpenSim/Region/Physics/OdePlugin/Tests/ODETestClass.cs | |||
@@ -48,6 +48,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
48 | [SetUp] | 48 | [SetUp] |
49 | public void Initialize() | 49 | public void Initialize() |
50 | { | 50 | { |
51 | IConfigSource TopConfig = new IniConfigSource(); | ||
52 | IConfig config = TopConfig.AddConfig("Startup"); | ||
53 | config.Set("DecodedSculpMapPath","j2kDecodeCache"); | ||
54 | |||
51 | // Loading ODEPlugin | 55 | // Loading ODEPlugin |
52 | cbt = new OdePlugin(); | 56 | cbt = new OdePlugin(); |
53 | // Loading Zero Mesher | 57 | // Loading Zero Mesher |
@@ -55,7 +59,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
55 | // Getting Physics Scene | 59 | // Getting Physics Scene |
56 | ps = cbt.GetScene("test"); | 60 | ps = cbt.GetScene("test"); |
57 | // Initializing Physics Scene. | 61 | // Initializing Physics Scene. |
58 | ps.Initialise(imp.GetMesher(),null); | 62 | ps.Initialise(imp.GetMesher(TopConfig),null); |
59 | float[] _heightmap = new float[(int)Constants.RegionSize * (int)Constants.RegionSize]; | 63 | float[] _heightmap = new float[(int)Constants.RegionSize * (int)Constants.RegionSize]; |
60 | for (int i = 0; i < ((int)Constants.RegionSize * (int)Constants.RegionSize); i++) | 64 | for (int i = 0; i < ((int)Constants.RegionSize * (int)Constants.RegionSize); i++) |
61 | { | 65 | { |
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 26acac7..4c579c9 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini | |||
@@ -1003,14 +1003,8 @@ | |||
1003 | ; false to allow script controlled underground positioning of | 1003 | ; false to allow script controlled underground positioning of |
1004 | ; prims | 1004 | ; prims |
1005 | ; DisableUndergroundMovement = true | 1005 | ; DisableUndergroundMovement = true |
1006 | <<<<<<< HEAD:bin/OpenSimDefaults.ini | ||
1007 | 1006 | ||
1008 | ; Path to script engine assemblies | ||
1009 | ; Default is ./bin/ScriptEngines | ||
1010 | ======= | ||
1011 | |||
1012 | ;; Path to script assemblies | 1007 | ;; Path to script assemblies |
1013 | >>>>>>> 298b4c0... Some cleanup to OpenSimDefaults.ini:OpenSim/Region/Application/OpenSimDefaults.ini | ||
1014 | ; ScriptEnginesPath = "ScriptEngines" | 1008 | ; ScriptEnginesPath = "ScriptEngines" |
1015 | 1009 | ||
1016 | [OpenGridProtocol] | 1010 | [OpenGridProtocol] |