diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Meshing/SculptMesh.cs | 11 |
2 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 306eab4..8c9836e 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -202,7 +202,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
202 | return null; | 202 | return null; |
203 | } | 203 | } |
204 | 204 | ||
205 | |||
206 | PrimMesher.SculptMesh.SculptType sculptType; | 205 | PrimMesher.SculptMesh.SculptType sculptType; |
207 | switch ((OpenMetaverse.SculptType)primShape.SculptType) | 206 | switch ((OpenMetaverse.SculptType)primShape.SculptType) |
208 | { | 207 | { |
@@ -220,7 +219,11 @@ namespace OpenSim.Region.Physics.Meshing | |||
220 | sculptType = PrimMesher.SculptMesh.SculptType.sphere; | 219 | sculptType = PrimMesher.SculptMesh.SculptType.sphere; |
221 | break; | 220 | break; |
222 | } | 221 | } |
223 | sculptMesh = new PrimMesher.SculptMesh((Bitmap)idata, sculptType, (int)lod, false); | 222 | |
223 | bool mirror = ((primShape.SculptType & 128) != 0); | ||
224 | bool invert = ((primShape.SculptType & 64) != 0); | ||
225 | |||
226 | sculptMesh = new PrimMesher.SculptMesh((Bitmap)idata, sculptType, (int)lod, false, mirror, invert); | ||
224 | 227 | ||
225 | idata.Dispose(); | 228 | idata.Dispose(); |
226 | 229 | ||
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 | ||