aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing
diff options
context:
space:
mode:
authorJeff Ames2008-02-05 19:44:27 +0000
committerJeff Ames2008-02-05 19:44:27 +0000
commit6ed5283bc06a62f38eb517e67b975832b603bf61 (patch)
treee5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/Region/Physics/Meshing
parentCut down on the number of packets sent during terraforming. Terraforming shou... (diff)
downloadopensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.zip
opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz
opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2
opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.xz
Converted logging to use log4net.
Changed LogBase to ConsoleBase, which handles console I/O. This is mostly an in-place conversion, so lots of refactoring can still be done.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs6
-rw-r--r--OpenSim/Region/Physics/Meshing/SimpleHull.cs18
2 files changed, 13 insertions, 11 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index 3217dd8..d4c9926 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -53,6 +53,8 @@ namespace OpenSim.Region.Physics.Meshing
53 53
54 public class Meshmerizer : IMesher 54 public class Meshmerizer : IMesher
55 { 55 {
56 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
57
56 // 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
57 // 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
58 // const string baseDir = "rawFiles"; 60 // const string baseDir = "rawFiles";
@@ -101,7 +103,6 @@ namespace OpenSim.Region.Physics.Meshing
101 return influenced; 103 return influenced;
102 } 104 }
103 105
104
105 private static void InsertVertices(List<Vertex> vertices, int usedForSeed, List<Triangle> triangles) 106 private static void InsertVertices(List<Vertex> vertices, int usedForSeed, List<Triangle> triangles)
106 { 107 {
107 // This is a variant of the delaunay algorithm 108 // This is a variant of the delaunay algorithm
@@ -174,7 +175,6 @@ namespace OpenSim.Region.Physics.Meshing
174 } 175 }
175 } 176 }
176 177
177
178 private static Mesh CreateBoxMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size) 178 private static Mesh CreateBoxMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size)
179 // Builds the z (+ and -) surfaces of a box shaped prim 179 // Builds the z (+ and -) surfaces of a box shaped prim
180 { 180 {
@@ -236,7 +236,7 @@ namespace OpenSim.Region.Physics.Meshing
236 // Calculated separately to avoid errors 236 // Calculated separately to avoid errors
237 cutHull.AddVertex(legEnd); 237 cutHull.AddVertex(legEnd);
238 238
239 MainLog.Instance.Debug("Starting cutting of the hollow shape from the prim {1}", 0, primName); 239 m_log.Debug(String.Format("Starting cutting of the hollow shape from the prim {1}", 0, primName));
240 SimpleHull cuttedHull = SimpleHull.SubtractHull(outerHull, cutHull); 240 SimpleHull cuttedHull = SimpleHull.SubtractHull(outerHull, cutHull);
241 241
242 outerHull = cuttedHull; 242 outerHull = cuttedHull;
diff --git a/OpenSim/Region/Physics/Meshing/SimpleHull.cs b/OpenSim/Region/Physics/Meshing/SimpleHull.cs
index 4532bda..9209860 100644
--- a/OpenSim/Region/Physics/Meshing/SimpleHull.cs
+++ b/OpenSim/Region/Physics/Meshing/SimpleHull.cs
@@ -42,6 +42,8 @@ namespace OpenSim.Region.Physics.Meshing
42 // is defined by the hull lies inside or outside the simplex chain 42 // is defined by the hull lies inside or outside the simplex chain
43 public class SimpleHull 43 public class SimpleHull
44 { 44 {
45 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
46
45 private List<Vertex> vertices = new List<Vertex>(); 47 private List<Vertex> vertices = new List<Vertex>();
46 private List<Vertex> holeVertices = new List<Vertex>(); // Only used, when the hull is hollow 48 private List<Vertex> holeVertices = new List<Vertex>(); // Only used, when the hull is hollow
47 49
@@ -243,9 +245,9 @@ namespace OpenSim.Region.Physics.Meshing
243 SimpleHull otherHullClone = otherHull.Clone(); 245 SimpleHull otherHullClone = otherHull.Clone();
244 bool intersects = false; 246 bool intersects = false;
245 247
246 MainLog.Instance.Debug("State before intersection detection"); 248 m_log.Debug("State before intersection detection");
247 MainLog.Instance.Debug("The baseHull is:\n{1}", 0, baseHullClone.ToString()); 249 m_log.Debug(String.Format("The baseHull is:\n{1}", 0, baseHullClone.ToString()));
248 MainLog.Instance.Debug("The otherHull is:\n{1}", 0, otherHullClone.ToString()); 250 m_log.Debug(String.Format("The otherHull is:\n{1}", 0, otherHullClone.ToString()));
249 251
250 { 252 {
251 int iBase, iOther; 253 int iBase, iOther;
@@ -274,8 +276,8 @@ namespace OpenSim.Region.Physics.Meshing
274 } 276 }
275 } 277 }
276 278
277 MainLog.Instance.Debug("State after intersection detection for the base hull"); 279 m_log.Debug("State after intersection detection for the base hull");
278 MainLog.Instance.Debug("The baseHull is:\n{1}", 0, baseHullClone.ToString()); 280 m_log.Debug(String.Format("The baseHull is:\n{1}", 0, baseHullClone.ToString()));
279 281
280 { 282 {
281 int iOther, iBase; 283 int iOther, iBase;
@@ -303,8 +305,8 @@ namespace OpenSim.Region.Physics.Meshing
303 } 305 }
304 } 306 }
305 307
306 MainLog.Instance.Debug("State after intersection detection for the base hull"); 308 m_log.Debug("State after intersection detection for the base hull");
307 MainLog.Instance.Debug("The otherHull is:\n{1}", 0, otherHullClone.ToString()); 309 m_log.Debug(String.Format("The otherHull is:\n{1}", 0, otherHullClone.ToString()));
308 310
309 311
310 bool otherIsInBase = baseHullClone.containsPointsFrom(otherHullClone); 312 bool otherIsInBase = baseHullClone.containsPointsFrom(otherHullClone);
@@ -387,7 +389,7 @@ namespace OpenSim.Region.Physics.Meshing
387 done = true; 389 done = true;
388 } 390 }
389 391
390 MainLog.Instance.Debug("The resulting Hull is:\n{1}", 0, result.ToString()); 392 m_log.Debug(String.Format("The resulting Hull is:\n{1}", 0, result.ToString()));
391 393
392 return result; 394 return result;
393 } 395 }