From 7d55dfba8addd5c580e6c7bcf4449315428b84ed Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Fri, 27 Jun 2008 17:25:03 +0000 Subject: dr scofield's warnings safari: * commenting out unused variables --- OpenSim/Region/Physics/Meshing/Extruder.cs | 12 ++-- OpenSim/Region/Physics/Meshing/HelperTypes.cs | 3 + OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 98 +++++++++++++-------------- OpenSim/Region/Physics/Meshing/SculptMesh.cs | 2 +- 4 files changed, 59 insertions(+), 56 deletions(-) (limited to 'OpenSim/Region/Physics/Meshing') diff --git a/OpenSim/Region/Physics/Meshing/Extruder.cs b/OpenSim/Region/Physics/Meshing/Extruder.cs index baa2d9b..ac8d81c 100644 --- a/OpenSim/Region/Physics/Meshing/Extruder.cs +++ b/OpenSim/Region/Physics/Meshing/Extruder.cs @@ -259,8 +259,8 @@ namespace OpenSim.Region.Physics.Meshing { Mesh result = new Mesh(); - Quaternion tt = new Quaternion(); - Vertex v2 = new Vertex(0, 0, 0); + // Quaternion tt = new Quaternion(); + // Vertex v2 = new Vertex(0, 0, 0); Mesh newLayer; Mesh lastLayer = null; @@ -441,8 +441,8 @@ namespace OpenSim.Region.Physics.Meshing { Mesh result = new Mesh(); - Quaternion tt = new Quaternion(); - Vertex v2 = new Vertex(0, 0, 0); + // Quaternion tt = new Quaternion(); + // Vertex v2 = new Vertex(0, 0, 0); Mesh newLayer; Mesh lastLayer = null; @@ -457,8 +457,8 @@ namespace OpenSim.Region.Physics.Meshing if (System.Math.Abs(twistTotal) > (float)System.Math.PI * 1.5f) steps *= 2; if (System.Math.Abs(twistTotal) > (float)System.Math.PI * 3.0f) steps *= 2; - double percentOfPathMultiplier = 1.0 / steps; - double angleStepMultiplier = System.Math.PI * 2.0 / steps; + // double percentOfPathMultiplier = 1.0 / steps; + // double angleStepMultiplier = System.Math.PI * 2.0 / steps; float yPathScale = pathScaleY * 0.5f; float pathLength = pathCutEnd - pathCutBegin; diff --git a/OpenSim/Region/Physics/Meshing/HelperTypes.cs b/OpenSim/Region/Physics/Meshing/HelperTypes.cs index f031fb6..aed6c45 100644 --- a/OpenSim/Region/Physics/Meshing/HelperTypes.cs +++ b/OpenSim/Region/Physics/Meshing/HelperTypes.cs @@ -221,6 +221,7 @@ public class Vertex : PhysicsVector, IComparable v1.Z += am; return v1; } + public static Vertex operator -(Vertex v1, float am) { v1.X -= am; @@ -228,6 +229,7 @@ public class Vertex : PhysicsVector, IComparable v1.Z -= am; return v1; } + public static Vertex operator *(Vertex v1, float am) { v1.X *= am; @@ -235,6 +237,7 @@ public class Vertex : PhysicsVector, IComparable v1.Z *= am; return v1; } + public static Vertex operator /(Vertex v1, float am) { if (am == 0f) diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 5a04a8e..879129a 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -432,8 +432,8 @@ namespace OpenSim.Region.Physics.Meshing UInt16 taperY = primShape.PathScaleY; UInt16 pathShearX = primShape.PathShearX; UInt16 pathShearY = primShape.PathShearY; - Int16 twistTop = primShape.PathTwistBegin; - Int16 twistBot = primShape.PathTwist; + // Int16 twistTop = primShape.PathTwistBegin; + // Int16 twistBot = primShape.PathTwist; #if SPAM reportPrimParams("[BOX] " + primName, primShape); @@ -690,8 +690,8 @@ namespace OpenSim.Region.Physics.Meshing UInt16 taperY = primShape.PathScaleY; UInt16 pathShearX = primShape.PathShearX; UInt16 pathShearY = primShape.PathShearY; - Int16 twistBot = primShape.PathTwist; - Int16 twistTop = primShape.PathTwistBegin; + // Int16 twistBot = primShape.PathTwist; + // Int16 twistTop = primShape.PathTwistBegin; #if SPAM reportPrimParams("[CYLINDER] " + primName, primShape); @@ -1043,8 +1043,8 @@ namespace OpenSim.Region.Physics.Meshing UInt16 pathShearX = primShape.PathShearX; UInt16 pathShearY = primShape.PathShearY; - Int16 twistTop = primShape.PathTwistBegin; - Int16 twistBot = primShape.PathTwist; + // Int16 twistTop = primShape.PathTwistBegin; + // Int16 twistBot = primShape.PathTwist; #if SPAM reportPrimParams("[PRISM] " + primName, primShape); @@ -1295,13 +1295,13 @@ namespace OpenSim.Region.Physics.Meshing // Still have more to do here. - UInt16 hollowFactor = primShape.ProfileHollow; - UInt16 profileBegin = primShape.ProfileBegin; - UInt16 profileEnd = primShape.ProfileEnd; - UInt16 taperX = primShape.PathScaleX; - UInt16 taperY = primShape.PathScaleY; - UInt16 pathShearX = primShape.PathShearX; - UInt16 pathShearY = primShape.PathShearY; + // UInt16 hollowFactor = primShape.ProfileHollow; + // UInt16 profileBegin = primShape.ProfileBegin; + // UInt16 profileEnd = primShape.ProfileEnd; + // UInt16 taperX = primShape.PathScaleX; + // UInt16 taperY = primShape.PathScaleY; + // UInt16 pathShearX = primShape.PathShearX; + // UInt16 pathShearY = primShape.PathShearY; Mesh m = new Mesh(); #if SPAM @@ -1424,12 +1424,12 @@ namespace OpenSim.Region.Physics.Meshing UInt16 hollowFactor = primShape.ProfileHollow; UInt16 profileBegin = primShape.ProfileBegin; UInt16 profileEnd = primShape.ProfileEnd; - UInt16 taperX = primShape.PathScaleX; - UInt16 taperY = primShape.PathScaleY; + // UInt16 taperX = primShape.PathScaleX; + // UInt16 taperY = primShape.PathScaleY; UInt16 pathShearX = primShape.PathShearX; UInt16 pathShearY = primShape.PathShearY; - Int16 twistBot = primShape.PathTwist; - Int16 twistTop = primShape.PathTwistBegin; + // Int16 twistBot = primShape.PathTwist; + // Int16 twistTop = primShape.PathTwistBegin; HollowShape hollowShape = primShape.HollowShape; #if SPAM @@ -1706,7 +1706,7 @@ namespace OpenSim.Region.Physics.Meshing foreach (Triangle t in m.triangles) t.invertNormal(); - Vertex vTemp = new Vertex(0.0f, 0.0f, 0.0f); + // Vertex vTemp = new Vertex(0.0f, 0.0f, 0.0f); float skew = primShape.PathSkew * 0.01f; @@ -2038,36 +2038,36 @@ namespace OpenSim.Region.Physics.Meshing return mesh; } - private static void reportPrimParams(string name, PrimitiveBaseShape primShape) - { -#if SPAM - float pathShearX = primShape.PathShearX < 128 ? (float)primShape.PathShearX * 0.01f : (float)(primShape.PathShearX - 256) * 0.01f; - float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f; - - Console.WriteLine("********************* PrimitiveBaseShape Parameters *******************\n" - + "Name.............: " + name.ToString() + "\n" - + "HollowShape......: " + primShape.HollowShape.ToString() + "\n" - + "PathBegin........: " + primShape.PathBegin.ToString() + "\n" - + "PathCurve........: " + primShape.PathCurve.ToString() + "\n" - + "PathEnd..........: " + primShape.PathEnd.ToString() + "\n" - + "PathRadiusOffset.: " + primShape.PathRadiusOffset.ToString() + "\n" - + "PathRevolutions..: " + primShape.PathRevolutions.ToString() + "\n" - + "PathScaleX.......: " + primShape.PathScaleX.ToString() + "\n" - + "PathScaleY.......: " + primShape.PathScaleY.ToString() + "\n" - + "PathShearX.......: " + primShape.PathShearX.ToString() + " (" + pathShearX.ToString() + ")\n" - + "PathShearY.......: " + primShape.PathShearY.ToString() + " (" + pathShearY.ToString() + ")\n" - + "PathSkew.........: " + primShape.PathSkew.ToString() + "\n" - + "PathTaperX.......: " + primShape.PathTaperX.ToString() + "\n" - + "PathTaperY.......: " + primShape.PathTaperY.ToString() + "\n" - + "PathTwist........: " + primShape.PathTwist.ToString() + "\n" - + "PathTwistBegin...: " + primShape.PathTwistBegin.ToString() + "\n" - + "ProfileBegin.....: " + primShape.ProfileBegin.ToString() + "\n" - + "ProfileCurve.....: " + primShape.ProfileCurve.ToString() + "\n" - + "ProfileEnd.......: " + primShape.ProfileEnd.ToString() + "\n" - + "ProfileHollow....: " + primShape.ProfileHollow.ToString() + "\n" - + "ProfileShape.....: " + primShape.ProfileShape.ToString() + "\n" - ); -#endif - } +// private static void reportPrimParams(string name, PrimitiveBaseShape primShape) +// { +// #if SPAM +// float pathShearX = primShape.PathShearX < 128 ? (float)primShape.PathShearX * 0.01f : (float)(primShape.PathShearX - 256) * 0.01f; +// float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f; + +// Console.WriteLine("********************* PrimitiveBaseShape Parameters *******************\n" +// + "Name.............: " + name.ToString() + "\n" +// + "HollowShape......: " + primShape.HollowShape.ToString() + "\n" +// + "PathBegin........: " + primShape.PathBegin.ToString() + "\n" +// + "PathCurve........: " + primShape.PathCurve.ToString() + "\n" +// + "PathEnd..........: " + primShape.PathEnd.ToString() + "\n" +// + "PathRadiusOffset.: " + primShape.PathRadiusOffset.ToString() + "\n" +// + "PathRevolutions..: " + primShape.PathRevolutions.ToString() + "\n" +// + "PathScaleX.......: " + primShape.PathScaleX.ToString() + "\n" +// + "PathScaleY.......: " + primShape.PathScaleY.ToString() + "\n" +// + "PathShearX.......: " + primShape.PathShearX.ToString() + " (" + pathShearX.ToString() + ")\n" +// + "PathShearY.......: " + primShape.PathShearY.ToString() + " (" + pathShearY.ToString() + ")\n" +// + "PathSkew.........: " + primShape.PathSkew.ToString() + "\n" +// + "PathTaperX.......: " + primShape.PathTaperX.ToString() + "\n" +// + "PathTaperY.......: " + primShape.PathTaperY.ToString() + "\n" +// + "PathTwist........: " + primShape.PathTwist.ToString() + "\n" +// + "PathTwistBegin...: " + primShape.PathTwistBegin.ToString() + "\n" +// + "ProfileBegin.....: " + primShape.ProfileBegin.ToString() + "\n" +// + "ProfileCurve.....: " + primShape.ProfileCurve.ToString() + "\n" +// + "ProfileEnd.......: " + primShape.ProfileEnd.ToString() + "\n" +// + "ProfileHollow....: " + primShape.ProfileHollow.ToString() + "\n" +// + "ProfileShape.....: " + primShape.ProfileShape.ToString() + "\n" +// ); +// #endif +// } } } diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs index c9933fe..95a244d 100644 --- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs +++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs @@ -223,7 +223,7 @@ namespace OpenSim.Region.Physics.Meshing Vertex v1 = new Vertex(0,0,0); // Create a vertex position from the RGB channels in the current pixel - int ypos = y * bLOD.Width; + // int ypos = y * bLOD.Width; if (y == 0) -- cgit v1.1