diff options
author | Dahlia Trimble | 2009-02-24 06:02:44 +0000 |
---|---|---|
committer | Dahlia Trimble | 2009-02-24 06:02:44 +0000 |
commit | 8afad46d100131e98a4358da8b97da3b15359ce9 (patch) | |
tree | 1896388f5a777ea72bf269a2d007bcdd4cc10c7f /OpenSim/Region/Physics/Meshing/PrimMesher.cs | |
parent | Minor guard protecting against hackers like me who manipulate region UUIDs di... (diff) | |
download | opensim-SC-8afad46d100131e98a4358da8b97da3b15359ce9.zip opensim-SC-8afad46d100131e98a4358da8b97da3b15359ce9.tar.gz opensim-SC-8afad46d100131e98a4358da8b97da3b15359ce9.tar.bz2 opensim-SC-8afad46d100131e98a4358da8b97da3b15359ce9.tar.xz |
remove log4net dependency and from PrimMesher.cs
sync PrimMesher.cs with PrimMesher.dll version 29 on forge
Diffstat (limited to 'OpenSim/Region/Physics/Meshing/PrimMesher.cs')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/PrimMesher.cs | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs index 86c9c08..962041b 100644 --- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs +++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs | |||
@@ -29,8 +29,6 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Text; | 30 | using System.Text; |
31 | using System.IO; | 31 | using System.IO; |
32 | using log4net; | ||
33 | using System.Reflection; | ||
34 | 32 | ||
35 | namespace PrimMesher | 33 | namespace PrimMesher |
36 | { | 34 | { |
@@ -578,9 +576,10 @@ namespace PrimMesher | |||
578 | /// </summary> | 576 | /// </summary> |
579 | internal class Profile | 577 | internal class Profile |
580 | { | 578 | { |
581 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
582 | private const float twoPi = 2.0f * (float)Math.PI; | 579 | private const float twoPi = 2.0f * (float)Math.PI; |
583 | 580 | ||
581 | internal string errorMessage = null; | ||
582 | |||
584 | internal List<Coord> coords; | 583 | internal List<Coord> coords; |
585 | internal List<Face> faces; | 584 | internal List<Face> faces; |
586 | internal List<Coord> vertexNormals; | 585 | internal List<Coord> vertexNormals; |
@@ -646,8 +645,10 @@ namespace PrimMesher | |||
646 | try { angles.makeAngles(sides, startAngle, stopAngle); } | 645 | try { angles.makeAngles(sides, startAngle, stopAngle); } |
647 | catch (Exception ex) | 646 | catch (Exception ex) |
648 | { | 647 | { |
649 | m_log.Error("makeAngles failed: Exception: " + ex.ToString()); | 648 | |
650 | m_log.Error("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString()); | 649 | errorMessage = "makeAngles failed: Exception: " + ex.ToString() |
650 | + "\nsides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString(); | ||
651 | |||
651 | return; | 652 | return; |
652 | } | 653 | } |
653 | 654 | ||
@@ -666,8 +667,9 @@ namespace PrimMesher | |||
666 | try { hollowAngles.makeAngles(hollowSides, startAngle, stopAngle); } | 667 | try { hollowAngles.makeAngles(hollowSides, startAngle, stopAngle); } |
667 | catch (Exception ex) | 668 | catch (Exception ex) |
668 | { | 669 | { |
669 | m_log.Error("makeAngles failed: Exception: " + ex.ToString()); | 670 | errorMessage = "makeAngles failed: Exception: " + ex.ToString() |
670 | m_log.Error("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString()); | 671 | + "\nsides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString(); |
672 | |||
671 | return; | 673 | return; |
672 | } | 674 | } |
673 | } | 675 | } |
@@ -1127,6 +1129,7 @@ namespace PrimMesher | |||
1127 | 1129 | ||
1128 | public class PrimMesh | 1130 | public class PrimMesh |
1129 | { | 1131 | { |
1132 | public string errorMessage = ""; | ||
1130 | private const float twoPi = 2.0f * (float)Math.PI; | 1133 | private const float twoPi = 2.0f * (float)Math.PI; |
1131 | 1134 | ||
1132 | public List<Coord> coords; | 1135 | public List<Coord> coords; |
@@ -1314,6 +1317,8 @@ namespace PrimMesher | |||
1314 | hollow *= 1.414f; | 1317 | hollow *= 1.414f; |
1315 | 1318 | ||
1316 | Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides, true, calcVertexNormals); | 1319 | Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides, true, calcVertexNormals); |
1320 | this.errorMessage = profile.errorMessage; | ||
1321 | |||
1317 | this.numPrimFaces = profile.numPrimFaces; | 1322 | this.numPrimFaces = profile.numPrimFaces; |
1318 | 1323 | ||
1319 | int cut1Vert = -1; | 1324 | int cut1Vert = -1; |
@@ -1694,6 +1699,8 @@ namespace PrimMesher | |||
1694 | needEndFaces = true; | 1699 | needEndFaces = true; |
1695 | 1700 | ||
1696 | Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides, needEndFaces, calcVertexNormals); | 1701 | Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides, needEndFaces, calcVertexNormals); |
1702 | this.errorMessage = profile.errorMessage; | ||
1703 | |||
1697 | this.numPrimFaces = profile.numPrimFaces; | 1704 | this.numPrimFaces = profile.numPrimFaces; |
1698 | 1705 | ||
1699 | int cut1Vert = -1; | 1706 | int cut1Vert = -1; |