From ad012d4b46413bcd550f6bc5d300db3ae3cb7a2e Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Thu, 26 Mar 2009 18:12:10 +0000 Subject: add x-axis mirror capability to sculpted prim mesh - addresses Mantis #3342 --- OpenSim/Region/Physics/Meshing/SculptMesh.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'OpenSim/Region/Physics/Meshing/SculptMesh.cs') 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 public SculptMesh(Bitmap sculptBitmap, SculptType sculptType, int lod, bool viewerMode) { + _SculptMesh(sculptBitmap, sculptType, lod, viewerMode, false, false); + } + + public SculptMesh(Bitmap sculptBitmap, SculptType sculptType, int lod, bool viewerMode, bool mirror, bool invert) + { + _SculptMesh(sculptBitmap, sculptType, lod, viewerMode, mirror, invert); + } + + void _SculptMesh(Bitmap sculptBitmap, SculptType sculptType, int lod, bool viewerMode, bool mirror, bool invert) + { coords = new List(); faces = new List(); normals = new List(); @@ -310,6 +320,7 @@ namespace PrimMesher color = bitmap.GetPixel(imageX == width ? 0 : imageX, imageY == height ? height - 1 : imageY); x = (color.R - 128) * pixScale; + if (mirror) x = -x; y = (color.G - 128) * pixScale; z = (color.B - 128) * pixScale; -- cgit v1.1