aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing/SculptMesh.cs
diff options
context:
space:
mode:
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