aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing/SculptMesh.cs
diff options
context:
space:
mode:
authorDahlia Trimble2009-03-26 18:12:10 +0000
committerDahlia Trimble2009-03-26 18:12:10 +0000
commitad012d4b46413bcd550f6bc5d300db3ae3cb7a2e (patch)
treeca7f0922f5e0925e1a4168a7e250d41f8e67db88 /OpenSim/Region/Physics/Meshing/SculptMesh.cs
parent* Ooops, wasn't that - it was the lack of a Types reference isntead (diff)
downloadopensim-SC-ad012d4b46413bcd550f6bc5d300db3ae3cb7a2e.zip
opensim-SC-ad012d4b46413bcd550f6bc5d300db3ae3cb7a2e.tar.gz
opensim-SC-ad012d4b46413bcd550f6bc5d300db3ae3cb7a2e.tar.bz2
opensim-SC-ad012d4b46413bcd550f6bc5d300db3ae3cb7a2e.tar.xz
add x-axis mirror capability to sculpted prim mesh - addresses Mantis #3342
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/Meshing/SculptMesh.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
index 534dd4d..0e39d73 100644
--- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs
+++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
@@ -216,6 +216,16 @@ namespace PrimMesher
216 216
217 public SculptMesh(Bitmap sculptBitmap, SculptType sculptType, int lod, bool viewerMode) 217 public SculptMesh(Bitmap sculptBitmap, SculptType sculptType, int lod, bool viewerMode)
218 { 218 {
219 _SculptMesh(sculptBitmap, sculptType, lod, viewerMode, false, false);
220 }
221
222 public SculptMesh(Bitmap sculptBitmap, SculptType sculptType, int lod, bool viewerMode, bool mirror, bool invert)
223 {
224 _SculptMesh(sculptBitmap, sculptType, lod, viewerMode, mirror, invert);
225 }
226
227 void _SculptMesh(Bitmap sculptBitmap, SculptType sculptType, int lod, bool viewerMode, bool mirror, bool invert)
228 {
219 coords = new List<Coord>(); 229 coords = new List<Coord>();
220 faces = new List<Face>(); 230 faces = new List<Face>();
221 normals = new List<Coord>(); 231 normals = new List<Coord>();
@@ -310,6 +320,7 @@ namespace PrimMesher
310 color = bitmap.GetPixel(imageX == width ? 0 : imageX, imageY == height ? height - 1 : imageY); 320 color = bitmap.GetPixel(imageX == width ? 0 : imageX, imageY == height ? height - 1 : imageY);
311 321
312 x = (color.R - 128) * pixScale; 322 x = (color.R - 128) * pixScale;
323 if (mirror) x = -x;
313 y = (color.G - 128) * pixScale; 324 y = (color.G - 128) * pixScale;
314 z = (color.B - 128) * pixScale; 325 z = (color.B - 128) * pixScale;
315 326