aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2015-09-08 16:47:31 +0100
committerUbitUmarov2015-09-08 16:47:31 +0100
commit971b613d088d77235aeef4b6ba7bffd612f4bfda (patch)
tree6573ad07a580f77a9bd524a74bb647a5fff25243 /OpenSim
parentMerge branch 'mbworknew1' into ubitworkvarnew (diff)
downloadopensim-SC_OLD-971b613d088d77235aeef4b6ba7bffd612f4bfda.zip
opensim-SC_OLD-971b613d088d77235aeef4b6ba7bffd612f4bfda.tar.gz
opensim-SC_OLD-971b613d088d77235aeef4b6ba7bffd612f4bfda.tar.bz2
opensim-SC_OLD-971b613d088d77235aeef4b6ba7bffd612f4bfda.tar.xz
fix some compile
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/PhysicsModules/UbitMeshing/HelperTypes.cs4
-rw-r--r--OpenSim/Region/PhysicsModules/UbitMeshing/Mesh.cs4
-rw-r--r--OpenSim/Region/PhysicsModules/UbitMeshing/Meshmerizer.cs71
3 files changed, 53 insertions, 26 deletions
diff --git a/OpenSim/Region/PhysicsModules/UbitMeshing/HelperTypes.cs b/OpenSim/Region/PhysicsModules/UbitMeshing/HelperTypes.cs
index 5dc1e78..284d9fe 100644
--- a/OpenSim/Region/PhysicsModules/UbitMeshing/HelperTypes.cs
+++ b/OpenSim/Region/PhysicsModules/UbitMeshing/HelperTypes.cs
@@ -30,8 +30,8 @@ using System.Collections.Generic;
30using System.Diagnostics; 30using System.Diagnostics;
31using System.Globalization; 31using System.Globalization;
32using OpenMetaverse; 32using OpenMetaverse;
33using OpenSim.Region.Physics.Manager; 33using OpenSim.Region.PhysicsModules.SharedBase;
34using OpenSim.Region.Physics.Meshing; 34using OpenSim.Region.PhysicsModules.UbitMeshing;
35 35
36public class Vertex : IComparable<Vertex> 36public class Vertex : IComparable<Vertex>
37{ 37{
diff --git a/OpenSim/Region/PhysicsModules/UbitMeshing/Mesh.cs b/OpenSim/Region/PhysicsModules/UbitMeshing/Mesh.cs
index 0418893..485de63 100644
--- a/OpenSim/Region/PhysicsModules/UbitMeshing/Mesh.cs
+++ b/OpenSim/Region/PhysicsModules/UbitMeshing/Mesh.cs
@@ -29,13 +29,13 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.Runtime.InteropServices; 31using System.Runtime.InteropServices;
32using OpenSim.Region.Physics.Manager; 32using OpenSim.Region.PhysicsModules.SharedBase;
33using PrimMesher; 33using PrimMesher;
34using OpenMetaverse; 34using OpenMetaverse;
35using System.Runtime.Serialization; 35using System.Runtime.Serialization;
36using System.Runtime.Serialization.Formatters.Binary; 36using System.Runtime.Serialization.Formatters.Binary;
37 37
38namespace OpenSim.Region.Physics.Meshing 38namespace OpenSim.Region.PhysicsModules.UbitMeshing
39{ 39{
40 public class MeshBuildingData 40 public class MeshBuildingData
41 { 41 {
diff --git a/OpenSim/Region/PhysicsModules/UbitMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/UbitMeshing/Meshmerizer.cs
index c131c6f..7a728ce 100644
--- a/OpenSim/Region/PhysicsModules/UbitMeshing/Meshmerizer.cs
+++ b/OpenSim/Region/PhysicsModules/UbitMeshing/Meshmerizer.cs
@@ -29,7 +29,9 @@
29using System; 29using System;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Physics.Manager; 32using OpenSim.Region.Framework.Scenes;
33using OpenSim.Region.Framework.Interfaces;
34using OpenSim.Region.PhysicsModules.SharedBase;
33using OpenMetaverse; 35using OpenMetaverse;
34using OpenMetaverse.StructuredData; 36using OpenMetaverse.StructuredData;
35using System.Drawing; 37using System.Drawing;
@@ -41,36 +43,23 @@ using Nini.Config;
41using System.Reflection; 43using System.Reflection;
42using System.IO; 44using System.IO;
43using ComponentAce.Compression.Libs.zlib; 45using ComponentAce.Compression.Libs.zlib;
44using OpenSim.Region.Physics.ConvexDecompositionDotNet;
45using System.Runtime.Serialization; 46using System.Runtime.Serialization;
46using System.Runtime.Serialization.Formatters.Binary; 47using System.Runtime.Serialization.Formatters.Binary;
47 48
48namespace OpenSim.Region.Physics.Meshing 49using Mono.Addins;
49{
50 public class MeshmerizerPlugin : IMeshingPlugin
51 {
52 public MeshmerizerPlugin()
53 {
54 }
55 50
56 public string GetName() 51namespace OpenSim.Region.PhysicsModules.UbitMeshing
57 { 52{
58 return "UbitMeshmerizer"; 53 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "UbitMeshmerizer")]
59 } 54 public class UbitMeshmerizer : IMesher, INonSharedRegionModule
60
61 public IMesher GetMesher(IConfigSource config)
62 {
63 return new Meshmerizer(config);
64 }
65 }
66
67 public class Meshmerizer : IMesher
68 { 55 {
69 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 56 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
70 57
71 // Setting baseDir to a path will enable the dumping of raw files 58 // Setting baseDir to a path will enable the dumping of raw files
72 // raw files can be imported by blender so a visual inspection of the results can be done 59 // raw files can be imported by blender so a visual inspection of the results can be done
73 60
61 private bool m_Enabled = false;
62
74 public object diskLock = new object(); 63 public object diskLock = new object();
75 64
76 public bool doMeshFileCache = true; 65 public bool doMeshFileCache = true;
@@ -89,7 +78,18 @@ namespace OpenSim.Region.Physics.Meshing
89 private Dictionary<AMeshKey, Mesh> m_uniqueMeshes = new Dictionary<AMeshKey, Mesh>(); 78 private Dictionary<AMeshKey, Mesh> m_uniqueMeshes = new Dictionary<AMeshKey, Mesh>();
90 private Dictionary<AMeshKey, Mesh> m_uniqueReleasedMeshes = new Dictionary<AMeshKey, Mesh>(); 79 private Dictionary<AMeshKey, Mesh> m_uniqueReleasedMeshes = new Dictionary<AMeshKey, Mesh>();
91 80
92 public Meshmerizer(IConfigSource config) 81 #region INonSharedRegionModule
82 public string Name
83 {
84 get { return "UbitMeshmerizer"; }
85 }
86
87 public Type ReplaceableInterface
88 {
89 get { return null; }
90 }
91
92 public void Initialise(IConfigSource config)
93 { 93 {
94 IConfig start_config = config.Configs["Startup"]; 94 IConfig start_config = config.Configs["Startup"];
95 IConfig mesh_config = config.Configs["Mesh"]; 95 IConfig mesh_config = config.Configs["Mesh"];
@@ -118,7 +118,34 @@ namespace OpenSim.Region.Physics.Meshing
118 CacheExpire = TimeSpan.FromHours(fcache); 118 CacheExpire = TimeSpan.FromHours(fcache);
119 119
120 } 120 }
121 public void Close()
122 {
123 }
124
125 public void AddRegion(Scene scene)
126 {
127 if (!m_Enabled)
128 return;
129
130 scene.RegisterModuleInterface<IMesher>(this);
131 }
121 132
133 public void RemoveRegion(Scene scene)
134 {
135 if (!m_Enabled)
136 return;
137
138 scene.UnregisterModuleInterface<IMesher>(this);
139 }
140
141 public void RegionLoaded(Scene scene)
142 {
143 if (!m_Enabled)
144 return;
145 }
146
147 #endregion
148
122 /// <summary> 149 /// <summary>
123 /// creates a simple box mesh of the specified size. This mesh is of very low vertex count and may 150 /// creates a simple box mesh of the specified size. This mesh is of very low vertex count and may
124 /// be useful as a backup proxy when level of detail is not needed or when more complex meshes fail 151 /// be useful as a backup proxy when level of detail is not needed or when more complex meshes fail