From 971b613d088d77235aeef4b6ba7bffd612f4bfda Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 8 Sep 2015 16:47:31 +0100 Subject: fix some compile --- .../PhysicsModules/UbitMeshing/HelperTypes.cs | 4 +- OpenSim/Region/PhysicsModules/UbitMeshing/Mesh.cs | 4 +- .../PhysicsModules/UbitMeshing/Meshmerizer.cs | 71 +++++++++++++++------- prebuild.xml | 10 +-- 4 files changed, 59 insertions(+), 30 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; using System.Diagnostics; using System.Globalization; using OpenMetaverse; -using OpenSim.Region.Physics.Manager; -using OpenSim.Region.Physics.Meshing; +using OpenSim.Region.PhysicsModules.SharedBase; +using OpenSim.Region.PhysicsModules.UbitMeshing; public class Vertex : IComparable { 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; using System.Collections.Generic; using System.IO; using System.Runtime.InteropServices; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.PhysicsModules.SharedBase; using PrimMesher; using OpenMetaverse; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; -namespace OpenSim.Region.Physics.Meshing +namespace OpenSim.Region.PhysicsModules.UbitMeshing { public class MeshBuildingData { 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 @@ using System; using System.Collections.Generic; using OpenSim.Framework; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenMetaverse; using OpenMetaverse.StructuredData; using System.Drawing; @@ -41,36 +43,23 @@ using Nini.Config; using System.Reflection; using System.IO; using ComponentAce.Compression.Libs.zlib; -using OpenSim.Region.Physics.ConvexDecompositionDotNet; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; -namespace OpenSim.Region.Physics.Meshing -{ - public class MeshmerizerPlugin : IMeshingPlugin - { - public MeshmerizerPlugin() - { - } +using Mono.Addins; - public string GetName() - { - return "UbitMeshmerizer"; - } - - public IMesher GetMesher(IConfigSource config) - { - return new Meshmerizer(config); - } - } - - public class Meshmerizer : IMesher +namespace OpenSim.Region.PhysicsModules.UbitMeshing +{ + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "UbitMeshmerizer")] + public class UbitMeshmerizer : IMesher, INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // Setting baseDir to a path will enable the dumping of raw files // raw files can be imported by blender so a visual inspection of the results can be done + private bool m_Enabled = false; + public object diskLock = new object(); public bool doMeshFileCache = true; @@ -89,7 +78,18 @@ namespace OpenSim.Region.Physics.Meshing private Dictionary m_uniqueMeshes = new Dictionary(); private Dictionary m_uniqueReleasedMeshes = new Dictionary(); - public Meshmerizer(IConfigSource config) + #region INonSharedRegionModule + public string Name + { + get { return "UbitMeshmerizer"; } + } + + public Type ReplaceableInterface + { + get { return null; } + } + + public void Initialise(IConfigSource config) { IConfig start_config = config.Configs["Startup"]; IConfig mesh_config = config.Configs["Mesh"]; @@ -118,7 +118,34 @@ namespace OpenSim.Region.Physics.Meshing CacheExpire = TimeSpan.FromHours(fcache); } + public void Close() + { + } + + public void AddRegion(Scene scene) + { + if (!m_Enabled) + return; + + scene.RegisterModuleInterface(this); + } + public void RemoveRegion(Scene scene) + { + if (!m_Enabled) + return; + + scene.UnregisterModuleInterface(this); + } + + public void RegionLoaded(Scene scene) + { + if (!m_Enabled) + return; + } + + #endregion + /// /// creates a simple box mesh of the specified size. This mesh is of very low vertex count and may /// be useful as a backup proxy when level of detail is not needed or when more complex meshes fail diff --git a/prebuild.xml b/prebuild.xml index a9b9336..fdef5c5 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -414,10 +414,12 @@ + - - + + + @@ -1589,7 +1591,7 @@ - + ../../../../bin/ @@ -1755,7 +1757,7 @@ - + -- cgit v1.1