aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing
diff options
context:
space:
mode:
authorDr Scofield2009-05-22 14:57:00 +0000
committerDr Scofield2009-05-22 14:57:00 +0000
commit1d02636c27de64f8acec5bb9a76f8659f0bfdd2b (patch)
treea54b14f51877472031e92beee26f1cf72e4f2b4c /OpenSim/Region/Physics/Meshing
parentconverting Chat module and Concierge module to new style region modules (diff)
downloadopensim-SC_OLD-1d02636c27de64f8acec5bb9a76f8659f0bfdd2b.zip
opensim-SC_OLD-1d02636c27de64f8acec5bb9a76f8659f0bfdd2b.tar.gz
opensim-SC_OLD-1d02636c27de64f8acec5bb9a76f8659f0bfdd2b.tar.bz2
opensim-SC_OLD-1d02636c27de64f8acec5bb9a76f8659f0bfdd2b.tar.xz
cleaning out warnings.
NOTE: we currently have a gazillion warnings caused stuff flagged as "obsolete" (OGS1 stuff) --- what's up with that?
Diffstat (limited to 'OpenSim/Region/Physics/Meshing')
-rw-r--r--OpenSim/Region/Physics/Meshing/SculptMesh.cs74
1 files changed, 37 insertions, 37 deletions
diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
index 77e4459..946b7c6 100644
--- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs
+++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
@@ -46,42 +46,42 @@ namespace PrimMesher
46 46
47 public enum SculptType { sphere = 1, torus = 2, plane = 3, cylinder = 4 }; 47 public enum SculptType { sphere = 1, torus = 2, plane = 3, cylinder = 4 };
48 48
49 private Bitmap ScaleImage(Bitmap srcImage, float scale) 49 // private Bitmap ScaleImage(Bitmap srcImage, float scale)
50 { 50 // {
51 int sourceWidth = srcImage.Width; 51 // int sourceWidth = srcImage.Width;
52 int sourceHeight = srcImage.Height; 52 // int sourceHeight = srcImage.Height;
53 int sourceX = 0; 53 // int sourceX = 0;
54 int sourceY = 0; 54 // int sourceY = 0;
55 55
56 int destX = 0; 56 // int destX = 0;
57 int destY = 0; 57 // int destY = 0;
58 int destWidth = (int)(srcImage.Width * scale); 58 // int destWidth = (int)(srcImage.Width * scale);
59 int destHeight = (int)(srcImage.Height * scale); 59 // int destHeight = (int)(srcImage.Height * scale);
60 60
61 if (srcImage.PixelFormat == PixelFormat.Format32bppArgb) 61 // if (srcImage.PixelFormat == PixelFormat.Format32bppArgb)
62 for (int y = 0; y < srcImage.Height; y++) 62 // for (int y = 0; y < srcImage.Height; y++)
63 for (int x = 0; x < srcImage.Width; x++) 63 // for (int x = 0; x < srcImage.Width; x++)
64 { 64 // {
65 Color c = srcImage.GetPixel(x, y); 65 // Color c = srcImage.GetPixel(x, y);
66 srcImage.SetPixel(x, y, Color.FromArgb(255, c.R, c.G, c.B)); 66 // srcImage.SetPixel(x, y, Color.FromArgb(255, c.R, c.G, c.B));
67 } 67 // }
68 68
69 Bitmap scaledImage = new Bitmap(destWidth, destHeight, 69 // Bitmap scaledImage = new Bitmap(destWidth, destHeight,
70 PixelFormat.Format24bppRgb); 70 // PixelFormat.Format24bppRgb);
71 71
72 scaledImage.SetResolution(96.0f, 96.0f); 72 // scaledImage.SetResolution(96.0f, 96.0f);
73 73
74 Graphics grPhoto = Graphics.FromImage(scaledImage); 74 // Graphics grPhoto = Graphics.FromImage(scaledImage);
75 grPhoto.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.Low; 75 // grPhoto.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.Low;
76 76
77 grPhoto.DrawImage(srcImage, 77 // grPhoto.DrawImage(srcImage,
78 new Rectangle(destX, destY, destWidth, destHeight), 78 // new Rectangle(destX, destY, destWidth, destHeight),
79 new Rectangle(sourceX, sourceY, sourceWidth, sourceHeight), 79 // new Rectangle(sourceX, sourceY, sourceWidth, sourceHeight),
80 GraphicsUnit.Pixel); 80 // GraphicsUnit.Pixel);
81 81
82 grPhoto.Dispose(); 82 // grPhoto.Dispose();
83 return scaledImage; 83 // return scaledImage;
84 } 84 // }
85 85
86 public SculptMesh SculptMeshFromFile(string fileName, SculptType sculptType, int lod, bool viewerMode) 86 public SculptMesh SculptMeshFromFile(string fileName, SculptType sculptType, int lod, bool viewerMode)
87 { 87 {
@@ -283,7 +283,7 @@ namespace PrimMesher
283 viewerFaces = new List<ViewerFace>(); 283 viewerFaces = new List<ViewerFace>();
284 284
285 int width = sculptBitmap.Width / scale; 285 int width = sculptBitmap.Width / scale;
286 int height = sculptBitmap.Height / scale; 286 // int height = sculptBitmap.Height / scale;
287 287
288 int p1, p2, p3, p4; 288 int p1, p2, p3, p4;
289 289