aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/Meshing/SculptMesh.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
index 51c8d42..bf42fee 100644
--- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs
+++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
@@ -91,6 +91,13 @@ namespace PrimMesher
91 return sculptMesh; 91 return sculptMesh;
92 } 92 }
93 93
94 public SculptMesh(string fileName, int sculptType, int lod, int viewerMode, int mirror, int invert)
95 {
96 Bitmap bitmap = (Bitmap)Bitmap.FromFile(fileName);
97 _SculptMesh(bitmap, (SculptType)sculptType, lod, viewerMode != 0, mirror != 0, invert != 0);
98 bitmap.Dispose();
99 }
100
94 /// <summary> 101 /// <summary>
95 /// ** Experimental ** May disappear from future versions ** not recommeneded for use in applications 102 /// ** Experimental ** May disappear from future versions ** not recommeneded for use in applications
96 /// Construct a sculpt mesh from a 2D array of floats 103 /// Construct a sculpt mesh from a 2D array of floats
@@ -467,6 +474,32 @@ namespace PrimMesher
467 } 474 }
468 } 475 }
469 476
477 /// <summary>
478 /// Adds a value to each XYZ vertex coordinate in the mesh
479 /// </summary>
480 /// <param name="x"></param>
481 /// <param name="y"></param>
482 /// <param name="z"></param>
483 public void AddPos(float x, float y, float z)
484 {
485 int i;
486 int numVerts = this.coords.Count;
487 Coord vert;
488
489 for (i = 0; i < numVerts; i++)
490 {
491 vert = this.coords[i];
492 vert.X += x;
493 vert.Y += y;
494 vert.Z += z;
495 this.coords[i] = vert;
496 }
497 }
498
499 /// <summary>
500 /// Rotates the mesh
501 /// </summary>
502 /// <param name="q"></param>
470 public void AddRot(Quat q) 503 public void AddRot(Quat q)
471 { 504 {
472 int i; 505 int i;