remove log4net dependency and from PrimMesher.cs

sync PrimMesher.cs with PrimMesher.dll version 29 on forge
GenericGridServerConcept
Dahlia Trimble 2009-02-24 06:02:44 +00:00
parent c31e2d5987
commit 8afad46d10
2 changed files with 18 additions and 7 deletions

View File

@ -269,6 +269,10 @@ namespace OpenSim.Region.Physics.Meshing
primMesh = new PrimMesh(sides, profileBegin, profileEnd, profileHollow, hollowSides);
if (primMesh.errorMessage != null)
if (primMesh.errorMessage.Length > 0)
m_log.Error("[ERROR] " + primMesh.errorMessage);
primMesh.topShearX = pathShearX;
primMesh.topShearY = pathShearY;
primMesh.pathCutBegin = pathBegin;

View File

@ -29,8 +29,6 @@ using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using log4net;
using System.Reflection;
namespace PrimMesher
{
@ -578,9 +576,10 @@ namespace PrimMesher
/// </summary>
internal class Profile
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private const float twoPi = 2.0f * (float)Math.PI;
internal string errorMessage = null;
internal List<Coord> coords;
internal List<Face> faces;
internal List<Coord> vertexNormals;
@ -646,8 +645,10 @@ namespace PrimMesher
try { angles.makeAngles(sides, startAngle, stopAngle); }
catch (Exception ex)
{
m_log.Error("makeAngles failed: Exception: " + ex.ToString());
m_log.Error("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString());
errorMessage = "makeAngles failed: Exception: " + ex.ToString()
+ "\nsides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString();
return;
}
@ -666,8 +667,9 @@ namespace PrimMesher
try { hollowAngles.makeAngles(hollowSides, startAngle, stopAngle); }
catch (Exception ex)
{
m_log.Error("makeAngles failed: Exception: " + ex.ToString());
m_log.Error("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString());
errorMessage = "makeAngles failed: Exception: " + ex.ToString()
+ "\nsides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString();
return;
}
}
@ -1127,6 +1129,7 @@ namespace PrimMesher
public class PrimMesh
{
public string errorMessage = "";
private const float twoPi = 2.0f * (float)Math.PI;
public List<Coord> coords;
@ -1314,6 +1317,8 @@ namespace PrimMesher
hollow *= 1.414f;
Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides, true, calcVertexNormals);
this.errorMessage = profile.errorMessage;
this.numPrimFaces = profile.numPrimFaces;
int cut1Vert = -1;
@ -1694,6 +1699,8 @@ namespace PrimMesher
needEndFaces = true;
Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides, needEndFaces, calcVertexNormals);
this.errorMessage = profile.errorMessage;
this.numPrimFaces = profile.numPrimFaces;
int cut1Vert = -1;