mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
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.
This commit is contained in:
@@ -35,6 +35,8 @@ using OpenMetaverse.Imaging;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using PrimMesher;
|
||||
using log4net;
|
||||
using System.Reflection;
|
||||
|
||||
namespace OpenSim.Region.Physics.Meshing
|
||||
{
|
||||
@@ -57,6 +59,7 @@ namespace OpenSim.Region.Physics.Meshing
|
||||
|
||||
public class Meshmerizer : IMesher
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
//private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
// Setting baseDir to a path will enable the dumping of raw files
|
||||
@@ -155,9 +158,9 @@ namespace OpenSim.Region.Physics.Meshing
|
||||
|
||||
private void ReportPrimError(string message, string primName, PrimMesh primMesh)
|
||||
{
|
||||
Console.WriteLine(message);
|
||||
Console.WriteLine("\nPrim Name: " + primName);
|
||||
Console.WriteLine("****** PrimMesh Parameters ******\n" + primMesh.ParamsToDisplayString());
|
||||
m_log.Error(message);
|
||||
m_log.Error("\nPrim Name: " + primName);
|
||||
m_log.Error("****** PrimMesh Parameters ******\n" + primMesh.ParamsToDisplayString());
|
||||
|
||||
}
|
||||
|
||||
@@ -185,17 +188,17 @@ namespace OpenSim.Region.Physics.Meshing
|
||||
}
|
||||
catch (DllNotFoundException)
|
||||
{
|
||||
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!");
|
||||
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!");
|
||||
return null;
|
||||
}
|
||||
catch (IndexOutOfRangeException)
|
||||
{
|
||||
System.Console.WriteLine("[PHYSICS]: OpenJpeg was unable to decode this. Physics Proxy generation failed");
|
||||
m_log.Error("[PHYSICS]: OpenJpeg was unable to decode this. Physics Proxy generation failed");
|
||||
return null;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
System.Console.WriteLine("[PHYSICS]: Unable to generate a Sculpty physics proxy. Sculpty texture decode failed!");
|
||||
m_log.Error("[PHYSICS]: Unable to generate a Sculpty physics proxy. Sculpty texture decode failed!");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -285,7 +288,7 @@ namespace OpenSim.Region.Physics.Meshing
|
||||
if (profileEnd > 1.0f) profileEnd = 1.0f;
|
||||
}
|
||||
#if SPAM
|
||||
Console.WriteLine("****** PrimMesh Parameters (Linear) ******\n" + primMesh.ParamsToDisplayString());
|
||||
m_log.Debug("****** PrimMesh Parameters (Linear) ******\n" + primMesh.ParamsToDisplayString());
|
||||
#endif
|
||||
try
|
||||
{
|
||||
@@ -316,7 +319,7 @@ namespace OpenSim.Region.Physics.Meshing
|
||||
if (profileEnd > 1.0f) profileEnd = 1.0f;
|
||||
}
|
||||
#if SPAM
|
||||
Console.WriteLine("****** PrimMesh Parameters (Circular) ******\n" + primMesh.ParamsToDisplayString());
|
||||
m_log.Debug("****** PrimMesh Parameters (Circular) ******\n" + primMesh.ParamsToDisplayString());
|
||||
#endif
|
||||
try
|
||||
{
|
||||
@@ -378,7 +381,7 @@ namespace OpenSim.Region.Physics.Meshing
|
||||
if ((!isPhysical) && size.X < minSizeForComplexMesh && size.Y < minSizeForComplexMesh && size.Z < minSizeForComplexMesh)
|
||||
{
|
||||
#if SPAM
|
||||
Console.WriteLine("Meshmerizer: prim " + primName + " has a size of " + size.ToString() + " which is below threshold of " +
|
||||
m_log.Debug("Meshmerizer: prim " + primName + " has a size of " + size.ToString() + " which is below threshold of " +
|
||||
|
||||
minSizeForComplexMesh.ToString() + " - creating simple bounding box" );
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using log4net;
|
||||
using System.Reflection;
|
||||
|
||||
namespace PrimMesher
|
||||
{
|
||||
@@ -576,6 +578,7 @@ 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 List<Coord> coords;
|
||||
@@ -643,8 +646,8 @@ namespace PrimMesher
|
||||
try { angles.makeAngles(sides, startAngle, stopAngle); }
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("makeAngles failed: Exception: " + ex.ToString());
|
||||
Console.WriteLine("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString());
|
||||
m_log.Error("makeAngles failed: Exception: " + ex.ToString());
|
||||
m_log.Error("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -663,8 +666,8 @@ namespace PrimMesher
|
||||
try { hollowAngles.makeAngles(hollowSides, startAngle, stopAngle); }
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("makeAngles failed: Exception: " + ex.ToString());
|
||||
Console.WriteLine("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString());
|
||||
m_log.Error("makeAngles failed: Exception: " + ex.ToString());
|
||||
m_log.Error("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user