aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing/SculptMesh.cs
diff options
context:
space:
mode:
authorDahlia Trimble2009-05-08 03:04:45 +0000
committerDahlia Trimble2009-05-08 03:04:45 +0000
commitbd3a4e5f01cff3831817eb5dd4adf8ea1ed7fac0 (patch)
tree5e9ac07b13118999d1d88d20f9a1e06be4b6019f /OpenSim/Region/Physics/Meshing/SculptMesh.cs
parentfix svn properties (diff)
downloadopensim-SC_OLD-bd3a4e5f01cff3831817eb5dd4adf8ea1ed7fac0.zip
opensim-SC_OLD-bd3a4e5f01cff3831817eb5dd4adf8ea1ed7fac0.tar.gz
opensim-SC_OLD-bd3a4e5f01cff3831817eb5dd4adf8ea1ed7fac0.tar.bz2
opensim-SC_OLD-bd3a4e5f01cff3831817eb5dd4adf8ea1ed7fac0.tar.xz
Added a Copy() method to PrimMesh and SculptMesh as suggested by dmiles. Sync PrimMesher.cs and SculptMesh.cs with PrimMesher.dll r36.
Diffstat (limited to 'OpenSim/Region/Physics/Meshing/SculptMesh.cs')
-rw-r--r--OpenSim/Region/Physics/Meshing/SculptMesh.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
index 5b8a5be..77b1771 100644
--- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs
+++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
@@ -376,6 +376,24 @@ namespace PrimMesher
376 calcVertexNormals(sculptType, width, height); 376 calcVertexNormals(sculptType, width, height);
377 } 377 }
378 378
379 /// <summary>
380 /// Duplicates a SculptMesh object. All object properties are copied by value, including lists.
381 /// </summary>
382 /// <returns></returns>
383 public SculptMesh Copy()
384 {
385 return new SculptMesh(this);
386 }
387
388 public SculptMesh(SculptMesh sm)
389 {
390 coords = new List<Coord>(sm.coords);
391 faces = new List<Face>(sm.faces);
392 viewerFaces = new List<ViewerFace>(sm.viewerFaces);
393 normals = new List<Coord>(sm.normals);
394 uvs = new List<UVCoord>(sm.uvs);
395 }
396
379 private void calcVertexNormals(SculptType sculptType, int xSize, int ySize) 397 private void calcVertexNormals(SculptType sculptType, int xSize, int ySize)
380 { // compute vertex normals by summing all the surface normals of all the triangles sharing 398 { // compute vertex normals by summing all the surface normals of all the triangles sharing
381 // each vertex and then normalizing 399 // each vertex and then normalizing