mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 20:55:43 +08:00
add x-axis mirror capability to sculpted prim mesh - addresses Mantis #3342
This commit is contained in:
@@ -215,6 +215,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<Coord>();
|
||||
faces = new List<Face>();
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user