aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
diff options
context:
space:
mode:
authorCharles Krinke2009-02-22 20:52:55 +0000
committerCharles Krinke2009-02-22 20:52:55 +0000
commit8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49 (patch)
tree96a24a49de82056060dd9b7bab0cb209d5f1a129 /OpenSim/Region/Physics/Meshing/Meshmerizer.cs
parentAllow delivery of object messages gridwide (diff)
downloadopensim-SC-8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49.zip
opensim-SC-8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49.tar.gz
opensim-SC-8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49.tar.bz2
opensim-SC-8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49.tar.xz
Mantis#3218. Thank you kindly, TLaukkan (Tommil) for a patch that:
* Added log4net dependency to physxplugin in prebuild.xml. * Added missing m_log fields to classes. * Replaced Console.WriteLine with appropriate m_log.Xxxx * Tested that nant test target runs succesfully. * Tested that local opensim sandbox starts up without errors.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs21
1 files changed, 12 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index 72575e5..72dc70f 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -35,6 +35,8 @@ using OpenMetaverse.Imaging;
35using System.Drawing; 35using System.Drawing;
36using System.Drawing.Imaging; 36using System.Drawing.Imaging;
37using PrimMesher; 37using PrimMesher;
38using log4net;
39using System.Reflection;
38 40
39namespace OpenSim.Region.Physics.Meshing 41namespace OpenSim.Region.Physics.Meshing
40{ 42{
@@ -57,6 +59,7 @@ namespace OpenSim.Region.Physics.Meshing
57 59
58 public class Meshmerizer : IMesher 60 public class Meshmerizer : IMesher
59 { 61 {
62 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
60 //private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 63 //private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
61 64
62 // Setting baseDir to a path will enable the dumping of raw files 65 // Setting baseDir to a path will enable the dumping of raw files
@@ -155,9 +158,9 @@ namespace OpenSim.Region.Physics.Meshing
155 158
156 private void ReportPrimError(string message, string primName, PrimMesh primMesh) 159 private void ReportPrimError(string message, string primName, PrimMesh primMesh)
157 { 160 {
158 Console.WriteLine(message); 161 m_log.Error(message);
159 Console.WriteLine("\nPrim Name: " + primName); 162 m_log.Error("\nPrim Name: " + primName);
160 Console.WriteLine("****** PrimMesh Parameters ******\n" + primMesh.ParamsToDisplayString()); 163 m_log.Error("****** PrimMesh Parameters ******\n" + primMesh.ParamsToDisplayString());
161 164
162 } 165 }
163 166
@@ -185,17 +188,17 @@ namespace OpenSim.Region.Physics.Meshing
185 } 188 }
186 catch (DllNotFoundException) 189 catch (DllNotFoundException)
187 { 190 {
188 System.Console.WriteLine("[PHYSICS]: OpenJpeg is not installed correctly on this system. Physics Proxy generation failed. Often times this is because of an old version of GLIBC. You must have version 2.4 or above!"); 191 m_log.Error("[PHYSICS]: OpenJpeg is not installed correctly on this system. Physics Proxy generation failed. Often times this is because of an old version of GLIBC. You must have version 2.4 or above!");
189 return null; 192 return null;
190 } 193 }
191 catch (IndexOutOfRangeException) 194 catch (IndexOutOfRangeException)
192 { 195 {
193 System.Console.WriteLine("[PHYSICS]: OpenJpeg was unable to decode this. Physics Proxy generation failed"); 196 m_log.Error("[PHYSICS]: OpenJpeg was unable to decode this. Physics Proxy generation failed");
194 return null; 197 return null;
195 } 198 }
196 catch (Exception) 199 catch (Exception)
197 { 200 {
198 System.Console.WriteLine("[PHYSICS]: Unable to generate a Sculpty physics proxy. Sculpty texture decode failed!"); 201 m_log.Error("[PHYSICS]: Unable to generate a Sculpty physics proxy. Sculpty texture decode failed!");
199 return null; 202 return null;
200 } 203 }
201 204
@@ -285,7 +288,7 @@ namespace OpenSim.Region.Physics.Meshing
285 if (profileEnd > 1.0f) profileEnd = 1.0f; 288 if (profileEnd > 1.0f) profileEnd = 1.0f;
286 } 289 }
287#if SPAM 290#if SPAM
288 Console.WriteLine("****** PrimMesh Parameters (Linear) ******\n" + primMesh.ParamsToDisplayString()); 291 m_log.Debug("****** PrimMesh Parameters (Linear) ******\n" + primMesh.ParamsToDisplayString());
289#endif 292#endif
290 try 293 try
291 { 294 {
@@ -316,7 +319,7 @@ namespace OpenSim.Region.Physics.Meshing
316 if (profileEnd > 1.0f) profileEnd = 1.0f; 319 if (profileEnd > 1.0f) profileEnd = 1.0f;
317 } 320 }
318#if SPAM 321#if SPAM
319 Console.WriteLine("****** PrimMesh Parameters (Circular) ******\n" + primMesh.ParamsToDisplayString()); 322 m_log.Debug("****** PrimMesh Parameters (Circular) ******\n" + primMesh.ParamsToDisplayString());
320#endif 323#endif
321 try 324 try
322 { 325 {
@@ -378,7 +381,7 @@ namespace OpenSim.Region.Physics.Meshing
378 if ((!isPhysical) && size.X < minSizeForComplexMesh && size.Y < minSizeForComplexMesh && size.Z < minSizeForComplexMesh) 381 if ((!isPhysical) && size.X < minSizeForComplexMesh && size.Y < minSizeForComplexMesh && size.Z < minSizeForComplexMesh)
379 { 382 {
380#if SPAM 383#if SPAM
381 Console.WriteLine("Meshmerizer: prim " + primName + " has a size of " + size.ToString() + " which is below threshold of " + 384 m_log.Debug("Meshmerizer: prim " + primName + " has a size of " + size.ToString() + " which is below threshold of " +
382 385
383minSizeForComplexMesh.ToString() + " - creating simple bounding box" ); 386minSizeForComplexMesh.ToString() + " - creating simple bounding box" );
384#endif 387#endif