aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDahlia Trimble2009-07-14 06:09:18 +0000
committerDahlia Trimble2009-07-14 06:09:18 +0000
commit73251ed3469e0e0b095c936549c3d557d23af135 (patch)
treea29bc39b439bf3981c3e1defa6eaec085a42fa54
parentA commit to retrigger panda (diff)
downloadopensim-SC_OLD-73251ed3469e0e0b095c936549c3d557d23af135.zip
opensim-SC_OLD-73251ed3469e0e0b095c936549c3d557d23af135.tar.gz
opensim-SC_OLD-73251ed3469e0e0b095c936549c3d557d23af135.tar.bz2
opensim-SC_OLD-73251ed3469e0e0b095c936549c3d557d23af135.tar.xz
add a constructor overload and an AddPos method to SculptMesh
-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;